diff --git a/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/Syncs/JisBBACSeEdiCompareAppService.cs b/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/Syncs/JisBBACSeEdiCompareAppService.cs new file mode 100644 index 00000000..314ed0a8 --- /dev/null +++ b/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/Syncs/JisBBACSeEdiCompareAppService.cs @@ -0,0 +1,44 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; +using Coravel.Invocable; +using Microsoft.AspNetCore.Mvc; +using Microsoft.Extensions.DependencyInjection; +using SettleAccount.Domain.BQ; +using Volo.Abp.Application.Services; + +namespace Win.Sfs.SettleAccount.Entities.BQ.Syncs; + +/// +/// JisBBAC 发运数据与EDI数据对比 +/// +[ApiExplorerSettings(IgnoreApi = true)] +public class JisBBACSeEdiCompareAppService : ApplicationService, IInvocable +{ + private readonly IServiceProvider _serviceProvider; + + public JisBBACSeEdiCompareAppService(IServiceProvider serviceProvider) + { + _serviceProvider = serviceProvider; + } + + /// + /// 执行 + /// + public async Task Invoke() + { + using var serviceScope = _serviceProvider.CreateScope(); + var db = serviceScope.ServiceProvider.GetRequiredService(); + var query = db.Set().Join(db.Set(), a => new { a.PN, a.LU, a.Qty }, b => new { b.PN, b.LU, b.Qty }, (se, edi) => new { se, edi }).Where(t => t.se.IsHaveEdiData == false && t.edi.IsHaveSeData == false); + var ses = query.Select(t => t.se); + var edis = query.Select(t => t.edi); + + ses.ForEach(t => t.IsHaveEdiData = true); + edis.ForEach(t => t.IsHaveSeData = true); + + db.Set().UpdateRange(ses); + db.Set().UpdateRange(edis); + await db.SaveChangesAsync().ConfigureAwait(false); + } +} diff --git a/code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/BBAC_SE_DETAIL.cs b/code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/BBAC_SE_DETAIL.cs index 3eeb8c53..3ecc0cde 100644 --- a/code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/BBAC_SE_DETAIL.cs +++ b/code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/BBAC_SE_DETAIL.cs @@ -194,6 +194,12 @@ public class BBAC_SE_DETAIL:SE_BASE [Display(Name = "客户位置")] public string Position { get; set; } + /// + /// 是否有EDI数据 + /// + [Display(Name = "是否有EDI数据")] + public bool IsHaveEdiData { get; set; } + public BBAC_SE_DETAIL(Guid guid, string keyCode, int version, string lU, string pN, string seqNumber, string assemblyCode, string injectionCode, decimal qty, DateTime beginDate, DateTime shippingDate, string wmsBillNum) { Id= guid; diff --git a/code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/BBAC_SE_EDI.cs b/code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/BBAC_SE_EDI.cs index 3c93be62..b152d1ad 100644 --- a/code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/BBAC_SE_EDI.cs +++ b/code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/BBAC_SE_EDI.cs @@ -44,6 +44,11 @@ public class BBAC_SE_EDI:FullAuditedAggregateRoot public string Extend3 { set; get; } public string Extend4 { set; get; } + /// + /// 是否有发运数据 + /// + [Display(Name = "是否有发运数据")] + public bool IsHaveSeData { get; set; } public BBAC_SE_EDI() { } diff --git a/code/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Migrations/20230810081159_20230810-3.Designer.cs b/code/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Migrations/20230810081159_20230810-3.Designer.cs new file mode 100644 index 00000000..0a865585 --- /dev/null +++ b/code/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Migrations/20230810081159_20230810-3.Designer.cs @@ -0,0 +1,5401 @@ +// +using System; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Metadata; +using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; +using Volo.Abp.EntityFrameworkCore; +using Win.Sfs.SettleAccount; + +namespace Win.Sfs.SettleAccount.Migrations +{ + [DbContext(typeof(SettleAccountDbContext))] + [Migration("20230810081159_20230810-3")] + partial class _202308103 + { + protected override void BuildTargetModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder + .HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.SqlServer) + .HasAnnotation("Relational:MaxIdentifierLength", 128) + .HasAnnotation("ProductVersion", "5.0.17") + .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn); + + modelBuilder.Entity("SettleAccount.Domain.BQ.BBAC_CAN_SA", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("BillNum") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("BusinessType") + .HasColumnType("int"); + + 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("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("InvGroupNum") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("SettleBillNum") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Site") + .HasColumnType("nvarchar(max)"); + + b.Property("State") + .HasMaxLength(50) + .HasColumnType("int"); + + b.Property("Version") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.ToTable("Set_BBAC_CAN_SA"); + }); + + modelBuilder.Entity("SettleAccount.Domain.BQ.BBAC_CAN_SA_DETAIL", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("BillNum") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("BusinessType") + .HasColumnType("int"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(50) + .HasColumnType("nvarchar(50)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("ContractDocID") + .HasColumnType("nvarchar(max)"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("GroupNum") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("InvGroupNum") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("InvbillNum") + .HasColumnType("nvarchar(max)"); + + b.Property("IsMaiDan") + .HasColumnType("bit"); + + b.Property("IsReturn") + .HasMaxLength(50) + .HasColumnType("bit"); + + b.Property("KeyCode") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("LU") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("PN") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("PartCode") + .HasColumnType("nvarchar(max)"); + + b.Property("Price") + .HasColumnType("decimal(18,2)"); + + b.Property("Qty") + .HasColumnType("decimal(18,2)"); + + b.Property("SettleBillNum") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("SettleDate") + .HasColumnType("datetime2"); + + b.Property("Site") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Version") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.ToTable("Set_BBAC_CAN_SA_DETAIL"); + }); + + modelBuilder.Entity("SettleAccount.Domain.BQ.BBAC_NOT_SA_DETAIL", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("BusinessType") + .HasColumnType("int"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(50) + .HasColumnType("nvarchar(50)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("ContractDocID") + .HasColumnType("nvarchar(max)"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("GroupNum") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("InvGroupNum") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("IsMaiDan") + .HasColumnType("bit"); + + b.Property("IsReturn") + .HasMaxLength(50) + .HasColumnType("bit"); + + b.Property("KeyCode") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("LU") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("PN") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("PartCode") + .HasColumnType("nvarchar(max)"); + + b.Property("Price") + .HasColumnType("decimal(18,2)"); + + b.Property("Qty") + .HasColumnType("decimal(18,2)"); + + b.Property("SettleBillNum") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("SettleDate") + .HasColumnType("datetime2"); + + b.Property("Site") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Version") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.ToTable("Set_BBAC_NOT_SA_DETAIL"); + }); + + modelBuilder.Entity("SettleAccount.Domain.BQ.BBAC_PD", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("BillNum") + .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("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("InvGroupNum") + .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("SettleBillNum") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Site") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("State") + .HasColumnType("int"); + + b.Property("Version") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.ToTable("Set_BBAC_PD"); + }); + + modelBuilder.Entity("SettleAccount.Domain.BQ.BBAC_PD_DETAIL", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("BillNum") + .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("Extend1") + .HasColumnType("nvarchar(max)"); + + b.Property("Extend2") + .HasColumnType("nvarchar(max)"); + + b.Property("Extend3") + .HasColumnType("nvarchar(max)"); + + b.Property("Extend4") + .HasColumnType("nvarchar(max)"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("GroupNum") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("InvGroupNum") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("KeyCode") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("LU") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("PN") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Price") + .HasColumnType("decimal(18,2)"); + + b.Property("Qty") + .HasColumnType("decimal(18,2)"); + + b.Property("RELU") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("REPN") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("SettleDate") + .HasColumnType("datetime2"); + + b.Property("Site") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Version") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.ToTable("Set_BBAC_PD_DETAIL"); + }); + + modelBuilder.Entity("SettleAccount.Domain.BQ.BBAC_SA", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("BillNum") + .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("DNBillNum") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Site") + .HasColumnType("nvarchar(max)"); + + b.Property("State") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Version") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.ToTable("Set_BBAC_SA"); + }); + + modelBuilder.Entity("SettleAccount.Domain.BQ.BBAC_SA_DETAIL", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("BillNum") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Category") + .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("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("GroupNum") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("IsMaiDan") + .HasColumnType("bit"); + + b.Property("IsReturn") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("KeyCode") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("LU") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("PN") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("PartCode") + .HasColumnType("nvarchar(max)"); + + b.Property("Price") + .HasColumnType("decimal(18,2)"); + + b.Property("Qty") + .HasColumnType("decimal(18,2)"); + + b.Property("SettleDate") + .HasColumnType("datetime2"); + + b.Property("Site") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Version") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.ToTable("Set_BBAC_SA_DETAIL"); + }); + + modelBuilder.Entity("SettleAccount.Domain.BQ.BBAC_SE_DETAIL", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("AssemblyCode") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Batch") + .HasColumnType("nvarchar(max)"); + + b.Property("BeginDate") + .HasColumnType("datetime2"); + + b.Property("BillCharacter") + .HasColumnType("nvarchar(max)"); + + b.Property("BillTime") + .HasColumnType("datetime2"); + + b.Property("CodeType") + .HasColumnType("nvarchar(max)"); + + 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("DeliverCode") + .HasColumnType("nvarchar(max)"); + + b.Property("ErpToLoc") + .HasColumnType("nvarchar(max)"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("FromLoc") + .HasColumnType("nvarchar(max)"); + + b.Property("InjectionCode") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("IsHaveEdiData") + .HasColumnType("bit"); + + b.Property("KeyCode") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("LU") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("MESConfigCode") + .HasColumnType("nvarchar(max)"); + + b.Property("MatchNumber") + .HasColumnType("nvarchar(max)"); + + b.Property("Num") + .HasColumnType("nvarchar(max)"); + + b.Property("Oper") + .HasColumnType("nvarchar(max)"); + + b.Property("OrderNum") + .HasColumnType("nvarchar(max)"); + + b.Property("OrigiCode") + .HasColumnType("nvarchar(max)"); + + b.Property("PN") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("PartCode") + .HasColumnType("nvarchar(max)"); + + b.Property("PjsNum") + .HasColumnType("nvarchar(max)"); + + b.Property("Position") + .HasColumnType("nvarchar(max)"); + + b.Property("Qty") + .HasColumnType("decimal(18,2)"); + + b.Property("RealCode") + .HasColumnType("nvarchar(max)"); + + b.Property("RealPartCode") + .HasColumnType("nvarchar(max)"); + + b.Property("RefBillNum") + .HasColumnType("nvarchar(max)"); + + b.Property("RefVinCode") + .HasColumnType("nvarchar(max)"); + + b.Property("Remark") + .HasColumnType("nvarchar(max)"); + + b.Property("Seq") + .HasColumnType("nvarchar(max)"); + + b.Property("SeqNumber") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("ShippingDate") + .HasColumnType("datetime2"); + + b.Property("ToLoc") + .HasColumnType("nvarchar(max)"); + + b.Property("UniqueCode") + .HasColumnType("nvarchar(max)"); + + b.Property("Version") + .HasColumnType("int"); + + b.Property("VinCode") + .HasColumnType("nvarchar(max)"); + + b.Property("WmsBillNum") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.HasKey("Id"); + + b.ToTable("Set_BBAC_SE_DETAIL"); + }); + + modelBuilder.Entity("SettleAccount.Domain.BQ.BBAC_SE_EDI", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("AssemblyCode") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("BeginDate") + .HasColumnType("datetime2"); + + 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("Extend1") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Extend2") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Extend3") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Extend4") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("InjectionCode") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("IsHaveSeData") + .HasColumnType("bit"); + + b.Property("KeyCode") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("LU") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("PN") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Qty") + .HasColumnType("decimal(18,2)"); + + b.Property("SeqNumber") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Site") + .HasColumnType("nvarchar(max)"); + + b.Property("Version") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.ToTable("Set_BBAC_SE_EDI"); + }); + + modelBuilder.Entity("SettleAccount.Domain.BQ.BBAC_SE_REPORT", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("AssemblyCode") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("BeginDate") + .HasColumnType("datetime2"); + + 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("EDIQty") + .HasColumnType("decimal(18,2)"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("InjectionCode") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("KeyCode") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("LU") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("PN") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Qty") + .HasColumnType("decimal(18,2)"); + + b.Property("SeqNumber") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("ShippingDate") + .HasColumnType("datetime2"); + + b.Property("Version") + .HasColumnType("int"); + + b.Property("WmsBillNum") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.HasKey("Id"); + + b.ToTable("Set_BBAC_SE_REPORT"); + }); + + modelBuilder.Entity("SettleAccount.Domain.BQ.BBAC_SE_SA_REPORT", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("AssemblyCode") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Category") + .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("CustomerOfflineTime") + .HasColumnType("datetime2"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("EDIQty") + .HasColumnType("decimal(18,2)"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("FixPrice") + .HasColumnType("decimal(18,2)"); + + b.Property("InjectionCode") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("KeyCode") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("LU") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("MateType") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("MaterialDes") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("MaterialNumber") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("PJISSeqNumber") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("PN") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("SEQty") + .HasColumnType("decimal(18,2)"); + + b.Property("SeqNumber") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("ShippingDate") + .HasColumnType("datetime2"); + + b.Property("Version") + .HasColumnType("int"); + + b.Property("WMSQty") + .HasColumnType("decimal(18,2)"); + + b.Property("WmsBillNum") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.HasKey("Id"); + + b.ToTable("Set_BBAC_SE_SA_REPORT"); + }); + + modelBuilder.Entity("SettleAccount.Domain.BQ.HBPO_ADJ_DETAIL", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("BusinessType") + .HasColumnType("int"); + + 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("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("GroupNum") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("InvBillNum") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("InvGroupNum") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("KeyCode") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("LU") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("OldInvBillNum") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("PN") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("PartCode") + .HasColumnType("nvarchar(max)"); + + b.Property("Price") + .HasColumnType("decimal(18,2)"); + + b.Property("Qty") + .HasColumnType("decimal(18,2)"); + + b.Property("SettleBillNum") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("SettleDate") + .HasColumnType("datetime2"); + + b.Property("Site") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Version") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.ToTable("Set_HBPO_ADJ_DETAIL"); + }); + + modelBuilder.Entity("SettleAccount.Domain.BQ.HBPO_CAN_SA", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("BillNum") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("BusinessType") + .HasColumnType("int"); + + 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("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("InvGroupNum") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("SettleBillNum") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Site") + .HasColumnType("nvarchar(max)"); + + b.Property("State") + .HasMaxLength(50) + .HasColumnType("int"); + + b.Property("Version") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.ToTable("Set_HBPO_CAN_SA"); + }); + + modelBuilder.Entity("SettleAccount.Domain.BQ.HBPO_CAN_SA_DETAIL", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("BillNum") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("BusinessType") + .HasColumnType("int"); + + 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("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("GroupNum") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("InvGroupNum") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("InvbillNum") + .HasColumnType("nvarchar(max)"); + + b.Property("KeyCode") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("LU") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("PN") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("PartCode") + .HasColumnType("nvarchar(max)"); + + b.Property("Price") + .HasColumnType("decimal(18,2)"); + + b.Property("Qty") + .HasColumnType("decimal(18,2)"); + + b.Property("SettleBillNum") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("SettleDate") + .HasColumnType("datetime2"); + + b.Property("Site") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Version") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.ToTable("Set_HBPO_CAN_SA_DETAIL"); + }); + + modelBuilder.Entity("SettleAccount.Domain.BQ.HBPO_NOT_SA_DETAIL", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("BusinessType") + .HasColumnType("int"); + + 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("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("GroupNum") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("InvGroupNum") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("KeyCode") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("LU") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("PN") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("PartCode") + .HasColumnType("nvarchar(max)"); + + b.Property("Price") + .HasColumnType("decimal(18,2)"); + + b.Property("Qty") + .HasColumnType("decimal(18,2)"); + + b.Property("SettleBillNum") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("SettleDate") + .HasColumnType("datetime2"); + + b.Property("Site") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Version") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.ToTable("Set_HBPO_NOT_SA_DETAIL"); + }); + + modelBuilder.Entity("SettleAccount.Domain.BQ.HBPO_PD", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("BillNum") + .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("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("InvGroupNum") + .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("SettleBillNum") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Site") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("State") + .HasColumnType("int"); + + b.Property("Version") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.ToTable("Set_HBPO_PD"); + }); + + modelBuilder.Entity("SettleAccount.Domain.BQ.HBPO_PD_DETAIL", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("BillNum") + .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("Extend1") + .HasColumnType("nvarchar(max)"); + + b.Property("Extend2") + .HasColumnType("nvarchar(max)"); + + b.Property("Extend3") + .HasColumnType("nvarchar(max)"); + + b.Property("Extend4") + .HasColumnType("nvarchar(max)"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("GroupNum") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("InvGroupNum") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("KeyCode") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("LU") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("PN") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Price") + .HasColumnType("decimal(18,2)"); + + b.Property("Qty") + .HasColumnType("decimal(18,2)"); + + b.Property("RELU") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("REPN") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("SettleDate") + .HasColumnType("datetime2"); + + b.Property("Site") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Version") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.ToTable("Set_HBPO_PD_DETAIL"); + }); + + modelBuilder.Entity("SettleAccount.Domain.BQ.HBPO_SA", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("BillNum") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("BusinessType") + .HasColumnType("int"); + + 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("DNBillNum") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("RecordCount") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Site") + .HasColumnType("nvarchar(max)"); + + b.Property("State") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Version") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.ToTable("Set_HBPO_SA"); + }); + + modelBuilder.Entity("SettleAccount.Domain.BQ.HBPO_SA_DETAIL", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("BillNum") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("BusinessType") + .HasColumnType("int"); + + 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("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("GroupNum") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("InvGroupNum") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("KeyCode") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("LU") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("PN") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("PartCode") + .HasColumnType("nvarchar(max)"); + + b.Property("Price") + .HasColumnType("decimal(18,2)"); + + b.Property("Qty") + .HasColumnType("decimal(18,2)"); + + b.Property("SettleDate") + .HasColumnType("datetime2"); + + b.Property("Site") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Version") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.ToTable("Set_HBPO_SA_DETAIL"); + }); + + modelBuilder.Entity("SettleAccount.Domain.BQ.HBPO_SE_DETAIL", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("AssemblyCode") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Batch") + .HasColumnType("nvarchar(max)"); + + b.Property("BeginDate") + .HasColumnType("datetime2"); + + b.Property("BillCharacter") + .HasColumnType("nvarchar(max)"); + + b.Property("BillTime") + .HasColumnType("datetime2"); + + b.Property("CodeType") + .HasColumnType("nvarchar(max)"); + + 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("DeliverCode") + .HasColumnType("nvarchar(max)"); + + b.Property("ErpToLoc") + .HasColumnType("nvarchar(max)"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("FromLoc") + .HasColumnType("nvarchar(max)"); + + b.Property("InjectionCode") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("IsHaveEdiData") + .HasColumnType("bit"); + + b.Property("KeyCode") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("LU") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("MESConfigCode") + .HasColumnType("nvarchar(max)"); + + b.Property("MatchNumber") + .HasColumnType("nvarchar(max)"); + + b.Property("Num") + .HasColumnType("nvarchar(max)"); + + b.Property("Oper") + .HasColumnType("nvarchar(max)"); + + b.Property("OrderNum") + .HasColumnType("nvarchar(max)"); + + b.Property("OrigiCode") + .HasColumnType("nvarchar(max)"); + + b.Property("PN") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("PartCode") + .HasColumnType("nvarchar(max)"); + + b.Property("PjsNum") + .HasColumnType("nvarchar(max)"); + + b.Property("Position") + .HasColumnType("nvarchar(max)"); + + b.Property("Qty") + .HasColumnType("decimal(18,2)"); + + b.Property("RealCode") + .HasColumnType("nvarchar(max)"); + + b.Property("RealPartCode") + .HasColumnType("nvarchar(max)"); + + b.Property("RefBillNum") + .HasColumnType("nvarchar(max)"); + + b.Property("RefVinCode") + .HasColumnType("nvarchar(max)"); + + b.Property("Remark") + .HasColumnType("nvarchar(max)"); + + b.Property("Seq") + .HasColumnType("nvarchar(max)"); + + b.Property("SeqNumber") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("ShippingDate") + .HasColumnType("datetime2"); + + b.Property("ToLoc") + .HasColumnType("nvarchar(max)"); + + b.Property("UniqueCode") + .HasColumnType("nvarchar(max)"); + + b.Property("Version") + .HasColumnType("int"); + + b.Property("VinCode") + .HasColumnType("nvarchar(max)"); + + b.Property("WmsBillNum") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.HasKey("Id"); + + b.ToTable("Set_HBPO_SE_DETAIL"); + }); + + modelBuilder.Entity("SettleAccount.Domain.BQ.HBPO_SE_EDI", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("AssemblyCode") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("BeginDate") + .HasColumnType("datetime2"); + + 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("Extend1") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Extend2") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Extend3") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Extend4") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("InjectionCode") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("IsHaveSeData") + .HasColumnType("bit"); + + b.Property("KeyCode") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("LU") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("PN") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Qty") + .HasColumnType("decimal(18,2)"); + + b.Property("SeqNumber") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Site") + .HasColumnType("nvarchar(max)"); + + b.Property("Version") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.ToTable("Set_HBPO_SE_EDI"); + }); + + modelBuilder.Entity("SettleAccount.Domain.BQ.HBPO_SE_REPORT", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("AssemblyCode") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("BeginDate") + .HasColumnType("datetime2"); + + 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("EDIQty") + .HasColumnType("decimal(18,2)"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("InjectionCode") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("KeyCode") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("LU") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("PN") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Qty") + .HasColumnType("decimal(18,2)"); + + b.Property("SeqNumber") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("ShippingDate") + .HasColumnType("datetime2"); + + b.Property("Version") + .HasColumnType("int"); + + b.Property("WmsBillNum") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.HasKey("Id"); + + b.ToTable("Set_HBPO_SE_REPORT"); + }); + + modelBuilder.Entity("SettleAccount.Domain.BQ.HBPO_SE_SA_REPORT", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("AssemblyCode") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Category") + .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("CustomerOfflineTime") + .HasColumnType("datetime2"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("EDIQty") + .HasColumnType("decimal(18,2)"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("FixPrice") + .HasColumnType("decimal(18,2)"); + + b.Property("InjectionCode") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("KeyCode") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("LU") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("MateType") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("MaterialDes") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("MaterialNumber") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("PJISSeqNumber") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("PN") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Qty") + .HasColumnType("decimal(18,2)"); + + b.Property("SEQty") + .HasColumnType("decimal(18,2)"); + + b.Property("SeqNumber") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("ShippingDate") + .HasColumnType("datetime2"); + + b.Property("Version") + .HasColumnType("int"); + + b.Property("WMSQty") + .HasColumnType("decimal(18,2)"); + + b.Property("WmsBillNum") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.HasKey("Id"); + + b.ToTable("Set_HBPO_SE_SA_REPORT"); + }); + + modelBuilder.Entity("SettleAccount.Domain.BQ.INVOICE_GRP", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("Amt") + .HasColumnType("decimal(18,2)"); + + b.Property("BusinessType") + .HasMaxLength(50) + .HasColumnType("int"); + + b.Property("ClientCode") + .HasColumnType("nvarchar(max)"); + + 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("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("FileName") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("InvGroupNum") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("InvbillNum") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("InvoiceState") + .HasColumnType("int"); + + 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("ParentInvbillNum") + .HasColumnType("nvarchar(max)"); + + b.Property("PreTaxDiff") + .HasColumnType("decimal(18,2)"); + + b.Property("RealAmt") + .HasColumnType("decimal(18,2)"); + + b.Property("RealnvBillNum") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("State") + .HasColumnType("int"); + + b.Property("Tax") + .HasColumnType("decimal(18,2)"); + + b.Property("TaxAmt") + .HasColumnType("decimal(18,2)"); + + b.Property("TaxDiff") + .HasColumnType("decimal(18,2)"); + + b.HasKey("Id"); + + b.ToTable("Set_INVOICE_GRP"); + }); + + modelBuilder.Entity("SettleAccount.Domain.BQ.INVOICE_MAP_GROUP", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("Amt") + .HasColumnType("decimal(18,2)"); + + 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("Extend1") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Extend2") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("InvGroupNum") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("InvbillNum") + .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("SettleGroupNum") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Version") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.ToTable("Set_INVOICE_MAP_GROUP"); + }); + + modelBuilder.Entity("SettleAccount.Domain.BQ.INVOICE_NOT_SETTLE", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .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("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("Extend1") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Extend2") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("InvGroupNum") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LU") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("LU1") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Qty") + .HasColumnType("decimal(18,2)"); + + b.Property("SettleGroupNum") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Version") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.ToTable("Set_INVOICE_NOT_SETTLE"); + }); + + modelBuilder.Entity("SettleAccount.Domain.BQ.INVOICE_WAIT_DETAIL", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("Amt") + .HasColumnType("decimal(18,2)"); + + b.Property("BeginDate") + .HasColumnType("datetime2"); + + b.Property("BussiessType") + .HasMaxLength(50) + .HasColumnType("int"); + + 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("EndDate") + .HasColumnType("datetime2"); + + b.Property("Extend1") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Extend2") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("InvGroupNum") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("InvbillNum") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LU") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("PRICE") + .HasColumnType("decimal(18,2)"); + + b.Property("Qty") + .HasColumnType("decimal(18,2)"); + + b.Property("Version") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.ToTable("Set_INVOICE_WAIT_DETAIL"); + }); + + modelBuilder.Entity("SettleAccount.Domain.BQ.JIT_SE_SA_REPORT", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("AssemblyCode") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Category") + .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("CustomerOfflineTime") + .HasColumnType("datetime2"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("EDIQty") + .HasColumnType("decimal(18,2)"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("FixPrice") + .HasColumnType("decimal(18,2)"); + + b.Property("InjectionCode") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("KeyCode") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("LU") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("MateType") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("MaterialDes") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("MaterialNumber") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("PJISSeqNumber") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("PN") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Qty") + .HasColumnType("decimal(18,2)"); + + b.Property("SEQty") + .HasColumnType("decimal(18,2)"); + + b.Property("SeqNumber") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("ShippingDate") + .HasColumnType("datetime2"); + + b.Property("Version") + .HasColumnType("int"); + + b.Property("WMSQty") + .HasColumnType("decimal(18,2)"); + + b.Property("WmsBillNum") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.HasKey("Id"); + + b.ToTable("Set_JIT_SE_SA_REPORT"); + }); + + modelBuilder.Entity("SettleAccount.Domain.BQ.PUB_ADJ_DETAIL", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("BusinessType") + .HasColumnType("int"); + + 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("Extend1") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("GroupNum") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("InvBillNum") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("InvGroupNum") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("KeyCode") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("LU") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("OldInvBillNum") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("PN") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("PartCode") + .HasColumnType("nvarchar(max)"); + + b.Property("Price") + .HasColumnType("decimal(18,2)"); + + b.Property("Qty") + .HasColumnType("decimal(18,2)"); + + b.Property("SettleBillNum") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("SettleDate") + .HasColumnType("datetime2"); + + b.Property("Site") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Version") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.ToTable("Set_PUB_ADJ_DETAIL"); + }); + + modelBuilder.Entity("SettleAccount.Domain.BQ.PUB_CAN_SA", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("BillNum") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("BusinessType") + .HasMaxLength(50) + .HasColumnType("int"); + + 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("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("InvGroupNum") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("SettleBillNum") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Site") + .HasColumnType("nvarchar(max)"); + + b.Property("State") + .HasColumnType("int"); + + b.Property("Version") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.ToTable("Set_PUB_CAN_SA"); + }); + + modelBuilder.Entity("SettleAccount.Domain.BQ.PUB_CAN_SA_DETAIL", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("BillNum") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("BusinessType") + .HasMaxLength(50) + .HasColumnType("int"); + + 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("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("GroupNum") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("InvGroupNum") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("InvbillNum") + .HasColumnType("nvarchar(max)"); + + b.Property("KeyCode") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("LU") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("PN") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("PartCode") + .HasColumnType("nvarchar(max)"); + + b.Property("Price") + .HasColumnType("decimal(18,2)"); + + b.Property("Qty") + .HasColumnType("decimal(18,2)"); + + b.Property("SettleBillNum") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("SettleDate") + .HasColumnType("datetime2"); + + b.Property("Site") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Version") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.ToTable("Set_PUB_CAN_SA_DETAIL"); + }); + + modelBuilder.Entity("SettleAccount.Domain.BQ.PUB_NOT_SA_DETAIL", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("BusinessType") + .HasMaxLength(50) + .HasColumnType("int"); + + 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("Extend1") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Extend2") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Extend3") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("GroupNum") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("InvGroupNum") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("KeyCode") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("LU") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("PN") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("PartCode") + .HasColumnType("nvarchar(max)"); + + b.Property("Price") + .HasColumnType("decimal(18,2)"); + + b.Property("Qty") + .HasColumnType("decimal(18,2)"); + + b.Property("SettleBillNum") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("SettleDate") + .HasColumnType("datetime2"); + + b.Property("Site") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Version") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.ToTable("Set_PUB_NOT_SA_DETAIL"); + }); + + modelBuilder.Entity("SettleAccount.Domain.BQ.PUB_PD", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("BillNum") + .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("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("InvGroupNum") + .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("SettleBillNum") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Site") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("State") + .HasColumnType("int"); + + b.Property("Version") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.ToTable("Set_PUB_PD"); + }); + + modelBuilder.Entity("SettleAccount.Domain.BQ.PUB_PD_DETAIL", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("BillNum") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("BusinessType") + .HasMaxLength(50) + .HasColumnType("int"); + + 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("Extend1") + .HasColumnType("nvarchar(max)"); + + b.Property("Extend2") + .HasColumnType("nvarchar(max)"); + + b.Property("Extend3") + .HasColumnType("nvarchar(max)"); + + b.Property("Extend4") + .HasColumnType("nvarchar(max)"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("GroupNum") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("InvGroupNum") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("KeyCode") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("LU") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("PN") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Price") + .HasColumnType("decimal(18,2)"); + + b.Property("Qty") + .HasColumnType("decimal(18,2)"); + + b.Property("RELU") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("REPN") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("SettleDate") + .HasColumnType("datetime2"); + + b.Property("Site") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Version") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.ToTable("Set_PUB_PD_DETAIL"); + }); + + modelBuilder.Entity("SettleAccount.Domain.BQ.PUB_SA", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("BillNum") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("BusinessType") + .HasColumnType("int"); + + 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("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("State") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Version") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.ToTable("Set_PUB_SA"); + }); + + modelBuilder.Entity("SettleAccount.Domain.BQ.PUB_SA_DETAIL", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("BillNum") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("BusinessType") + .HasColumnType("int"); + + 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("Extend1") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Extend2") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Extend3") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("GroupNum") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("KeyCode") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("LU") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("PN") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("PartCode") + .HasColumnType("nvarchar(max)"); + + b.Property("Price") + .HasColumnType("decimal(18,2)"); + + b.Property("Qty") + .HasColumnType("decimal(18,2)"); + + b.Property("SettleDate") + .HasColumnType("datetime2"); + + b.Property("Site") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Version") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.ToTable("Set_PUB_SA_DETAIL"); + }); + + modelBuilder.Entity("SettleAccount.Domain.BQ.PUB_SE_DETAIL", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("Batch") + .HasColumnType("nvarchar(max)"); + + b.Property("BeginDate") + .HasColumnType("datetime2"); + + b.Property("BillTime") + .HasColumnType("datetime2"); + + b.Property("BillType") + .HasColumnType("int"); + + b.Property("BusinessType") + .HasMaxLength(50) + .HasColumnType("int"); + + 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("CustId") + .HasColumnType("nvarchar(max)"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("DeliverBillType") + .HasColumnType("int"); + + b.Property("DeliverSubBillType") + .HasColumnType("int"); + + b.Property("DeliveryHose") + .HasColumnType("nvarchar(max)"); + + b.Property("DeliveryIndex") + .HasColumnType("nvarchar(max)"); + + b.Property("DnBillNum") + .HasColumnType("nvarchar(max)"); + + b.Property("DnBillTime") + .HasColumnType("datetime2"); + + b.Property("DnOper") + .HasColumnType("nvarchar(max)"); + + b.Property("Extend1") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Extend2") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Extend3") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("FromErpLocCode") + .HasColumnType("nvarchar(max)"); + + b.Property("FromHose") + .HasColumnType("nvarchar(max)"); + + b.Property("FromLocCode") + .HasColumnType("nvarchar(max)"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("KeyCode") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("LU") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Oper") + .HasColumnType("nvarchar(max)"); + + b.Property("PN") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("PartCode") + .HasColumnType("nvarchar(max)"); + + b.Property("ProType") + .HasColumnType("int"); + + b.Property("Qty") + .HasColumnType("decimal(18,2)"); + + b.Property("Remark") + .HasColumnType("nvarchar(max)"); + + b.Property("ShippingDate") + .HasColumnType("datetime2"); + + b.Property("SubBillType") + .HasColumnType("int"); + + b.Property("ToErpLocCode") + .HasColumnType("nvarchar(max)"); + + b.Property("ToHose") + .HasColumnType("nvarchar(max)"); + + b.Property("ToLocCode") + .HasColumnType("nvarchar(max)"); + + b.Property("TransType") + .HasColumnType("int"); + + b.Property("Version") + .HasColumnType("int"); + + b.Property("WmsBillNum") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.HasKey("Id"); + + b.ToTable("Set_PUB_SE_DETAIL"); + }); + + modelBuilder.Entity("SettleAccount.Domain.BQ.PURCHASE_PRICE", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .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("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LU") + .HasColumnType("nvarchar(max)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Price") + .HasColumnType("decimal(18,2)"); + + b.HasKey("Id"); + + b.ToTable("Set_PURCHASE_PRICE"); + }); + + modelBuilder.Entity("SettleAccount.Domain.BQ.TB_RePartsRelationship", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("BusinessType") + .HasColumnType("int"); + + b.Property("ClientCode") + .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("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LU") + .HasColumnType("nvarchar(max)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("RepLU") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.ToTable("Set_TB_RePartsRelationship"); + }); + + 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) + .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("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"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + 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") + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.Property("Year") + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.HasKey("Id"); + + b.HasIndex("ParentItemCode", "ChildItemCode", "Version") + .IsUnique() + .HasFilter("IsDeleted=0"); + + b.ToTable("Set_bom"); + }); + + modelBuilder.Entity("Win.Sfs.SettleAccount.Entities.BQ.BBAC_SEC_DETAIL", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("Category") + .HasColumnType("int"); + + 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("CustomerOfflineTime") + .HasColumnType("datetime2"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("DiffQty") + .HasColumnType("decimal(18,2)"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("FixPrice") + .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("MateType") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("MaterialDes") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("MaterialNumber") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("PJISSeqNumber") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("PN") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("PrimitiveLU") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("ReplaceLU") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("SAQty") + .HasColumnType("decimal(18,2)"); + + b.Property("SEQty") + .HasColumnType("decimal(18,2)"); + + b.Property("SeqNumber") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("ShippingDate") + .HasColumnType("datetime2"); + + b.Property("WmsBillNum") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.HasKey("Id"); + + b.ToTable("Set_BBAC_SEC_DETAIL"); + }); + + modelBuilder.Entity("Win.Sfs.SettleAccount.Entities.BQ.HBPO_SEC_DETAIL", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("Category") + .HasColumnType("int"); + + 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("CustomerOfflineTime") + .HasColumnType("datetime2"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("DiffQty") + .HasColumnType("decimal(18,2)"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("FixPrice") + .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("MateType") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("MaterialDes") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("MaterialNumber") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("PJISSeqNumber") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("PN") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("PrimitiveLU") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("ReplaceLU") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("SAQty") + .HasColumnType("decimal(18,2)"); + + b.Property("SEQty") + .HasColumnType("decimal(18,2)"); + + b.Property("SeqNumber") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("ShippingDate") + .HasColumnType("datetime2"); + + b.Property("WmsBillNum") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.HasKey("Id"); + + b.ToTable("Set_HBPO_SEC_DETAIL"); + }); + + modelBuilder.Entity("Win.Sfs.SettleAccount.Entities.BQ.PUB_SEC_DETAIL", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("Category") + .HasColumnType("int"); + + 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("CustomerOfflineTime") + .HasColumnType("datetime2"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("DiffQty") + .HasColumnType("decimal(18,2)"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("FixPrice") + .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("MateType") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("MaterialDes") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("MaterialNumber") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("PJISSeqNumber") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("PN") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("PrimitiveLU") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("ReplaceLU") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("SAQty") + .HasColumnType("decimal(18,2)"); + + b.Property("SEQty") + .HasColumnType("decimal(18,2)"); + + b.Property("SeqNumber") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("ShippingDate") + .HasColumnType("datetime2"); + + b.Property("WmsBillNum") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.HasKey("Id"); + + b.ToTable("Set_PUB_SEC_DETAIL"); + }); + + modelBuilder.Entity("Win.Sfs.SettleAccount.Entities.BQ.Syncs.SyncPositionFlag", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .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("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Position") + .HasColumnType("nvarchar(max)"); + + b.Property("TableName") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.ToTable("Set_SyncPositionFlag"); + }); + + modelBuilder.Entity("Win.Sfs.SettleAccount.Entities.BQ.Vmi.JobItem", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .ValueGeneratedOnAddOrUpdate() + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Cron") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("HeartBeat") + .HasColumnType("datetime2"); + + b.Property("IsDisabled") + .HasColumnType("bit"); + + b.Property("IsRunning") + .HasColumnType("bit"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Service") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("nvarchar(100)"); + + b.HasKey("Id"); + + b.HasIndex("Name") + .IsUnique(); + + b.ToTable("Set_JobItem"); + + b.HasData( + new + { + Id = new Guid("ef3d8e8a-a88e-ca1f-e615-714c6bc48824"), + Cron = "0 0 8 26 *", + IsDisabled = false, + IsRunning = false, + Name = "库存快照", + Service = "Win.Sfs.SettleAccount.Entities.BQ.VmiAppService" + }, + new + { + Id = new Guid("d6d5e1d7-9326-ceea-eed4-fb4039e7ee68"), + Cron = "0 0/10 * * * ? ", + IsDisabled = false, + IsRunning = false, + Name = "BBAC发运数据同步", + Service = "Win.Sfs.SettleAccount.Entities.BQ.Syncs.BBACSeSyncAppService" + }, + new + { + Id = new Guid("d50400b0-b0d4-38d1-fcdf-b1e7ac1d3a68"), + Cron = "0 0/10 * * * ? ", + IsDisabled = false, + IsRunning = false, + Name = "HBPO发运数据同步", + Service = "Win.Sfs.SettleAccount.Entities.BQ.Syncs.HBPOSeSyncAppService" + }, + new + { + Id = new Guid("f306b380-47e5-5c01-b902-67ca4113a8f4"), + Cron = "0 0/10 * * * ? ", + IsDisabled = false, + IsRunning = false, + Name = "直供件BBAC发运同步", + Service = "Win.Sfs.SettleAccount.Entities.BQ.Syncs.ZhiGongBBACSeSyncAppService" + }, + new + { + Id = new Guid("8f7dc23d-e2e9-3691-cfe9-545bb958e3f2"), + Cron = "0 0/10 * * * ? ", + IsDisabled = false, + IsRunning = false, + Name = "直供件HBPO发运同步", + Service = "Win.Sfs.SettleAccount.Entities.BQ.Syncs.ZhiGongHBPOSeSyncAppService" + }, + new + { + Id = new Guid("c1f71240-1b81-0107-8b23-ddc9811a3efe"), + Cron = "0 0/10 * * * ? ", + IsDisabled = false, + IsRunning = false, + Name = "备件发运同步", + Service = "Win.Sfs.SettleAccount.Entities.BQ.Syncs.BeiSeSyncAppService" + }, + new + { + Id = new Guid("c09c23ea-815f-1b43-4476-2365a8d9a60b"), + Cron = "0 0/10 * * * ? ", + IsDisabled = false, + IsRunning = false, + Name = "印度件发运同步", + Service = "Win.Sfs.SettleAccount.Entities.BQ.Syncs.YinDuSeSyncAppService" + }); + }); + + modelBuilder.Entity("Win.Sfs.SettleAccount.Entities.BQ.Vmi.JobLog", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("End") + .HasColumnType("datetime2"); + + b.Property("Exception") + .HasColumnType("nvarchar(max)"); + + b.Property("Host") + .HasColumnType("nvarchar(max)"); + + b.Property("JobId") + .HasColumnType("uniqueidentifier"); + + b.Property("Start") + .HasColumnType("datetime2"); + + b.Property("Success") + .HasColumnType("bit"); + + b.HasKey("Id"); + + b.HasIndex("JobId"); + + b.ToTable("Set_JobLog"); + }); + + modelBuilder.Entity("Win.Sfs.SettleAccount.Entities.BQ.Vmi.VmiBalance", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("BackupTime") + .HasColumnType("datetime2"); + + b.Property("BillTime") + .HasColumnType("datetime2"); + + b.Property("BillType") + .HasColumnType("int"); + + b.Property("CodeType") + .HasColumnType("nvarchar(450)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("Configcode") + .HasColumnType("nvarchar(450)"); + + b.Property("CustomerPartCode") + .HasColumnType("nvarchar(max)"); + + b.Property("DeliverTime") + .HasColumnType("datetime2"); + + b.Property("ErpToLoc") + .HasColumnType("nvarchar(450)"); + + b.Property("MatchNumber") + .HasColumnType("nvarchar(max)"); + + b.Property("OrderNum") + .HasColumnType("nvarchar(450)"); + + b.Property("PartCode") + .HasColumnType("nvarchar(450)"); + + b.Property("PjsNum") + .HasColumnType("nvarchar(max)"); + + b.Property("Qty") + .HasColumnType("decimal(18,2)"); + + b.Property("ReMark") + .HasColumnType("nvarchar(max)"); + + b.Property("RealCode") + .HasColumnType("nvarchar(max)"); + + b.Property("Seq") + .HasColumnType("nvarchar(max)"); + + b.Property("SubBillType") + .HasColumnType("int"); + + b.Property("UniqueCode") + .HasColumnType("nvarchar(max)"); + + b.Property("VinCode") + .HasColumnType("nvarchar(450)"); + + b.Property("factory") + .HasColumnType("nvarchar(450)"); + + b.HasKey("Id"); + + b.HasIndex("BillType", "CodeType", "PartCode", "VinCode", "ErpToLoc", "OrderNum", "factory", "Configcode") + .IsUnique() + .HasFilter("[CodeType] IS NOT NULL AND [PartCode] IS NOT NULL AND [VinCode] IS NOT NULL AND [ErpToLoc] IS NOT NULL AND [OrderNum] IS NOT NULL AND [factory] IS NOT NULL AND [Configcode] IS NOT NULL"); + + b.ToTable("Set_VmiBalance"); + + b.HasData( + new + { + Id = new Guid("824c911a-6915-42a3-8bb2-bcb4aca93545"), + BillTime = new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), + BillType = 1, + ConcurrencyStamp = "1d0093aa74814ffd982671a5ac362c52", + DeliverTime = new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), + ErpToLoc = "ErpToLoc", + OrderNum = "OrderNum", + PartCode = "PartCode", + Qty = 0m, + SubBillType = 0, + VinCode = "VinCode" + }); + }); + + modelBuilder.Entity("Win.Sfs.SettleAccount.Entities.BQ.Vmi.VmiLog", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("BillTime") + .HasColumnType("datetime2"); + + b.Property("BillType") + .HasColumnType("int"); + + b.Property("ChangedBy") + .HasColumnType("nvarchar(max)"); + + b.Property("ChangedNumber") + .HasColumnType("nvarchar(max)"); + + b.Property("ChangedQty") + .HasColumnType("decimal(18,2)"); + + b.Property("ChangedTime") + .HasColumnType("datetime2"); + + b.Property("ChangedType") + .HasColumnType("int"); + + b.Property("CodeType") + .HasColumnType("nvarchar(max)"); + + b.Property("Configcode") + .HasColumnType("nvarchar(max)"); + + b.Property("CustomerPartCode") + .HasColumnType("nvarchar(max)"); + + b.Property("DeliverTime") + .HasColumnType("datetime2"); + + b.Property("ErpToLoc") + .HasColumnType("nvarchar(max)"); + + b.Property("GroupId") + .HasColumnType("nvarchar(max)"); + + b.Property("IsReplenished") + .HasColumnType("bit"); + + b.Property("LogType") + .HasColumnType("int"); + + b.Property("MatchNumber") + .HasColumnType("nvarchar(max)"); + + b.Property("OrderNum") + .HasColumnType("nvarchar(max)"); + + b.Property("PartCode") + .HasColumnType("nvarchar(max)"); + + b.Property("PartCode2") + .HasColumnType("nvarchar(max)"); + + b.Property("PjsNum") + .HasColumnType("nvarchar(max)"); + + b.Property("Qty") + .HasColumnType("decimal(18,2)"); + + b.Property("ReMark") + .HasColumnType("nvarchar(max)"); + + b.Property("RealCode") + .HasColumnType("nvarchar(max)"); + + b.Property("Seq") + .HasColumnType("nvarchar(max)"); + + b.Property("SettlementVinCode") + .HasColumnType("nvarchar(max)"); + + b.Property("SubBillType") + .HasColumnType("int"); + + b.Property("UniqueCode") + .HasColumnType("nvarchar(max)"); + + b.Property("VinCode") + .HasColumnType("nvarchar(max)"); + + b.Property("factory") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.ToTable("Set_VmiLog"); + }); + + modelBuilder.Entity("Win.Sfs.SettleAccount.Entities.BQ.Vmi.VmiSnapshot", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("Name") + .HasColumnType("nvarchar(max)"); + + b.Property("Path") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.ToTable("Set_VmiSnapshot"); + }); + + 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.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") + .HasColumnType("nvarchar(max)"); + + b.Property("Remark") + .HasColumnType("nvarchar(max)"); + + b.Property("Value") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.ToTable("Set_CodeSetting"); + }); + + 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("bit"); + + 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.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("CustomerPartCode") + .HasColumnType("nvarchar(max)"); + + 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("BeginTime") + .HasColumnType("datetime2"); + + b.Property("BranchId") + .HasColumnType("uniqueidentifier"); + + b.Property("BusinessType") + .HasColumnType("int"); + + b.Property("ClientCode") + .HasColumnType("nvarchar(max)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("ContractNo") + .HasColumnType("nvarchar(max)"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("CustomerCode") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Date") + .HasColumnType("datetime2"); + + 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("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LU") + .HasColumnType("nvarchar(max)"); + + 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.PriceListBJ", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("BeginDate") + .HasColumnType("datetime2"); + + b.Property("BranchId") + .HasColumnType("uniqueidentifier"); + + b.Property("ClientCode") + .HasColumnType("nvarchar(max)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("ContractNo") + .HasColumnType("nvarchar(max)"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("CustomerCode") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Date") + .HasColumnType("datetime2"); + + 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("LU") + .HasColumnType("nvarchar(max)"); + + 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_PriceListBJ"); + }); + + 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.Prices.PriceListVersionBJ", 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_PriceListVersionBJ"); + }); + + 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(40) + .HasColumnType("nvarchar(40)") + .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(200) + .HasColumnType("nvarchar(200)"); + + 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(200) + .HasColumnType("nvarchar(200)"); + + 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(200) + .HasColumnType("nvarchar(200)"); + + b.Property("RealFileName") + .HasMaxLength(200) + .HasColumnType("nvarchar(200)"); + + 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.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") + .HasColumnType("nvarchar(max)"); + + 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.Entities.BQ.Vmi.JobLog", b => + { + b.HasOne("Win.Sfs.SettleAccount.Entities.BQ.Vmi.JobItem", "Job") + .WithMany() + .HasForeignKey("JobId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Job"); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/code/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Migrations/20230810081159_20230810-3.cs b/code/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Migrations/20230810081159_20230810-3.cs new file mode 100644 index 00000000..69e65dc4 --- /dev/null +++ b/code/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Migrations/20230810081159_20230810-3.cs @@ -0,0 +1,56 @@ +using System; +using Microsoft.EntityFrameworkCore.Migrations; + +namespace Win.Sfs.SettleAccount.Migrations +{ + public partial class _202308103 : Migration + { + protected override void Up(MigrationBuilder migrationBuilder) + { + migrationBuilder.DeleteData( + table: "Set_VmiBalance", + keyColumn: "Id", + keyValue: new Guid("96b1beec-0eef-4ae5-880b-23678addb759")); + + migrationBuilder.AddColumn( + name: "IsHaveSeData", + table: "Set_BBAC_SE_EDI", + type: "bit", + nullable: false, + defaultValue: false); + + migrationBuilder.AddColumn( + name: "IsHaveEdiData", + table: "Set_BBAC_SE_DETAIL", + type: "bit", + nullable: false, + defaultValue: false); + + migrationBuilder.InsertData( + table: "Set_VmiBalance", + columns: new[] { "Id", "BackupTime", "BillTime", "BillType", "CodeType", "ConcurrencyStamp", "Configcode", "CustomerPartCode", "DeliverTime", "ErpToLoc", "MatchNumber", "OrderNum", "PartCode", "PjsNum", "Qty", "ReMark", "RealCode", "Seq", "SubBillType", "UniqueCode", "VinCode", "factory" }, + values: new object[] { new Guid("824c911a-6915-42a3-8bb2-bcb4aca93545"), null, new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), 1, null, "1d0093aa74814ffd982671a5ac362c52", null, null, new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), "ErpToLoc", null, "OrderNum", "PartCode", null, 0m, null, null, null, 0, null, "VinCode", null }); + } + + protected override void Down(MigrationBuilder migrationBuilder) + { + migrationBuilder.DeleteData( + table: "Set_VmiBalance", + keyColumn: "Id", + keyValue: new Guid("824c911a-6915-42a3-8bb2-bcb4aca93545")); + + migrationBuilder.DropColumn( + name: "IsHaveSeData", + table: "Set_BBAC_SE_EDI"); + + migrationBuilder.DropColumn( + name: "IsHaveEdiData", + table: "Set_BBAC_SE_DETAIL"); + + migrationBuilder.InsertData( + table: "Set_VmiBalance", + columns: new[] { "Id", "BackupTime", "BillTime", "BillType", "CodeType", "ConcurrencyStamp", "Configcode", "CustomerPartCode", "DeliverTime", "ErpToLoc", "MatchNumber", "OrderNum", "PartCode", "PjsNum", "Qty", "ReMark", "RealCode", "Seq", "SubBillType", "UniqueCode", "VinCode", "factory" }, + values: new object[] { new Guid("96b1beec-0eef-4ae5-880b-23678addb759"), null, new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), 1, null, "ebf2d34687e14358a9d63dbe3df7abd3", null, null, new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), "ErpToLoc", null, "OrderNum", "PartCode", null, 0m, null, null, null, 0, null, "VinCode", null }); + } + } +} diff --git a/code/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Migrations/SettleAccountDbContextModelSnapshot.cs b/code/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Migrations/SettleAccountDbContextModelSnapshot.cs index 6f241281..ce20dfab 100644 --- a/code/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Migrations/SettleAccountDbContextModelSnapshot.cs +++ b/code/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Migrations/SettleAccountDbContextModelSnapshot.cs @@ -672,6 +672,9 @@ namespace Win.Sfs.SettleAccount.Migrations .HasDefaultValue(false) .HasColumnName("IsDeleted"); + b.Property("IsHaveEdiData") + .HasColumnType("bit"); + b.Property("KeyCode") .HasMaxLength(50) .HasColumnType("nvarchar(50)"); @@ -833,6 +836,9 @@ namespace Win.Sfs.SettleAccount.Migrations .HasDefaultValue(false) .HasColumnName("IsDeleted"); + b.Property("IsHaveSeData") + .HasColumnType("bit"); + b.Property("KeyCode") .HasMaxLength(50) .HasColumnType("nvarchar(50)"); @@ -4384,10 +4390,10 @@ namespace Win.Sfs.SettleAccount.Migrations b.HasData( new { - Id = new Guid("96b1beec-0eef-4ae5-880b-23678addb759"), + Id = new Guid("824c911a-6915-42a3-8bb2-bcb4aca93545"), BillTime = new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), BillType = 1, - ConcurrencyStamp = "ebf2d34687e14358a9d63dbe3df7abd3", + ConcurrencyStamp = "1d0093aa74814ffd982671a5ac362c52", DeliverTime = new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), ErpToLoc = "ErpToLoc", OrderNum = "OrderNum",