From b3ec4b3bff7d935ab3e91b499290ca419722fbf5 Mon Sep 17 00:00:00 2001 From: 44673626 <44673626@qq.com> Date: Mon, 15 Nov 2021 14:02:04 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E5=AF=BC=E5=85=A5=E5=8A=9F=E8=83=BD?= =?UTF-8?q?=E4=BB=A3=E7=A0=81=E6=8F=90=E4=BA=A4-=E4=B8=8B=E5=8D=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...ApiHostMigrationsDbContextModelSnapshot.cs | 9432 ++++++++++++++++- .../VWSparePart/ISparePartAppService.cs | 2 +- .../VWSparePart/SparePartAppService.cs | 30 +- .../SettleAccount.Application.xml | 7 +- .../Entities/VWSparePart/SparePart.cs | 9 + ...AccountDbContextModelCreatingExtensions.cs | 260 +- .../UnSettleAccountImportService.cs | 3 + 7 files changed, 9211 insertions(+), 532 deletions(-) diff --git a/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/Migrations/SettleAccountHttpApiHostMigrationsDbContextModelSnapshot.cs b/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/Migrations/SettleAccountHttpApiHostMigrationsDbContextModelSnapshot.cs index da951d66..4902863f 100644 --- a/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/Migrations/SettleAccountHttpApiHostMigrationsDbContextModelSnapshot.cs +++ b/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/Migrations/SettleAccountHttpApiHostMigrationsDbContextModelSnapshot.cs @@ -21,15 +21,12 @@ namespace Win.Sfs.SettleAccount.Migrations .HasAnnotation("ProductVersion", "5.0.8") .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn); - modelBuilder.Entity("Win.Sfs.SettleAccount.Entities.Invoices.Invoice", b => + modelBuilder.Entity("Win.Sfs.SettleAccount.BTCarConsigns.BTCarConsign", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("uniqueidentifier"); - b.Property("Amt") - .HasColumnType("decimal(18,2)"); - b.Property("BranchId") .HasColumnType("uniqueidentifier"); @@ -47,6 +44,10 @@ namespace Win.Sfs.SettleAccount.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("CreatorId"); + b.Property("CustomerCode") + .IsRequired() + .HasColumnType("nvarchar(450)"); + b.Property("DeleterId") .HasColumnType("uniqueidentifier") .HasColumnName("DeleterId"); @@ -58,23 +59,21 @@ namespace Win.Sfs.SettleAccount.Migrations b.Property("Enabled") .HasColumnType("bit"); - b.Property("Extend") - .HasColumnType("nvarchar(max)"); - b.Property("ExtraProperties") .HasColumnType("nvarchar(max)") .HasColumnName("ExtraProperties"); - b.Property("Factory") - .HasMaxLength(50) - .HasColumnType("nvarchar(50)"); - b.Property("IsDeleted") .ValueGeneratedOnAdd() .HasColumnType("bit") .HasDefaultValue(false) .HasColumnName("IsDeleted"); + b.Property("KBCode") + .IsRequired() + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + b.Property("LastModificationTime") .HasColumnType("datetime2") .HasColumnName("LastModificationTime"); @@ -85,38 +84,41 @@ namespace Win.Sfs.SettleAccount.Migrations b.Property("MaterialCode") .IsRequired() - .HasMaxLength(50) - .HasColumnType("nvarchar(50)"); + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); - b.Property("MaterialDesc") - .HasMaxLength(50) - .HasColumnType("nvarchar(50)"); + b.Property("ParentId") + .HasColumnType("uniqueidentifier"); b.Property("Period") - .HasMaxLength(50) - .HasColumnType("nvarchar(50)"); + .HasColumnType("nvarchar(max)"); b.Property("Qty") + .HasPrecision(18, 2) .HasColumnType("decimal(18,2)"); b.Property("Remark") - .HasMaxLength(1000) - .HasColumnType("nvarchar(1000)"); + .HasColumnType("nvarchar(max)"); - b.Property("Version") - .HasMaxLength(50) - .HasColumnType("nvarchar(50)"); + b.Property("State") + .HasMaxLength(36) + .HasColumnType("int"); - b.Property("Year") - .HasMaxLength(50) - .HasColumnType("nvarchar(50)"); + b.Property("Version") + .IsRequired() + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); b.HasKey("Id"); - b.ToTable("Set_Invoice"); + b.HasIndex("CustomerCode", "MaterialCode", "KBCode", "Version") + .IsUnique() + .HasFilter("IsDeleted=0"); + + b.ToTable("Set_btcarconsign"); }); - modelBuilder.Entity("Win.Sfs.SettleAccount.Entities.Invoices.InvoiceVersion", b => + modelBuilder.Entity("Win.Sfs.SettleAccount.BTCarKBs.BTCarKB", b => { b.Property("Id") .ValueGeneratedOnAdd() @@ -131,6 +133,9 @@ namespace Win.Sfs.SettleAccount.Migrations .HasColumnType("nvarchar(40)") .HasColumnName("ConcurrencyStamp"); + b.Property("ConsignQty") + .HasColumnType("decimal(18,2)"); + b.Property("CreationTime") .HasColumnType("datetime2") .HasColumnName("CreationTime"); @@ -140,8 +145,12 @@ namespace Win.Sfs.SettleAccount.Migrations .HasColumnName("CreatorId"); b.Property("CustomerCode") - .HasMaxLength(50) - .HasColumnType("nvarchar(50)"); + .IsRequired() + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.Property("DateTime") + .HasColumnType("datetime2"); b.Property("DeleterId") .HasColumnType("uniqueidentifier") @@ -151,6 +160,9 @@ namespace Win.Sfs.SettleAccount.Migrations .HasColumnType("datetime2") .HasColumnName("DeletionTime"); + b.Property("DeliveryDateTime") + .HasColumnType("datetime2"); + b.Property("Enabled") .HasColumnType("bit"); @@ -172,46 +184,72 @@ namespace Win.Sfs.SettleAccount.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("LastModifierId"); + b.Property("MaterialCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("MaterialDesc") + .HasColumnType("nvarchar(max)"); + + b.Property("NeedQty") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("OrderKBCode") + .IsRequired() + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.Property("ParentId") + .HasColumnType("uniqueidentifier"); + b.Property("Period") - .HasMaxLength(50) - .HasColumnType("nvarchar(50)"); + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.Property("ReceiveAreaCode") + .IsRequired() + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.Property("ReceiveAreaName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); b.Property("Remark") .HasColumnType("nvarchar(max)"); - b.Property("Version") - .HasMaxLength(50) - .HasColumnType("nvarchar(50)"); + b.Property("State") + .HasMaxLength(36) + .HasColumnType("int"); - b.Property("Year") - .HasMaxLength(50) - .HasColumnType("nvarchar(50)"); + b.Property("Version") + .IsRequired() + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); b.HasKey("Id"); - b.ToTable("Set_InvoiceVersion"); + b.HasIndex("CustomerCode", "MaterialCode", "OrderKBCode", "Version") + .IsUnique() + .HasFilter("IsDeleted=0"); + + b.ToTable("Set_btcarkb"); }); - modelBuilder.Entity("Win.Sfs.SettleAccount.Entities.SettleAccounts.SettleAccount", b => + modelBuilder.Entity("Win.Sfs.SettleAccount.BTCarSeqFirsts.BTCarSeqFirst", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("uniqueidentifier"); + b.Property("BarCode") + .HasColumnType("nvarchar(450)"); + b.Property("BranchId") .HasColumnType("uniqueidentifier"); - b.Property("CP5A") - .HasColumnType("datetime2"); - - b.Property("CP7") - .HasColumnType("datetime2"); - - b.Property("ChassisNumber") - .IsRequired() - .HasMaxLength(36) - .HasColumnType("nvarchar(36)"); - b.Property("ConcurrencyStamp") .IsConcurrencyToken() .HasMaxLength(40) @@ -226,6 +264,13 @@ namespace Win.Sfs.SettleAccount.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("CreatorId"); + b.Property("CustomerCode") + .IsRequired() + .HasColumnType("nvarchar(450)"); + + b.Property("DT") + .HasColumnType("datetime2"); + b.Property("DeleterId") .HasColumnType("uniqueidentifier") .HasColumnName("DeleterId"); @@ -247,11 +292,6 @@ namespace Win.Sfs.SettleAccount.Migrations .HasDefaultValue(false) .HasColumnName("IsDeleted"); - b.Property("KENNCode") - .IsRequired() - .HasMaxLength(36) - .HasColumnType("nvarchar(36)"); - b.Property("LastModificationTime") .HasColumnType("datetime2") .HasColumnName("LastModificationTime"); @@ -260,72 +300,68 @@ namespace Win.Sfs.SettleAccount.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("LastModifierId"); - b.Property("MaterialCode") - .IsRequired() - .HasMaxLength(36) - .HasColumnType("nvarchar(36)"); - - b.Property("Model") - .IsRequired() - .HasMaxLength(36) - .HasColumnType("nvarchar(36)"); + b.Property("OnLineDateTime") + .HasColumnType("datetime2"); b.Property("ParentId") .HasColumnType("uniqueidentifier"); b.Property("Period") - .HasMaxLength(36) - .HasColumnType("nvarchar(36)"); - - b.Property("Qty") - .HasColumnType("decimal(18,2)"); - - b.Property("Remark") .HasColumnType("nvarchar(max)"); - b.Property("SettleYear") + b.Property("Remark") .HasColumnType("nvarchar(max)"); - b.Property("SettlementID") - .IsRequired() - .HasMaxLength(36) - .HasColumnType("nvarchar(36)"); - - b.Property("SettlementSupplier") - .IsRequired() - .HasMaxLength(36) - .HasColumnType("nvarchar(36)"); + b.Property("VIN") + .HasColumnType("nvarchar(450)"); b.Property("Version") .IsRequired() .HasMaxLength(36) .HasColumnType("nvarchar(36)"); - b.Property("Year") - .HasMaxLength(36) - .HasColumnType("nvarchar(36)"); - - b.Property("state") - .HasColumnType("int"); - b.HasKey("Id"); - b.HasIndex("state"); - - b.HasIndex("Version", "ChassisNumber", "MaterialCode", "KENNCode"); + b.HasIndex("CustomerCode", "BarCode", "VIN", "Version") + .IsUnique() + .HasFilter("IsDeleted=0"); - b.ToTable("Set_Settle"); + b.ToTable("Set_btcarseqfirst"); }); - modelBuilder.Entity("Win.Sfs.SettleAccount.Entities.SettleAccounts.SettleAccountVersion", b => + modelBuilder.Entity("Win.Sfs.SettleAccount.BTCarSeqSeconds.BTCarSeqSecond", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("uniqueidentifier"); + b.Property("BarCode") + .HasColumnType("nvarchar(450)"); + b.Property("BranchId") .HasColumnType("uniqueidentifier"); + b.Property("CMSerie") + .HasColumnType("nvarchar(max)"); + + b.Property("CMSerieRemark") + .HasColumnType("nvarchar(max)"); + + b.Property("CarModelShort") + .HasColumnType("nvarchar(max)"); + + b.Property("CarName") + .HasColumnType("nvarchar(max)"); + + b.Property("CarType") + .HasColumnType("nvarchar(max)"); + + b.Property("Code") + .HasColumnType("nvarchar(max)"); + + b.Property("Color") + .HasColumnType("nvarchar(max)"); + b.Property("ConcurrencyStamp") .IsConcurrencyToken() .HasMaxLength(40) @@ -341,8 +377,11 @@ namespace Win.Sfs.SettleAccount.Migrations .HasColumnName("CreatorId"); b.Property("CustomerCode") - .HasMaxLength(36) - .HasColumnType("nvarchar(36)"); + .IsRequired() + .HasColumnType("nvarchar(450)"); + + b.Property("DateTime") + .HasColumnType("datetime2"); b.Property("DeleterId") .HasColumnType("uniqueidentifier") @@ -355,11 +394,14 @@ namespace Win.Sfs.SettleAccount.Migrations b.Property("Enabled") .HasColumnType("bit"); + b.Property("EngineCode") + .HasColumnType("nvarchar(max)"); + b.Property("ExtraProperties") .HasColumnType("nvarchar(max)") .HasColumnName("ExtraProperties"); - b.Property("Factory") + b.Property("InColor") .HasColumnType("nvarchar(max)"); b.Property("IsDeleted") @@ -376,53 +418,69 @@ namespace Win.Sfs.SettleAccount.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("LastModifierId"); + b.Property("OnLineDateTime") + .HasColumnType("datetime2"); + + b.Property("OrderStateNum") + .HasColumnType("nvarchar(max)"); + + b.Property("ParentId") + .HasColumnType("uniqueidentifier"); + b.Property("Period") - .IsRequired() - .HasMaxLength(36) - .HasColumnType("nvarchar(36)"); + .HasColumnType("nvarchar(max)"); + + b.Property("PlanDate") + .HasColumnType("datetime2"); + + b.Property("PlanSeq") + .HasColumnType("int"); + + b.Property("PlanTypeRemark") + .HasColumnType("nvarchar(max)"); b.Property("Remark") .HasColumnType("nvarchar(max)"); - b.Property("Version") - .IsRequired() - .HasMaxLength(36) - .HasColumnType("nvarchar(36)"); + b.Property("SpecialCarTypeRemark") + .HasColumnType("nvarchar(max)"); - b.Property("Year") + b.Property("StateName") + .HasColumnType("nvarchar(max)"); + + b.Property("TopSeq") + .HasColumnType("nvarchar(max)"); + + b.Property("VIN") + .HasColumnType("nvarchar(450)"); + + b.Property("Version") .IsRequired() .HasMaxLength(36) .HasColumnType("nvarchar(36)"); b.HasKey("Id"); - b.HasIndex("Version") + b.HasIndex("CustomerCode", "BarCode", "VIN", "Version") .IsUnique() .HasFilter("IsDeleted=0"); - b.ToTable("Set_Settle_Version"); + b.ToTable("Set_btcarseqsecond"); }); - modelBuilder.Entity("Win.Sfs.SettleAccount.Entities.SettleAccounts.UnSettleAccount", b => + modelBuilder.Entity("Win.Sfs.SettleAccount.BTCarSeqs.BTCarSeq", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("uniqueidentifier"); + b.Property("BarCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + b.Property("BranchId") .HasColumnType("uniqueidentifier"); - b.Property("CP5A") - .HasColumnType("datetime2"); - - b.Property("CP7") - .HasColumnType("datetime2"); - - b.Property("ChassisNumber") - .IsRequired() - .HasMaxLength(36) - .HasColumnType("nvarchar(36)"); - b.Property("ConcurrencyStamp") .IsConcurrencyToken() .HasMaxLength(40) @@ -437,6 +495,14 @@ namespace Win.Sfs.SettleAccount.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("CreatorId"); + b.Property("CustomerCode") + .IsRequired() + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.Property("DT") + .HasColumnType("datetime2"); + b.Property("DeleterId") .HasColumnType("uniqueidentifier") .HasColumnName("DeleterId"); @@ -458,11 +524,6 @@ namespace Win.Sfs.SettleAccount.Migrations .HasDefaultValue(false) .HasColumnName("IsDeleted"); - b.Property("KENNCode") - .IsRequired() - .HasMaxLength(36) - .HasColumnType("nvarchar(36)"); - b.Property("LastModificationTime") .HasColumnType("datetime2") .HasColumnName("LastModificationTime"); @@ -471,74 +532,49 @@ namespace Win.Sfs.SettleAccount.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("LastModifierId"); - b.Property("MaterialCode") - .IsRequired() - .HasMaxLength(36) - .HasColumnType("nvarchar(36)"); - - b.Property("Model") - .IsRequired() - .HasMaxLength(36) - .HasColumnType("nvarchar(36)"); + b.Property("OnLineDateTime") + .HasColumnType("datetime2"); b.Property("ParentId") .HasColumnType("uniqueidentifier"); b.Property("Period") - .HasMaxLength(36) - .HasColumnType("nvarchar(36)"); - - b.Property("Qty") - .HasColumnType("decimal(18,2)"); + .HasMaxLength(1024) + .HasColumnType("nvarchar(1024)"); b.Property("Remark") .HasColumnType("nvarchar(max)"); - b.Property("SettleYear") - .HasColumnType("nvarchar(max)"); - - b.Property("SettlementID") - .IsRequired() - .HasMaxLength(36) - .HasColumnType("nvarchar(36)"); - - b.Property("SettlementSupplier") + b.Property("VIN") .IsRequired() - .HasMaxLength(36) - .HasColumnType("nvarchar(36)"); - - b.Property("UnsettledReason") - .HasColumnType("nvarchar(max)"); + .HasMaxLength(100) + .HasColumnType("nvarchar(100)"); b.Property("Version") .IsRequired() .HasMaxLength(36) .HasColumnType("nvarchar(36)"); - b.Property("Year") - .HasMaxLength(36) - .HasColumnType("nvarchar(36)"); - - b.Property("state") - .HasColumnType("int"); - b.HasKey("Id"); - b.HasIndex("state"); - - b.HasIndex("Version", "ChassisNumber", "MaterialCode") - .IsUnique(); + b.HasIndex("CustomerCode", "BarCode", "VIN", "Version") + .IsUnique() + .HasFilter("IsDeleted=0"); - b.ToTable("Set_Unsettle"); + b.ToTable("Set_btcarseq"); }); - modelBuilder.Entity("Win.Sfs.SettleAccount.Entities.SettleAccounts.UnSettleAccountVersion", b => + modelBuilder.Entity("Win.Sfs.SettleAccount.BTNotConsignReports.BTNotConsignReport", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("uniqueidentifier"); + b.Property("BeginTime") + .HasColumnType("datetime2"); + b.Property("BranchId") + .HasMaxLength(36) .HasColumnType("uniqueidentifier"); b.Property("ConcurrencyStamp") @@ -555,9 +591,14 @@ namespace Win.Sfs.SettleAccount.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("CreatorId"); - b.Property("CustomerCode") - .HasMaxLength(36) - .HasColumnType("nvarchar(36)"); + b.Property("CreatorName") + .HasColumnType("nvarchar(max)"); + + b.Property("CustomCode") + .HasColumnType("nvarchar(max)"); + + b.Property("CustomName") + .HasColumnType("nvarchar(max)"); b.Property("DeleterId") .HasColumnType("uniqueidentifier") @@ -567,16 +608,27 @@ namespace Win.Sfs.SettleAccount.Migrations .HasColumnType("datetime2") .HasColumnName("DeletionTime"); + b.Property("DocumentNumber") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("DocumentStatus") + .HasColumnType("int"); + + b.Property("DocumentType") + .HasColumnType("int"); + b.Property("Enabled") .HasColumnType("bit"); + b.Property("EndTime") + .HasColumnType("datetime2"); + b.Property("ExtraProperties") .HasColumnType("nvarchar(max)") .HasColumnName("ExtraProperties"); - b.Property("Factory") - .HasColumnType("nvarchar(max)"); - b.Property("IsDeleted") .ValueGeneratedOnAdd() .HasColumnType("bit") @@ -591,51 +643,30 @@ namespace Win.Sfs.SettleAccount.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("LastModifierId"); - b.Property("Period") - .IsRequired() - .HasMaxLength(36) - .HasColumnType("nvarchar(36)"); - b.Property("Remark") .HasColumnType("nvarchar(max)"); - b.Property("Version") - .IsRequired() - .HasMaxLength(36) - .HasColumnType("nvarchar(36)"); - - b.Property("Year") - .IsRequired() - .HasMaxLength(36) - .HasColumnType("nvarchar(36)"); - b.HasKey("Id"); - b.HasIndex("Version") + b.HasIndex("BranchId", "DocumentNumber") .IsUnique() .HasFilter("IsDeleted=0"); - b.ToTable("Set_Unsettle_Version"); + b.ToTable("Set_bt_not_kb_consign_report"); }); - modelBuilder.Entity("Win.Sfs.SettleAccount.Entities.VWKanBan.KanBanSettle", b => + modelBuilder.Entity("Win.Sfs.SettleAccount.BTNotConsignReports.BTNotConsignReportDetail", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("uniqueidentifier"); - b.Property("Batch") - .HasMaxLength(50) - .HasColumnType("nvarchar(50)"); - b.Property("BranchId") + .HasMaxLength(36) .HasColumnType("uniqueidentifier"); - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("nvarchar(40)") - .HasColumnName("ConcurrencyStamp"); + b.Property("ConsignQty") + .HasColumnType("decimal(18,2)"); b.Property("CreationTime") .HasColumnType("datetime2") @@ -645,6 +676,9 @@ namespace Win.Sfs.SettleAccount.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("CreatorId"); + b.Property("CustomCode") + .HasColumnType("nvarchar(450)"); + b.Property("DeleterId") .HasColumnType("uniqueidentifier") .HasColumnName("DeleterId"); @@ -653,23 +687,19 @@ namespace Win.Sfs.SettleAccount.Migrations .HasColumnType("datetime2") .HasColumnName("DeletionTime"); - b.Property("Enabled") - .HasColumnType("bit"); - - b.Property("Extend") - .HasColumnType("nvarchar(max)"); + b.Property("DeliveryDateTime") + .HasColumnType("datetime2"); - b.Property("ExtraProperties") - .HasColumnType("nvarchar(max)") - .HasColumnName("ExtraProperties"); + b.Property("DocumentId") + .HasColumnType("uniqueidentifier"); - b.Property("Factory") - .HasMaxLength(50) - .HasColumnType("nvarchar(50)"); + b.Property("DocumentNumber") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); - b.Property("Flag") - .HasMaxLength(50) - .HasColumnType("nvarchar(50)"); + b.Property("Enabled") + .HasColumnType("bit"); b.Property("IsDeleted") .ValueGeneratedOnAdd() @@ -677,11 +707,6 @@ namespace Win.Sfs.SettleAccount.Migrations .HasDefaultValue(false) .HasColumnName("IsDeleted"); - b.Property("Kanban") - .IsRequired() - .HasMaxLength(150) - .HasColumnType("nvarchar(150)"); - b.Property("LastModificationTime") .HasColumnType("datetime2") .HasColumnName("LastModificationTime"); @@ -691,65 +716,51 @@ namespace Win.Sfs.SettleAccount.Migrations .HasColumnName("LastModifierId"); b.Property("MaterialCode") - .IsRequired() - .HasMaxLength(150) - .HasColumnType("nvarchar(150)"); - - b.Property("ParentId") - .HasColumnType("uniqueidentifier"); - - b.Property("PartType") - .HasMaxLength(50) - .HasColumnType("nvarchar(50)"); + .HasColumnType("nvarchar(450)"); - b.Property("Period") + b.Property("MaterialDesc") .HasColumnType("nvarchar(max)"); - b.Property("Qty") + b.Property("NeedQty") .HasColumnType("decimal(18,2)"); - b.Property("Relation") - .HasMaxLength(100) - .HasColumnType("nvarchar(100)"); + b.Property("OrderKBCode") + .HasColumnType("nvarchar(450)"); - b.Property("Remark") + b.Property("Period") .HasColumnType("nvarchar(max)"); - b.Property("SettleDate") - .HasColumnType("datetime2"); - - b.Property("SettleInputDate") - .HasColumnType("datetime2"); - - b.Property("State") + b.Property("Remark") .HasColumnType("nvarchar(max)"); - b.Property("SupplierCode") - .HasMaxLength(50) - .HasColumnType("nvarchar(50)"); + b.Property("State") + .HasColumnType("int"); b.Property("Version") - .HasColumnType("nvarchar(max)"); + .HasColumnType("nvarchar(450)"); b.Property("Year") .HasColumnType("nvarchar(max)"); b.HasKey("Id"); - b.HasIndex("Kanban", "MaterialCode") + b.HasIndex("DocumentId"); + + b.HasIndex("BranchId", "DocumentId", "Version", "CustomCode", "MaterialCode", "OrderKBCode") .IsUnique() .HasFilter("IsDeleted=0"); - b.ToTable("Set_KanBanSettle"); + b.ToTable("Set_bt_not_kb_consign_report_detail"); }); - modelBuilder.Entity("Win.Sfs.SettleAccount.Entities.VWKanBan.KanBanVersion", b => + modelBuilder.Entity("Win.Sfs.SettleAccount.BTSeqKBDiffReports.BTSeqKBDiffReport", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("uniqueidentifier"); b.Property("BranchId") + .HasMaxLength(36) .HasColumnType("uniqueidentifier"); b.Property("ConcurrencyStamp") @@ -766,9 +777,14 @@ namespace Win.Sfs.SettleAccount.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("CreatorId"); - b.Property("CustomerCode") - .HasMaxLength(36) - .HasColumnType("nvarchar(36)"); + b.Property("CreatorName") + .HasColumnType("nvarchar(max)"); + + b.Property("CustomCode") + .HasColumnType("nvarchar(max)"); + + b.Property("CustomName") + .HasColumnType("nvarchar(max)"); b.Property("DeleterId") .HasColumnType("uniqueidentifier") @@ -778,6 +794,17 @@ namespace Win.Sfs.SettleAccount.Migrations .HasColumnType("datetime2") .HasColumnName("DeletionTime"); + b.Property("DocumentNumber") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("DocumentStatus") + .HasColumnType("int"); + + b.Property("DocumentType") + .HasColumnType("int"); + b.Property("Enabled") .HasColumnType("bit"); @@ -800,50 +827,36 @@ namespace Win.Sfs.SettleAccount.Migrations .HasColumnName("LastModifierId"); b.Property("Period") - .IsRequired() - .HasMaxLength(36) - .HasColumnType("nvarchar(36)"); + .HasColumnType("nvarchar(max)"); b.Property("Remark") .HasColumnType("nvarchar(max)"); b.Property("Version") - .IsRequired() - .HasMaxLength(36) - .HasColumnType("nvarchar(36)"); + .HasColumnType("nvarchar(max)"); b.Property("Year") - .IsRequired() - .HasMaxLength(36) - .HasColumnType("nvarchar(36)"); + .HasColumnType("nvarchar(max)"); b.HasKey("Id"); - b.HasIndex("Version") + b.HasIndex("BranchId", "DocumentNumber") .IsUnique() .HasFilter("IsDeleted=0"); - b.ToTable("Set_KanBanSettle_Version"); + b.ToTable("Set_bt_seq_kb_diff_report"); }); - modelBuilder.Entity("Win.Sfs.SettleAccount.Entities.VWScrapClaims.ScrapClaims", b => + modelBuilder.Entity("Win.Sfs.SettleAccount.BTSeqKBDiffReports.BTSeqKBDiffReportDetail", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("uniqueidentifier"); - b.Property("Amt") - .HasColumnType("decimal(18,2)"); - b.Property("BranchId") + .HasMaxLength(36) .HasColumnType("uniqueidentifier"); - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("nvarchar(40)") - .HasColumnName("ConcurrencyStamp"); - b.Property("CreationTime") .HasColumnType("datetime2") .HasColumnName("CreationTime"); @@ -852,6 +865,12 @@ namespace Win.Sfs.SettleAccount.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("CreatorId"); + b.Property("CustomCode") + .HasColumnType("nvarchar(450)"); + + b.Property("DT") + .HasColumnType("datetime2"); + b.Property("DeleterId") .HasColumnType("uniqueidentifier") .HasColumnName("DeleterId"); @@ -860,15 +879,19 @@ namespace Win.Sfs.SettleAccount.Migrations .HasColumnType("datetime2") .HasColumnName("DeletionTime"); - b.Property("Enabled") - .HasColumnType("bit"); + b.Property("DiffQty") + .HasColumnType("decimal(18,2)"); - b.Property("Extend") - .HasColumnType("nvarchar(max)"); + b.Property("DocumentId") + .HasColumnType("uniqueidentifier"); - b.Property("ExtraProperties") - .HasColumnType("nvarchar(max)") - .HasColumnName("ExtraProperties"); + b.Property("DocumentNumber") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Enabled") + .HasColumnType("bit"); b.Property("IsDeleted") .ValueGeneratedOnAdd() @@ -876,6 +899,9 @@ namespace Win.Sfs.SettleAccount.Migrations .HasDefaultValue(false) .HasColumnName("IsDeleted"); + b.Property("KBQty") + .HasColumnType("decimal(18,2)"); + b.Property("LastModificationTime") .HasColumnType("datetime2") .HasColumnName("LastModificationTime"); @@ -885,52 +911,63 @@ namespace Win.Sfs.SettleAccount.Migrations .HasColumnName("LastModifierId"); b.Property("MaterialCode") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("nvarchar(50)"); - - b.Property("MaterialDesc") - .HasMaxLength(50) - .HasColumnType("nvarchar(50)"); + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); b.Property("Period") - .HasMaxLength(50) - .HasColumnType("nvarchar(50)"); - - b.Property("Qty") - .HasColumnType("decimal(18,2)"); + .HasColumnType("nvarchar(max)"); b.Property("Remark") - .HasMaxLength(1000) - .HasColumnType("nvarchar(1000)"); + .HasColumnType("nvarchar(max)"); - b.Property("Type") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("nvarchar(50)"); + b.Property("SeqQty") + .HasColumnType("decimal(18,2)"); b.Property("Version") - .HasMaxLength(50) - .HasColumnType("nvarchar(50)"); + .HasColumnType("nvarchar(450)"); b.Property("Year") - .HasMaxLength(50) - .HasColumnType("nvarchar(50)"); + .HasColumnType("nvarchar(max)"); b.HasKey("Id"); - b.ToTable("Set_ScrapClaims"); + b.HasIndex("DocumentId"); + + b.HasIndex("BranchId", "DocumentId", "Version", "DT", "CustomCode", "MaterialCode") + .IsUnique() + .HasFilter("IsDeleted=0"); + + b.ToTable("Set_bt_seq_kb_diff_report_detail"); }); - modelBuilder.Entity("Win.Sfs.SettleAccount.Entities.VWScrapClaims.ScrapClaimsVersion", b => + modelBuilder.Entity("Win.Sfs.SettleAccount.Boms.Bom", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("uniqueidentifier"); + b.Property("BomLevel") + .HasColumnType("int"); + + b.Property("BomType") + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + b.Property("BranchId") .HasColumnType("uniqueidentifier"); + b.Property("ChildItemCode") + .IsRequired() + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.Property("ChildItemDesc") + .HasMaxLength(2048) + .HasColumnType("nvarchar(2048)"); + + b.Property("ChildItemUom") + .HasColumnType("nvarchar(max)"); + b.Property("ConcurrencyStamp") .IsConcurrencyToken() .HasMaxLength(40) @@ -945,10 +982,6 @@ namespace Win.Sfs.SettleAccount.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("CreatorId"); - b.Property("CustomerCode") - .HasMaxLength(36) - .HasColumnType("nvarchar(36)"); - b.Property("DeleterId") .HasColumnType("uniqueidentifier") .HasColumnName("DeleterId"); @@ -957,19 +990,32 @@ namespace Win.Sfs.SettleAccount.Migrations .HasColumnType("datetime2") .HasColumnName("DeletionTime"); + b.Property("EffectiveTime") + .HasColumnType("datetime2"); + b.Property("Enabled") .HasColumnType("bit"); + b.Property("ExpireTime") + .HasColumnType("datetime2"); + b.Property("ExtraProperties") .HasColumnType("nvarchar(max)") .HasColumnName("ExtraProperties"); + b.Property("Factory") + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + b.Property("IsDeleted") .ValueGeneratedOnAdd() .HasColumnType("bit") .HasDefaultValue(false) .HasColumnName("IsDeleted"); + b.Property("IssuePosition") + .HasColumnType("nvarchar(max)"); + b.Property("LastModificationTime") .HasColumnType("datetime2") .HasColumnName("LastModificationTime"); @@ -978,59 +1024,89 @@ namespace Win.Sfs.SettleAccount.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("LastModifierId"); - b.Property("Period") + b.Property("OperateProcess") + .HasColumnType("int"); + + b.Property("ParentId") + .HasColumnType("uniqueidentifier"); + + b.Property("ParentItemCode") .IsRequired() .HasMaxLength(36) .HasColumnType("nvarchar(36)"); + b.Property("ParentItemDesc") + .HasMaxLength(2048) + .HasColumnType("nvarchar(2048)"); + + b.Property("Period") + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.Property("Qty") + .HasColumnType("decimal(18,2)"); + b.Property("Remark") .HasColumnType("nvarchar(max)"); + b.Property("ScrapPercent") + .HasColumnType("decimal(18,2)"); + b.Property("Version") - .IsRequired() .HasMaxLength(36) .HasColumnType("nvarchar(36)"); b.Property("Year") - .IsRequired() .HasMaxLength(36) .HasColumnType("nvarchar(36)"); b.HasKey("Id"); - b.HasIndex("Version") + b.HasIndex("ParentItemCode", "ChildItemCode", "Version") .IsUnique() .HasFilter("IsDeleted=0"); - b.ToTable("Set_ScrapClaims_Version"); + b.ToTable("Set_bom"); }); - modelBuilder.Entity("Win.Sfs.SettleAccount.Entities.VWSparePart.SparePart", b => + modelBuilder.Entity("Win.Sfs.SettleAccount.Customers.Customer", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("uniqueidentifier"); - b.Property("AccountNum") - .HasMaxLength(50) - .HasColumnType("nvarchar(50)"); - - b.Property("AmountNoTax") - .HasColumnType("decimal(18,2)"); - - b.Property("BatchNo") - .HasMaxLength(50) - .HasColumnType("nvarchar(50)"); + b.Property("Address") + .HasMaxLength(2048) + .HasColumnType("nvarchar(2048)"); b.Property("BranchId") + .HasMaxLength(36) .HasColumnType("uniqueidentifier"); + b.Property("Code") + .IsRequired() + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + b.Property("ConcurrencyStamp") .IsConcurrencyToken() .HasMaxLength(40) .HasColumnType("nvarchar(40)") .HasColumnName("ConcurrencyStamp"); + b.Property("Contact") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ContactEmail") + .HasColumnType("nvarchar(max)"); + + b.Property("ContactFax") + .HasColumnType("nvarchar(max)"); + + b.Property("ContactPhone") + .HasColumnType("nvarchar(max)"); + b.Property("CreationTime") .HasColumnType("datetime2") .HasColumnName("CreationTime"); @@ -1039,6 +1115,12 @@ namespace Win.Sfs.SettleAccount.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("CreatorId"); + b.Property("CurrencyId") + .HasColumnType("uniqueidentifier"); + + b.Property("CustomerType") + .HasColumnType("int"); + b.Property("DeleterId") .HasColumnType("uniqueidentifier") .HasColumnName("DeleterId"); @@ -1047,41 +1129,17 @@ namespace Win.Sfs.SettleAccount.Migrations .HasColumnType("datetime2") .HasColumnName("DeletionTime"); - b.Property("DeliveryLineNum") - .HasMaxLength(50) - .HasColumnType("nvarchar(50)"); - - b.Property("DeliveryOrderNo") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("nvarchar(50)"); + b.Property("Description") + .HasMaxLength(2048) + .HasColumnType("nvarchar(2048)"); b.Property("Enabled") .HasColumnType("bit"); - b.Property("Extend") - .HasMaxLength(250) - .HasColumnType("nvarchar(250)"); - b.Property("ExtraProperties") .HasColumnType("nvarchar(max)") .HasColumnName("ExtraProperties"); - b.Property("Factory") - .HasMaxLength(50) - .HasColumnType("nvarchar(50)"); - - b.Property("FactoryName") - .HasMaxLength(50) - .HasColumnType("nvarchar(50)"); - - b.Property("GermanInvoiceNo") - .HasMaxLength(100) - .HasColumnType("nvarchar(100)"); - - b.Property("InvoicedQty") - .HasColumnType("decimal(18,2)"); - b.Property("IsDeleted") .ValueGeneratedOnAdd() .HasColumnType("bit") @@ -1096,76 +1154,189 @@ namespace Win.Sfs.SettleAccount.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("LastModifierId"); - b.Property("LineNumber") - .HasMaxLength(50) - .HasColumnType("nvarchar(50)"); + b.Property("Name") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); - b.Property("MaterialCode") + b.Property("Remark") + .HasColumnType("nvarchar(max)"); + + b.Property("TaxRate") + .HasColumnType("decimal(18,2)"); + + b.HasKey("Id"); + + b.HasIndex("BranchId", "Code") + .IsUnique() + .HasFilter("IsDeleted=0"); + + b.ToTable("Set_customer"); + }); + + modelBuilder.Entity("Win.Sfs.SettleAccount.Customers.CustomerBom", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("BranchId") + .HasColumnType("uniqueidentifier"); + + b.Property("ChildItemCode") .IsRequired() - .HasMaxLength(150) - .HasColumnType("nvarchar(150)"); + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); - b.Property("MaterialDesc") - .HasMaxLength(50) - .HasColumnType("nvarchar(50)"); + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); - b.Property("Period") - .HasMaxLength(36) - .HasColumnType("nvarchar(36)"); + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); - b.Property("PurchaseOrderNo") + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("CustomerCode") .IsRequired() - .HasMaxLength(50) - .HasColumnType("nvarchar(50)"); + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); - b.Property("PurchaseOrderNoItem") - .HasMaxLength(50) - .HasColumnType("nvarchar(50)"); + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); - b.Property("PurchaseOrderNoText") - .HasMaxLength(50) - .HasColumnType("nvarchar(50)"); + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); - b.Property("PurchasePriceNoTax") - .HasColumnType("decimal(18,2)"); + b.Property("EffectiveTime") + .HasColumnType("datetime2"); - b.Property("PurchaseType") - .HasMaxLength(50) - .HasColumnType("nvarchar(50)"); + b.Property("Enabled") + .HasColumnType("bit"); - b.Property("ReceiptQty") + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("FailureTime") + .HasColumnType("datetime2"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("ParentItemCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Qty") .HasColumnType("decimal(18,2)"); b.Property("Remark") .HasColumnType("nvarchar(max)"); - b.Property("SpareDate") - .HasColumnType("datetime2"); + b.HasKey("Id"); - b.Property("TaxCode") - .HasColumnType("nvarchar(max)"); + b.HasIndex("BranchId", "CustomerCode", "ParentItemCode", "ChildItemCode") + .IsUnique() + .HasFilter("IsDeleted=0"); - b.Property("TaxRate") - .HasColumnType("decimal(18,2)"); + b.ToTable("Set_customer_bom"); + }); - b.Property("Unit") - .HasMaxLength(50) - .HasColumnType("nvarchar(50)"); + modelBuilder.Entity("Win.Sfs.SettleAccount.Entities.BTCarConsigns.BTCarConsignVersion", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); - b.Property("Version") + b.Property("BranchId") + .HasColumnType("uniqueidentifier"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("CustomerCode") + .IsRequired() .HasMaxLength(36) .HasColumnType("nvarchar(36)"); - b.Property("Year") + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("Enabled") + .HasColumnType("bit"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Period") + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.Property("Remark") + .HasColumnType("nvarchar(max)"); + + b.Property("Version") + .IsRequired() .HasMaxLength(36) .HasColumnType("nvarchar(36)"); b.HasKey("Id"); - b.ToTable("Set_SparePart"); + b.ToTable("Set_btcarconsign_version"); }); - modelBuilder.Entity("Win.Sfs.SettleAccount.Entities.VWSparePart.SparePartVersion", b => + modelBuilder.Entity("Win.Sfs.SettleAccount.Entities.BTCarKBs.BTCarKBVersion", b => { b.Property("Id") .ValueGeneratedOnAdd() @@ -1192,6 +1363,9 @@ namespace Win.Sfs.SettleAccount.Migrations .HasMaxLength(36) .HasColumnType("nvarchar(36)"); + b.Property("DateTime") + .HasColumnType("datetime2"); + b.Property("DeleterId") .HasColumnType("uniqueidentifier") .HasColumnName("DeleterId"); @@ -1222,7 +1396,6 @@ namespace Win.Sfs.SettleAccount.Migrations .HasColumnName("LastModifierId"); b.Property("Period") - .IsRequired() .HasMaxLength(36) .HasColumnType("nvarchar(36)"); @@ -1234,18 +1407,8493 @@ namespace Win.Sfs.SettleAccount.Migrations .HasMaxLength(36) .HasColumnType("nvarchar(36)"); + b.HasKey("Id"); + + b.ToTable("Set_btcarkb_version"); + }); + + modelBuilder.Entity("Win.Sfs.SettleAccount.Entities.BTCarSeqFirsts.BTCarSeqFirstVersion", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("BranchId") + .HasColumnType("uniqueidentifier"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("CustomerCode") + .IsRequired() + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.Property("DT") + .HasColumnType("datetime2"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("Enabled") + .HasColumnType("bit"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Period") + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.Property("Remark") + .HasColumnType("nvarchar(max)"); + + b.Property("Version") + .IsRequired() + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.HasKey("Id"); + + b.ToTable("Set_btcarseqfirst_version"); + }); + + modelBuilder.Entity("Win.Sfs.SettleAccount.Entities.BTCarSeqSeconds.BTCarSeqSecondVersion", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("BranchId") + .HasColumnType("uniqueidentifier"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("CustomerCode") + .IsRequired() + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.Property("DateTime") + .HasColumnType("datetime2"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("Enabled") + .HasColumnType("bit"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Period") + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.Property("Remark") + .HasColumnType("nvarchar(max)"); + + b.Property("Version") + .IsRequired() + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.HasKey("Id"); + + b.ToTable("Set_btcarseqsecond_version"); + }); + + modelBuilder.Entity("Win.Sfs.SettleAccount.Entities.BTCarSeqs.BTCarSeqVersion", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("BranchId") + .HasColumnType("uniqueidentifier"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("CustomerCode") + .IsRequired() + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.Property("DT") + .HasColumnType("datetime2"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("Enabled") + .HasColumnType("bit"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Period") + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.Property("Remark") + .HasColumnType("nvarchar(max)"); + + b.Property("Version") + .IsRequired() + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.HasKey("Id"); + + b.ToTable("Set_btcarseq_version"); + }); + + modelBuilder.Entity("Win.Sfs.SettleAccount.Entities.Boms.BomVersion", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("BranchId") + .HasColumnType("uniqueidentifier"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("CustomerCode") + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("Enabled") + .HasColumnType("bit"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("Factory") + .HasColumnType("nvarchar(max)"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Period") + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.Property("Remark") + .HasColumnType("nvarchar(max)"); + + b.Property("Version") + .IsRequired() + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.Property("Year") + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.HasKey("Id"); + + b.ToTable("Set_bom_version"); + }); + + modelBuilder.Entity("Win.Sfs.SettleAccount.Entities.CarMaterialConfigs.CarMaterialConfig", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("BranchId") + .HasColumnType("uniqueidentifier"); + + b.Property("CarCode") + .IsRequired() + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("Enabled") + .HasColumnType("bit"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("MaterialCode") + .IsRequired() + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.Property("Qty") + .HasColumnType("decimal(18,2)"); + + b.Property("Remark") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("CarCode", "MaterialCode") + .IsUnique() + .HasFilter("IsDeleted=0"); + + b.ToTable("Set_carmaterialconfig"); + }); + + modelBuilder.Entity("Win.Sfs.SettleAccount.Entities.CodeSettings.CodeSetting", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("BranchId") + .HasColumnType("uniqueidentifier"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("Description") + .HasColumnType("nvarchar(max)"); + + b.Property("Enabled") + .HasColumnType("bit"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Project") + .IsRequired() + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.Property("Remark") + .HasColumnType("nvarchar(max)"); + + b.Property("Value") + .IsRequired() + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.HasKey("Id"); + + b.HasIndex("Project", "Value") + .IsUnique() + .HasFilter("IsDeleted=0"); + + b.ToTable("Set_code"); + }); + + modelBuilder.Entity("Win.Sfs.SettleAccount.Entities.Controls.CentralizedControl", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("BranchId") + .HasColumnType("uniqueidentifier"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("Enabled") + .HasColumnType("bit"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Period") + .IsRequired() + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.Property("Remark") + .HasColumnType("nvarchar(max)"); + + b.Property("State") + .HasColumnType("int"); + + b.Property("Version") + .HasColumnType("nvarchar(max)"); + + b.Property("Year") + .IsRequired() + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.HasKey("Id"); + + b.HasIndex("Year", "Period") + .IsUnique() + .HasFilter("IsDeleted=0"); + + b.ToTable("Set_control"); + }); + + modelBuilder.Entity("Win.Sfs.SettleAccount.Entities.EstimatedInventories.EstimatedInventoryVersion", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("BranchId") + .HasColumnType("uniqueidentifier"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("CustomerCode") + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("Enabled") + .HasColumnType("bit"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("Factory") + .HasColumnType("nvarchar(max)"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Period") + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.Property("Remark") + .HasColumnType("nvarchar(max)"); + + b.Property("Version") + .IsRequired() + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.Property("Year") + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.HasKey("Id"); + + b.ToTable("Set_estinventory_version"); + }); + + modelBuilder.Entity("Win.Sfs.SettleAccount.Entities.EstimatedSums.EstimatedSum", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("BranchId") + .HasColumnType("uniqueidentifier"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("Enabled") + .HasColumnType("bit"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("MaterialCode") + .IsRequired() + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.Property("MaterialDesc") + .HasColumnType("nvarchar(max)"); + + b.Property("ParentId") + .HasColumnType("uniqueidentifier"); + + b.Property("Postingperiod") + .IsRequired() + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.Property("PurchaseDocument") + .HasColumnType("nvarchar(max)"); + + b.Property("PurchaseLine") + .HasColumnType("nvarchar(max)"); + + b.Property("Qty") + .HasColumnType("decimal(18,2)"); + + b.Property("Remark") + .HasColumnType("nvarchar(max)"); + + b.Property("SupplierCode") + .HasColumnType("nvarchar(max)"); + + b.Property("SupplierDesc") + .HasColumnType("nvarchar(max)"); + + b.Property("Version") + .IsRequired() + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.Property("Year") + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.HasKey("Id"); + + b.ToTable("Set_estsum"); + }); + + modelBuilder.Entity("Win.Sfs.SettleAccount.Entities.EstimatedSums.EstimatedSumVersion", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("BranchId") + .HasColumnType("uniqueidentifier"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("CustomerCode") + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("Enabled") + .HasColumnType("bit"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("Factory") + .HasColumnType("nvarchar(max)"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Period") + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.Property("Remark") + .HasColumnType("nvarchar(max)"); + + b.Property("Version") + .IsRequired() + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.Property("Year") + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.HasKey("Id"); + + b.ToTable("Set_estsum_verion"); + }); + + modelBuilder.Entity("Win.Sfs.SettleAccount.Entities.FISes.FIS_TH", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("BeginTime") + .HasColumnType("datetime2"); + + b.Property("BranchId") + .HasColumnType("uniqueidentifier"); + + b.Property("CP5Time") + .HasColumnType("datetime2"); + + b.Property("CP7Time") + .HasColumnType("datetime2"); + + b.Property("ChassisNumber") + .IsRequired() + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.Property("ChassisNumber2") + .HasColumnType("nvarchar(450)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("Enabled") + .HasColumnType("bit"); + + b.Property("EndTime") + .HasColumnType("datetime2"); + + b.Property("ErpMaterialCode") + .IsRequired() + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.Property("Extend1") + .HasColumnType("nvarchar(max)"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("Factory") + .HasColumnType("nvarchar(max)"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("KENNCode") + .HasColumnType("nvarchar(max)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("MaterialCode") + .IsRequired() + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.Property("Model") + .HasColumnType("nvarchar(450)"); + + b.Property("OrderBillNum") + .IsRequired() + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.Property("ParentId") + .HasColumnType("uniqueidentifier"); + + b.Property("Period") + .IsRequired() + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.Property("Qty") + .HasColumnType("decimal(18,2)"); + + b.Property("Remark") + .HasColumnType("nvarchar(max)"); + + b.Property("SequenceNumber") + .HasColumnType("nvarchar(max)"); + + b.Property("SettledQty") + .HasColumnType("decimal(18,2)"); + + b.Property("State") + .HasColumnType("int"); + + b.Property("Version") + .IsRequired() + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.Property("Year") + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.HasKey("Id"); + + b.HasIndex("ChassisNumber2", "Version", "Model", "MaterialCode") + .IsUnique() + .HasFilter("[ChassisNumber2] IS NOT NULL AND [Model] IS NOT NULL"); + + b.ToTable("Set_fis_th"); + }); + + modelBuilder.Entity("Win.Sfs.SettleAccount.Entities.Factories.Factory", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("BranchId") + .HasColumnType("uniqueidentifier"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("CustomerCode") + .HasColumnType("nvarchar(max)"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("Desc") + .IsRequired() + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.Property("Enabled") + .HasColumnType("bit"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Remark") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("Code") + .IsUnique() + .HasFilter("IsDeleted=0"); + + b.ToTable("Set_factory"); + }); + + modelBuilder.Entity("Win.Sfs.SettleAccount.Entities.HQCarConsigns.HQConsign", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("BranchId") + .HasColumnType("uniqueidentifier"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("CustomerCode") + .IsRequired() + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("Enabled") + .HasColumnType("bit"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("MaterialCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("MaterialDesc") + .HasMaxLength(200) + .HasColumnType("nvarchar(200)"); + + b.Property("ParentId") + .HasColumnType("uniqueidentifier"); + + b.Property("Qty") + .HasColumnType("decimal(18,2)"); + + b.Property("Remark") + .HasColumnType("nvarchar(max)"); + + b.Property("State") + .HasColumnType("int"); + + b.Property("VIN") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("nvarchar(100)"); + + b.Property("Version") + .IsRequired() + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.HasKey("Id"); + + b.HasIndex("CustomerCode", "MaterialCode", "VIN", "Version") + .IsUnique() + .HasFilter("IsDeleted=0"); + + b.ToTable("Set_hqcon"); + }); + + modelBuilder.Entity("Win.Sfs.SettleAccount.Entities.HQCarConsigns.HQConsignVersion", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("BranchId") + .HasColumnType("uniqueidentifier"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("CustomerCode") + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("Enabled") + .HasColumnType("bit"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Period") + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.Property("Remark") + .HasColumnType("nvarchar(max)"); + + b.Property("Version") + .IsRequired() + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.HasKey("Id"); + + b.ToTable("Set_hqcon_version"); + }); + + modelBuilder.Entity("Win.Sfs.SettleAccount.Entities.HQCarConsigns.HQSpecConsign", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("BranchId") + .HasColumnType("uniqueidentifier"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("CustomerCode") + .IsRequired() + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("Enabled") + .HasColumnType("bit"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("KBCode") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("nvarchar(100)"); + + b.Property("KBCodeExtend") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("nvarchar(100)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("MaterialCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("MaterialDesc") + .HasMaxLength(200) + .HasColumnType("nvarchar(200)"); + + b.Property("ParentId") + .HasColumnType("uniqueidentifier"); + + b.Property("Qty") + .HasColumnType("decimal(18,2)"); + + b.Property("Remark") + .HasColumnType("nvarchar(max)"); + + b.Property("State") + .HasColumnType("int"); + + b.Property("Version") + .IsRequired() + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.HasKey("Id"); + + b.HasIndex("CustomerCode", "MaterialCode", "KBCode", "KBCodeExtend", "Version") + .IsUnique() + .HasFilter("IsDeleted=0"); + + b.ToTable("Set_hqspcon"); + }); + + modelBuilder.Entity("Win.Sfs.SettleAccount.Entities.HQCarConsigns.HQSpecConsignVersion", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("BranchId") + .HasColumnType("uniqueidentifier"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("CustomerCode") + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("Enabled") + .HasColumnType("bit"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Period") + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.Property("Remark") + .HasColumnType("nvarchar(max)"); + + b.Property("Version") + .IsRequired() + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.HasKey("Id"); + + b.ToTable("Set_hqspcon_version"); + }); + + modelBuilder.Entity("Win.Sfs.SettleAccount.Entities.HQCarKBs.HQKB", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("BranchId") + .HasColumnType("uniqueidentifier"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("ConsignQty") + .HasColumnType("decimal(18,2)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("CustomerCode") + .IsRequired() + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("Enabled") + .HasColumnType("bit"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("KBCode") + .HasColumnType("nvarchar(max)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("MaterialCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("MaterialDesc") + .HasMaxLength(200) + .HasColumnType("nvarchar(200)"); + + b.Property("NeedQty") + .HasColumnType("decimal(18,2)"); + + b.Property("ParentId") + .HasColumnType("uniqueidentifier"); + + b.Property("Remark") + .HasColumnType("nvarchar(max)"); + + b.Property("State") + .HasColumnType("int"); + + b.Property("VIN") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("nvarchar(100)"); + + b.Property("Version") + .IsRequired() + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.HasKey("Id"); + + b.HasIndex("CustomerCode", "MaterialCode", "VIN", "Version") + .IsUnique() + .HasFilter("IsDeleted=0"); + + b.ToTable("Set_hqkb"); + }); + + modelBuilder.Entity("Win.Sfs.SettleAccount.Entities.HQCarKBs.HQKBVersion", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("BranchId") + .HasColumnType("uniqueidentifier"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("CustomerCode") + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("Enabled") + .HasColumnType("bit"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Period") + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.Property("Remark") + .HasColumnType("nvarchar(max)"); + + b.Property("Version") + .IsRequired() + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.HasKey("Id"); + + b.ToTable("Set_hqkb_version"); + }); + + modelBuilder.Entity("Win.Sfs.SettleAccount.Entities.HQCarKBs.HQSpecKB", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("BranchId") + .HasColumnType("uniqueidentifier"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("ConsignQty") + .HasColumnType("decimal(18,2)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("CustomerCode") + .IsRequired() + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("Enabled") + .HasColumnType("bit"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("KBCode") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("nvarchar(100)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("MaterialCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("MaterialDesc") + .HasMaxLength(200) + .HasColumnType("nvarchar(200)"); + + b.Property("NeedQty") + .HasColumnType("decimal(18,2)"); + + b.Property("ParentId") + .HasColumnType("uniqueidentifier"); + + b.Property("Remark") + .HasColumnType("nvarchar(max)"); + + b.Property("State") + .HasColumnType("int"); + + b.Property("Version") + .IsRequired() + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.HasKey("Id"); + + b.HasIndex("CustomerCode", "MaterialCode", "KBCode", "Version") + .IsUnique() + .HasFilter("[MaterialCode] IS NOT NULL"); + + b.ToTable("Set_hqspkb"); + }); + + modelBuilder.Entity("Win.Sfs.SettleAccount.Entities.HQCarKBs.HQSpecKBVersion", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("BranchId") + .HasColumnType("uniqueidentifier"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("CustomerCode") + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("Enabled") + .HasColumnType("bit"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Period") + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.Property("Remark") + .HasColumnType("nvarchar(max)"); + + b.Property("Version") + .IsRequired() + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.HasKey("Id"); + + b.ToTable("Set_hqspkb_version"); + }); + + modelBuilder.Entity("Win.Sfs.SettleAccount.Entities.ImportMap.ImportColumnMap", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("BranchId") + .HasColumnType("uniqueidentifier"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("Enabled") + .HasColumnType("bit"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("IsCheck") + .HasColumnType("bit"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("NewColumnName") + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.Property("OldColumnName") + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.Property("ProjectName") + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.Property("Remark") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.ToTable("Set_importmap"); + }); + + modelBuilder.Entity("Win.Sfs.SettleAccount.Entities.Inventories.InventoryDetailVersion", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("BranchId") + .HasColumnType("uniqueidentifier"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("CustomerCode") + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("Enabled") + .HasColumnType("bit"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("Factory") + .HasColumnType("nvarchar(450)"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Period") + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.Property("Remark") + .HasColumnType("nvarchar(max)"); + + b.Property("Version") + .IsRequired() + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.Property("Year") + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.HasKey("Id"); + + b.HasIndex("Version", "Factory") + .IsUnique() + .HasFilter("IsDeleted=0"); + + b.ToTable("Set_inventory_version"); + }); + + modelBuilder.Entity("Win.Sfs.SettleAccount.Entities.Invoices.Invoice", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("Amt") + .HasColumnType("decimal(18,2)"); + + b.Property("BranchId") + .HasColumnType("uniqueidentifier"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("Enabled") + .HasColumnType("bit"); + + b.Property("Extend") + .HasColumnType("nvarchar(max)"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("Factory") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("MaterialCode") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("MaterialDesc") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Period") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Qty") + .HasColumnType("decimal(18,2)"); + + b.Property("Remark") + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("Version") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Year") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.HasKey("Id"); + + b.ToTable("Set_Invoice"); + }); + + modelBuilder.Entity("Win.Sfs.SettleAccount.Entities.Invoices.InvoiceVersion", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("BranchId") + .HasColumnType("uniqueidentifier"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("CustomerCode") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("Enabled") + .HasColumnType("bit"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Period") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Remark") + .HasColumnType("nvarchar(max)"); + + b.Property("Version") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Year") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.HasKey("Id"); + + b.ToTable("Set_InvoiceVersion"); + }); + + modelBuilder.Entity("Win.Sfs.SettleAccount.Entities.ItemInvoicePrices.ItemInvoicePrice", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("Backorder") + .HasColumnType("nvarchar(max)"); + + b.Property("BranchId") + .HasColumnType("uniqueidentifier"); + + b.Property("CC") + .HasColumnType("nvarchar(max)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("Enabled") + .HasColumnType("bit"); + + b.Property("ExtendedMargin") + .HasColumnType("decimal(18,2)"); + + b.Property("ExtendedPrice") + .HasColumnType("decimal(18,2)"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("Factory") + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("MaterialCode") + .IsRequired() + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.Property("MaterialDesc") + .HasColumnType("nvarchar(max)"); + + b.Property("Period") + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.Property("Price") + .HasColumnType("decimal(18,2)"); + + b.Property("Remark") + .HasColumnType("nvarchar(max)"); + + b.Property("Sales") + .HasColumnType("nvarchar(max)"); + + b.Property("SubAcct") + .HasColumnType("nvarchar(max)"); + + b.Property("UM") + .HasColumnType("nvarchar(max)"); + + b.Property("Version") + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.Property("Year") + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.HasKey("Id"); + + b.HasIndex("Period", "Version", "MaterialCode") + .IsUnique() + .HasFilter("IsDeleted=0"); + + b.ToTable("Set_item_invoice_price"); + }); + + modelBuilder.Entity("Win.Sfs.SettleAccount.Entities.ItemInvoicePrices.ItemInvoicePriceVersion", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("BranchId") + .HasColumnType("uniqueidentifier"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("CustomerCode") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("Enabled") + .HasColumnType("bit"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("Factory") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Period") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Remark") + .HasColumnType("nvarchar(max)"); + + b.Property("Version") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Year") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.HasKey("Id"); + + b.ToTable("Set_item_invoice_price_version"); + }); + + modelBuilder.Entity("Win.Sfs.SettleAccount.Entities.JFCarConsigns.JFCarConsignVersion", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("BranchId") + .HasColumnType("uniqueidentifier"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("CustomerCode") + .IsRequired() + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("Enabled") + .HasColumnType("bit"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Period") + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.Property("Remark") + .HasColumnType("nvarchar(max)"); + + b.Property("Version") + .IsRequired() + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.HasKey("Id"); + + b.ToTable("Set_jfcarconsign_version"); + }); + + modelBuilder.Entity("Win.Sfs.SettleAccount.Entities.JFCarKBs.JFCarKBVersion", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("BranchId") + .HasColumnType("uniqueidentifier"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("CustomerCode") + .IsRequired() + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("Enabled") + .HasColumnType("bit"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Period") + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.Property("Remark") + .HasColumnType("nvarchar(max)"); + + b.Property("Version") + .IsRequired() + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.HasKey("Id"); + + b.ToTable("Set_jfcarkb_version"); + }); + + modelBuilder.Entity("Win.Sfs.SettleAccount.Entities.MaterialRelationships.MaterialRelationshipDetail", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("AppraisalCategory") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("BranchId") + .HasColumnType("uniqueidentifier"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(50) + .HasColumnType("nvarchar(50)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("CustomerCode") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("Enabled") + .HasColumnType("bit"); + + b.Property("ErpMaterialCode") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("MaterialDesc") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("MaterialProperty") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Qty") + .HasColumnType("decimal(18,2)"); + + b.Property("Remark") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("SettleMaterialCode") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("ShipMaterailCode") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Version") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.HasKey("Id"); + + b.ToTable("Set_MaterialRelationshipDetail"); + }); + + modelBuilder.Entity("Win.Sfs.SettleAccount.Entities.MaterialRelationships.MaterialRelationshipVersion", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("BranchId") + .HasColumnType("uniqueidentifier"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(50) + .HasColumnType("nvarchar(50)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("CustomerCode") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("Enabled") + .HasColumnType("bit"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("Factory") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Period") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Remark") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Version") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Year") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.HasKey("Id"); + + b.ToTable("Set_MaterialRelationshipVersion"); + }); + + modelBuilder.Entity("Win.Sfs.SettleAccount.Entities.Materials.Material", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("BranchId") + .HasColumnType("uniqueidentifier"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("Enabled") + .HasColumnType("bit"); + + b.Property("EstimateType") + .IsRequired() + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.Property("EstimateTypeDesc") + .HasColumnType("nvarchar(max)"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("Factory") + .HasColumnType("nvarchar(max)"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("MaterialCode") + .IsRequired() + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.Property("MaterialDesc") + .HasColumnType("nvarchar(max)"); + + b.Property("Remark") + .HasColumnType("nvarchar(max)"); + + b.Property("Unit") + .IsRequired() + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.HasKey("Id"); + + b.HasIndex("MaterialCode") + .IsUnique() + .HasFilter("IsDeleted=0"); + + b.ToTable("Set_material"); + }); + + modelBuilder.Entity("Win.Sfs.SettleAccount.Entities.Prices.PriceList", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("BeginDate") + .HasColumnType("datetime2"); + + b.Property("BranchId") + .HasColumnType("uniqueidentifier"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("CustomerCode") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("Enabled") + .HasColumnType("bit"); + + b.Property("EndDate") + .HasColumnType("datetime2"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("MaterialCode") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("ParentId") + .HasColumnType("uniqueidentifier"); + + b.Property("Price") + .HasColumnType("decimal(18,2)"); + + b.Property("Remark") + .HasColumnType("nvarchar(max)"); + + b.Property("Type") + .HasColumnType("int"); + + b.Property("Version") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.ToTable("Set_PriceList"); + }); + + modelBuilder.Entity("Win.Sfs.SettleAccount.Entities.Prices.PriceListVersion", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("BranchId") + .HasColumnType("uniqueidentifier"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("Enabled") + .HasColumnType("bit"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("Factory") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Period") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Remark") + .HasColumnType("nvarchar(max)"); + + b.Property("Version") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Year") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.HasKey("Id"); + + b.ToTable("Set_PriceListVersion"); + }); + + modelBuilder.Entity("Win.Sfs.SettleAccount.Entities.SecMatch.SecMatchBase", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("BranchId") + .HasColumnType("uniqueidentifier"); + + b.Property("Buyer") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(50) + .HasColumnType("nvarchar(50)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("DiffAmount") + .HasColumnType("decimal(18,2)"); + + b.Property("DiffPrice") + .HasColumnType("decimal(18,2)"); + + b.Property("Enabled") + .HasColumnType("bit"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("Factory") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Index") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("IsDiffNumber") + .HasColumnType("bit"); + + b.Property("IsSettle") + .HasColumnType("nvarchar(max)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("MaterialDesc") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("MaterialPartCode") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Model") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("PartType") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Price") + .HasColumnType("decimal(18,2)"); + + b.Property("RealSettlementNumber") + .HasColumnType("decimal(18,2)"); + + b.Property("RealSettlementPrice") + .HasColumnType("decimal(18,2)"); + + b.Property("Remark") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("SettleMentPartCode") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("SettlementNumber") + .HasColumnType("decimal(18,2)"); + + b.Property("SettlementPrice") + .HasColumnType("decimal(18,2)"); + + b.Property("SupplierCode") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("SupplierName") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("SupplyProportion") + .HasMaxLength(50) + .HasColumnType("decimal(18,2)"); + + b.Property("TheoreticalSettlementNumber") + .HasColumnType("decimal(18,2)"); + + b.Property("UsedNumber") + .HasMaxLength(50) + .HasColumnType("decimal(18,2)"); + + b.Property("Version") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.HasKey("Id"); + + b.ToTable("Set_SecMatchBase"); + }); + + modelBuilder.Entity("Win.Sfs.SettleAccount.Entities.SecondaryMatching.SecondaryAdjustment", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("Amt") + .HasColumnType("decimal(18,2)"); + + b.Property("BranchId") + .HasColumnType("uniqueidentifier"); + + b.Property("Buyer") + .HasColumnType("nvarchar(max)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("CustomerComponentCode") + .IsRequired() + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.Property("CustomerMaterialCode") + .IsRequired() + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("Enabled") + .HasColumnType("bit"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("HasChanged") + .HasColumnType("nvarchar(max)"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("ParentId") + .HasColumnType("uniqueidentifier"); + + b.Property("Period") + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.Property("Qty") + .HasColumnType("decimal(18,2)"); + + b.Property("Remark") + .HasColumnType("nvarchar(max)"); + + b.Property("SupplierCode") + .HasColumnType("nvarchar(450)"); + + b.Property("Total") + .HasColumnType("decimal(18,2)"); + + b.Property("Version") + .HasColumnType("nvarchar(450)"); + + b.Property("Year") + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.HasKey("Id"); + + b.HasIndex("Version", "CustomerComponentCode", "CustomerMaterialCode", "SupplierCode") + .IsUnique() + .HasFilter("IsDeleted=0"); + + b.ToTable("Set_sec_adj"); + }); + + modelBuilder.Entity("Win.Sfs.SettleAccount.Entities.SecondaryMatching.SecondaryAdjustmentVersion", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("BranchId") + .HasColumnType("uniqueidentifier"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("CustomerCode") + .HasColumnType("nvarchar(max)"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("Enabled") + .HasColumnType("bit"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("Factory") + .HasColumnType("nvarchar(max)"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Period") + .IsRequired() + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.Property("Remark") + .HasColumnType("nvarchar(max)"); + + b.Property("Version") + .HasColumnType("nvarchar(450)"); + + b.Property("Year") + .IsRequired() + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.HasKey("Id"); + + b.HasIndex("Version") + .IsUnique() + .HasFilter("IsDeleted=0"); + + b.ToTable("Set_sec_adj_version"); + }); + + modelBuilder.Entity("Win.Sfs.SettleAccount.Entities.SecondaryMatching.SecondaryDiscount", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("Amt") + .HasColumnType("decimal(18,2)"); + + b.Property("BranchId") + .HasColumnType("uniqueidentifier"); + + b.Property("Buyer") + .HasColumnType("nvarchar(max)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("Enabled") + .HasColumnType("bit"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("HasChanged") + .HasColumnType("nvarchar(max)"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("ParentId") + .HasColumnType("uniqueidentifier"); + + b.Property("Period") + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.Property("Qty") + .HasColumnType("decimal(18,2)"); + + b.Property("Remark") + .HasColumnType("nvarchar(max)"); + + b.Property("SupplierCode") + .IsRequired() + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.Property("Total") + .HasColumnType("decimal(18,2)"); + + b.Property("Version") + .HasColumnType("nvarchar(max)"); + + b.Property("Year") + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.HasKey("Id"); + + b.HasIndex("SupplierCode") + .IsUnique() + .HasFilter("IsDeleted=0"); + + b.ToTable("Set_sec_dis"); + }); + + modelBuilder.Entity("Win.Sfs.SettleAccount.Entities.SecondaryMatching.SecondaryDiscountVersion", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("BranchId") + .HasColumnType("uniqueidentifier"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("CustomerCode") + .HasColumnType("nvarchar(max)"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("Enabled") + .HasColumnType("bit"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("Factory") + .HasColumnType("nvarchar(max)"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Period") + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.Property("Remark") + .HasColumnType("nvarchar(max)"); + + b.Property("Version") + .IsRequired() + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.Property("Year") + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.HasKey("Id"); + + b.HasIndex("Version") + .IsUnique() + .HasFilter("IsDeleted=0"); + + b.ToTable("Set_sec_dis_version"); + }); + + modelBuilder.Entity("Win.Sfs.SettleAccount.Entities.SecondaryMatching.SecondaryPriceRatio", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("BranchId") + .HasColumnType("uniqueidentifier"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("CustomItemCode") + .IsRequired() + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.Property("CustomItemPrice") + .HasColumnType("decimal(18,2)"); + + b.Property("CustomSubItemCode") + .HasColumnType("nvarchar(450)"); + + b.Property("CustomSubItemPrice") + .HasColumnType("decimal(18,2)"); + + b.Property("CustomerCode") + .IsRequired() + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("Enabled") + .HasColumnType("bit"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("ParentId") + .HasColumnType("uniqueidentifier"); + + b.Property("Period") + .IsRequired() + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.Property("Remark") + .HasColumnType("nvarchar(max)"); + + b.Property("SupplierCode") + .HasColumnType("nvarchar(450)"); + + b.Property("SupplierDesc") + .HasColumnType("nvarchar(max)"); + + b.Property("SupplyProportion") + .HasColumnType("nvarchar(max)"); + + b.Property("SupplyProportionPrice") + .HasColumnType("decimal(18,2)"); + + b.Property("Version") + .HasColumnType("nvarchar(450)"); + + b.Property("Year") + .IsRequired() + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.HasKey("Id"); + + b.HasIndex("Version", "CustomItemCode", "CustomSubItemCode", "SupplierCode") + .IsUnique() + .HasFilter("IsDeleted=0"); + + b.ToTable("Set_sec_ratio"); + }); + + modelBuilder.Entity("Win.Sfs.SettleAccount.Entities.SecondaryMatching.SecondaryPriceRatioVersion", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("BranchId") + .HasColumnType("uniqueidentifier"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("CustomerCode") + .HasColumnType("nvarchar(max)"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("Enabled") + .HasColumnType("bit"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("Factory") + .HasColumnType("nvarchar(max)"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Period") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("Remark") + .HasColumnType("nvarchar(max)"); + + b.Property("Version") + .HasColumnType("nvarchar(450)"); + + b.Property("Year") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("Version") + .IsUnique() + .HasFilter("IsDeleted=0"); + + b.ToTable("Set_sec_ratio_version"); + }); + + modelBuilder.Entity("Win.Sfs.SettleAccount.Entities.SettleAccounts.SettleAccount", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("BranchId") + .HasColumnType("uniqueidentifier"); + + b.Property("CP5A") + .HasColumnType("datetime2"); + + b.Property("CP7") + .HasColumnType("datetime2"); + + b.Property("ChassisNumber") + .IsRequired() + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("Enabled") + .HasColumnType("bit"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("KENNCode") + .IsRequired() + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("MaterialCode") + .IsRequired() + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.Property("Model") + .IsRequired() + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.Property("ParentId") + .HasColumnType("uniqueidentifier"); + + b.Property("Period") + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.Property("Qty") + .HasColumnType("decimal(18,2)"); + + b.Property("Remark") + .HasColumnType("nvarchar(max)"); + + b.Property("SettleYear") + .HasColumnType("nvarchar(max)"); + + b.Property("SettlementID") + .IsRequired() + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.Property("SettlementSupplier") + .IsRequired() + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.Property("Version") + .IsRequired() + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.Property("Year") + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.Property("state") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("state"); + + b.HasIndex("Version", "ChassisNumber", "MaterialCode", "KENNCode"); + + b.ToTable("Set_Settle"); + }); + + modelBuilder.Entity("Win.Sfs.SettleAccount.Entities.SettleAccounts.SettleAccountVersion", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("BranchId") + .HasColumnType("uniqueidentifier"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("CustomerCode") + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("Enabled") + .HasColumnType("bit"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("Factory") + .HasColumnType("nvarchar(max)"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Period") + .IsRequired() + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.Property("Remark") + .HasColumnType("nvarchar(max)"); + + b.Property("Version") + .IsRequired() + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.Property("Year") + .IsRequired() + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.HasKey("Id"); + + b.HasIndex("Version") + .IsUnique() + .HasFilter("IsDeleted=0"); + + b.ToTable("Set_Settle_Version"); + }); + + modelBuilder.Entity("Win.Sfs.SettleAccount.Entities.SettleAccounts.UnSettleAccount", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("BranchId") + .HasColumnType("uniqueidentifier"); + + b.Property("CP5A") + .HasColumnType("datetime2"); + + b.Property("CP7") + .HasColumnType("datetime2"); + + b.Property("ChassisNumber") + .IsRequired() + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("Enabled") + .HasColumnType("bit"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("KENNCode") + .IsRequired() + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("MaterialCode") + .IsRequired() + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.Property("Model") + .IsRequired() + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.Property("ParentId") + .HasColumnType("uniqueidentifier"); + + b.Property("Period") + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.Property("Qty") + .HasColumnType("decimal(18,2)"); + + b.Property("Remark") + .HasColumnType("nvarchar(max)"); + + b.Property("SettleYear") + .HasColumnType("nvarchar(max)"); + + b.Property("SettlementID") + .IsRequired() + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.Property("SettlementSupplier") + .IsRequired() + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.Property("UnsettledReason") + .HasColumnType("nvarchar(max)"); + + b.Property("Version") + .IsRequired() + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.Property("Year") + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.Property("state") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("state"); + + b.HasIndex("Version", "ChassisNumber", "MaterialCode") + .IsUnique(); + + b.ToTable("Set_Unsettle"); + }); + + modelBuilder.Entity("Win.Sfs.SettleAccount.Entities.SettleAccounts.UnSettleAccountVersion", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("BranchId") + .HasColumnType("uniqueidentifier"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("CustomerCode") + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("Enabled") + .HasColumnType("bit"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("Factory") + .HasColumnType("nvarchar(max)"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Period") + .IsRequired() + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.Property("Remark") + .HasColumnType("nvarchar(max)"); + + b.Property("Version") + .IsRequired() + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.Property("Year") + .IsRequired() + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.HasKey("Id"); + + b.HasIndex("Version") + .IsUnique() + .HasFilter("IsDeleted=0"); + + b.ToTable("Set_Unsettle_Version"); + }); + + modelBuilder.Entity("Win.Sfs.SettleAccount.Entities.SettlementCrossReference.SettlementCrossReferenceVersion", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("BranchId") + .HasColumnType("uniqueidentifier"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("CustomerCode") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("Enabled") + .HasColumnType("bit"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("Factory") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Period") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Remark") + .HasColumnType("nvarchar(max)"); + + b.Property("Version") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Year") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.HasKey("Id"); + + b.ToTable("Set_SettlementCrossReference_Version"); + }); + + modelBuilder.Entity("Win.Sfs.SettleAccount.Entities.SettlementCrossReferences.SettlementCrossReference", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("BomMaterialCode") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("BranchId") + .HasColumnType("uniqueidentifier"); + + b.Property("Buyer") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("CustomerCode") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("Enabled") + .HasColumnType("bit"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("Factory") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("MaterialDesc") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Model") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("PartType") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Period") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Remark") + .HasColumnType("nvarchar(max)"); + + b.Property("SettlementMaterialCode") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("SupplierCode") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("SupplierDesc") + .HasMaxLength(128) + .HasColumnType("nvarchar(128)"); + + b.Property("Version") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Year") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.HasKey("Id"); + + b.HasIndex("Version", "SettlementMaterialCode", "BomMaterialCode") + .IsUnique() + .HasFilter("IsDeleted=0"); + + b.ToTable("Set_SettlementCrossReference"); + }); + + modelBuilder.Entity("Win.Sfs.SettleAccount.Entities.SettlementPakAndSparePartsRef.SettlementPakAndSpareParts", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("ApplicableFunction") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("BranchId") + .HasColumnType("uniqueidentifier"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("CustomerCode") + .HasColumnType("nvarchar(max)"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("Enabled") + .HasColumnType("bit"); + + b.Property("ErpSparePartCode") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("ErpSparePartName") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Model") + .HasColumnType("nvarchar(max)"); + + b.Property("PartType") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("PerCarNum") + .HasMaxLength(50) + .HasColumnType("decimal(18,2)"); + + b.Property("Period") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Price") + .HasMaxLength(50) + .HasColumnType("decimal(18,2)"); + + b.Property("ProductLine") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("QADCode") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("QuantityPrice") + .HasMaxLength(50) + .HasColumnType("decimal(18,2)"); + + b.Property("Remark") + .HasColumnType("nvarchar(max)"); + + b.Property("SettlementPartCode") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("SettlementPartDesc") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("SupplierCode") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("SupplierName") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("SupplyProportion") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Version") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.HasKey("Id"); + + b.ToTable("Set_SettlementPakAndSpareParts"); + }); + + modelBuilder.Entity("Win.Sfs.SettleAccount.Entities.SettlementPakAndSparePartsRef.SettlementPakAndSparePartsVersion", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("BranchId") + .HasColumnType("uniqueidentifier"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("CustomerCode") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("Enabled") + .HasColumnType("bit"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("Factory") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Period") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Remark") + .HasColumnType("nvarchar(max)"); + + b.Property("Version") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Year") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.HasKey("Id"); + + b.ToTable("Set_SettlementPakAndSpareParts_Version"); + }); + + modelBuilder.Entity("Win.Sfs.SettleAccount.Entities.SettlementParts.SettlementPart", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("BranchId") + .HasColumnType("uniqueidentifier"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("CustomerCode") + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("Enabled") + .HasColumnType("bit"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("Factory") + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Model") + .HasColumnType("nvarchar(max)"); + + b.Property("Period") + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.Property("Price") + .HasColumnType("decimal(18,2)"); + + b.Property("Remark") + .HasColumnType("nvarchar(max)"); + + b.Property("SettlementPartCode") + .IsRequired() + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.Property("SettlementPartDesc") + .HasMaxLength(2048) + .HasColumnType("nvarchar(2048)"); + + b.Property("Uom") + .HasColumnType("nvarchar(max)"); + + b.Property("Version") + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.Property("Year") + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.HasKey("Id"); + + b.HasIndex("Period", "CustomerCode", "Version", "SettlementPartCode") + .IsUnique() + .HasFilter("IsDeleted=0"); + + b.ToTable("Set_settlement_part"); + }); + + modelBuilder.Entity("Win.Sfs.SettleAccount.Entities.SettlementParts.SettlementPartVersion", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("BranchId") + .HasColumnType("uniqueidentifier"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("CustomerCode") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("Enabled") + .HasColumnType("bit"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("Factory") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Period") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Remark") + .HasColumnType("nvarchar(max)"); + + b.Property("Version") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Year") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.HasKey("Id"); + + b.ToTable("Set_settlement_part_version"); + }); + + modelBuilder.Entity("Win.Sfs.SettleAccount.Entities.StorageLocations.CustomerStorageLocation", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("BranchId") + .HasColumnType("uniqueidentifier"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("CustomerCode") + .IsRequired() + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.Property("CustomerDesc") + .IsRequired() + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("Enabled") + .HasColumnType("bit"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Remark") + .HasColumnType("nvarchar(max)"); + + b.Property("State") + .HasColumnType("int"); + + b.Property("Storagelocation") + .IsRequired() + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.HasKey("Id"); + + b.HasIndex("Storagelocation", "CustomerCode") + .IsUnique() + .HasFilter("IsDeleted=0"); + + b.ToTable("Set_customerlocation"); + }); + + modelBuilder.Entity("Win.Sfs.SettleAccount.Entities.TaskJob", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("ActionName") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("BranchId") + .HasColumnType("uniqueidentifier"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(50) + .HasColumnType("nvarchar(50)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("Creator") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("DownFileName") + .HasMaxLength(500) + .HasColumnType("nvarchar(500)"); + + b.Property("Email") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Enabled") + .HasColumnType("bit"); + + b.Property("Error") + .HasColumnType("nvarchar(max)"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("FileName") + .HasMaxLength(500) + .HasColumnType("nvarchar(500)"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Name") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("RealDownFileName") + .HasMaxLength(500) + .HasColumnType("nvarchar(500)"); + + b.Property("RealFileName") + .HasMaxLength(500) + .HasColumnType("nvarchar(500)"); + + b.Property("Remark") + .HasColumnType("nvarchar(max)"); + + b.Property("ServiceName") + .HasMaxLength(300) + .HasColumnType("nvarchar(300)"); + + b.Property("State") + .HasColumnType("nvarchar(max)"); + + b.Property("TaskId") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Type") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.ToTable("Set_TaskJob"); + }); + + modelBuilder.Entity("Win.Sfs.SettleAccount.Entities.VWKanBan.KanBanSettle", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("Batch") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("BranchId") + .HasColumnType("uniqueidentifier"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("Enabled") + .HasColumnType("bit"); + + b.Property("Extend") + .HasColumnType("nvarchar(max)"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("Factory") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Flag") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("Kanban") + .IsRequired() + .HasMaxLength(150) + .HasColumnType("nvarchar(150)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("MaterialCode") + .IsRequired() + .HasMaxLength(150) + .HasColumnType("nvarchar(150)"); + + b.Property("ParentId") + .HasColumnType("uniqueidentifier"); + + b.Property("PartType") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Period") + .HasColumnType("nvarchar(max)"); + + b.Property("Qty") + .HasColumnType("decimal(18,2)"); + + b.Property("Relation") + .HasMaxLength(100) + .HasColumnType("nvarchar(100)"); + + b.Property("Remark") + .HasColumnType("nvarchar(max)"); + + b.Property("SettleDate") + .HasColumnType("datetime2"); + + b.Property("SettleInputDate") + .HasColumnType("datetime2"); + + b.Property("State") + .HasColumnType("nvarchar(max)"); + + b.Property("SupplierCode") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Version") + .HasColumnType("nvarchar(max)"); + + b.Property("Year") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("Kanban", "MaterialCode") + .IsUnique() + .HasFilter("IsDeleted=0"); + + b.ToTable("Set_KanBanSettle"); + }); + + modelBuilder.Entity("Win.Sfs.SettleAccount.Entities.VWKanBan.KanBanVersion", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("BranchId") + .HasColumnType("uniqueidentifier"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("CustomerCode") + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("Enabled") + .HasColumnType("bit"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Period") + .IsRequired() + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.Property("Remark") + .HasColumnType("nvarchar(max)"); + + b.Property("Version") + .IsRequired() + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.Property("Year") + .IsRequired() + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.HasKey("Id"); + + b.HasIndex("Version") + .IsUnique() + .HasFilter("IsDeleted=0"); + + b.ToTable("Set_KanBanSettle_Version"); + }); + + modelBuilder.Entity("Win.Sfs.SettleAccount.Entities.VWScrapClaims.ScrapClaims", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("Amt") + .HasColumnType("decimal(18,2)"); + + b.Property("BranchId") + .HasColumnType("uniqueidentifier"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("Enabled") + .HasColumnType("bit"); + + b.Property("Extend") + .HasColumnType("nvarchar(max)"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("MaterialCode") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("MaterialDesc") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Period") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Qty") + .HasColumnType("decimal(18,2)"); + + b.Property("Remark") + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("Type") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Version") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Year") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.HasKey("Id"); + + b.ToTable("Set_ScrapClaims"); + }); + + modelBuilder.Entity("Win.Sfs.SettleAccount.Entities.VWScrapClaims.ScrapClaimsVersion", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("BranchId") + .HasColumnType("uniqueidentifier"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("CustomerCode") + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("Enabled") + .HasColumnType("bit"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Period") + .IsRequired() + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.Property("Remark") + .HasColumnType("nvarchar(max)"); + + b.Property("Version") + .IsRequired() + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.Property("Year") + .IsRequired() + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.HasKey("Id"); + + b.HasIndex("Version") + .IsUnique() + .HasFilter("IsDeleted=0"); + + b.ToTable("Set_ScrapClaims_Version"); + }); + + modelBuilder.Entity("Win.Sfs.SettleAccount.Entities.VWSparePart.SparePart", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("AccountNum") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("AmountNoTax") + .HasColumnType("decimal(18,2)"); + + b.Property("BatchNo") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("BranchId") + .HasColumnType("uniqueidentifier"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("DeliveryLineNum") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("DeliveryOrderNo") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Enabled") + .HasColumnType("bit"); + + b.Property("Extend") + .HasMaxLength(250) + .HasColumnType("nvarchar(250)"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("Factory") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("FactoryName") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("GermanInvoiceNo") + .HasMaxLength(100) + .HasColumnType("nvarchar(100)"); + + b.Property("InvoicedQty") + .HasColumnType("decimal(18,2)"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("LineNumber") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("MaterialCode") + .IsRequired() + .HasMaxLength(150) + .HasColumnType("nvarchar(150)"); + + b.Property("MaterialDesc") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Period") + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.Property("PurchaseOrderNo") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("PurchaseOrderNoItem") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("PurchaseOrderNoText") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("PurchasePriceNoTax") + .HasColumnType("decimal(18,2)"); + + b.Property("PurchaseType") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("ReceiptQty") + .HasColumnType("decimal(18,2)"); + + b.Property("Remark") + .HasColumnType("nvarchar(max)"); + + b.Property("SpareDate") + .HasColumnType("datetime2"); + + b.Property("TaxCode") + .HasColumnType("nvarchar(max)"); + + b.Property("TaxRate") + .HasColumnType("decimal(18,2)"); + + b.Property("Unit") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Version") + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.Property("Year") + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.HasKey("Id"); + + b.ToTable("Set_SparePart"); + }); + + modelBuilder.Entity("Win.Sfs.SettleAccount.Entities.VWSparePart.SparePartVersion", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("BranchId") + .HasColumnType("uniqueidentifier"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("CustomerCode") + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("Enabled") + .HasColumnType("bit"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Period") + .IsRequired() + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.Property("Remark") + .HasColumnType("nvarchar(max)"); + + b.Property("Version") + .IsRequired() + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.Property("Year") + .IsRequired() + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.HasKey("Id"); + + b.HasIndex("Version") + .IsUnique() + .HasFilter("IsDeleted=0"); + + b.ToTable("Set_SparePart_Version"); + }); + + modelBuilder.Entity("Win.Sfs.SettleAccount.EstimatedInventories.EstimatedInventoryDetail", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("BillNumber") + .HasColumnType("nvarchar(max)"); + + b.Property("BranchId") + .HasColumnType("uniqueidentifier"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("Enabled") + .HasColumnType("bit"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("Factory") + .HasColumnType("nvarchar(max)"); + + b.Property("InvoiceQty") + .HasColumnType("decimal(18,2)"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("MaterialCode") + .IsRequired() + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.Property("MaterialDesc") + .HasColumnType("nvarchar(max)"); + + b.Property("MaterialDocument") + .IsRequired() + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.Property("MaterialDocumentLine") + .HasColumnType("nvarchar(450)"); + + b.Property("ParentId") + .HasColumnType("uniqueidentifier"); + + b.Property("Period") + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.Property("PostingDate") + .HasColumnType("datetime2"); + + b.Property("PurchaseDocument") + .IsRequired() + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.Property("PurchaseLine") + .IsRequired() + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.Property("ReceiveQty") + .HasColumnType("decimal(18,2)"); + + b.Property("Remark") + .HasColumnType("nvarchar(max)"); + + b.Property("Source") + .HasColumnType("nvarchar(max)"); + + b.Property("StorageLocation") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("SupplierCode") + .IsRequired() + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.Property("SupplierDesc") + .HasColumnType("nvarchar(max)"); + + b.Property("Version") + .IsRequired() + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.Property("Year") + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.HasKey("Id"); + + b.HasIndex("MaterialDocument", "MaterialDocumentLine", "MaterialCode", "Version") + .IsUnique() + .HasFilter("[MaterialDocumentLine] IS NOT NULL"); + + b.ToTable("Set_estdetail"); + }); + + modelBuilder.Entity("Win.Sfs.SettleAccount.EstimatedStockDiffReports.EstimatedStockDiffReport", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("BranchId") + .HasMaxLength(36) + .HasColumnType("uniqueidentifier"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("CreatorName") + .HasColumnType("nvarchar(max)"); + + b.Property("CustomCode") + .HasColumnType("nvarchar(max)"); + + b.Property("CustomName") + .HasColumnType("nvarchar(max)"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("DocumentNumber") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("DocumentStatus") + .HasColumnType("int"); + + b.Property("DocumentType") + .HasColumnType("int"); + + b.Property("Enabled") + .HasColumnType("bit"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Period") + .HasColumnType("nvarchar(max)"); + + b.Property("Remark") + .HasColumnType("nvarchar(max)"); + + b.Property("Version") + .HasColumnType("nvarchar(max)"); + + b.Property("Year") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("BranchId", "DocumentNumber") + .IsUnique() + .HasFilter("IsDeleted=0"); + + b.ToTable("Set_estimate_stock_report"); + }); + + modelBuilder.Entity("Win.Sfs.SettleAccount.EstimatedStockDiffReports.EstimatedStockDiffReportDetail", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("BranchId") + .HasMaxLength(36) + .HasColumnType("uniqueidentifier"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("DiffQty") + .HasColumnType("decimal(18,2)"); + + b.Property("DocumentId") + .HasColumnType("uniqueidentifier"); + + b.Property("DocumentNumber") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Enabled") + .HasColumnType("bit"); + + b.Property("EstimationQty") + .HasColumnType("decimal(18,2)"); + + b.Property("EstimationType") + .HasColumnType("nvarchar(max)"); + + b.Property("EstimationTypeDesc") + .HasColumnType("nvarchar(max)"); + + b.Property("FgQty") + .HasColumnType("decimal(18,2)"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("ItemCode") + .HasColumnType("nvarchar(450)"); + + b.Property("ItemDesc") + .HasColumnType("nvarchar(max)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Period") + .HasColumnType("nvarchar(max)"); + + b.Property("Remark") + .HasColumnType("nvarchar(max)"); + + b.Property("StockQty") + .HasColumnType("decimal(18,2)"); + + b.Property("UnSettledQty") + .HasColumnType("decimal(18,2)"); + + b.Property("Version") + .HasColumnType("nvarchar(max)"); + + b.Property("Year") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("DocumentId"); + + b.HasIndex("BranchId", "DocumentId", "ItemCode") + .IsUnique() + .HasFilter("IsDeleted=0"); + + b.ToTable("Set_estimate_stock_report_detail"); + }); + + modelBuilder.Entity("Win.Sfs.SettleAccount.FISes.FIS", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("BeginTime") + .HasColumnType("datetime2"); + + b.Property("BranchId") + .HasColumnType("uniqueidentifier"); + + b.Property("CP5Time") + .HasColumnType("datetime2"); + + b.Property("CP7Time") + .HasColumnType("datetime2"); + + b.Property("ChassisNumber") + .IsRequired() + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.Property("ChassisNumber2") + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("Enabled") + .HasColumnType("bit"); + + b.Property("EndTime") + .HasColumnType("datetime2"); + + b.Property("ErpMaterialCode") + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.Property("Extend1") + .HasColumnType("nvarchar(max)"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("FISYear") + .HasColumnType("nvarchar(max)"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("ItemCode") + .IsRequired() + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.Property("KENNCode") + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Model") + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.Property("OrderBillNum") + .IsRequired() + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.Property("ParentId") + .HasColumnType("uniqueidentifier"); + + b.Property("Period") + .IsRequired() + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.Property("Qty") + .HasColumnType("decimal(18,2)"); + + b.Property("Remark") + .HasColumnType("nvarchar(max)"); + + b.Property("SequenceNumber") + .HasColumnType("nvarchar(max)"); + + b.Property("SettleState") + .HasColumnType("int"); + + b.Property("SettledQty") + .HasColumnType("decimal(18,2)"); + + b.Property("State") + .HasColumnType("int"); + + b.Property("Version") + .IsRequired() + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.Property("Year") + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.HasKey("Id"); + + b.HasIndex("ChassisNumber2", "KENNCode"); + + b.HasIndex("ChassisNumber2", "Version", "KENNCode", "ItemCode"); + + b.ToTable("Set_fis"); + }); + + modelBuilder.Entity("Win.Sfs.SettleAccount.FISes.FISExtend", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("BeginTime") + .HasColumnType("datetime2"); + + b.Property("BranchId") + .HasColumnType("uniqueidentifier"); + + b.Property("CP5Time") + .HasColumnType("datetime2"); + + b.Property("CP7Time") + .HasColumnType("datetime2"); + + b.Property("ChassisNumber") + .IsRequired() + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.Property("ChassisNumber2") + .IsRequired() + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("Enabled") + .HasColumnType("bit"); + + b.Property("EndTime") + .HasColumnType("datetime2"); + + b.Property("ErpMaterialCode") + .HasColumnType("nvarchar(max)"); + + b.Property("Extend1") + .HasColumnType("nvarchar(max)"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("FISYear") + .HasColumnType("nvarchar(max)"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("ItemCode") + .IsRequired() + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.Property("KENNCode") + .HasColumnType("nvarchar(max)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Model") + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.Property("OrderBillNum") + .IsRequired() + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.Property("ParentId") + .HasColumnType("uniqueidentifier"); + + b.Property("Period") + .IsRequired() + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.Property("Qty") + .HasColumnType("decimal(18,2)"); + + b.Property("Remark") + .HasColumnType("nvarchar(max)"); + + b.Property("SequenceNumber") + .HasColumnType("nvarchar(max)"); + + b.Property("SettleState") + .HasColumnType("int"); + + b.Property("SettledQty") + .HasColumnType("decimal(18,2)"); + + b.Property("State") + .HasColumnType("int"); + + b.Property("Version") + .IsRequired() + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.Property("Year") + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.HasKey("Id"); + + b.HasIndex("ChassisNumber2", "Version", "Model", "ItemCode") + .IsUnique() + .HasFilter("[Model] IS NOT NULL"); + + b.ToTable("Set_fis_extend"); + }); + + modelBuilder.Entity("Win.Sfs.SettleAccount.FISes.FISVersion", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("BeginDate") + .HasColumnType("datetime2"); + + b.Property("BranchId") + .HasColumnType("uniqueidentifier"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("CustomerCode") + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("Enabled") + .HasColumnType("bit"); + + b.Property("EndDate") + .HasColumnType("datetime2"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("Factory") + .HasColumnType("nvarchar(max)"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Model") + .HasColumnType("nvarchar(max)"); + + b.Property("Period") + .IsRequired() + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.Property("Remark") + .HasColumnType("nvarchar(max)"); + + b.Property("Version") + .IsRequired() + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.Property("Year") + .IsRequired() + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.HasKey("Id"); + + b.ToTable("Set_fis_version"); + }); + + modelBuilder.Entity("Win.Sfs.SettleAccount.Inventories.InventoryDetail", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("AppraisalCategory") + .IsRequired() + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.Property("AppraisalDesc") + .HasColumnType("nvarchar(max)"); + + b.Property("BranchId") + .HasColumnType("uniqueidentifier"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("Enabled") + .HasColumnType("bit"); + + b.Property("EndingInventoryQty") + .HasColumnType("decimal(18,2)"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("Factory") + .HasColumnType("nvarchar(max)"); + + b.Property("InputQty") + .HasColumnType("decimal(18,2)"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("MaterialCode") + .IsRequired() + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.Property("MaterialDesc") + .HasColumnType("nvarchar(max)"); + + b.Property("OpeningInventoryQty") + .HasColumnType("decimal(18,2)"); + + b.Property("OutputQty") + .HasColumnType("decimal(18,2)"); + + b.Property("ParentId") + .HasColumnType("uniqueidentifier"); + + b.Property("Period") + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.Property("Price") + .HasColumnType("decimal(18,2)"); + + b.Property("Remark") + .HasColumnType("nvarchar(max)"); + + b.Property("StorageLocation") + .IsRequired() + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.Property("StorageLocationDesc") + .HasColumnType("nvarchar(max)"); + + b.Property("Unit") + .IsRequired() + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.Property("Version") + .IsRequired() + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.Property("Year") + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.HasKey("Id"); + + b.HasIndex("Version", "MaterialCode", "StorageLocation") + .IsUnique() + .HasFilter("IsDeleted=0"); + + b.ToTable("Set_inventory"); + }); + + modelBuilder.Entity("Win.Sfs.SettleAccount.JFCarConsigns.JFCarConsign", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("BranchId") + .HasColumnType("uniqueidentifier"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("CustomerCode") + .IsRequired() + .HasColumnType("nvarchar(450)"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("Enabled") + .HasColumnType("bit"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("MaterialCode") + .IsRequired() + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.Property("MaterialDesc") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("PABillNum") + .IsRequired() + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.Property("ParentId") + .HasColumnType("uniqueidentifier"); + + b.Property("Period") + .HasColumnType("nvarchar(max)"); + + b.Property("Qty") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("Remark") + .HasColumnType("nvarchar(max)"); + + b.Property("State") + .HasMaxLength(36) + .HasColumnType("int"); + + b.Property("Version") + .IsRequired() + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.HasKey("Id"); + + b.HasIndex("CustomerCode", "MaterialCode", "PABillNum", "Version") + .IsUnique() + .HasFilter("IsDeleted=0"); + + b.ToTable("Set_jfcarconsign"); + }); + + modelBuilder.Entity("Win.Sfs.SettleAccount.JFCarKBs.JFCarKB", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("BillNum") + .IsRequired() + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.Property("BranchId") + .HasColumnType("uniqueidentifier"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("ConsignQty") + .HasColumnType("decimal(18,2)"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("CustomerCode") + .IsRequired() + .HasColumnType("nvarchar(450)"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("Enabled") + .HasColumnType("bit"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("InStockQty") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("MaterialCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("MaterialDesc") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("OnLineDateTime") + .HasColumnType("datetime2"); + + b.Property("ParentId") + .HasColumnType("uniqueidentifier"); + + b.Property("Period") + .HasColumnType("nvarchar(max)"); + + b.Property("Remark") + .HasColumnType("nvarchar(max)"); + + b.Property("State") + .HasMaxLength(36) + .HasColumnType("int"); + + b.Property("Version") + .IsRequired() + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.HasKey("Id"); + + b.HasIndex("CustomerCode", "MaterialCode", "BillNum", "Version") + .IsUnique() + .HasFilter("IsDeleted=0"); + + b.ToTable("Set_jfcarkb"); + }); + + modelBuilder.Entity("Win.Sfs.SettleAccount.JFNotConsignReports.JFNotConsignReport", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("BeginTime") + .HasColumnType("datetime2"); + + b.Property("BranchId") + .HasMaxLength(36) + .HasColumnType("uniqueidentifier"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("CreatorName") + .HasColumnType("nvarchar(max)"); + + b.Property("CustomCode") + .HasColumnType("nvarchar(max)"); + + b.Property("CustomName") + .HasColumnType("nvarchar(max)"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("DocumentNumber") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("DocumentStatus") + .HasColumnType("int"); + + b.Property("DocumentType") + .HasColumnType("int"); + + b.Property("Enabled") + .HasColumnType("bit"); + + b.Property("EndTime") + .HasColumnType("datetime2"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Remark") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("BranchId", "DocumentNumber") + .IsUnique() + .HasFilter("IsDeleted=0"); + + b.ToTable("Set_jf_not_kb_consign_report"); + }); + + modelBuilder.Entity("Win.Sfs.SettleAccount.JFNotConsignReports.JFNotConsignReportDetail", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("BillNum") + .HasColumnType("nvarchar(450)"); + + b.Property("BranchId") + .HasMaxLength(36) + .HasColumnType("uniqueidentifier"); + + b.Property("ConsignQty") + .HasColumnType("decimal(18,2)"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("CustomCode") + .HasColumnType("nvarchar(450)"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("DocumentId") + .HasColumnType("uniqueidentifier"); + + b.Property("DocumentNumber") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Enabled") + .HasColumnType("bit"); + + b.Property("InStockQty") + .HasColumnType("decimal(18,2)"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("MaterialCode") + .HasColumnType("nvarchar(450)"); + + b.Property("MaterialDesc") + .HasColumnType("nvarchar(max)"); + + b.Property("OnLineDateTime") + .HasColumnType("datetime2"); + + b.Property("Period") + .HasColumnType("nvarchar(max)"); + + b.Property("Remark") + .HasColumnType("nvarchar(max)"); + + b.Property("State") + .HasColumnType("int"); + + b.Property("Version") + .HasColumnType("nvarchar(450)"); + + b.Property("Year") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("DocumentId", "Version", "CustomCode", "MaterialCode", "BillNum") + .IsUnique() + .HasFilter("IsDeleted=0"); + + b.ToTable("Set_jf_not_kb_consign_report_detail"); + }); + + modelBuilder.Entity("Win.Sfs.SettleAccount.MaterialRelationships.MaterialRelationship", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("AppraisalCategory") + .HasColumnType("nvarchar(max)"); + + b.Property("BranchId") + .HasColumnType("uniqueidentifier"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("Enabled") + .HasColumnType("bit"); + + b.Property("ErpMaterialCode") + .IsRequired() + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("MaterialDesc") + .HasColumnType("nvarchar(max)"); + + b.Property("MaterialProperty") + .IsRequired() + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.Property("Remark") + .HasColumnType("nvarchar(max)"); + + b.Property("SettleMaterialCode") + .HasColumnType("nvarchar(max)"); + + b.Property("ShipMaterailCode") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("ErpMaterialCode") + .IsUnique() + .HasFilter("IsDeleted=0"); + + b.ToTable("Set_relationship"); + }); + + modelBuilder.Entity("Win.Sfs.SettleAccount.Prebatches.Prebatch", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("BranchId") + .HasColumnType("uniqueidentifier"); + + b.Property("CarCode") + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("Enabled") + .HasColumnType("bit"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("KENNCode") + .IsRequired() + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Remark") + .HasColumnType("nvarchar(max)"); + + b.Property("State") + .HasColumnType("int"); + + b.Property("Year") + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.Property("YearKennCode") + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.HasKey("Id"); + + b.ToTable("Set_prebatch"); + }); + + modelBuilder.Entity("Win.Sfs.SettleAccount.Reports.InvoiceSettledDiffs.InvoiceSettledDiff", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("BranchId") + .HasColumnType("uniqueidentifier"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("DiffQty") + .HasColumnType("decimal(18,2)"); + + b.Property("Enabled") + .HasColumnType("bit"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("InvoiceQty") + .HasColumnType("decimal(18,2)"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("MaterialCode") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("ParentId") + .HasColumnType("uniqueidentifier"); + + b.Property("Remark") + .HasColumnType("nvarchar(max)"); + + b.Property("SettleQty") + .HasColumnType("decimal(18,2)"); + + b.Property("Version") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.ToTable("Set_InvoiceSettledDiff"); + }); + + modelBuilder.Entity("Win.Sfs.SettleAccount.Reports.InvoiceSettledDiffs.InvoiceSettledDiffVersion", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("BranchId") + .HasColumnType("uniqueidentifier"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("CreatorName") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("CustomCode") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("CustomName") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("Enabled") + .HasColumnType("bit"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Period") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("ProjectName") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Remark") + .HasColumnType("nvarchar(max)"); + + b.Property("Version") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Year") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.HasKey("Id"); + + b.ToTable("Set_InvoiceSettledDiffVersion"); + }); + + modelBuilder.Entity("Win.Sfs.SettleAccount.SecondaryActuralAdjustmentReports.SecondaryActuralAdjustmentReport", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("BranchId") + .HasMaxLength(36) + .HasColumnType("uniqueidentifier"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("CreatorName") + .HasColumnType("nvarchar(max)"); + + b.Property("CustomCode") + .HasColumnType("nvarchar(max)"); + + b.Property("CustomName") + .HasColumnType("nvarchar(max)"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("DocumentNumber") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("DocumentStatus") + .HasColumnType("int"); + + b.Property("DocumentType") + .HasColumnType("int"); + + b.Property("Enabled") + .HasColumnType("bit"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Period") + .HasColumnType("nvarchar(max)"); + + b.Property("Remark") + .HasColumnType("nvarchar(max)"); + + b.Property("Version") + .HasColumnType("nvarchar(max)"); + + b.Property("Year") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("BranchId", "DocumentNumber") + .IsUnique() + .HasFilter("IsDeleted=0"); + + b.ToTable("Set_sec_act_adjustment_report"); + }); + + modelBuilder.Entity("Win.Sfs.SettleAccount.SecondaryActuralAdjustmentReports.SecondaryActuralAdjustmentReportDetail", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("BranchId") + .HasMaxLength(36) + .HasColumnType("uniqueidentifier"); + + b.Property("Buyer") + .HasColumnType("nvarchar(max)"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("CustomItemCode") + .HasColumnType("nvarchar(450)"); + + b.Property("CustomItemDesc") + .HasColumnType("nvarchar(max)"); + + b.Property("CustomSubItemCode") + .HasColumnType("nvarchar(450)"); + + b.Property("CustomSubItemDesc") + .HasColumnType("nvarchar(max)"); + + b.Property("CustomSubItemPrice") + .HasColumnType("decimal(18,2)"); + + b.Property("CustomSubItemSumQty") + .HasColumnType("decimal(18,2)"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("DocumentId") + .HasColumnType("uniqueidentifier"); + + b.Property("DocumentNumber") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Enabled") + .HasColumnType("bit"); + + b.Property("ErpSubItemActualQty") + .HasColumnType("decimal(18,2)"); + + b.Property("ErpSubItemCode") + .HasColumnType("nvarchar(max)"); + + b.Property("ErpSubItemQty") + .HasColumnType("decimal(18,2)"); + + b.Property("HasChanged") + .HasColumnType("nvarchar(max)"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("OfflineQty") + .HasColumnType("decimal(18,2)"); + + b.Property("Period") + .HasColumnType("nvarchar(max)"); + + b.Property("Remark") + .HasColumnType("nvarchar(max)"); + + b.Property("SumPriceNoTax") + .HasColumnType("decimal(18,2)"); + + b.Property("SumPriceWithTax") + .HasColumnType("decimal(18,2)"); + + b.Property("SupplierCode") + .HasColumnType("nvarchar(450)"); + + b.Property("SupplierDesc") + .HasColumnType("nvarchar(max)"); + + b.Property("SupplyProportion") + .HasColumnType("nvarchar(max)"); + + b.Property("Version") + .HasColumnType("nvarchar(450)"); + + b.Property("Year") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("DocumentId"); + + b.HasIndex("BranchId", "DocumentId", "Version", "CustomItemCode", "CustomSubItemCode", "SupplierCode") + .IsUnique() + .HasFilter("IsDeleted=0"); + + b.ToTable("Set_sec_act_adjustment_report_detail"); + }); + + modelBuilder.Entity("Win.Sfs.SettleAccount.SecondaryActuralDiffReports.SecondaryActuralDiffReport", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("BranchId") + .HasMaxLength(36) + .HasColumnType("uniqueidentifier"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("CreatorName") + .HasColumnType("nvarchar(max)"); + + b.Property("CustomCode") + .HasColumnType("nvarchar(max)"); + + b.Property("CustomName") + .HasColumnType("nvarchar(max)"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("DocumentNumber") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("DocumentStatus") + .HasColumnType("int"); + + b.Property("DocumentType") + .HasColumnType("int"); + + b.Property("Enabled") + .HasColumnType("bit"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Period") + .HasColumnType("nvarchar(max)"); + + b.Property("Remark") + .HasColumnType("nvarchar(max)"); + + b.Property("Version") + .HasColumnType("nvarchar(max)"); + + b.Property("Year") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("BranchId", "DocumentNumber") + .IsUnique() + .HasFilter("IsDeleted=0"); + + b.ToTable("Set_sec_act_diff_report"); + }); + + modelBuilder.Entity("Win.Sfs.SettleAccount.SecondaryActuralDiffReports.SecondaryActuralDiffReportDetail", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("ActNoTaxAmount") + .HasColumnType("decimal(18,2)"); + + b.Property("ActPaymentPartyQty") + .HasColumnType("decimal(18,2)"); + + b.Property("BranchId") + .HasMaxLength(36) + .HasColumnType("uniqueidentifier"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("CustomItemCode") + .HasColumnType("nvarchar(450)"); + + b.Property("CustomItemDesc") + .HasColumnType("nvarchar(max)"); + + b.Property("CustomSubItemCode") + .HasColumnType("nvarchar(450)"); + + b.Property("CustomSubItemDesc") + .HasColumnType("nvarchar(max)"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("DiffAmount") + .HasColumnType("decimal(18,2)"); + + b.Property("DiffQty") + .HasColumnType("decimal(18,2)"); + + b.Property("DocumentId") + .HasColumnType("uniqueidentifier"); + + b.Property("DocumentNumber") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Enabled") + .HasColumnType("bit"); + + b.Property("ErpSubItemCode") + .HasColumnType("nvarchar(max)"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Period") + .HasColumnType("nvarchar(max)"); + + b.Property("Remark") + .HasColumnType("nvarchar(max)"); + + b.Property("StaPaymentPartyQty") + .HasColumnType("decimal(18,2)"); + + b.Property("StdNoTaxAmount") + .HasColumnType("decimal(18,2)"); + + b.Property("SupplierCode") + .HasColumnType("nvarchar(450)"); + + b.Property("SupplierDesc") + .HasColumnType("nvarchar(max)"); + + b.Property("Version") + .HasColumnType("nvarchar(450)"); + + b.Property("Year") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("DocumentId"); + + b.HasIndex("BranchId", "DocumentId", "Version", "CustomItemCode", "CustomSubItemCode", "SupplierCode") + .IsUnique() + .HasFilter("IsDeleted=0"); + + b.ToTable("Set_sec_act_diff_report_detail"); + }); + + modelBuilder.Entity("Win.Sfs.SettleAccount.SendUnsettledDiffReports.SendUnsettledDiffReport", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("BeginTime") + .HasColumnType("datetime2"); + + b.Property("BeginVersion") + .HasColumnType("nvarchar(max)"); + + b.Property("BranchId") + .HasMaxLength(36) + .HasColumnType("uniqueidentifier"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("CreatorName") + .HasColumnType("nvarchar(max)"); + + b.Property("CustomCode") + .HasColumnType("nvarchar(max)"); + + b.Property("CustomName") + .HasColumnType("nvarchar(max)"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("DocumentNumber") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("DocumentStatus") + .HasColumnType("int"); + + b.Property("DocumentType") + .HasColumnType("int"); + + b.Property("Enabled") + .HasColumnType("bit"); + + b.Property("EndTime") + .HasColumnType("datetime2"); + + b.Property("EndVersion") + .HasColumnType("nvarchar(max)"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Remark") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("BranchId", "DocumentNumber") + .IsUnique() + .HasFilter("IsDeleted=0"); + + b.ToTable("Set_send_unsettled_report"); + }); + + modelBuilder.Entity("Win.Sfs.SettleAccount.SendUnsettledDiffReports.SendUnsettledDiffReportDetail", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("BranchId") + .HasMaxLength(36) + .HasColumnType("uniqueidentifier"); + + b.Property("CP5Time") + .HasColumnType("datetime2"); + + b.Property("ChassisNumber") + .HasColumnType("nvarchar(450)"); + + b.Property("ChassisNumber2") + .HasColumnType("nvarchar(max)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("DocumentId") + .HasColumnType("uniqueidentifier"); + + b.Property("DocumentNumber") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Enabled") + .HasColumnType("bit"); + + b.Property("Extend1") + .HasColumnType("nvarchar(max)"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("FISYear") + .HasColumnType("nvarchar(max)"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("ItemCode") + .HasColumnType("nvarchar(450)"); + + b.Property("ItemDesc") + .HasColumnType("nvarchar(max)"); + + b.Property("KENNCode") + .HasColumnType("nvarchar(max)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Model") + .HasColumnType("nvarchar(max)"); + + b.Property("OrderBillNum") + .HasColumnType("nvarchar(max)"); + + b.Property("Period") + .HasColumnType("nvarchar(max)"); + + b.Property("Qty") + .HasColumnType("decimal(18,2)"); + + b.Property("Remark") + .HasColumnType("nvarchar(max)"); + + b.Property("SequenceNumber") + .HasColumnType("nvarchar(max)"); + + b.Property("SettledQty") + .HasColumnType("decimal(18,2)"); + + b.Property("Status") + .HasColumnType("int"); + + b.Property("Version") + .HasColumnType("nvarchar(450)"); + + b.Property("Year") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("BranchId", "DocumentId", "Version", "ChassisNumber", "ItemCode") + .IsUnique() + .HasFilter("IsDeleted=0"); + + b.ToTable("Set_send_unsettled_report_detail"); + }); + + modelBuilder.Entity("Win.Sfs.SettleAccount.StockFisDiffReports.StockFisDiffReport", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("BranchId") + .HasMaxLength(36) + .HasColumnType("uniqueidentifier"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("CreatorName") + .HasColumnType("nvarchar(max)"); + + b.Property("CustomCode") + .HasColumnType("nvarchar(max)"); + + b.Property("CustomName") + .HasColumnType("nvarchar(max)"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("DocumentNumber") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("DocumentStatus") + .HasColumnType("int"); + + b.Property("DocumentType") + .HasColumnType("int"); + + b.Property("Enabled") + .HasColumnType("bit"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Period") + .HasColumnType("nvarchar(max)"); + + b.Property("Remark") + .HasColumnType("nvarchar(max)"); + + b.Property("Version") + .HasColumnType("nvarchar(max)"); + + b.Property("Year") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("BranchId", "DocumentNumber") + .IsUnique() + .HasFilter("IsDeleted=0"); + + b.ToTable("Set_stock_fis_diff_report"); + }); + + modelBuilder.Entity("Win.Sfs.SettleAccount.StockFisDiffReports.StockFisDiffReportDetail", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("BranchId") + .HasMaxLength(36) + .HasColumnType("uniqueidentifier"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("CustomCode") + .HasColumnType("nvarchar(max)"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("DiffQty") + .HasColumnType("decimal(18,2)"); + + b.Property("DocumentId") + .HasColumnType("uniqueidentifier"); + + b.Property("DocumentNumber") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Enabled") + .HasColumnType("bit"); + + b.Property("EstimationType") + .HasColumnType("nvarchar(max)"); + + b.Property("FisQty") + .HasColumnType("decimal(18,2)"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("ItemCode") + .HasColumnType("nvarchar(450)"); + + b.Property("ItemDesc") + .HasColumnType("nvarchar(max)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Period") + .HasColumnType("nvarchar(max)"); + + b.Property("Remark") + .HasColumnType("nvarchar(max)"); + + b.Property("StockQty") + .HasColumnType("decimal(18,2)"); + + b.Property("Version") + .HasColumnType("nvarchar(max)"); + + b.Property("Year") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("DocumentId"); + + b.HasIndex("BranchId", "DocumentId", "ItemCode") + .IsUnique() + .HasFilter("IsDeleted=0"); + + b.ToTable("Set_stock_fis_diff_report_detail"); + }); + + modelBuilder.Entity("Win.Sfs.SettleAccount.StockSettledDiffReports.StockSettledDiffReport", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("BranchId") + .HasMaxLength(36) + .HasColumnType("uniqueidentifier"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("CreatorName") + .HasColumnType("nvarchar(max)"); + + b.Property("CustomCode") + .HasColumnType("nvarchar(max)"); + + b.Property("CustomName") + .HasColumnType("nvarchar(max)"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("DocumentNumber") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("DocumentStatus") + .HasColumnType("int"); + + b.Property("DocumentType") + .HasColumnType("int"); + + b.Property("Enabled") + .HasColumnType("bit"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Period") + .HasColumnType("nvarchar(max)"); + + b.Property("Remark") + .HasColumnType("nvarchar(max)"); + + b.Property("Version") + .HasColumnType("nvarchar(max)"); + + b.Property("Year") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("BranchId", "DocumentNumber") + .IsUnique() + .HasFilter("IsDeleted=0"); + + b.ToTable("Set_stock_settled_report"); + }); + + modelBuilder.Entity("Win.Sfs.SettleAccount.StockSettledDiffReports.StockSettledDiffReportDetail", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("BranchId") + .HasMaxLength(36) + .HasColumnType("uniqueidentifier"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("CustomCode") + .HasColumnType("nvarchar(max)"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("DiffQty") + .HasColumnType("decimal(18,2)"); + + b.Property("DocumentId") + .HasColumnType("uniqueidentifier"); + + b.Property("DocumentNumber") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Enabled") + .HasColumnType("bit"); + + b.Property("EstimationType") + .HasColumnType("nvarchar(max)"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("ItemCode") + .HasColumnType("nvarchar(450)"); + + b.Property("ItemDesc") + .HasColumnType("nvarchar(max)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Period") + .HasColumnType("nvarchar(max)"); + + b.Property("R3SettledQty") + .HasColumnType("decimal(18,2)"); + + b.Property("Remark") + .HasColumnType("nvarchar(max)"); + + b.Property("StockQty") + .HasColumnType("decimal(18,2)"); + + b.Property("Version") + .HasColumnType("nvarchar(max)"); + + b.Property("Year") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("DocumentId"); + + b.HasIndex("BranchId", "DocumentId", "ItemCode") + .IsUnique() + .HasFilter("IsDeleted=0"); + + b.ToTable("Set_stock_settled_report_detail"); + }); + + modelBuilder.Entity("Win.Sfs.SettleAccount.StockUnsettledDiffReports.StockUnsettledDiffReport", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("BranchId") + .HasMaxLength(36) + .HasColumnType("uniqueidentifier"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("CreatorName") + .HasColumnType("nvarchar(max)"); + + b.Property("CustomCode") + .HasColumnType("nvarchar(max)"); + + b.Property("CustomName") + .HasColumnType("nvarchar(max)"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("DocumentNumber") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("DocumentStatus") + .HasColumnType("int"); + + b.Property("DocumentType") + .HasColumnType("int"); + + b.Property("Enabled") + .HasColumnType("bit"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Period") + .HasColumnType("nvarchar(max)"); + + b.Property("Remark") + .HasColumnType("nvarchar(max)"); + + b.Property("Version") + .HasColumnType("nvarchar(max)"); + + b.Property("Year") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("BranchId", "DocumentNumber") + .IsUnique() + .HasFilter("IsDeleted=0"); + + b.ToTable("Set_stock_unsettled_report"); + }); + + modelBuilder.Entity("Win.Sfs.SettleAccount.StockUnsettledDiffReports.StockUnsettledDiffReportDetail", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("BranchId") + .HasMaxLength(36) + .HasColumnType("uniqueidentifier"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("CustomCode") + .HasColumnType("nvarchar(max)"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("DiffQty") + .HasColumnType("decimal(18,2)"); + + b.Property("DocumentId") + .HasColumnType("uniqueidentifier"); + + b.Property("DocumentNumber") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Enabled") + .HasColumnType("bit"); + + b.Property("EstimationType") + .HasColumnType("nvarchar(max)"); + + b.Property("FisUnSettledQty") + .HasColumnType("decimal(18,2)"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("ItemCode") + .HasColumnType("nvarchar(450)"); + + b.Property("ItemDesc") + .HasColumnType("nvarchar(max)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Period") + .HasColumnType("nvarchar(max)"); + + b.Property("Remark") + .HasColumnType("nvarchar(max)"); + + b.Property("StockQty") + .HasColumnType("decimal(18,2)"); + + b.Property("Version") + .HasColumnType("nvarchar(max)"); + b.Property("Year") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("DocumentId"); + + b.HasIndex("BranchId", "DocumentId", "ItemCode") + .IsUnique() + .HasFilter("IsDeleted=0"); + + b.ToTable("Set_stock_unsettled_report_detail"); + }); + + modelBuilder.Entity("Win.Sfs.SettleAccount.SupplierItemSetUps.SupplierItemSetUp", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("BranchId") + .HasColumnType("uniqueidentifier"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("CustomerCode") + .HasColumnType("nvarchar(450)"); + + b.Property("CustomerSupplierCode") + .IsRequired() + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("Enabled") + .HasColumnType("bit"); + + b.Property("ErpItemCode") + .IsRequired() + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.Property("ErpSupplierCode") .IsRequired() .HasMaxLength(36) .HasColumnType("nvarchar(36)"); + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Remark") + .HasColumnType("nvarchar(max)"); + b.HasKey("Id"); - b.HasIndex("Version") + b.HasIndex("ErpSupplierCode", "ErpItemCode", "CustomerSupplierCode", "CustomerCode") .IsUnique() .HasFilter("IsDeleted=0"); - b.ToTable("Set_SparePart_Version"); + b.ToTable("Set_supplier_item_setup"); + }); + + modelBuilder.Entity("Win.Sfs.Shared.DomainBase.UpstreamDocument", b => + { + b.Property("UpstreamDocumentId") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("BTNotConsignReportId") + .HasColumnType("uniqueidentifier"); + + b.Property("BTSeqKBDiffReportId") + .HasColumnType("uniqueidentifier"); + + b.Property("EstimatedStockDiffReportId") + .HasColumnType("uniqueidentifier"); + + b.Property("JFNotConsignReportId") + .HasColumnType("uniqueidentifier"); + + b.Property("SecondaryActuralAdjustmentReportId") + .HasColumnType("uniqueidentifier"); + + b.Property("SecondaryActuralDiffReportId") + .HasColumnType("uniqueidentifier"); + + b.Property("SendUnsettledDiffReportId") + .HasColumnType("uniqueidentifier"); + + b.Property("Seq") + .HasColumnType("int"); + + b.Property("StockFisDiffReportId") + .HasColumnType("uniqueidentifier"); + + b.Property("StockSettledDiffReportId") + .HasColumnType("uniqueidentifier"); + + b.Property("StockUnsettledDiffReportId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpstreamDocumentNumber") + .HasColumnType("nvarchar(max)"); + + b.Property("UpstreamDocumentType") + .HasColumnType("int"); + + b.HasKey("UpstreamDocumentId"); + + b.HasIndex("BTNotConsignReportId"); + + b.HasIndex("BTSeqKBDiffReportId"); + + b.HasIndex("EstimatedStockDiffReportId"); + + b.HasIndex("JFNotConsignReportId"); + + b.HasIndex("SecondaryActuralAdjustmentReportId"); + + b.HasIndex("SecondaryActuralDiffReportId"); + + b.HasIndex("SendUnsettledDiffReportId"); + + b.HasIndex("StockFisDiffReportId"); + + b.HasIndex("StockSettledDiffReportId"); + + b.HasIndex("StockUnsettledDiffReportId"); + + b.ToTable("UpstreamDocument"); + }); + + modelBuilder.Entity("Win.Sfs.SettleAccount.BTNotConsignReports.BTNotConsignReportDetail", b => + { + b.HasOne("Win.Sfs.SettleAccount.BTNotConsignReports.BTNotConsignReport", null) + .WithMany("BTNotConsignReportDetails") + .HasForeignKey("DocumentId") + .OnDelete(DeleteBehavior.NoAction) + .IsRequired(); + }); + + modelBuilder.Entity("Win.Sfs.SettleAccount.BTSeqKBDiffReports.BTSeqKBDiffReportDetail", b => + { + b.HasOne("Win.Sfs.SettleAccount.BTSeqKBDiffReports.BTSeqKBDiffReport", null) + .WithMany("BTSeqKBDiffReportDetails") + .HasForeignKey("DocumentId") + .OnDelete(DeleteBehavior.NoAction) + .IsRequired(); + }); + + modelBuilder.Entity("Win.Sfs.SettleAccount.EstimatedStockDiffReports.EstimatedStockDiffReportDetail", b => + { + b.HasOne("Win.Sfs.SettleAccount.EstimatedStockDiffReports.EstimatedStockDiffReport", null) + .WithMany("EstimatedStockDiffReportDetails") + .HasForeignKey("DocumentId") + .OnDelete(DeleteBehavior.NoAction) + .IsRequired(); + }); + + modelBuilder.Entity("Win.Sfs.SettleAccount.JFNotConsignReports.JFNotConsignReportDetail", b => + { + b.HasOne("Win.Sfs.SettleAccount.JFNotConsignReports.JFNotConsignReport", null) + .WithMany("JFNotConsignReportDetails") + .HasForeignKey("DocumentId") + .OnDelete(DeleteBehavior.NoAction) + .IsRequired(); + }); + + modelBuilder.Entity("Win.Sfs.SettleAccount.SecondaryActuralAdjustmentReports.SecondaryActuralAdjustmentReportDetail", b => + { + b.HasOne("Win.Sfs.SettleAccount.SecondaryActuralAdjustmentReports.SecondaryActuralAdjustmentReport", null) + .WithMany("SecondaryActuralAdjustmentReportDetails") + .HasForeignKey("DocumentId") + .OnDelete(DeleteBehavior.NoAction) + .IsRequired(); + }); + + modelBuilder.Entity("Win.Sfs.SettleAccount.SecondaryActuralDiffReports.SecondaryActuralDiffReportDetail", b => + { + b.HasOne("Win.Sfs.SettleAccount.SecondaryActuralDiffReports.SecondaryActuralDiffReport", null) + .WithMany("SecondaryActuralDiffReportDetails") + .HasForeignKey("DocumentId") + .OnDelete(DeleteBehavior.NoAction) + .IsRequired(); + }); + + modelBuilder.Entity("Win.Sfs.SettleAccount.StockFisDiffReports.StockFisDiffReportDetail", b => + { + b.HasOne("Win.Sfs.SettleAccount.StockFisDiffReports.StockFisDiffReport", null) + .WithMany("StockFisDiffReportDetails") + .HasForeignKey("DocumentId") + .OnDelete(DeleteBehavior.NoAction) + .IsRequired(); + }); + + modelBuilder.Entity("Win.Sfs.SettleAccount.StockSettledDiffReports.StockSettledDiffReportDetail", b => + { + b.HasOne("Win.Sfs.SettleAccount.StockSettledDiffReports.StockSettledDiffReport", null) + .WithMany("StockSettledDiffReportDetails") + .HasForeignKey("DocumentId") + .OnDelete(DeleteBehavior.NoAction) + .IsRequired(); + }); + + modelBuilder.Entity("Win.Sfs.SettleAccount.StockUnsettledDiffReports.StockUnsettledDiffReportDetail", b => + { + b.HasOne("Win.Sfs.SettleAccount.StockUnsettledDiffReports.StockUnsettledDiffReport", null) + .WithMany("StockUnsettledDiffReportDetails") + .HasForeignKey("DocumentId") + .OnDelete(DeleteBehavior.NoAction) + .IsRequired(); + }); + + modelBuilder.Entity("Win.Sfs.Shared.DomainBase.UpstreamDocument", b => + { + b.HasOne("Win.Sfs.SettleAccount.BTNotConsignReports.BTNotConsignReport", null) + .WithMany("UpstreamDocuments") + .HasForeignKey("BTNotConsignReportId"); + + b.HasOne("Win.Sfs.SettleAccount.BTSeqKBDiffReports.BTSeqKBDiffReport", null) + .WithMany("UpstreamDocuments") + .HasForeignKey("BTSeqKBDiffReportId"); + + b.HasOne("Win.Sfs.SettleAccount.EstimatedStockDiffReports.EstimatedStockDiffReport", null) + .WithMany("UpstreamDocuments") + .HasForeignKey("EstimatedStockDiffReportId"); + + b.HasOne("Win.Sfs.SettleAccount.JFNotConsignReports.JFNotConsignReport", null) + .WithMany("UpstreamDocuments") + .HasForeignKey("JFNotConsignReportId"); + + b.HasOne("Win.Sfs.SettleAccount.SecondaryActuralAdjustmentReports.SecondaryActuralAdjustmentReport", null) + .WithMany("UpstreamDocuments") + .HasForeignKey("SecondaryActuralAdjustmentReportId"); + + b.HasOne("Win.Sfs.SettleAccount.SecondaryActuralDiffReports.SecondaryActuralDiffReport", null) + .WithMany("UpstreamDocuments") + .HasForeignKey("SecondaryActuralDiffReportId"); + + b.HasOne("Win.Sfs.SettleAccount.SendUnsettledDiffReports.SendUnsettledDiffReport", null) + .WithMany("UpstreamDocuments") + .HasForeignKey("SendUnsettledDiffReportId"); + + b.HasOne("Win.Sfs.SettleAccount.StockFisDiffReports.StockFisDiffReport", null) + .WithMany("UpstreamDocuments") + .HasForeignKey("StockFisDiffReportId"); + + b.HasOne("Win.Sfs.SettleAccount.StockSettledDiffReports.StockSettledDiffReport", null) + .WithMany("UpstreamDocuments") + .HasForeignKey("StockSettledDiffReportId"); + + b.HasOne("Win.Sfs.SettleAccount.StockUnsettledDiffReports.StockUnsettledDiffReport", null) + .WithMany("UpstreamDocuments") + .HasForeignKey("StockUnsettledDiffReportId"); + }); + + modelBuilder.Entity("Win.Sfs.SettleAccount.BTNotConsignReports.BTNotConsignReport", b => + { + b.Navigation("BTNotConsignReportDetails"); + + b.Navigation("UpstreamDocuments"); + }); + + modelBuilder.Entity("Win.Sfs.SettleAccount.BTSeqKBDiffReports.BTSeqKBDiffReport", b => + { + b.Navigation("BTSeqKBDiffReportDetails"); + + b.Navigation("UpstreamDocuments"); + }); + + modelBuilder.Entity("Win.Sfs.SettleAccount.EstimatedStockDiffReports.EstimatedStockDiffReport", b => + { + b.Navigation("EstimatedStockDiffReportDetails"); + + b.Navigation("UpstreamDocuments"); + }); + + modelBuilder.Entity("Win.Sfs.SettleAccount.JFNotConsignReports.JFNotConsignReport", b => + { + b.Navigation("JFNotConsignReportDetails"); + + b.Navigation("UpstreamDocuments"); + }); + + modelBuilder.Entity("Win.Sfs.SettleAccount.SecondaryActuralAdjustmentReports.SecondaryActuralAdjustmentReport", b => + { + b.Navigation("SecondaryActuralAdjustmentReportDetails"); + + b.Navigation("UpstreamDocuments"); + }); + + modelBuilder.Entity("Win.Sfs.SettleAccount.SecondaryActuralDiffReports.SecondaryActuralDiffReport", b => + { + b.Navigation("SecondaryActuralDiffReportDetails"); + + b.Navigation("UpstreamDocuments"); + }); + + modelBuilder.Entity("Win.Sfs.SettleAccount.SendUnsettledDiffReports.SendUnsettledDiffReport", b => + { + b.Navigation("UpstreamDocuments"); + }); + + modelBuilder.Entity("Win.Sfs.SettleAccount.StockFisDiffReports.StockFisDiffReport", b => + { + b.Navigation("StockFisDiffReportDetails"); + + b.Navigation("UpstreamDocuments"); + }); + + modelBuilder.Entity("Win.Sfs.SettleAccount.StockSettledDiffReports.StockSettledDiffReport", b => + { + b.Navigation("StockSettledDiffReportDetails"); + + b.Navigation("UpstreamDocuments"); + }); + + modelBuilder.Entity("Win.Sfs.SettleAccount.StockUnsettledDiffReports.StockUnsettledDiffReport", b => + { + b.Navigation("StockUnsettledDiffReportDetails"); + + b.Navigation("UpstreamDocuments"); }); #pragma warning restore 612, 618 } diff --git a/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/VWSparePart/ISparePartAppService.cs b/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/VWSparePart/ISparePartAppService.cs index d7148931..f3fec313 100644 --- a/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/VWSparePart/ISparePartAppService.cs +++ b/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/VWSparePart/ISparePartAppService.cs @@ -43,7 +43,7 @@ namespace Win.Sfs.SettleAccount.Entities.VWSparePart /// 请求条件 /// 实体DTO列表 - Task> GetListAsync(Guid parentId, SparePartRequestDto input); + Task> GetListAsync( SparePartRequestDto input); diff --git a/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/VWSparePart/SparePartAppService.cs b/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/VWSparePart/SparePartAppService.cs index d74033d2..1a99deee 100644 --- a/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/VWSparePart/SparePartAppService.cs +++ b/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/VWSparePart/SparePartAppService.cs @@ -22,10 +22,13 @@ using Magicodes.ExporterAndImporter.Core; using Magicodes.ExporterAndImporter.Csv; using Magicodes.ExporterAndImporter.Excel; using Win.Sfs.Shared.Filter; +using Volo.Abp; namespace Win.Sfs.SettleAccount.Entities.VWSparePart { - + /// + /// 大众备件服务 + /// [Route("api/settleaccount/SparePart")] public class SparePartAppService : SettleAccountApplicationBase, ISparePartAppService { @@ -69,6 +72,10 @@ namespace Win.Sfs.SettleAccount.Entities.VWSparePart //[Authorize(SettleAccountPermissions.SettleAccounts.Default)] public async Task SparePartUploadExcelImport([FromForm] IFormFileCollection files, Guid branchId, string year, string period, string version, string customerCode) { + if (string.IsNullOrEmpty(version)) + { + throw new BusinessException("版本不能空,必须传入!"); + } ExportImporter _exportImporter = new ExportImporter(); var result = await _exportImporter.UploadExcelImport< SparePartImportDto>(files, _excelImportService); var entityList = ObjectMapper.Map, List>(result); @@ -91,7 +98,10 @@ namespace Win.Sfs.SettleAccount.Entities.VWSparePart var _id = GuidGenerator.Create(); var _bomList = new List< SparePartVersion>(); _bomList.Add(new SparePartVersion(_id, branchId, year, period, version, customerCode)); - + foreach (var itm in entityList) + { + itm.SetValue(GuidGenerator.Create(), branchId, year, period, version); + } if (checkList.Count > 0) { return await ExportErrorReportAsync(checkList); @@ -148,12 +158,15 @@ namespace Win.Sfs.SettleAccount.Entities.VWSparePart //[Authorize(SettleAccountPermissions.SettleAccounts.Default)] virtual public async Task ExportAsync(SparePartRequestDto input) { - + if (string.IsNullOrEmpty(input.Version)) + { + throw new BusinessException("版本不能空,必须传入!"); + } IExporter _csv = new CsvExporter(); IExporter _excel = new ExcelExporter(); - if (input.ParentId != Guid.Empty) + if (!string.IsNullOrEmpty(input.Version)) { - input.Filters.Add(new FilterCondition() { Action = EnumFilterAction.Equal, Column = "ParentId", Logic = EnumFilterLogic.And, Value = input.ParentId.ToString() }); + input.Filters.Add(new FilterCondition() { Action = EnumFilterAction.Equal, Column = "Version", Logic = EnumFilterLogic.And, Value = input.Version }); } var entities = await _repository.GetListByFilterAsync(input.BranchId, input.Filters, input.Sorting, int.MaxValue, 0, true); @@ -200,16 +213,17 @@ namespace Win.Sfs.SettleAccount.Entities.VWSparePart [HttpPost] [Route("list")] //[Authorize(SettleAccountPermissions.SettleAccounts.Default)] - virtual public async Task> GetListAsync(Guid id, SparePartRequestDto input) + virtual public async Task> GetListAsync(SparePartRequestDto input) { - if (input.ParentId != Guid.Empty) + if (!string.IsNullOrEmpty(input.Version)) { - input.Filters.Add(new FilterCondition() { Action = EnumFilterAction.Equal, Column = "ParentId", Logic = EnumFilterLogic.And, Value = input.ParentId.ToString() }); + input.Filters.Add(new FilterCondition() { Action = EnumFilterAction.Equal, Column = "Version", Logic = EnumFilterLogic.And, Value = input.Version }); } else { return new PagedResultDto(0, new List()); } + var entities = await _repository.GetListByFilterAsync(input.BranchId, input.Filters, input.Sorting, input.MaxResultCount, input.SkipCount, true); diff --git a/src/Modules/SettleAccount/src/SettleAccount.Application/SettleAccount.Application.xml b/src/Modules/SettleAccount/src/SettleAccount.Application/SettleAccount.Application.xml index 889b4e43..30684b63 100644 --- a/src/Modules/SettleAccount/src/SettleAccount.Application/SettleAccount.Application.xml +++ b/src/Modules/SettleAccount/src/SettleAccount.Application/SettleAccount.Application.xml @@ -1659,6 +1659,11 @@ + + + 大众备件服务 + + 构建方法 @@ -1691,7 +1696,7 @@ - + 根据筛选条件获取实体列表 diff --git a/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/VWSparePart/SparePart.cs b/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/VWSparePart/SparePart.cs index f9aab181..caa70da8 100644 --- a/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/VWSparePart/SparePart.cs +++ b/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/VWSparePart/SparePart.cs @@ -15,6 +15,15 @@ namespace Win.Sfs.SettleAccount.Entities.VWSparePart { public SparePart() { } + + public void SetValue(Guid guid, Guid branchId, string year, string peroid, string version) + { + Period = peroid; + Year = year; + Id = guid; + Version = version; + BranchId = branchId; + } public SparePart(Guid Id, string year, string period, string version, string lineNumber, string purchaseType,string purchaseOrderNo, string purchaseOrderNoItem, string purchaseOrderNoText, decimal receiptQty, decimal invoicedQty, decimal amountNoTax, decimal purchasePriceNoTax, diff --git a/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/EntityFrameworkCore/SettleAccountDbContextModelCreatingExtensions.cs b/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/EntityFrameworkCore/SettleAccountDbContextModelCreatingExtensions.cs index 790e4377..f33f1b1d 100644 --- a/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/EntityFrameworkCore/SettleAccountDbContextModelCreatingExtensions.cs +++ b/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/EntityFrameworkCore/SettleAccountDbContextModelCreatingExtensions.cs @@ -87,181 +87,181 @@ namespace Win.Sfs.SettleAccount #region 天合 //产品结构 - //builder.ConfigureBom(options); + builder.ConfigureBom(options); - ////结算件 - //builder.ConfigureSettlementPart(options); + //结算件 + builder.ConfigureSettlementPart(options); - ////ERP总成开票价格 - //builder.ConfigureItemInvoicePrice(options); - //builder.ConfigureItemInvoicePriceVersion(options); + //ERP总成开票价格 + builder.ConfigureItemInvoicePrice(options); + builder.ConfigureItemInvoicePriceVersion(options); - ////客户 - //builder.ConfigureCustomer(options); + //客户 + builder.ConfigureCustomer(options); - ////客户产品结构 - //builder.ConfigureCustomerBom(options); - //builder.ConfigureEstimatedSum(options); - //builder.ConfigureCodeSetting(options); - //builder.ConfigureMaterial(options); - //builder.ConfigureEstimatedInventoryDetail(options); - //builder.ConfigureInventoryDetail(options); - - - //builder.ConfigureMaterialRelationship(options); - //builder.ConfigureFIS(options); - //builder.ConfigureFISExtend(options); - //builder.ConfigureCentralizedControl(options); - //builder.ConfigurePrebatch(options); - //builder.ConfigureFactory(options); - //builder.ConfigureSupplierItemSetUp(options); - //builder.ConfigureSecondaryAdjustment(options); - //builder.ConfigureSecondaryPriceRatio(options); - //builder.ConfigureCustomerStorageLocation(options); - //builder.ConfigureBomVersion(options); - //builder.ConfigureFISVersion(options); - //builder.ConfigureEstimatedSumVersion(options); - //builder.ConfigureEstimatedInventoryVersion(options); - //builder.ConfigureInventoryDetailVersion(options); - - + //客户产品结构 + builder.ConfigureCustomerBom(options); + builder.ConfigureEstimatedSum(options); + builder.ConfigureCodeSetting(options); + builder.ConfigureMaterial(options); + builder.ConfigureEstimatedInventoryDetail(options); + builder.ConfigureInventoryDetail(options); - //builder.ConfigureSecondaryAdjustmentVersion(options); - //builder.ConfigureSecondaryPriceRatioVersion(options); - //builder.ConfigureSecondaryDiscount(options); - //builder.ConfigureSecondaryDiscountVersion(options); - //builder.ConfigureSecondaryPriceRatioVersion(options); - ////暂估发出未结算 - //builder.ConfigureEstimatedStockDiffReport(options); + builder.ConfigureMaterialRelationship(options); + builder.ConfigureFIS(options); + builder.ConfigureFISExtend(options); + builder.ConfigureCentralizedControl(options); + builder.ConfigurePrebatch(options); + builder.ConfigureFactory(options); + builder.ConfigureSupplierItemSetUp(options); + builder.ConfigureSecondaryAdjustment(options); + builder.ConfigureSecondaryPriceRatio(options); + builder.ConfigureCustomerStorageLocation(options); + builder.ConfigureBomVersion(options); + builder.ConfigureFISVersion(options); + builder.ConfigureEstimatedSumVersion(options); + builder.ConfigureEstimatedInventoryVersion(options); + builder.ConfigureInventoryDetailVersion(options); - ////暂估发出未结算明细 - //builder.ConfigureEstimatedStockDiffReportDetail(options); - ////库存未结算比对 - //builder.ConfigureStockUnsettledDiffReport(options); + builder.ConfigureSecondaryAdjustmentVersion(options); + builder.ConfigureSecondaryPriceRatioVersion(options); + builder.ConfigureSecondaryDiscount(options); + builder.ConfigureSecondaryDiscountVersion(options); - ////库存未结算比对明细 - //builder.ConfigureStockUnsettledDiffReportDetail(options); + builder.ConfigureSecondaryPriceRatioVersion(options); + //暂估发出未结算 + builder.ConfigureEstimatedStockDiffReport(options); + //暂估发出未结算明细 + builder.ConfigureEstimatedStockDiffReportDetail(options); - ////R3结算数据对比输出表 - //builder.ConfigureStockSettledDiffReport(options); - ////R3结算数据对比输出表明细 - //builder.ConfigureStockSettledDiffReportDetail(options); + //库存未结算比对 + builder.ConfigureStockUnsettledDiffReport(options); - ////FIS发运数据对比输出表 - //builder.ConfigureStockFisDiffReport(options); + //库存未结算比对明细 + builder.ConfigureStockUnsettledDiffReportDetail(options); - ////FIS发运数据对比输出表明细 - //builder.ConfigureStockFisDiffReportDetail(options); + //R3结算数据对比输出表 + builder.ConfigureStockSettledDiffReport(options); - ////发出未结算比对 - //builder.ConfigureSendUnsettledDiffReport(options); + //R3结算数据对比输出表明细 + builder.ConfigureStockSettledDiffReportDetail(options); - ////发出未结算比对明细 - //builder.ConfigureSendUnsettledDiffReportDetail(options); + //FIS发运数据对比输出表 + builder.ConfigureStockFisDiffReport(options); - ////奔腾轿车一厂车序输入表 - //builder.ConfigureBTCarSeqFirst(options); - //builder.ConfigureBTCarSeqFirstVersion(options); - ////实际二配调整后输出表 - //builder.ConfigureSecondaryActuralAdjustmentReport(options); + //FIS发运数据对比输出表明细 + builder.ConfigureStockFisDiffReportDetail(options); - ////实际二配调整后输出表明细 - //builder.ConfigureSecondaryActuralAdjustmentReportDetail(options); + //发出未结算比对 + builder.ConfigureSendUnsettledDiffReport(options); - ////二配对比输出表 - //builder.ConfigureSecondaryActuralDiffReport(options); + //发出未结算比对明细 + builder.ConfigureSendUnsettledDiffReportDetail(options); - ////二配对比输出表明细 - //builder.ConfigureSecondaryActuralDiffReportDetail(options); + //奔腾轿车一厂车序输入表 + builder.ConfigureBTCarSeqFirst(options); + builder.ConfigureBTCarSeqFirstVersion(options); + //实际二配调整后输出表 + builder.ConfigureSecondaryActuralAdjustmentReport(options); - ////奔腾轿车二厂车序输入表 - //builder.ConfigureBTCarSeqSecond(options); - //builder.ConfigureBTCarSeqSecondVersion(options); + //实际二配调整后输出表明细 + builder.ConfigureSecondaryActuralAdjustmentReportDetail(options); - ////奔腾轿车车序输入表 - //builder.ConfigureBTCarSeq(options); - //builder.ConfigureBTCarSeqVersion(options); - ////奔腾看板输入表 - //builder.ConfigureBTCarKB(options); - //builder.ConfigureBTCarKBVersion(options); + //二配对比输出表 + builder.ConfigureSecondaryActuralDiffReport(options); - ////奔腾结算输入表 - //builder.ConfigureBTCarConsign(options); - //builder.ConfigureBTCarConsignVersion(options); + //二配对比输出表明细 + builder.ConfigureSecondaryActuralDiffReportDetail(options); - ////解放看板输入表 - //builder.ConfigureJFCarKB(options); - //builder.ConfigureJFCarKBVersion(options); + //奔腾轿车二厂车序输入表 + builder.ConfigureBTCarSeqSecond(options); + builder.ConfigureBTCarSeqSecondVersion(options); - ////结算结算输入表 - //builder.ConfigureJFCarConsign(options); - //builder.ConfigureJFCarConsignVersion(options); + //奔腾轿车车序输入表 + builder.ConfigureBTCarSeq(options); + builder.ConfigureBTCarSeqVersion(options); - ////车型代码与零件号匹配关系设置表 - //builder.ConfigureCarMaterialConfig(options); + //奔腾看板输入表 + builder.ConfigureBTCarKB(options); + builder.ConfigureBTCarKBVersion(options); - ////轿车车序与看板差异输出表 - //builder.ConfigureBTSeqKBDiffReport(options); + //奔腾结算输入表 + builder.ConfigureBTCarConsign(options); + builder.ConfigureBTCarConsignVersion(options); - ////轿车车序与看板差异输出表明细 - //builder.ConfigureBTSeqKBDiffReportDetail(options); + //解放看板输入表 + builder.ConfigureJFCarKB(options); + builder.ConfigureJFCarKBVersion(options); - ////轿车发出未结算输出表 - //builder.ConfigureBTNotConsignReport(options); - ////轿车发出未结算输出表明细 - //builder.ConfigureBTNotConsignReportDetail(options); + //结算结算输入表 + builder.ConfigureJFCarConsign(options); + builder.ConfigureJFCarConsignVersion(options); + //车型代码与零件号匹配关系设置表 + builder.ConfigureCarMaterialConfig(options); - ////解放发出未结算输出表 - //builder.ConfigureJFNotConsignReport(options); - ////解放发出未结算输出表明细 - //builder.ConfigureJFNotConsignReportDetail(options); + //轿车车序与看板差异输出表 + builder.ConfigureBTSeqKBDiffReport(options); + //轿车车序与看板差异输出表明细 + builder.ConfigureBTSeqKBDiffReportDetail(options); + + //轿车发出未结算输出表 + builder.ConfigureBTNotConsignReport(options); + //轿车发出未结算输出表明细 + builder.ConfigureBTNotConsignReportDetail(options); + + + //解放发出未结算输出表 + builder.ConfigureJFNotConsignReport(options); + //解放发出未结算输出表明细 + builder.ConfigureJFNotConsignReportDetail(options); + + + builder.ConfigureHQKBVersion(options); + builder.ConfigureHQSpecKBVersion(options); + builder.ConfigureHQConsignVersion(options); + builder.ConfigureHQSpecConsignVersion(options); + + builder.ConfigureHQKB(options); + builder.ConfigureHQSpecKB(options); + builder.ConfigureHQConsign(options); + builder.ConfigureHQSpecConsign(options); + builder.ConfigureTaskJob(options); + builder.ConfigureImportMap(options); - //builder.ConfigureHQKBVersion(options); - //builder.ConfigureHQSpecKBVersion(options); - //builder.ConfigureHQConsignVersion(options); - //builder.ConfigureHQSpecConsignVersion(options); - //builder.ConfigureHQKB(options); - //builder.ConfigureHQSpecKB(options); - //builder.ConfigureHQConsign(options); - //builder.ConfigureHQSpecConsign(options); - //builder.ConfigureTaskJob(options); - //builder.ConfigureImportMap(options); - + builder.ConfigureInvoiceSettledDiff(options); + builder.ConfigureInventoryDetailVersion(options); + builder.ConfigureInvoiceSettledDiffVersion(options); + builder.ConfigurePriceListVersion(options); + builder.ConfigurePriceList(options); + builder.ConfigureFIS_TH(options); + builder.ConfigureMaterialRelationshipVersion(options); + builder.ConfigureMaterialRelationshipDetail(options); + builder.ConfigureSettlementPartVersion(options); + //结算关系对照表 + builder.ConfigureSettlementCrossReference(options); + builder.ConfigureSettlementCrossReferenceVersion(options); + //结算包和跟散件对应关系 + builder.ConfigureSettlementPakAndSpareParts(options); + builder.ConfigureSettlementPakAndSparePartsVersion(options); - //builder.ConfigureInvoiceSettledDiff(options); - //builder.ConfigureInventoryDetailVersion(options); - //builder.ConfigureInvoiceSettledDiffVersion(options); - //builder.ConfigurePriceListVersion(options); - //builder.ConfigurePriceList(options); - //builder.ConfigureFIS_TH(options); - //builder.ConfigureMaterialRelationshipVersion(options); - //builder.ConfigureMaterialRelationshipDetail(options); - //builder.ConfigureSettlementPartVersion(options); - ////结算关系对照表 - //builder.ConfigureSettlementCrossReference(options); - //builder.ConfigureSettlementCrossReferenceVersion(options); - ////结算包和跟散件对应关系 - //builder.ConfigureSettlementPakAndSpareParts(options); - //builder.ConfigureSettlementPakAndSparePartsVersion(options); - - //builder.ConfigureSecMatchBase(options); + builder.ConfigureSecMatchBase(options); #endregion diff --git a/src/Modules/SettleAccount/src/SettleAccount.Job/Services/UnSettleAccount/UnSettleAccountImportService.cs b/src/Modules/SettleAccount/src/SettleAccount.Job/Services/UnSettleAccount/UnSettleAccountImportService.cs index 8e95c7b3..74247508 100644 --- a/src/Modules/SettleAccount/src/SettleAccount.Job/Services/UnSettleAccount/UnSettleAccountImportService.cs +++ b/src/Modules/SettleAccount/src/SettleAccount.Job/Services/UnSettleAccount/UnSettleAccountImportService.cs @@ -15,6 +15,9 @@ using Win.Sfs.SettleAccount.Repository.SettleAccount; namespace TaskJob.Services { + /// + /// 大众FIS未结数据-服务 + /// public class UnSettleAccountImportService : ITransientDependency, IImportJob { private readonly UnSettleAccountRepository _repository; From f15ba605e991c8aa8ae7804ed25ea58f2b4f0b5f Mon Sep 17 00:00:00 2001 From: Administrator Date: Mon, 15 Nov 2021 15:10:14 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E7=89=88=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .vs/VSWorkspaceState.json | 7 ++++ .../SettleAccountImportService.cs | 36 ++++++++++--------- 2 files changed, 26 insertions(+), 17 deletions(-) create mode 100644 .vs/VSWorkspaceState.json diff --git a/.vs/VSWorkspaceState.json b/.vs/VSWorkspaceState.json new file mode 100644 index 00000000..fd5a9563 --- /dev/null +++ b/.vs/VSWorkspaceState.json @@ -0,0 +1,7 @@ +{ + "ExpandedNodes": [ + "" + ], + "SelectedNode": "\\WY.NewJit.sln (src\\Modules\\派格FIS\\WY.NewJit.sln)", + "PreviewInSolutionExplorer": false +} \ No newline at end of file diff --git a/src/Modules/SettleAccount/src/SettleAccount.Job/Services/SettleAccount/SettleAccountImportService.cs b/src/Modules/SettleAccount/src/SettleAccount.Job/Services/SettleAccount/SettleAccountImportService.cs index 8b58e32f..310e0278 100644 --- a/src/Modules/SettleAccount/src/SettleAccount.Job/Services/SettleAccount/SettleAccountImportService.cs +++ b/src/Modules/SettleAccount/src/SettleAccount.Job/Services/SettleAccount/SettleAccountImportService.cs @@ -42,8 +42,8 @@ namespace TaskJob.Services public string ImportFile(Guid id, List fileName, List realfileName, List customConditions) { - - + + IExporter _excel = new ExcelExporter(); string fileSavePath = Environment.CurrentDirectory + @"\wwwroot\files\host\my-file-container\"; var version = customConditions.Where(p => p.Name == "Version").FirstOrDefault().Value; @@ -53,6 +53,7 @@ namespace TaskJob.Services var factory = customConditions.Where(p => p.Name == "Factory").FirstOrDefault().Value; //_versionRepository.Delete(version); //_repository.Delete(version); + List _setls = new List(); var _id = Guid.NewGuid(); foreach (var itm in fileName) @@ -62,9 +63,9 @@ namespace TaskJob.Services var filePath = fileSavePath + itm;//获取到导入的excel var exten = Path.GetExtension(fileSavePath); - List _setls = new List(); + List _errorList = new List(); - + var checkList = new List(); //var _chList = await _relrepository.GetAllAsync(GuidGenerator.Create(), true); //var _chls = _chList.Select(p => p.SettleMaterialCode).Distinct(); @@ -130,29 +131,22 @@ namespace TaskJob.Services else { // _setls= _inputService.Input(filePath); - var errorlist=new List(); - var dtoList = _inputService.Input(filePath,null,errorlist); + var errorlist = new List(); + var dtoList = _inputService.Input(filePath, null, errorlist); foreach (var dto in dtoList) { if (dto.KENNCode.Length == 6) { dto.KENNCode = "0" + dto.KENNCode; } - var _settleaccount=new Win.Sfs.SettleAccount.Entities.SettleAccounts.SettleAccount(Guid.NewGuid(), Guid.NewGuid(),dto.SettleYear, dto.KENNCode, + var _settleaccount = new Win.Sfs.SettleAccount.Entities.SettleAccounts.SettleAccount(Guid.NewGuid(), Guid.NewGuid(), dto.SettleYear, dto.KENNCode, dto.ChassisNumber, dto.Model, dto.CP5A, dto.CP7, dto.MaterialCode, dto.Qty, dto.SettlementID, dto.SettlementSupplier, - DateTime.Now.Month.ToString(), dto.SettleYear, _id, version, DateTime.Now,Guid.NewGuid()); + DateTime.Now.Month.ToString(), dto.SettleYear, _id, version, DateTime.Now, Guid.NewGuid()); _setls.Add(_settleaccount); } } - var _ls = _setls; - var a = _ls.Where(p => string.IsNullOrEmpty(p.KENNCode)); - var query = from arc in _ls - group arc by new { arc.ChassisNumber, arc.MaterialCode } into g - where g.Count() > 1 - select g; - _repository.Insert(_setls); - _versionRepository.Insert(_id,version, customerCode, customerCode); + @@ -160,7 +154,7 @@ namespace TaskJob.Services #region //var errorFileName = "错误文件.xlsx"; //checkList.Add(new ErrorExportDto(version, customerCode, string.Empty, string.Empty, string.Empty, string.Empty, string.Format("ERP物料号{0}底盘号 {1}有重复", "11111111111", "22222222222"), string.Empty)); - + //_service.ExportError(id,errorFileName, checkList); #endregion } @@ -169,6 +163,14 @@ namespace TaskJob.Services throw e; } } + + _setls = _setls.GroupBy(p => new { p.ChassisNumber, p.MaterialCode, p.KENNCode }).Select(p => p.FirstOrDefault()).ToList(); + _repository.Insert(_setls); + _versionRepository.Insert(_id, version, customerCode, customerCode); + + + + return id.ToString(); } }