//
using System;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Migrations;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
using UniformMaterialManagementSystem.Data;
#nullable disable
namespace UniformMaterialManagementSystem.Migrations
{
[DbContext(typeof(SqliteContext))]
[Migration("20240729070502_Add_SampleRegistration_InspectionOrganization")]
partial class Add_SampleRegistration_InspectionOrganization
{
///
protected override void BuildTargetModel(ModelBuilder modelBuilder)
{
#pragma warning disable 612, 618
modelBuilder.HasAnnotation("ProductVersion", "7.0.20");
modelBuilder.Entity("UniformMaterialManagementSystem.Entities.Company", b =>
{
b.Property("Guid")
.ValueGeneratedOnAdd()
.HasColumnType("TEXT");
b.Property("Address")
.HasMaxLength(100)
.HasColumnType("TEXT");
b.Property("Category")
.IsRequired()
.HasMaxLength(50)
.HasColumnType("TEXT");
b.Property("Code")
.IsRequired()
.HasMaxLength(50)
.HasColumnType("TEXT");
b.Property("IsEnabled")
.HasColumnType("INTEGER");
b.Property("Manager")
.HasMaxLength(50)
.HasColumnType("TEXT");
b.Property("Name")
.IsRequired()
.HasMaxLength(50)
.HasColumnType("TEXT");
b.Property("Note")
.HasMaxLength(100)
.HasColumnType("TEXT");
b.Property("ShortName")
.IsRequired()
.HasMaxLength(50)
.HasColumnType("TEXT");
b.Property("SystemCode")
.HasMaxLength(50)
.HasColumnType("TEXT");
b.HasKey("Guid");
b.ToTable("Companies");
});
modelBuilder.Entity("UniformMaterialManagementSystem.Entities.Contract", b =>
{
b.Property("Guid")
.ValueGeneratedOnAdd()
.HasColumnType("TEXT");
b.Property("Attachment")
.HasColumnType("BLOB");
b.Property("CompanyGuid")
.HasColumnType("TEXT");
b.Property("ContractNo")
.IsRequired()
.HasMaxLength(50)
.HasColumnType("TEXT");
b.Property("EditDate")
.HasColumnType("TEXT");
b.Property("EditUser")
.IsRequired()
.HasMaxLength(50)
.HasColumnType("TEXT");
b.Property("ExportStatus")
.HasColumnType("INTEGER");
b.Property("PurchaseCompanyGuid")
.HasColumnType("TEXT");
b.Property("SigningDate")
.HasColumnType("TEXT");
b.Property("Telephone")
.IsRequired()
.HasMaxLength(50)
.HasColumnType("TEXT");
b.HasKey("Guid");
b.HasIndex("CompanyGuid");
b.HasIndex("PurchaseCompanyGuid");
b.ToTable("Contracts");
});
modelBuilder.Entity("UniformMaterialManagementSystem.Entities.ContractDetail", b =>
{
b.Property("Guid")
.ValueGeneratedOnAdd()
.HasColumnType("TEXT");
b.Property("ContractGuid")
.HasColumnType("TEXT");
b.Property("ContractQty")
.HasColumnType("REAL");
b.Property("DeliveryTime")
.HasColumnType("TEXT");
b.Property("InspectStatus")
.IsRequired()
.HasMaxLength(50)
.HasColumnType("TEXT");
b.Property("InspectedQty")
.HasColumnType("REAL");
b.Property("MaterialGuid")
.HasColumnType("TEXT");
b.Property("ShippedQuantity")
.HasColumnType("REAL");
b.Property("UnitPrice")
.HasColumnType("REAL");
b.HasKey("Guid");
b.HasIndex("ContractGuid");
b.HasIndex("MaterialGuid");
b.ToTable("ContractDetails");
});
modelBuilder.Entity("UniformMaterialManagementSystem.Entities.DeliveryReceipt", b =>
{
b.Property("Guid")
.ValueGeneratedOnAdd()
.HasColumnType("TEXT");
b.Property("ApplyGuid")
.HasColumnType("TEXT");
b.Property("BatchNo")
.IsRequired()
.HasColumnType("TEXT");
b.Property("CompanyName")
.IsRequired()
.HasColumnType("TEXT");
b.Property("ContractGuid")
.HasColumnType("TEXT");
b.Property("ContractNo")
.IsRequired()
.HasColumnType("TEXT");
b.Property("ContractQty")
.HasColumnType("TEXT");
b.Property("ContractSigningDate")
.HasColumnType("TEXT");
b.Property("Licence")
.HasColumnType("BLOB");
b.Property("MaterialName")
.IsRequired()
.HasColumnType("TEXT");
b.Property("ProductCompanyName")
.IsRequired()
.HasColumnType("TEXT");
b.Property("ReceivedCompanyName")
.IsRequired()
.HasColumnType("TEXT");
b.Property("ReceivedDate")
.HasColumnType("TEXT");
b.Property("ReceivedMan")
.HasColumnType("TEXT");
b.Property("ReceivedPackets")
.HasColumnType("INTEGER");
b.Property("ReceivedQty")
.HasColumnType("TEXT");
b.Property("ReceivedStatus")
.HasColumnType("TEXT");
b.Property("ReceivedTel")
.HasColumnType("TEXT");
b.Property("ShippedDate")
.HasColumnType("TEXT");
b.Property("ShippedMan")
.HasColumnType("TEXT");
b.Property("ShippedPackets")
.HasColumnType("INTEGER");
b.Property("ShippedQty")
.HasColumnType("TEXT");
b.Property("ShippedTel")
.HasColumnType("TEXT");
b.HasKey("Guid");
b.ToTable("DeliveryReceipts");
});
modelBuilder.Entity("UniformMaterialManagementSystem.Entities.DeliveryReceiptDetail", b =>
{
b.Property("Guid")
.ValueGeneratedOnAdd()
.HasColumnType("TEXT");
b.Property("DeliveryReceiptGuid")
.HasColumnType("TEXT");
b.Property("PacketNo")
.IsRequired()
.HasColumnType("TEXT");
b.Property("ReceiveQuantity")
.HasColumnType("TEXT");
b.Property("ShippedQuantity")
.HasColumnType("TEXT");
b.Property("UseQuantity")
.HasColumnType("TEXT");
b.Property("UseStatus")
.HasColumnType("TEXT");
b.HasKey("Guid");
b.HasIndex("DeliveryReceiptGuid");
b.ToTable("DeliveryReceiptDetails");
});
modelBuilder.Entity("UniformMaterialManagementSystem.Entities.InspectApply", b =>
{
b.Property("Guid")
.ValueGeneratedOnAdd()
.HasColumnType("TEXT");
b.Property("ApplyDescription")
.HasMaxLength(1000)
.HasColumnType("TEXT");
b.Property("ApplyNo")
.IsRequired()
.HasMaxLength(50)
.HasColumnType("TEXT");
b.Property("ApplyReceiveDate")
.HasColumnType("TEXT");
b.Property("ApplyUser")
.IsRequired()
.HasMaxLength(50)
.HasColumnType("TEXT");
b.Property("BatchNo")
.IsRequired()
.HasMaxLength(50)
.HasColumnType("TEXT");
b.Property("Company")
.IsRequired()
.HasMaxLength(50)
.HasColumnType("TEXT");
b.Property("CompanyGuid")
.HasColumnType("TEXT");
b.Property("EndProductDate")
.HasColumnType("TEXT");
b.Property("InspCategory")
.IsRequired()
.HasMaxLength(50)
.HasColumnType("TEXT");
b.Property("InspDate")
.HasColumnType("TEXT");
b.Property("InspQuantity")
.HasColumnType("REAL");
b.Property("InspReport")
.HasColumnType("BLOB");
b.Property("InspReportNo")
.IsRequired()
.HasMaxLength(50)
.HasColumnType("TEXT");
b.Property("LicenseStatus")
.HasColumnType("INTEGER");
b.Property("MaterialGuid")
.HasColumnType("TEXT");
b.Property("ProductName")
.IsRequired()
.HasMaxLength(50)
.HasColumnType("TEXT");
b.Property("ReportStatus")
.HasColumnType("INTEGER");
b.Property("SampleStatus")
.HasColumnType("INTEGER");
b.Property("StartProductDate")
.HasColumnType("TEXT");
b.Property("Year")
.HasColumnType("INTEGER");
b.HasKey("Guid");
b.HasIndex("CompanyGuid");
b.HasIndex("MaterialGuid");
b.ToTable("InspectApplies");
});
modelBuilder.Entity("UniformMaterialManagementSystem.Entities.InspectApplyContractDetail", b =>
{
b.Property("Guid")
.ValueGeneratedOnAdd()
.HasColumnType("TEXT");
b.Property("ApplyGuid")
.HasColumnType("TEXT");
b.Property("ApplyNo")
.IsRequired()
.HasMaxLength(50)
.HasColumnType("TEXT");
b.Property("ContractDetailGuid")
.HasColumnType("TEXT");
b.Property("ContractNo")
.IsRequired()
.HasMaxLength(50)
.HasColumnType("TEXT");
b.Property("InspectQty")
.HasColumnType("REAL");
b.Property("PurchaseCompany")
.IsRequired()
.HasMaxLength(50)
.HasColumnType("TEXT");
b.Property("PurchaseCompanyShortName")
.IsRequired()
.HasMaxLength(50)
.HasColumnType("TEXT");
b.Property("SigningDate")
.IsRequired()
.HasMaxLength(50)
.HasColumnType("TEXT");
b.Property("UnInspectQty")
.HasColumnType("REAL");
b.HasKey("Guid");
b.HasIndex("ApplyGuid");
b.ToTable("InspectApplyContractDetails");
});
modelBuilder.Entity("UniformMaterialManagementSystem.Entities.InspectApplyDetail", b =>
{
b.Property("Guid")
.ValueGeneratedOnAdd()
.HasColumnType("TEXT");
b.Property("ApplyGuid")
.HasColumnType("TEXT");
b.Property("ApplyNo")
.IsRequired()
.HasMaxLength(50)
.HasColumnType("TEXT");
b.Property("Note")
.HasMaxLength(50)
.HasColumnType("TEXT");
b.Property("PacketNo")
.IsRequired()
.HasMaxLength(50)
.HasColumnType("TEXT");
b.Property("Quantity")
.HasColumnType("REAL");
b.HasKey("Guid");
b.HasIndex("ApplyGuid");
b.ToTable("InspectApplyDetails");
});
modelBuilder.Entity("UniformMaterialManagementSystem.Entities.InspectionOrganization", b =>
{
b.Property("Guid")
.ValueGeneratedOnAdd()
.HasColumnType("TEXT");
b.Property("Address")
.IsRequired()
.HasMaxLength(50)
.HasColumnType("TEXT");
b.Property("Contacts")
.IsRequired()
.HasMaxLength(50)
.HasColumnType("TEXT");
b.Property("IsEnabled")
.HasColumnType("INTEGER");
b.Property("Name")
.IsRequired()
.HasMaxLength(50)
.HasColumnType("TEXT");
b.Property("OrderNo")
.HasColumnType("INTEGER");
b.Property("Telephone")
.IsRequired()
.HasMaxLength(50)
.HasColumnType("TEXT");
b.HasKey("Guid");
b.ToTable("InspectionOrganizations");
});
modelBuilder.Entity("UniformMaterialManagementSystem.Entities.InspectionReport", b =>
{
b.Property("Guid")
.ValueGeneratedOnAdd()
.HasColumnType("TEXT");
b.Property("Conclusion")
.IsRequired()
.HasMaxLength(50)
.HasColumnType("TEXT");
b.Property("ConclusionDesc")
.IsRequired()
.HasMaxLength(1000)
.HasColumnType("TEXT");
b.Property("Department")
.IsRequired()
.HasMaxLength(50)
.HasColumnType("TEXT");
b.Property("EditUser")
.IsRequired()
.HasMaxLength(50)
.HasColumnType("TEXT");
b.Property("InspectApplyGuid")
.HasColumnType("TEXT");
b.Property("IsSample")
.HasColumnType("INTEGER");
b.Property("ReportBasis")
.IsRequired()
.HasMaxLength(200)
.HasColumnType("TEXT");
b.Property("ReportDesc")
.IsRequired()
.HasMaxLength(1000)
.HasColumnType("TEXT");
b.Property("ReportNo")
.IsRequired()
.HasMaxLength(50)
.HasColumnType("TEXT");
b.Property("ReportTime")
.HasColumnType("TEXT");
b.HasKey("Guid");
b.HasIndex("InspectApplyGuid");
b.ToTable("InspectionReports");
});
modelBuilder.Entity("UniformMaterialManagementSystem.Entities.InspectionReportDetail", b =>
{
b.Property("Guid")
.ValueGeneratedOnAdd()
.HasColumnType("TEXT");
b.Property("InspectionReportGuid")
.HasColumnType("TEXT");
b.Property("Inspector")
.IsRequired()
.HasMaxLength(50)
.HasColumnType("TEXT");
b.Property("JobCategory")
.IsRequired()
.HasMaxLength(50)
.HasColumnType("TEXT");
b.Property("SupervisionUnit")
.IsRequired()
.HasMaxLength(50)
.HasColumnType("TEXT");
b.HasKey("Guid");
b.HasIndex("InspectionReportGuid");
b.ToTable("InspectionReportDetails");
});
modelBuilder.Entity("UniformMaterialManagementSystem.Entities.Material", b =>
{
b.Property("Guid")
.ValueGeneratedOnAdd()
.HasColumnType("TEXT");
b.Property("CategoryCode")
.IsRequired()
.HasMaxLength(50)
.HasColumnType("TEXT");
b.Property("IsEnabled")
.HasColumnType("INTEGER");
b.Property("MeasureUnit")
.IsRequired()
.HasMaxLength(50)
.HasColumnType("TEXT");
b.Property("Name")
.IsRequired()
.HasMaxLength(50)
.HasColumnType("TEXT");
b.Property("NormName")
.HasMaxLength(50)
.HasColumnType("TEXT");
b.Property("Note")
.HasMaxLength(100)
.HasColumnType("TEXT");
b.Property("Photo")
.HasColumnType("BLOB");
b.Property("ShortName")
.IsRequired()
.HasMaxLength(50)
.HasColumnType("TEXT");
b.Property("Specification")
.IsRequired()
.HasMaxLength(50)
.HasColumnType("TEXT");
b.Property("VarietyCode")
.IsRequired()
.HasMaxLength(50)
.HasColumnType("TEXT");
b.HasKey("Guid");
b.ToTable("Materials");
});
modelBuilder.Entity("UniformMaterialManagementSystem.Entities.MenuItem", b =>
{
b.Property("Guid")
.ValueGeneratedOnAdd()
.HasColumnType("TEXT");
b.Property("Icon")
.HasMaxLength(100)
.HasColumnType("TEXT");
b.Property("IsEnabled")
.HasColumnType("INTEGER");
b.Property("IsVisible")
.HasColumnType("INTEGER");
b.Property("Name")
.IsRequired()
.HasMaxLength(50)
.HasColumnType("TEXT");
b.Property("OrderIndex")
.HasColumnType("INTEGER");
b.Property("ParentGuid")
.HasColumnType("TEXT");
b.Property("Path")
.HasMaxLength(100)
.HasColumnType("TEXT");
b.HasKey("Guid");
b.HasIndex("ParentGuid");
b.ToTable("MenuItems");
});
modelBuilder.Entity("UniformMaterialManagementSystem.Entities.Role", b =>
{
b.Property("Guid")
.ValueGeneratedOnAdd()
.HasColumnType("TEXT");
b.Property("Description")
.IsRequired()
.HasMaxLength(100)
.HasColumnType("TEXT");
b.Property("IsEnabled")
.HasColumnType("INTEGER");
b.Property("Name")
.IsRequired()
.HasMaxLength(50)
.HasColumnType("TEXT");
b.HasKey("Guid");
b.ToTable("Roles");
});
modelBuilder.Entity("UniformMaterialManagementSystem.Entities.RoleMenuItem", b =>
{
b.Property("MenuItemGuid")
.HasColumnType("TEXT");
b.Property("RoleGuid")
.HasColumnType("TEXT");
b.HasKey("MenuItemGuid", "RoleGuid");
b.HasIndex("RoleGuid");
b.ToTable("RoleMenuItems");
});
modelBuilder.Entity("UniformMaterialManagementSystem.Entities.SampleRegistration", b =>
{
b.Property("Guid")
.ValueGeneratedOnAdd()
.HasColumnType("TEXT");
b.Property("BatchNo")
.IsRequired()
.HasMaxLength(50)
.HasColumnType("TEXT");
b.Property("Department")
.IsRequired()
.HasMaxLength(50)
.HasColumnType("TEXT");
b.Property("EditTime")
.HasColumnType("TEXT");
b.Property("EditUser")
.IsRequired()
.HasMaxLength(50)
.HasColumnType("TEXT");
b.Property("InspectApplyGuid")
.HasColumnType("TEXT");
b.Property("InspectionOrganization")
.IsRequired()
.HasMaxLength(500)
.HasColumnType("TEXT");
b.Property("PacketNo")
.IsRequired()
.HasMaxLength(50)
.HasColumnType("TEXT");
b.Property("ProductDate")
.HasColumnType("TEXT");
b.Property("ProductUsers")
.HasMaxLength(100)
.HasColumnType("TEXT");
b.Property("Quantity")
.HasColumnType("REAL");
b.Property("SampleNo")
.IsRequired()
.HasMaxLength(50)
.HasColumnType("TEXT");
b.Property("SingleIndexItem")
.HasMaxLength(50)
.HasColumnType("TEXT");
b.Property("Telephone")
.HasMaxLength(50)
.HasColumnType("TEXT");
b.Property("TestingItem")
.IsRequired()
.HasMaxLength(50)
.HasColumnType("TEXT");
b.HasKey("Guid");
b.HasIndex("InspectApplyGuid");
b.ToTable("SampleRegistrations");
});
modelBuilder.Entity("UniformMaterialManagementSystem.Entities.SerialNumber", b =>
{
b.Property("Guid")
.ValueGeneratedOnAdd()
.HasColumnType("TEXT");
b.Property("CompanyCode")
.IsRequired()
.HasMaxLength(50)
.HasColumnType("TEXT");
b.Property("CompanyGuid")
.HasColumnType("TEXT");
b.Property("InspCategory")
.IsRequired()
.HasMaxLength(50)
.HasColumnType("TEXT");
b.Property("MaxNumber")
.IsRequired()
.HasMaxLength(50)
.HasColumnType("TEXT");
b.Property("SupervisionUnitGuid")
.HasColumnType("TEXT");
b.Property("Year")
.HasColumnType("INTEGER");
b.HasKey("Guid");
b.ToTable("SerialNumbers");
});
modelBuilder.Entity("UniformMaterialManagementSystem.Entities.SupervisionUnit", b =>
{
b.Property("Guid")
.ValueGeneratedOnAdd()
.HasColumnType("TEXT");
b.Property("IsEnabled")
.HasColumnType("INTEGER");
b.Property("Name")
.IsRequired()
.HasMaxLength(50)
.HasColumnType("TEXT");
b.Property("Note")
.HasMaxLength(100)
.HasColumnType("TEXT");
b.Property("ShortName")
.IsRequired()
.HasMaxLength(50)
.HasColumnType("TEXT");
b.HasKey("Guid");
b.ToTable("SupervisionUnits");
});
modelBuilder.Entity("UniformMaterialManagementSystem.Entities.User", b =>
{
b.Property("Guid")
.ValueGeneratedOnAdd()
.HasColumnType("TEXT");
b.Property("CompanyGuid")
.HasColumnType("TEXT");
b.Property("CompanyName")
.HasMaxLength(50)
.HasColumnType("TEXT");
b.Property("IdNumber")
.IsRequired()
.HasMaxLength(50)
.HasColumnType("TEXT");
b.Property("IsEnabled")
.HasColumnType("INTEGER");
b.Property("LoginName")
.IsRequired()
.HasMaxLength(50)
.HasColumnType("TEXT");
b.Property("Password")
.IsRequired()
.HasMaxLength(50)
.HasColumnType("TEXT");
b.Property("RegisterDate")
.HasColumnType("TEXT");
b.Property("Salt")
.IsRequired()
.HasMaxLength(50)
.HasColumnType("TEXT");
b.Property("SupervisionUnitGuid")
.HasColumnType("TEXT");
b.Property("UserName")
.IsRequired()
.HasMaxLength(50)
.HasColumnType("TEXT");
b.HasKey("Guid");
b.HasIndex("CompanyGuid");
b.HasIndex("SupervisionUnitGuid");
b.ToTable("Users");
});
modelBuilder.Entity("UniformMaterialManagementSystem.Entities.UserRole", b =>
{
b.Property("RoleGuid")
.HasColumnType("TEXT");
b.Property("UserGuid")
.HasColumnType("TEXT");
b.HasKey("RoleGuid", "UserGuid");
b.HasIndex("UserGuid");
b.ToTable("UserRoles");
});
modelBuilder.Entity("UniformMaterialManagementSystem.Entities.Contract", b =>
{
b.HasOne("UniformMaterialManagementSystem.Entities.Company", "Company")
.WithMany()
.HasForeignKey("CompanyGuid")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.HasOne("UniformMaterialManagementSystem.Entities.Company", "PurchaseCompany")
.WithMany()
.HasForeignKey("PurchaseCompanyGuid")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("Company");
b.Navigation("PurchaseCompany");
});
modelBuilder.Entity("UniformMaterialManagementSystem.Entities.ContractDetail", b =>
{
b.HasOne("UniformMaterialManagementSystem.Entities.Contract", "Contract")
.WithMany("ContractDetails")
.HasForeignKey("ContractGuid")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.HasOne("UniformMaterialManagementSystem.Entities.Material", "Material")
.WithMany()
.HasForeignKey("MaterialGuid")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("Contract");
b.Navigation("Material");
});
modelBuilder.Entity("UniformMaterialManagementSystem.Entities.DeliveryReceiptDetail", b =>
{
b.HasOne("UniformMaterialManagementSystem.Entities.DeliveryReceipt", null)
.WithMany("DeliveryReceiptDetails")
.HasForeignKey("DeliveryReceiptGuid")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
});
modelBuilder.Entity("UniformMaterialManagementSystem.Entities.InspectApply", b =>
{
b.HasOne("UniformMaterialManagementSystem.Entities.Company", "MaterialCompany")
.WithMany()
.HasForeignKey("CompanyGuid")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.HasOne("UniformMaterialManagementSystem.Entities.Material", "Material")
.WithMany()
.HasForeignKey("MaterialGuid")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("Material");
b.Navigation("MaterialCompany");
});
modelBuilder.Entity("UniformMaterialManagementSystem.Entities.InspectApplyContractDetail", b =>
{
b.HasOne("UniformMaterialManagementSystem.Entities.InspectApply", "InspectApply")
.WithMany("InspectApplyContractDetails")
.HasForeignKey("ApplyGuid")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("InspectApply");
});
modelBuilder.Entity("UniformMaterialManagementSystem.Entities.InspectApplyDetail", b =>
{
b.HasOne("UniformMaterialManagementSystem.Entities.InspectApply", "InspectApply")
.WithMany("InspectApplyDetails")
.HasForeignKey("ApplyGuid")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("InspectApply");
});
modelBuilder.Entity("UniformMaterialManagementSystem.Entities.InspectionReport", b =>
{
b.HasOne("UniformMaterialManagementSystem.Entities.InspectApply", "InspectApply")
.WithMany()
.HasForeignKey("InspectApplyGuid")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("InspectApply");
});
modelBuilder.Entity("UniformMaterialManagementSystem.Entities.InspectionReportDetail", b =>
{
b.HasOne("UniformMaterialManagementSystem.Entities.InspectionReport", "InspectionReport")
.WithMany("InspectionReportDetails")
.HasForeignKey("InspectionReportGuid")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("InspectionReport");
});
modelBuilder.Entity("UniformMaterialManagementSystem.Entities.MenuItem", b =>
{
b.HasOne("UniformMaterialManagementSystem.Entities.MenuItem", "Parent")
.WithMany("Children")
.HasForeignKey("ParentGuid")
.OnDelete(DeleteBehavior.Restrict);
b.Navigation("Parent");
});
modelBuilder.Entity("UniformMaterialManagementSystem.Entities.RoleMenuItem", b =>
{
b.HasOne("UniformMaterialManagementSystem.Entities.MenuItem", "MenuItem")
.WithMany("MenuRoles")
.HasForeignKey("MenuItemGuid")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.HasOne("UniformMaterialManagementSystem.Entities.Role", "Role")
.WithMany("RoleMenus")
.HasForeignKey("RoleGuid")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("MenuItem");
b.Navigation("Role");
});
modelBuilder.Entity("UniformMaterialManagementSystem.Entities.SampleRegistration", b =>
{
b.HasOne("UniformMaterialManagementSystem.Entities.InspectApply", "InspectApply")
.WithMany()
.HasForeignKey("InspectApplyGuid")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("InspectApply");
});
modelBuilder.Entity("UniformMaterialManagementSystem.Entities.User", b =>
{
b.HasOne("UniformMaterialManagementSystem.Entities.Company", "Company")
.WithMany()
.HasForeignKey("CompanyGuid");
b.HasOne("UniformMaterialManagementSystem.Entities.SupervisionUnit", "SupervisionUnit")
.WithMany()
.HasForeignKey("SupervisionUnitGuid")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("Company");
b.Navigation("SupervisionUnit");
});
modelBuilder.Entity("UniformMaterialManagementSystem.Entities.UserRole", b =>
{
b.HasOne("UniformMaterialManagementSystem.Entities.Role", "Role")
.WithMany("UserRoles")
.HasForeignKey("RoleGuid")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.HasOne("UniformMaterialManagementSystem.Entities.User", "User")
.WithMany("UserRoles")
.HasForeignKey("UserGuid")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("Role");
b.Navigation("User");
});
modelBuilder.Entity("UniformMaterialManagementSystem.Entities.Contract", b =>
{
b.Navigation("ContractDetails");
});
modelBuilder.Entity("UniformMaterialManagementSystem.Entities.DeliveryReceipt", b =>
{
b.Navigation("DeliveryReceiptDetails");
});
modelBuilder.Entity("UniformMaterialManagementSystem.Entities.InspectApply", b =>
{
b.Navigation("InspectApplyContractDetails");
b.Navigation("InspectApplyDetails");
});
modelBuilder.Entity("UniformMaterialManagementSystem.Entities.InspectionReport", b =>
{
b.Navigation("InspectionReportDetails");
});
modelBuilder.Entity("UniformMaterialManagementSystem.Entities.MenuItem", b =>
{
b.Navigation("Children");
b.Navigation("MenuRoles");
});
modelBuilder.Entity("UniformMaterialManagementSystem.Entities.Role", b =>
{
b.Navigation("RoleMenus");
b.Navigation("UserRoles");
});
modelBuilder.Entity("UniformMaterialManagementSystem.Entities.User", b =>
{
b.Navigation("UserRoles");
});
#pragma warning restore 612, 618
}
}
}