Files
NKC/NKC.Data/Migrations/NKCContextModelSnapshot.cs
2021-11-25 09:56:01 +01:00

175 lines
5.9 KiB
C#

// <auto-generated />
using System;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Metadata;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
using NKC.Data;
#nullable disable
namespace NKC.Data.Migrations
{
[DbContext(typeof(NKCContext))]
partial class NKCContextModelSnapshot : ModelSnapshot
{
protected override void BuildModel(ModelBuilder modelBuilder)
{
#pragma warning disable 612, 618
modelBuilder
.HasAnnotation("ProductVersion", "6.0.0")
.HasAnnotation("Relational:MaxIdentifierLength", 128);
SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder, 1L, 1);
modelBuilder.Entity("NKC.Data.DbModels.MaterialModel", b =>
{
b.Property<int>("MatID")
.ValueGeneratedOnAdd()
.HasColumnType("int");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("MatID"), 1L, 1);
b.Property<DateTime>("ApprovDate")
.ValueGeneratedOnAdd()
.HasColumnType("datetime")
.HasDefaultValueSql("(getdate())");
b.Property<string>("ApprovUser")
.IsRequired()
.ValueGeneratedOnAdd()
.HasMaxLength(50)
.HasColumnType("nvarchar(50)")
.HasDefaultValueSql("('')");
b.Property<decimal>("LMm")
.HasColumnType("decimal(18,3)")
.HasColumnName("L_mm");
b.Property<string>("MatDesc")
.IsRequired()
.ValueGeneratedOnAdd()
.HasMaxLength(500)
.HasColumnType("nvarchar(500)")
.HasDefaultValueSql("('')")
.HasComment("Description");
b.Property<int>("MatExtCode")
.HasColumnType("int");
b.Property<decimal>("TMm")
.HasColumnType("decimal(18,3)")
.HasColumnName("T_mm");
b.Property<decimal>("WMm")
.HasColumnType("decimal(18,3)")
.HasColumnName("W_mm");
b.HasKey("MatID");
b.HasIndex(new[] { "MatExtCode" }, "Idx_Materials_MatExtCode_Unique")
.IsUnique();
b.ToTable("Materials");
});
modelBuilder.Entity("NKC.Data.DbModels.MovMagModel", b =>
{
b.Property<int>("MovID")
.ValueGeneratedOnAdd()
.HasColumnType("int");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("MovID"), 1L, 1);
b.Property<DateTime>("DtRec")
.HasColumnType("datetime2");
b.Property<int>("QtyRec")
.HasColumnType("int");
b.Property<int>("RemnID")
.HasColumnType("int");
b.Property<string>("UserId")
.IsRequired()
.HasColumnType("nvarchar(max)");
b.HasKey("MovID");
b.HasIndex("RemnID");
b.ToTable("MovMag");
});
modelBuilder.Entity("NKC.Data.DbModels.RemnantsModel", b =>
{
b.Property<int>("RemnID")
.ValueGeneratedOnAdd()
.HasColumnType("int");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("RemnID"), 1L, 1);
b.Property<DateTime>("DtMod")
.HasColumnType("datetime2");
b.Property<decimal>("LMm")
.HasColumnType("decimal(18,3)");
b.Property<string>("Location")
.IsRequired()
.HasColumnType("nvarchar(max)");
b.Property<int>("MatID")
.HasColumnType("int");
b.Property<string>("Note")
.IsRequired()
.HasColumnType("nvarchar(max)");
b.Property<int>("QtyAvail")
.HasColumnType("int");
b.Property<decimal>("TMm")
.HasColumnType("decimal(18,3)");
b.Property<decimal>("WMm")
.HasColumnType("decimal(18,3)");
b.HasKey("RemnID");
b.HasIndex("MatID");
b.ToTable("RemnantsList");
});
modelBuilder.Entity("NKC.Data.DbModels.MovMagModel", b =>
{
b.HasOne("NKC.Data.DbModels.RemnantsModel", "RemnantNav")
.WithMany()
.HasForeignKey("RemnID")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("RemnantNav");
});
modelBuilder.Entity("NKC.Data.DbModels.RemnantsModel", b =>
{
b.HasOne("NKC.Data.DbModels.MaterialModel", "MaterialNav")
.WithMany("RemnantNav")
.HasForeignKey("MatID")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("MaterialNav");
});
modelBuilder.Entity("NKC.Data.DbModels.MaterialModel", b =>
{
b.Navigation("RemnantNav");
});
#pragma warning restore 612, 618
}
}
}