//
using System;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
using SteUp.Data.LocalDb;
#nullable disable
namespace SteUp.Data.Migrations
{
[DbContext(typeof(AppDbContext))]
partial class AppDbContextModelSnapshot : ModelSnapshot
{
protected override void BuildModel(ModelBuilder modelBuilder)
{
#pragma warning disable 612, 618
modelBuilder.HasAnnotation("ProductVersion", "10.0.3");
modelBuilder.Entity("SteUp.Shared.Core.Entities.Ispezione", b =>
{
b.Property("CodMdep")
.HasColumnType("TEXT");
b.Property("Data")
.HasColumnType("TEXT");
b.Property("Rilevatore")
.HasColumnType("TEXT");
b.Property("ActivityId")
.HasColumnType("TEXT");
b.Property("Stato")
.HasColumnType("INTEGER");
b.HasKey("CodMdep", "Data", "Rilevatore");
b.ToTable("Ispezioni");
});
modelBuilder.Entity("SteUp.Shared.Core.Entities.Scheda", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("INTEGER");
b.Property("ActivityId")
.HasColumnType("TEXT");
b.Property("ActivityTypeId")
.HasColumnType("TEXT");
b.Property("CodJfas")
.HasColumnType("TEXT");
b.Property("CodMdep")
.IsRequired()
.HasColumnType("TEXT");
b.Property("Data")
.HasColumnType("TEXT");
b.Property("DescrizioneReparto")
.HasColumnType("TEXT");
b.Property("ImageNames")
.HasColumnType("TEXT");
b.Property("Note")
.HasColumnType("TEXT");
b.Property("Responsabile")
.HasColumnType("TEXT");
b.Property("Rilevatore")
.IsRequired()
.HasColumnType("TEXT");
b.Property("Scadenza")
.HasColumnType("INTEGER");
b.HasKey("Id");
b.HasIndex("CodMdep", "Data", "Rilevatore");
b.ToTable("Schede");
});
modelBuilder.Entity("SteUp.Shared.Core.Entities.SchedaArticolo", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("INTEGER");
b.Property("Barcode")
.IsRequired()
.HasMaxLength(64)
.HasColumnType("TEXT");
b.Property("Descrizione")
.IsRequired()
.HasMaxLength(256)
.HasColumnType("TEXT");
b.Property("SchedaId")
.HasColumnType("INTEGER");
b.HasKey("Id");
b.HasIndex("SchedaId", "Barcode")
.IsUnique();
b.ToTable("SchedaArticoli");
});
modelBuilder.Entity("SteUp.Shared.Core.Entities.Scheda", b =>
{
b.HasOne("SteUp.Shared.Core.Entities.Ispezione", "Ispezione")
.WithMany("Schede")
.HasForeignKey("CodMdep", "Data", "Rilevatore")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("Ispezione");
});
modelBuilder.Entity("SteUp.Shared.Core.Entities.SchedaArticolo", b =>
{
b.HasOne("SteUp.Shared.Core.Entities.Scheda", "Scheda")
.WithMany("Articoli")
.HasForeignKey("SchedaId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("Scheda");
});
modelBuilder.Entity("SteUp.Shared.Core.Entities.Ispezione", b =>
{
b.Navigation("Schede");
});
modelBuilder.Entity("SteUp.Shared.Core.Entities.Scheda", b =>
{
b.Navigation("Articoli");
});
#pragma warning restore 612, 618
}
}
}