diff --git a/be/DataExchange/Iac/Win_in.Sfs.Wms.DataExchange.Application.Iac.Qad/ProductLineAppService.cs b/be/DataExchange/Iac/Win_in.Sfs.Wms.DataExchange.Application.Iac.Qad/ProductLineAppService.cs index 04bc7de8f..10ba6b799 100644 --- a/be/DataExchange/Iac/Win_in.Sfs.Wms.DataExchange.Application.Iac.Qad/ProductLineAppService.cs +++ b/be/DataExchange/Iac/Win_in.Sfs.Wms.DataExchange.Application.Iac.Qad/ProductLineAppService.cs @@ -55,10 +55,6 @@ public class ProductLineAppService : ApplicationService, IProductLineAppService Validator.CheckSite(_configuration, entityObj.Site); Validator.CheckCompany(_configuration, entityObj.Company); var targetObj = ObjectMapper.Map(entityObj); - //if (targetObj.Type == null) { targetObj.Type = 0; } - if (targetObj.WorkshopCode == null) { targetObj.WorkshopCode = "_"; } - if (targetObj.RawLocationCode == null) { targetObj.RawLocationCode = "_"; } - if (targetObj.ProductLocationCode == null) { targetObj.ProductLocationCode = "_"; } await _productionLineAppService.UpsertAsync(targetObj).ConfigureAwait(false); diff --git a/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application.Contracts/Equipments/DTOs/EquipmentLocCapDTO.cs b/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application.Contracts/Equipments/DTOs/EquipmentLocCapDTO.cs index 6a4ad91ce..96125bfe8 100644 --- a/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application.Contracts/Equipments/DTOs/EquipmentLocCapDTO.cs +++ b/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application.Contracts/Equipments/DTOs/EquipmentLocCapDTO.cs @@ -3,11 +3,7 @@ using Win_in.Sfs.Shared.Domain; using Win_in.Sfs.Shared.Domain.Shared; namespace Win_in.Sfs.Basedata.Application.Contracts; - - - [Display(Name = "器具容量占用信息")] - public class EquipmentLocCapDTO : SfsBaseDataDTOBase, IHasCode { /// @@ -15,12 +11,11 @@ public class EquipmentLocCapDTO : SfsBaseDataDTOBase, IHasCode /// [Display(Name = "器具代码")] public string Code { get; set; } + /// /// 占用百分比 /// [Display(Name = "占用百分比")] public decimal Percent { get; set; } - - /// /// 零件号 /// diff --git a/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application.Contracts/Equipments/Inputs/EquipmentLocCapCheckInput.cs b/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application.Contracts/Equipments/Inputs/EquipmentLocCapCheckInput.cs index d7b272c8e..2f5c63eee 100644 --- a/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application.Contracts/Equipments/Inputs/EquipmentLocCapCheckInput.cs +++ b/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application.Contracts/Equipments/Inputs/EquipmentLocCapCheckInput.cs @@ -12,6 +12,7 @@ public class EquipmentLocCapCheckInput /// [Display(Name = "器具代码")] public string Code { get; set; } + /// /// 占用百分比 /// [Display(Name = "占用百分比")] diff --git a/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application.Contracts/ProductionLines/DTOs/ProductionLineDTO.cs b/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application.Contracts/ProductionLines/DTOs/ProductionLineDTO.cs index d0f5ef4bc..d5c2980d1 100644 --- a/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application.Contracts/ProductionLines/DTOs/ProductionLineDTO.cs +++ b/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application.Contracts/ProductionLines/DTOs/ProductionLineDTO.cs @@ -1,61 +1,57 @@ +using System.Collections.Generic; using System.ComponentModel.DataAnnotations; using Win_in.Sfs.Basedata.Domain.Shared; using Win_in.Sfs.Shared.Domain; +using Win_in.Sfs.Shared.Domain.Entities; namespace Win_in.Sfs.Basedata.Application.Contracts; /// -/// 生产线 +/// 生产线 /// [Display(Name = "生产线")] - public class ProductionLineDTO : SfsBaseDataDTOBase, IHasCode, IHasName { /// - /// 编码 + /// 代码 /// - [Display(Name = "编码")] + [Display(Name = "代码")] + [Key] + [IgnoreUpdate] public string Code { get; set; } /// - /// 名称 + /// 名称 /// [Display(Name = "名称")] public string Name { get; set; } /// - /// 描述 + /// 描述 /// [Display(Name = "描述")] public string Description { get; set; } /// - /// 类型 + /// 类型 /// - [Display(Name = "类型")] public EnumProductionLineType Type { get; set; } /// - /// 车间 - /// - [Display(Name = "车间")] - public string WorkshopCode { get; set; } - - /// - /// 原料库位 + /// 原料库位 /// - [Display(Name = "原料库位")] - public string RawLocationCode { get; set; } + [Display(Name = "原料库位Json集合")] + public string RawLocationCodeListJson { get; set; } /// - /// 成品库位 + /// 成品库位 /// - [Display(Name = "成品库位")] - public string ProductLocationCode { get; set; } + [Display(Name = "完工库位Json集合")] + public string ProductLocationCodeListJson { get; set; } /// - /// 原料库位组 + /// 线边库位 /// - [Display(Name = "原料库位组")] - public string RawLocationGroupCode { get; set; } + [Display(Name = "线边库位Json集合")] + public string WipLocationCodeListJson { get; set; } } diff --git a/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application.Contracts/ProductionLines/IProductionLineAppService.cs b/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application.Contracts/ProductionLines/IProductionLineAppService.cs index 8fe6598b8..5c97fc68f 100644 --- a/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application.Contracts/ProductionLines/IProductionLineAppService.cs +++ b/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application.Contracts/ProductionLines/IProductionLineAppService.cs @@ -8,5 +8,4 @@ public interface IProductionLineAppService , ISfsGetByCodeAppService , ISfsUpsertAppService { - Task GetByLocationGroupCodeAsync(string locationGroupCode); } diff --git a/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application.Contracts/ProductionLines/Inputs/ProductionLineEditInput.cs b/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application.Contracts/ProductionLines/Inputs/ProductionLineEditInput.cs index aa6605ab1..52c391c8c 100644 --- a/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application.Contracts/ProductionLines/Inputs/ProductionLineEditInput.cs +++ b/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application.Contracts/ProductionLines/Inputs/ProductionLineEditInput.cs @@ -1,6 +1,8 @@ +using System.Collections.Generic; using System.ComponentModel.DataAnnotations; using Win_in.Sfs.Basedata.Domain.Shared; using Win_in.Sfs.Shared.Domain; +using Win_in.Sfs.Shared.Domain.Entities; namespace Win_in.Sfs.Basedata.Application.Contracts; @@ -9,63 +11,46 @@ namespace Win_in.Sfs.Basedata.Application.Contracts; /// public class ProductionLineEditInput : SfsBaseDataCreateOrUpdateInputBase { - #region Base /// - /// 名称 + /// 代码 + /// + [Display(Name = "代码")] + [Key] + [IgnoreUpdate] + public string Code { get; set; } + + /// + /// 名称 /// [Display(Name = "名称")] - [StringLength(SfsEfCorePropertyConst.NameLength, ErrorMessage = "{0}最多输入{1}个字符")] public string Name { get; set; } /// - /// 描述 + /// 描述 /// [Display(Name = "描述")] - [StringLength(SfsEfCorePropertyConst.DescLength, ErrorMessage = "{0}最多输入{1}个字符")] public string Description { get; set; } /// - /// 类型 + /// 类型 /// - [Display(Name = "类型")] public EnumProductionLineType Type { get; set; } /// - /// 车间 + /// 原料库位 /// - [Display(Name = "车间")] - [Required(ErrorMessage = "{0}是必填项")] - [StringLength(SfsEfCorePropertyConst.CodeLength, ErrorMessage = "{0}最多输入{1}个字符")] - public string WorkshopCode { get; set; } + [Display(Name = "原料库位Json集合")] + public string RawLocationCodeListJson { get; set; } /// - /// 原料库位 + /// 成品库位 /// - [Display(Name = "原料库位")] - [Required(ErrorMessage = "{0}是必填项")] - [StringLength(SfsEfCorePropertyConst.CodeLength, ErrorMessage = "{0}最多输入{1}个字符")] - public string RawLocationCode { get; set; } + [Display(Name = "完工库位Json集合")] + public string ProductLocationCodeListJson { get; set; } /// - /// 成品库位 + /// 线边库位 /// - [Display(Name = "成品库位")] - [Required(ErrorMessage = "{0}是必填项")] - [StringLength(SfsEfCorePropertyConst.CodeLength, ErrorMessage = "{0}最多输入{1}个字符")] - public string ProductLocationCode { get; set; } - - /// - /// 原料库位组 - /// - [Display(Name = "原料库位组")] - [StringLength(SfsEfCorePropertyConst.CodeLength, ErrorMessage = "{0}最多输入{1}个字符")] - public string RawLocationGroupCode { get; set; } - #endregion - - #region Create - [Display(Name = "代码")] - [Required(ErrorMessage = "{0}是必填项")] - [StringLength(SfsEfCorePropertyConst.CodeLength, ErrorMessage = "{0}最多输入{1}个字符")] - public string Code { get; set; } - #endregion + [Display(Name = "线边库位Json集合")] + public string WipLocationCodeListJson { get; set; } } diff --git a/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application.Contracts/ProductionLines/Inputs/ProductionLineImportInput.cs b/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application.Contracts/ProductionLines/Inputs/ProductionLineImportInput.cs index 2a90a38cf..bbc24b3ae 100644 --- a/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application.Contracts/ProductionLines/Inputs/ProductionLineImportInput.cs +++ b/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application.Contracts/ProductionLines/Inputs/ProductionLineImportInput.cs @@ -1,6 +1,8 @@ +using System.Collections.Generic; using System.ComponentModel.DataAnnotations; using Win_in.Sfs.Basedata.Domain.Shared; using Win_in.Sfs.Shared.Domain; +using Win_in.Sfs.Shared.Domain.Entities; namespace Win_in.Sfs.Basedata.Application.Contracts; @@ -11,65 +13,45 @@ namespace Win_in.Sfs.Basedata.Application.Contracts; public class ProductionLineImportInput : SfsBaseDataImportInputBase { /// - /// 生产线代码 + /// 代码 /// + [Display(Name = "代码")] [Key] - [Display(Name = "生产线代码")] - [Required(ErrorMessage = "物品代码是必填项")] + [IgnoreUpdate] public string Code { get; set; } /// - /// 生产线名称 + /// 名称 /// - [Display(Name = "生产线名称")] - [Required(ErrorMessage = "{生产线名称}是必填项")] + [Display(Name = "名称")] public string Name { get; set; } /// - /// 描述 + /// 描述 /// [Display(Name = "描述")] public string Description { get; set; } /// - /// 类型 + /// 类型 /// - [Display(Name = "类型")] - [Required(ErrorMessage = "{0}是必填项")] public EnumProductionLineType Type { get; set; } /// - /// 车间代码 + /// 原料库位 /// - [Display(Name = "车间代码")] - [Required(ErrorMessage = "{0}是必填项")] - public string WorkshopCode { get; set; } + [Display(Name = "原料库位Json集合")] + public string RawLocationCodeListJson { get; set; } /// - /// 原料库位 + /// 成品库位 /// - [Display(Name = "原料库位")] - [Required(ErrorMessage = "{0}是必填项")] - public string RawLocationCode { get; set; } + [Display(Name = "完工库位Json集合")] + public string ProductLocationCodeListJson { get; set; } /// - /// 成品库位 + /// 线边库位 /// - [Display(Name = "成品库位")] - [Required(ErrorMessage = "{0}是必填项")] - public string ProductLocationCode { get; set; } - - /// - /// 原料库位组 - /// - [Display(Name = "原料库位组")] - [StringLength(SfsEfCorePropertyConst.CodeLength, ErrorMessage = "{0}最多输入{1}个字符")] - public string RawLocationGroupCode { get; set; } - - /// - /// 备注 - /// - [Display(Name = "备注")] - [StringLength(SfsEfCorePropertyConst.RemarkLength, ErrorMessage = "{0}最多输入{1}个字符")] - public string Remark { get; set; } + [Display(Name = "线边库位Json集合")] + public string WipLocationCodeListJson { get; set; } } diff --git a/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/ProductionLineItems/ProductionLineItemAutoMapperProfile.cs b/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/ProductionLineItems/ProductionLineItemAutoMapperProfile.cs index e1d527803..f8cff5004 100644 --- a/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/ProductionLineItems/ProductionLineItemAutoMapperProfile.cs +++ b/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/ProductionLineItems/ProductionLineItemAutoMapperProfile.cs @@ -13,16 +13,15 @@ public partial class BasedataApplicationAutoMapperProfile : Profile .ReverseMap(); CreateMap() - .IgnoreAuditedObjectProperties() - .Ignore(x => x.TenantId) - .Ignore(x => x.ExtraProperties) - .Ignore(x => x.ConcurrencyStamp) - ; + .IgnoreAuditedObjectProperties() + .Ignore(x => x.TenantId) + .Ignore(x => x.ExtraProperties) + .Ignore(x => x.ConcurrencyStamp) + ; CreateMap() - .Ignore(x => x.ReportStatus) + .Ignore(x => x.ReportStatus) .Ignore(x => x.ReportReason); ; - } } diff --git a/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/ProductionLines/ProductionLineAppService.cs b/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/ProductionLines/ProductionLineAppService.cs index 6ac8a8630..1f92877ce 100644 --- a/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/ProductionLines/ProductionLineAppService.cs +++ b/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/ProductionLines/ProductionLineAppService.cs @@ -41,25 +41,9 @@ public class ProductionLineAppService } [HttpPost("upsert")] - public virtual async Task UpsertAsync(ProductionLineEditInput input) { var entity = ObjectMapper.Map(input); await _repository.UpsertAsync(entity).ConfigureAwait(false); } - - [HttpGet("by-location-group/{locationGroupCode}")] - public virtual async Task GetByLocationGroupCodeAsync(string locationGroupCode) - { - var entity = await _repository.FindAsync(p => p.RawLocationGroupCode == locationGroupCode).ConfigureAwait(false); - return ObjectMapper.Map(entity); - } - - protected override async Task ValidateImportModelAsync(ProductionLineImportInput importInput, List validationRresult) - { - await base.ValidateImportModelAsync(importInput, validationRresult).ConfigureAwait(false); - await base.CheckWorkGroupWorkshopCodeAsync(importInput.WorkshopCode, validationRresult).ConfigureAwait(false); - await base.CheckRawLocationAsync(importInput.RawLocationCode, validationRresult).ConfigureAwait(false); - await base.CheckProductLocationAsync(importInput.ProductLocationCode, validationRresult).ConfigureAwait(false); - } } diff --git a/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/ProductionLines/ProductionLineAutoMapperProfile.cs b/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/ProductionLines/ProductionLineAutoMapperProfile.cs index ef063d859..47d08b6a6 100644 --- a/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/ProductionLines/ProductionLineAutoMapperProfile.cs +++ b/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/ProductionLines/ProductionLineAutoMapperProfile.cs @@ -17,11 +17,11 @@ public partial class BasedataApplicationAutoMapperProfile : Profile .Ignore(x => x.TenantId) .Ignore(x => x.ExtraProperties) .Ignore(x => x.ConcurrencyStamp) - ; + .Ignore(x=>x.Remark) + ; CreateMap() - .Ignore(x => x.ReportStatus) + .Ignore(x => x.ReportStatus) .Ignore(x => x.ReportReason); - } } diff --git a/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Domain/ProductionLines/ProductionLine.cs b/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Domain/ProductionLines/ProductionLine.cs index 9113a1b8b..7276cfc46 100644 --- a/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Domain/ProductionLines/ProductionLine.cs +++ b/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Domain/ProductionLines/ProductionLine.cs @@ -1,3 +1,4 @@ +using System.Collections.Generic; using System.ComponentModel.DataAnnotations; using Win_in.Sfs.Basedata.Domain.Shared; using Win_in.Sfs.Shared.Domain; @@ -6,61 +7,50 @@ using Win_in.Sfs.Shared.Domain.Entities; namespace Win_in.Sfs.Basedata.Domain; /// -/// 生产线 +/// 生产线 /// public class ProductionLine : SfsBaseDataAggregateRootBase, IHasCode, IHasName { - - [Display(Name = "编码")] - [Required(ErrorMessage = "{0}是必填项")] - [StringLength(SfsEfCorePropertyConst.CodeLength, ErrorMessage = "{0}最多输入{1}个字符")] + /// + /// 代码 + /// + [Display(Name = "代码")] + [Key] [IgnoreUpdate] public string Code { get; set; } /// - /// 名称 + /// 名称 /// - [Display(Name = "编码")] - [StringLength(SfsEfCorePropertyConst.CodeLength, ErrorMessage = "{0}最多输入{1}个字符")] + [Display(Name = "名称")] public string Name { get; set; } /// - /// 描述 + /// 描述 /// - [Display(Name = "编码")] - [StringLength(SfsEfCorePropertyConst.CodeLength, ErrorMessage = "{0}最多输入{1}个字符")] + [Display(Name = "描述")] public string Description { get; set; } /// - /// 类型 + /// 类型 /// public EnumProductionLineType Type { get; set; } /// - /// 车间 - /// - [Display(Name = "车间")] - [StringLength(SfsEfCorePropertyConst.CodeLength, ErrorMessage = "{0}最多输入{1}个字符")] - public string WorkshopCode { get; set; } - - /// - /// 原料库位 + /// 原料库位 /// - [Display(Name = "原料库位")] - [StringLength(SfsEfCorePropertyConst.CodeLength, ErrorMessage = "{0}最多输入{1}个字符")] - public string RawLocationCode { get; set; } + [Display(Name = "原料库位Json集合")] + public string RawLocationCodeListJson { get; set; } /// - /// 成品库位 + /// 成品库位 /// - [Display(Name = "成品库位")] - [StringLength(SfsEfCorePropertyConst.CodeLength, ErrorMessage = "{0}最多输入{1}个字符")] - public string ProductLocationCode { get; set; } + [Display(Name = "完工库位Json集合")] + public string ProductLocationCodeListJson { get; set; } /// - /// 原料库位组 + /// 线边库位 /// - [Display(Name = "原料库位组")] - [StringLength(SfsEfCorePropertyConst.CodeLength, ErrorMessage = "{0}最多输入{1}个字符")] - public string RawLocationGroupCode { get; set; } + [Display(Name = "线边库位Json集合")] + public string WipLocationCodeListJson { get; set; } } diff --git a/be/Modules/BaseData/src/Win_in.Sfs.Basedata.EntityFrameworkCore/Migrations/20240328061914_Added_First.Designer.cs b/be/Modules/BaseData/src/Win_in.Sfs.Basedata.EntityFrameworkCore/Migrations/20240328061914_Added_First.Designer.cs new file mode 100644 index 000000000..9676a40a7 --- /dev/null +++ b/be/Modules/BaseData/src/Win_in.Sfs.Basedata.EntityFrameworkCore/Migrations/20240328061914_Added_First.Designer.cs @@ -0,0 +1,4158 @@ +// +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_in.Sfs.Basedata.EntityFrameworkCore; + +#nullable disable + +namespace Win_in.Sfs.Basedata.Migrations +{ + [DbContext(typeof(BasedataDbContext))] + [Migration("20240328061914_Added_First")] + partial class Added_First + { + protected override void BuildTargetModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder + .HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.SqlServer) + .HasAnnotation("ProductVersion", "6.0.13") + .HasAnnotation("Relational:MaxIdentifierLength", 128); + + SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder, 1L, 1); + + modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.AQL", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AbcClass") + .HasColumnType("nvarchar(max)"); + + b.Property("CeilingQty") + .HasColumnType("decimal(18,6)"); + + 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("FloorQty") + .HasColumnType("decimal(18,6)"); + + b.Property("IsUsePercent") + .HasColumnType("bit"); + + b.Property("ItemCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("SamplePercent") + .HasColumnType("decimal(18,6)"); + + b.Property("SampleQty") + .HasColumnType("decimal(18,6)"); + + b.Property("SupplierCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("SupplierCode", "ItemCode", "FloorQty") + .IsUnique(); + + b.ToTable("Basedata_AQL", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.Area", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AreaType") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + 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("Description") + .HasMaxLength(1024) + .HasColumnType("nvarchar(1024)"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("IsFunctional") + .HasColumnType("bit"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Name") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("WarehouseCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.HasKey("Id"); + + b.HasIndex("Code") + .IsUnique(); + + b.ToTable("Basedata_Area", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.Bom", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("BeginTime") + .HasColumnType("datetime2"); + + b.Property("Component") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ComponentQty") + .HasColumnType("decimal(18,6)"); + + b.Property("ComponentUom") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + 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("DistributionType") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ERPOp") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("EndTime") + .HasColumnType("datetime2"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Layer") + .ValueGeneratedOnAdd() + .HasMaxLength(64) + .HasColumnType("int") + .HasDefaultValue(1); + + b.Property("MFGOp") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("PlannedSplitRule") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Product") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("TruncType") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.HasKey("Id"); + + b.HasIndex("Product", "Component") + .IsUnique(); + + b.ToTable("Basedata_Bom", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.Calendar", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("BeginTime") + .HasColumnType("datetime2"); + + 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("EndTime") + .HasColumnType("datetime2"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Module") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)"); + + b.Property("Status") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("Module") + .IsUnique() + .HasFilter("[Module] IS NOT NULL"); + + b.ToTable("Basedata_Calendar", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.Category", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + 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("Description") + .HasMaxLength(1024) + .HasColumnType("nvarchar(1024)"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Name") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("Code") + .IsUnique(); + + b.ToTable("Basedata_Category", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.Currency", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + 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("Description") + .HasMaxLength(1024) + .HasColumnType("nvarchar(1024)"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("IsBasicCurrency") + .HasColumnType("bit"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("Code") + .IsUnique(); + + b.ToTable("Basedata_Currency", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.CurrencyExchange", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("BasicCurrencyId") + .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("CurrencyId") + .HasColumnType("uniqueidentifier"); + + b.Property("EfficetiveTime") + .HasColumnType("datetime2"); + + b.Property("ExpireTime") + .HasColumnType("datetime2"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Rate") + .HasColumnType("decimal(18,6)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("CurrencyId", "BasicCurrencyId") + .IsUnique(); + + b.ToTable("Basedata_CurrencyExchange", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.Customer", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Address") + .HasMaxLength(1024) + .HasColumnType("nvarchar(1024)"); + + b.Property("City") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("Contacts") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Country") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("Currency") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("Fax") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("IsActive") + .HasColumnType("bit"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Name") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Phone") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("PostID") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("ShortName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Type") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.HasKey("Id"); + + b.HasIndex("Code") + .IsUnique(); + + b.ToTable("Basedata_Customer", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.CustomerAddress", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Address") + .HasMaxLength(1024) + .HasColumnType("nvarchar(1024)"); + + b.Property("City") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("Contact") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("CustomerCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Desc") + .HasMaxLength(1024) + .HasColumnType("nvarchar(1024)"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("LocationCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Name") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Remark") + .HasMaxLength(1024) + .HasColumnType("nvarchar(1024)") + .HasColumnName("Remark"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("WarehouseCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.HasKey("Id"); + + b.HasIndex("Code", "CustomerCode") + .IsUnique(); + + b.ToTable("Basedata_CustomerAddress", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.CustomerItem", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("BeginTime") + .HasColumnType("datetime2"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("CustomerCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("CustomerItemCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("CustomerPackQty") + .HasColumnType("decimal(18,6)"); + + b.Property("CustomerPackUom") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("EndTime") + .HasColumnType("datetime2"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("ItemCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Version") + .HasMaxLength(1024) + .HasColumnType("nvarchar(1024)"); + + b.HasKey("Id"); + + b.HasIndex("CustomerCode", "ItemCode") + .IsUnique(); + + b.ToTable("Basedata_CustomerItem", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.Dict", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + 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("Description") + .HasMaxLength(1024) + .HasColumnType("nvarchar(1024)"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Name") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("Code") + .IsUnique(); + + b.ToTable("Basedata_Dict", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.DictItem", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("Description") + .HasMaxLength(1024) + .HasColumnType("nvarchar(1024)"); + + b.Property("Enabled") + .HasColumnType("bit"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("MasterId") + .HasColumnType("uniqueidentifier"); + + b.Property("Name") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Value") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.HasKey("Id"); + + b.HasIndex("MasterId"); + + b.ToTable("Basedata_DictItem", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.Dock", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + 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("DefaultLocationCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Description") + .HasMaxLength(1024) + .HasColumnType("nvarchar(1024)"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Name") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("WarehouseCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.HasKey("Id"); + + b.HasIndex("Code") + .IsUnique(); + + b.ToTable("Basedata_Dock", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.DocumentSetting", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + 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("Description") + .HasMaxLength(1024) + .HasColumnType("nvarchar(1024)"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Name") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("NumberFormat") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("NumberPrefix") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("NumberSeparator") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("NumberSerialLength") + .HasColumnType("int"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("TransactionType") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.HasKey("Id"); + + b.HasIndex("Code") + .IsUnique(); + + b.ToTable("Basedata_DocumentSetting", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.Equipment", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreatTime") + .HasColumnType("datetime2"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("Creator") + .HasColumnType("nvarchar(max)"); + + 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("LocCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Model") + .HasMaxLength(64) + .HasColumnType("int"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("State") + .HasColumnType("int"); + + b.Property("StdQty") + .HasColumnType("decimal(18,6)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Type") + .HasMaxLength(64) + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("Code") + .IsUnique(); + + b.ToTable("Basedata_Equipment", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.EquipmentLoc", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + 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("LocCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("State") + .HasColumnType("int"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("Code", "LocCode") + .IsUnique(); + + b.ToTable("Basedata_EquipmentLoc", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.EquipmentLocCap", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + 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("PartCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Percent") + .HasColumnType("decimal(18,6)"); + + b.Property("Qty") + .HasColumnType("decimal(18,6)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("StdQty") + .HasColumnType("decimal(18,6)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("Code") + .IsUnique(); + + b.ToTable("Basedata_EquipmentLocCap", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.EquipmentPartCode", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + 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("PartCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("State") + .HasColumnType("int"); + + b.Property("StdQty") + .HasColumnType("decimal(18,2)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Unit") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("Code", "PartCode") + .IsUnique(); + + b.ToTable("Basedata_EquipmentPartCode", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.ErpLocation", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + 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("Description") + .HasMaxLength(1024) + .HasColumnType("nvarchar(1024)"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Name") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Type") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("WarehouseCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.HasKey("Id"); + + b.HasIndex("Code") + .IsUnique(); + + b.ToTable("Basedata_ErpLocation", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.InterfaceCalendar", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("BeginTime") + .HasColumnType("datetime2"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("ConvertToTime") + .HasColumnType("datetime2"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("Description") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("EndTime") + .HasColumnType("datetime2"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Month") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Remark") + .HasColumnType("nvarchar(max)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Year") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.HasKey("Id"); + + b.HasIndex("Code") + .IsUnique(); + + b.ToTable("Basedata_InterfaceCalendar", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.ItemBasic", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AbcClass") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("BasicUom") + .HasColumnType("nvarchar(max)"); + + b.Property("CanBuy") + .HasColumnType("bit"); + + b.Property("CanMake") + .HasColumnType("bit"); + + b.Property("CanOutsourcing") + .HasColumnType("bit"); + + b.Property("Category") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Color") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("Configuration") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("Desc1") + .HasMaxLength(1024) + .HasColumnType("nvarchar(1024)"); + + b.Property("Desc2") + .HasMaxLength(1024) + .HasColumnType("nvarchar(1024)"); + + b.Property("Eco") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Elevel") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("Group") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("IsPhantom") + .HasColumnType("bit"); + + b.Property("IsRecycled") + .HasColumnType("bit"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("ManageType") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Name") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Project") + .HasColumnType("nvarchar(max)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("Status") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("StdPackQty") + .HasColumnType("decimal(18,6)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Type") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Validity") + .HasColumnType("int"); + + b.Property("ValidityUnit") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Version") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.HasKey("Id"); + + b.HasIndex("Code") + .IsUnique(); + + b.ToTable("Basedata_ItemBasic", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.ItemCategory", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CategoryCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + 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("ItemCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Value") + .IsRequired() + .HasMaxLength(1024) + .HasColumnType("nvarchar(1024)"); + + b.HasKey("Id"); + + b.HasIndex("CategoryCode", "ItemCode") + .IsUnique(); + + b.ToTable("Basedata_ItemCategory", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.ItemGuideBook", b => + { + b.Property("Id") + .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("Desc1") + .HasColumnType("nvarchar(max)"); + + b.Property("Desc2") + .HasColumnType("nvarchar(max)"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("ItemCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Name") + .HasColumnType("nvarchar(max)"); + + b.Property("PictureBlobName") + .HasColumnType("nvarchar(max)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("Step") + .HasMaxLength(1024) + .HasColumnType("nvarchar(1024)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("ItemCode") + .IsUnique(); + + b.ToTable("Basedata_ItemGuideBook", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.ItemPack", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("BasicUom") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + 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("ItemCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("PackCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("PackName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("PackType") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Qty") + .HasColumnType("decimal(18,6)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("ItemCode", "PackCode") + .IsUnique(); + + b.ToTable("Basedata_ItemPack", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.ItemQuality", b => + { + b.Property("Id") + .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("Description") + .HasMaxLength(1024) + .HasColumnType("nvarchar(1024)"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("InspectType") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ItemCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("Status") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("SupplierCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("ItemCode", "SupplierCode") + .IsUnique(); + + b.ToTable("Basedata_ItemQuality", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.ItemSafetyStock", b => + { + b.Property("Id") + .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("FeedLine") + .HasColumnType("decimal(18,6)"); + + b.Property("FeedQty") + .HasColumnType("decimal(18,6)"); + + b.Property("FeedUM") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ItemCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("MaxStock") + .HasColumnType("decimal(18,6)"); + + b.Property("MinStock") + .HasColumnType("decimal(18,6)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("SafetyStock") + .HasColumnType("decimal(18,6)"); + + b.Property("StoreRelationType") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("StoreValue") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("WarehouseCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.HasKey("Id"); + + b.HasIndex("ItemCode", "WarehouseCode", "StoreRelationType", "StoreValue") + .IsUnique() + .HasFilter("[StoreValue] IS NOT NULL"); + + b.ToTable("Basedata_ItemSafetyStock", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.ItemStoreRelation", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AltUm") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("AltUmQty") + .HasColumnType("decimal(18,6)"); + + 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("Enabled") + .HasColumnType("bit"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("IsFixed") + .HasColumnType("bit"); + + b.Property("ItemCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("MultiLoc") + .HasColumnType("int"); + + b.Property("PramaryUM") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("StoreRelationType") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("StoreUM") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("StoreValue") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("UmQty") + .HasColumnType("decimal(18,6)"); + + b.Property("WarehouseCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.HasKey("Id"); + + b.HasIndex("ItemCode", "StoreRelationType", "StoreValue") + .IsUnique() + .HasFilter("[StoreValue] IS NOT NULL"); + + b.ToTable("Basedata_ItemStoreRelation", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.Kitting", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + 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("Name") + .HasMaxLength(1024) + .HasColumnType("nvarchar(1024)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("Code") + .IsUnique(); + + b.ToTable("Basedata_Kitting", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.KittingDetail", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("Conf") + .HasColumnType("nvarchar(max)"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("Desc1") + .HasMaxLength(1024) + .HasColumnType("nvarchar(1024)"); + + b.Property("Desc2") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("MasterId") + .HasColumnType("uniqueidentifier"); + + b.Property("PartCode") + .HasColumnType("nvarchar(max)"); + + b.Property("Qty") + .HasColumnType("decimal(18,2)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("MasterId"); + + b.ToTable("Basedata_KittingDetail", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.Location", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AreaCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ColumnCode") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasDefaultValue(1); + + 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("DefaultInventoryStatus") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Description") + .HasMaxLength(1024) + .HasColumnType("nvarchar(1024)"); + + b.Property("EnableBreakStore") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(true); + + b.Property("EnableKeepZero") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(true); + + b.Property("EnableMixItem") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(true); + + b.Property("EnableMixLot") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(true); + + b.Property("EnableMixStatus") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(true); + + b.Property("EnableNegative") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(true); + + b.Property("EnableOpportunityCount") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(true); + + b.Property("EnableOverPick") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(true); + + b.Property("EnablePick") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(true); + + b.Property("EnableReceive") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(true); + + b.Property("EnableReturnFromCustomer") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(true); + + b.Property("EnableReturnToSupplier") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(true); + + b.Property("EnableShip") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(true); + + b.Property("EnableSplitBox") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(true); + + b.Property("EnableSplitPallet") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(true); + + b.Property("EnableWholeStore") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(true); + + b.Property("ErpLocationCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("LocationGroupCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Name") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("PickOrder") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasDefaultValue(0); + + b.Property("PickPriority") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasDefaultValue(0); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("RowCode") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasDefaultValue(1); + + b.Property("ShelfCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Type") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("WarehouseCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("WorkGroupCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.HasKey("Id"); + + b.HasIndex("Code") + .IsUnique(); + + b.ToTable("Basedata_Location", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.LocationGroup", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AreaCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + 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("DefaultInventoryStatus") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Description") + .HasMaxLength(1024) + .HasColumnType("nvarchar(1024)"); + + b.Property("EnableBreakStore") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(true); + + b.Property("EnableKeepZero") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(true); + + b.Property("EnableMixItem") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(true); + + b.Property("EnableMixLot") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(true); + + b.Property("EnableMixStatus") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(true); + + b.Property("EnableNegative") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(true); + + b.Property("EnableOpportunityCount") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(true); + + b.Property("EnableOverPick") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(true); + + b.Property("EnablePick") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(true); + + b.Property("EnableReceive") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(true); + + b.Property("EnableReturnFromCustomer") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(true); + + b.Property("EnableReturnToSupplier") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(true); + + b.Property("EnableShip") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(true); + + b.Property("EnableSplitBox") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(true); + + b.Property("EnableSplitPallet") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(true); + + b.Property("EnableWholeStore") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(true); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("GroupType") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Name") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("OverflowLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("PickPriority") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasDefaultValue(0); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("WarehouseCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.HasKey("Id"); + + b.HasIndex("Code") + .IsUnique(); + + b.ToTable("Basedata_LocationGroup", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.Machine", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + 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("Description") + .HasMaxLength(1024) + .HasColumnType("nvarchar(1024)"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ProdLineId") + .HasColumnType("uniqueidentifier"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Type") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("WorkStationId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("Code") + .IsUnique(); + + b.ToTable("Basedata_Machine", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.PositionCode", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("BasicUom") + .HasColumnType("nvarchar(max)"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + 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("LocationCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("LocationName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("PartCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("PartDesc") + .HasColumnType("nvarchar(max)"); + + b.Property("PartName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("StdPackQty") + .HasColumnType("decimal(18,6)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Type") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.HasKey("Id"); + + b.HasIndex("Code") + .IsUnique(); + + b.HasIndex("PartCode") + .IsUnique() + .HasFilter("[PartCode] IS NOT NULL"); + + b.HasIndex("Code", "PartCode", "LocationCode") + .IsUnique() + .HasFilter("[PartCode] IS NOT NULL AND [LocationCode] IS NOT NULL"); + + b.ToTable("Basedata_PositionCode", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.ProductionLine", b => + { + b.Property("Code") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + 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("Description") + .HasMaxLength(1024) + .HasColumnType("nvarchar(1024)"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Name") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ProductLocationCodeListJson") + .HasColumnType("nvarchar(max)"); + + b.Property("RawLocationCodeListJson") + .HasColumnType("nvarchar(max)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Type") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("WipLocationCodeListJson") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Code"); + + b.HasIndex("Code") + .IsUnique(); + + b.ToTable("Basedata_ProductionLine", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.ProductionLineItem", b => + { + b.Property("Id") + .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("ItemCode") + .IsRequired() + .HasColumnType("nvarchar(450)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("ProdLineCode") + .IsRequired() + .HasColumnType("nvarchar(450)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("ProdLineCode", "ItemCode") + .IsUnique(); + + b.ToTable("Basedata_ProductionLineItem", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.Project", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("BeginTime") + .HasColumnType("datetime2"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + 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(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Description") + .HasMaxLength(1024) + .HasColumnType("nvarchar(1024)"); + + b.Property("EndTime") + .HasColumnType("datetime2"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Name") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("Code") + .IsUnique(); + + b.ToTable("Basedata_Project", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.PurchasePriceSheet", b => + { + b.Property("Id") + .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("Description") + .HasMaxLength(1024) + .HasColumnType("nvarchar(1024)"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("ItemCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("PurchasePrice") + .HasColumnType("decimal(18,6)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("SupplierCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("ItemCode", "SupplierCode") + .IsUnique() + .HasFilter("[ItemCode] IS NOT NULL AND [SupplierCode] IS NOT NULL"); + + b.ToTable("Basedata_PurchasePriceSheet", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.SalePriceSheet", b => + { + b.Property("Id") + .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(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Description") + .HasMaxLength(1024) + .HasColumnType("nvarchar(1024)"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("ItemCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("SalePrice") + .HasColumnType("decimal(18,6)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("CustomerCode", "ItemCode") + .IsUnique() + .HasFilter("[CustomerCode] IS NOT NULL"); + + b.ToTable("Basedata_SalePriceSheet", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.Shift", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("BeginTime") + .HasColumnType("datetime2"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + 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("Description") + .HasMaxLength(1024) + .HasColumnType("nvarchar(1024)"); + + b.Property("EndAtNextDay") + .HasColumnType("bit"); + + b.Property("EndTime") + .HasColumnType("datetime2"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Name") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("Code") + .IsUnique(); + + b.ToTable("Basedata_Shift", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.SplitPackingRec", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ArrivalNoticNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + 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("FromLot") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("FromPackingCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("FromQty") + .HasPrecision(18, 6) + .HasColumnType("decimal(18,6)"); + + b.Property("FromStdPackQty") + .HasColumnType("decimal(18,6)"); + + b.Property("FromTopPackingCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("FromUom") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ItemCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ItemDesc1") + .HasMaxLength(1024) + .HasColumnType("nvarchar(1024)"); + + b.Property("ItemDesc2") + .HasMaxLength(1024) + .HasColumnType("nvarchar(1024)"); + + b.Property("ItemName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("LabelType") + .HasColumnType("int"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("OprType") + .HasColumnType("int"); + + b.Property("PurchaseInfo_AsnNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("PurchaseInfo_PoNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("PutOnShelfNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ReceiptRecNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Remark") + .HasColumnType("nvarchar(max)"); + + b.Property("TaskOrderNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("ToLot") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ToPackingCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ToQty") + .HasPrecision(18, 6) + .HasColumnType("decimal(18,6)"); + + b.Property("ToStdPackQty") + .HasColumnType("decimal(18,6)"); + + b.Property("ToTopPackingCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ToUom") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.HasKey("Id"); + + b.HasIndex("ToPackingCode"); + + b.HasIndex("FromPackingCode", "ToPackingCode"); + + b.ToTable("Basedata_SplitPackingRec", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.StdCostPriceSheet", b => + { + b.Property("Id") + .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("Description") + .HasMaxLength(1024) + .HasColumnType("nvarchar(1024)"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("ItemCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("StdCostPrice") + .HasColumnType("decimal(18,6)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("ItemCode") + .IsUnique(); + + b.ToTable("Basedata_StdCostPriceSheet", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.Supplier", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Address") + .HasMaxLength(1024) + .HasColumnType("nvarchar(1024)"); + + b.Property("Bank") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("City") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("Contacts") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Country") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("Currency") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("Fax") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("IsActive") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(true); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Phone") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("PostID") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("ShortName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("TaxRate") + .HasColumnType("decimal(18,6)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Type") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.HasKey("Id"); + + b.HasIndex("Code") + .IsUnique(); + + b.ToTable("Basedata_Supplier", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.SupplierItem", b => + { + b.Property("Id") + .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("ItemCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ItemName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("QtyPerPallet") + .HasColumnType("decimal(18,6)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("SupplierCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("SupplierItemCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("SupplierPackQty") + .HasColumnType("decimal(18,6)"); + + b.Property("SupplierPackUom") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("SupplierSimpleName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Version") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.HasKey("Id"); + + b.HasIndex("SupplierCode", "ItemCode") + .IsUnique(); + + b.ToTable("Basedata_SupplierItem", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.SupplierTimeWindow", b => + { + b.Property("Id") + .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("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("SupplierCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("SupplierName") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("TimeSlot") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Week") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.HasKey("Id"); + + b.HasIndex("SupplierCode", "TimeSlot", "Week") + .IsUnique(); + + b.ToTable("Basedata_SupplierTimeWindow", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.Team", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + 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("Description") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Members") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Name") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("Code") + .IsUnique(); + + b.ToTable("Basedata_Team", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.TransactionType", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AutoAgreeRequest") + .HasColumnType("bit"); + + b.Property("AutoCompleteJob") + .HasColumnType("bit"); + + b.Property("AutoHandleRequest") + .HasColumnType("bit"); + + b.Property("AutoSubmitRequest") + .HasColumnType("bit"); + + 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("Description") + .IsRequired() + .HasMaxLength(1024) + .HasColumnType("nvarchar(1024)"); + + b.Property("DirectCreateNote") + .HasColumnType("bit"); + + b.Property("Enabled") + .HasColumnType("bit"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("InInventoryStatuses") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("InLocationAreas") + .HasColumnType("nvarchar(max)"); + + b.Property("InLocationTypes") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ItemStatuses") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ItemTypes") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("OutInventoryStatuses") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("OutLocationAreas") + .HasColumnType("nvarchar(max)"); + + b.Property("OutLocationTypes") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("TransSubType") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("TransType") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.HasKey("Id"); + + b.HasIndex("TransType", "TransSubType") + .IsUnique(); + + b.ToTable("Basedata_TransactionType", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.Uom", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + 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("Description") + .HasMaxLength(1024) + .HasColumnType("nvarchar(1024)"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Name") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Type") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.HasKey("Id"); + + b.HasIndex("Code") + .IsUnique(); + + b.ToTable("Basedata_Uom", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.Warehouse", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + 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("Description") + .HasMaxLength(1024) + .HasColumnType("nvarchar(1024)"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Name") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("Code") + .IsUnique(); + + b.ToTable("Basedata_Warehouse", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.WorkGroup", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + 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("Description") + .HasMaxLength(1024) + .HasColumnType("nvarchar(1024)"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Name") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("WarehouseCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.HasKey("Id"); + + b.HasIndex("Code") + .IsUnique(); + + b.ToTable("Basedata_WorkGroup", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.WorkShop", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + 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("Description") + .HasMaxLength(1024) + .HasColumnType("nvarchar(1024)"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("Code") + .IsUnique(); + + b.ToTable("Basedata_WorkShop", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.WorkStation", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + 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("Description") + .HasMaxLength(1024) + .HasColumnType("nvarchar(1024)"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ProductLocationCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ProductionLineCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("RawLocationCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Type") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.HasKey("Id"); + + b.HasIndex("Code") + .IsUnique(); + + b.ToTable("Basedata_WorkStation", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.DictItem", b => + { + b.HasOne("Win_in.Sfs.Basedata.Domain.Dict", null) + .WithMany("Items") + .HasForeignKey("MasterId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.KittingDetail", b => + { + b.HasOne("Win_in.Sfs.Basedata.Domain.Kitting", null) + .WithMany("Details") + .HasForeignKey("MasterId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.Dict", b => + { + b.Navigation("Items"); + }); + + modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.Kitting", b => + { + b.Navigation("Details"); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/be/Modules/BaseData/src/Win_in.Sfs.Basedata.EntityFrameworkCore/Migrations/20240328061914_Added_First.cs b/be/Modules/BaseData/src/Win_in.Sfs.Basedata.EntityFrameworkCore/Migrations/20240328061914_Added_First.cs new file mode 100644 index 000000000..7482b0cc2 --- /dev/null +++ b/be/Modules/BaseData/src/Win_in.Sfs.Basedata.EntityFrameworkCore/Migrations/20240328061914_Added_First.cs @@ -0,0 +1,1873 @@ +using System; +using Microsoft.EntityFrameworkCore.Migrations; + +#nullable disable + +namespace Win_in.Sfs.Basedata.Migrations +{ + public partial class Added_First : Migration + { + protected override void Up(MigrationBuilder migrationBuilder) + { + migrationBuilder.CreateTable( + name: "Basedata_AQL", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + ItemCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + SupplierCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + AbcClass = table.Column(type: "nvarchar(max)", nullable: true), + FloorQty = table.Column(type: "decimal(18,6)", nullable: false), + CeilingQty = table.Column(type: "decimal(18,6)", nullable: false), + SamplePercent = table.Column(type: "decimal(18,6)", nullable: false), + SampleQty = table.Column(type: "decimal(18,6)", nullable: false), + IsUsePercent = table.Column(type: "bit", nullable: false), + ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true), + ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: true), + CreationTime = table.Column(type: "datetime2", nullable: false), + CreatorId = table.Column(type: "uniqueidentifier", nullable: true), + LastModificationTime = table.Column(type: "datetime2", nullable: true), + LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + Remark = table.Column(type: "nvarchar(3072)", maxLength: 3072, nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_Basedata_AQL", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "Basedata_Area", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + Code = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + Name = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + Description = table.Column(type: "nvarchar(1024)", maxLength: 1024, nullable: true), + WarehouseCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + AreaType = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + IsFunctional = table.Column(type: "bit", nullable: false), + ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true), + ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: true), + CreationTime = table.Column(type: "datetime2", nullable: false), + CreatorId = table.Column(type: "uniqueidentifier", nullable: true), + LastModificationTime = table.Column(type: "datetime2", nullable: true), + LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + Remark = table.Column(type: "nvarchar(3072)", maxLength: 3072, nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_Basedata_Area", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "Basedata_Bom", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + Product = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + Component = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + ComponentUom = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + ComponentQty = table.Column(type: "decimal(18,6)", nullable: false), + BeginTime = table.Column(type: "datetime2", nullable: true), + EndTime = table.Column(type: "datetime2", nullable: true), + ERPOp = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + Layer = table.Column(type: "int", maxLength: 64, nullable: false, defaultValue: 1), + MFGOp = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + DistributionType = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + TruncType = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + PlannedSplitRule = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true), + ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: true), + CreationTime = table.Column(type: "datetime2", nullable: false), + CreatorId = table.Column(type: "uniqueidentifier", nullable: true), + LastModificationTime = table.Column(type: "datetime2", nullable: true), + LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + Remark = table.Column(type: "nvarchar(3072)", maxLength: 3072, nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_Basedata_Bom", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "Basedata_Calendar", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + Module = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + BeginTime = table.Column(type: "datetime2", nullable: true), + EndTime = table.Column(type: "datetime2", nullable: true), + Status = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true), + ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: true), + CreationTime = table.Column(type: "datetime2", nullable: false), + CreatorId = table.Column(type: "uniqueidentifier", nullable: true), + LastModificationTime = table.Column(type: "datetime2", nullable: true), + LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + Remark = table.Column(type: "nvarchar(3072)", maxLength: 3072, nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_Basedata_Calendar", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "Basedata_Category", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + Code = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + Name = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + Description = table.Column(type: "nvarchar(1024)", maxLength: 1024, nullable: true), + ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true), + ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: true), + CreationTime = table.Column(type: "datetime2", nullable: false), + CreatorId = table.Column(type: "uniqueidentifier", nullable: true), + LastModificationTime = table.Column(type: "datetime2", nullable: true), + LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + Remark = table.Column(type: "nvarchar(3072)", maxLength: 3072, nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_Basedata_Category", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "Basedata_Currency", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + Name = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + Code = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + Description = table.Column(type: "nvarchar(1024)", maxLength: 1024, nullable: true), + IsBasicCurrency = table.Column(type: "bit", nullable: false), + ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true), + ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: true), + CreationTime = table.Column(type: "datetime2", nullable: false), + CreatorId = table.Column(type: "uniqueidentifier", nullable: true), + LastModificationTime = table.Column(type: "datetime2", nullable: true), + LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + Remark = table.Column(type: "nvarchar(3072)", maxLength: 3072, nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_Basedata_Currency", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "Basedata_CurrencyExchange", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + CurrencyId = table.Column(type: "uniqueidentifier", nullable: false), + BasicCurrencyId = table.Column(type: "uniqueidentifier", nullable: false), + Rate = table.Column(type: "decimal(18,6)", nullable: false), + EfficetiveTime = table.Column(type: "datetime2", nullable: false), + ExpireTime = table.Column(type: "datetime2", nullable: false), + ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true), + ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: true), + CreationTime = table.Column(type: "datetime2", nullable: false), + CreatorId = table.Column(type: "uniqueidentifier", nullable: true), + LastModificationTime = table.Column(type: "datetime2", nullable: true), + LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + Remark = table.Column(type: "nvarchar(3072)", maxLength: 3072, nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_Basedata_CurrencyExchange", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "Basedata_Customer", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + Code = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + Name = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + ShortName = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + Address = table.Column(type: "nvarchar(1024)", maxLength: 1024, nullable: true), + Country = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + City = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + Phone = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + Fax = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + PostID = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + Contacts = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + Currency = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + IsActive = table.Column(type: "bit", nullable: false), + Type = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true), + ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: true), + CreationTime = table.Column(type: "datetime2", nullable: false), + CreatorId = table.Column(type: "uniqueidentifier", nullable: true), + LastModificationTime = table.Column(type: "datetime2", nullable: true), + LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + Remark = table.Column(type: "nvarchar(3072)", maxLength: 3072, nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_Basedata_Customer", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "Basedata_CustomerAddress", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + Code = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + Name = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + CustomerCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + Address = table.Column(type: "nvarchar(1024)", maxLength: 1024, nullable: true), + Contact = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + WarehouseCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + City = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + LocationCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + Desc = table.Column(type: "nvarchar(1024)", maxLength: 1024, nullable: true), + ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true), + ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: true), + CreationTime = table.Column(type: "datetime2", nullable: false), + CreatorId = table.Column(type: "uniqueidentifier", nullable: true), + LastModificationTime = table.Column(type: "datetime2", nullable: true), + LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + Remark = table.Column(type: "nvarchar(1024)", maxLength: 1024, nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_Basedata_CustomerAddress", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "Basedata_CustomerItem", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + CustomerCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + ItemCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + CustomerItemCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + Version = table.Column(type: "nvarchar(1024)", maxLength: 1024, nullable: true), + CustomerPackUom = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + CustomerPackQty = table.Column(type: "decimal(18,6)", nullable: false), + BeginTime = table.Column(type: "datetime2", nullable: true), + EndTime = table.Column(type: "datetime2", nullable: true), + ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true), + ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: true), + CreationTime = table.Column(type: "datetime2", nullable: false), + CreatorId = table.Column(type: "uniqueidentifier", nullable: true), + LastModificationTime = table.Column(type: "datetime2", nullable: true), + LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + Remark = table.Column(type: "nvarchar(3072)", maxLength: 3072, nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_Basedata_CustomerItem", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "Basedata_Dict", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + Code = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + Name = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + Description = table.Column(type: "nvarchar(1024)", maxLength: 1024, nullable: true), + ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true), + ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: true), + CreationTime = table.Column(type: "datetime2", nullable: false), + CreatorId = table.Column(type: "uniqueidentifier", nullable: true), + LastModificationTime = table.Column(type: "datetime2", nullable: true), + LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + Remark = table.Column(type: "nvarchar(3072)", maxLength: 3072, nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_Basedata_Dict", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "Basedata_Dock", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + Code = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + Name = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + Description = table.Column(type: "nvarchar(1024)", maxLength: 1024, nullable: true), + WarehouseCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + DefaultLocationCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true), + ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: true), + CreationTime = table.Column(type: "datetime2", nullable: false), + CreatorId = table.Column(type: "uniqueidentifier", nullable: true), + LastModificationTime = table.Column(type: "datetime2", nullable: true), + LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + Remark = table.Column(type: "nvarchar(3072)", maxLength: 3072, nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_Basedata_Dock", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "Basedata_DocumentSetting", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + Code = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + Name = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + Description = table.Column(type: "nvarchar(1024)", maxLength: 1024, nullable: true), + TransactionType = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + NumberPrefix = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + NumberFormat = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + NumberSerialLength = table.Column(type: "int", nullable: false), + NumberSeparator = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true), + ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: true), + CreationTime = table.Column(type: "datetime2", nullable: false), + CreatorId = table.Column(type: "uniqueidentifier", nullable: true), + LastModificationTime = table.Column(type: "datetime2", nullable: true), + LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + Remark = table.Column(type: "nvarchar(3072)", maxLength: 3072, nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_Basedata_DocumentSetting", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "Basedata_Equipment", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + Code = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + Type = table.Column(type: "int", maxLength: 64, nullable: false), + Model = table.Column(type: "int", maxLength: 64, nullable: false), + LocCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + State = table.Column(type: "int", nullable: false), + Creator = table.Column(type: "nvarchar(max)", nullable: true), + CreatTime = table.Column(type: "datetime2", nullable: false), + StdQty = table.Column(type: "decimal(18,6)", nullable: false), + ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true), + ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: true), + CreationTime = table.Column(type: "datetime2", nullable: false), + CreatorId = table.Column(type: "uniqueidentifier", nullable: true), + LastModificationTime = table.Column(type: "datetime2", nullable: true), + LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + Remark = table.Column(type: "nvarchar(3072)", maxLength: 3072, nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_Basedata_Equipment", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "Basedata_EquipmentLoc", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + Code = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + LocCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + State = table.Column(type: "int", nullable: false), + ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true), + ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: true), + CreationTime = table.Column(type: "datetime2", nullable: false), + CreatorId = table.Column(type: "uniqueidentifier", nullable: true), + LastModificationTime = table.Column(type: "datetime2", nullable: true), + LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + Remark = table.Column(type: "nvarchar(3072)", maxLength: 3072, nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_Basedata_EquipmentLoc", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "Basedata_EquipmentLocCap", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + Code = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + PartCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + Percent = table.Column(type: "decimal(18,6)", nullable: false), + Qty = table.Column(type: "decimal(18,6)", nullable: false), + StdQty = table.Column(type: "decimal(18,6)", nullable: false), + ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true), + ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: true), + CreationTime = table.Column(type: "datetime2", nullable: false), + CreatorId = table.Column(type: "uniqueidentifier", nullable: true), + LastModificationTime = table.Column(type: "datetime2", nullable: true), + LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + Remark = table.Column(type: "nvarchar(3072)", maxLength: 3072, nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_Basedata_EquipmentLocCap", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "Basedata_EquipmentPartCode", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + Code = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + PartCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + StdQty = table.Column(type: "decimal(18,2)", nullable: false), + State = table.Column(type: "int", nullable: false), + Unit = table.Column(type: "nvarchar(max)", nullable: true), + ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true), + ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: true), + CreationTime = table.Column(type: "datetime2", nullable: false), + CreatorId = table.Column(type: "uniqueidentifier", nullable: true), + LastModificationTime = table.Column(type: "datetime2", nullable: true), + LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + Remark = table.Column(type: "nvarchar(3072)", maxLength: 3072, nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_Basedata_EquipmentPartCode", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "Basedata_ErpLocation", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + Code = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + Name = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + Description = table.Column(type: "nvarchar(1024)", maxLength: 1024, nullable: true), + Type = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + WarehouseCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true), + ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: true), + CreationTime = table.Column(type: "datetime2", nullable: false), + CreatorId = table.Column(type: "uniqueidentifier", nullable: true), + LastModificationTime = table.Column(type: "datetime2", nullable: true), + LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + Remark = table.Column(type: "nvarchar(3072)", maxLength: 3072, nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_Basedata_ErpLocation", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "Basedata_InterfaceCalendar", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + Code = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + Name = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + Year = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + Month = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + BeginTime = table.Column(type: "datetime2", nullable: false), + EndTime = table.Column(type: "datetime2", nullable: false), + ConvertToTime = table.Column(type: "datetime2", nullable: false), + Description = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true), + ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: true), + CreationTime = table.Column(type: "datetime2", nullable: false), + CreatorId = table.Column(type: "uniqueidentifier", nullable: true), + LastModificationTime = table.Column(type: "datetime2", nullable: true), + LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + Remark = table.Column(type: "nvarchar(max)", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_Basedata_InterfaceCalendar", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "Basedata_ItemBasic", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + Code = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + Name = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + Desc1 = table.Column(type: "nvarchar(1024)", maxLength: 1024, nullable: true), + Desc2 = table.Column(type: "nvarchar(1024)", maxLength: 1024, nullable: true), + Status = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + CanMake = table.Column(type: "bit", nullable: false), + CanBuy = table.Column(type: "bit", nullable: false), + CanOutsourcing = table.Column(type: "bit", nullable: false), + IsRecycled = table.Column(type: "bit", nullable: false), + Type = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + Category = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + Group = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + Color = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + Configuration = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + BasicUom = table.Column(type: "nvarchar(max)", nullable: true), + StdPackQty = table.Column(type: "decimal(18,6)", nullable: false), + AbcClass = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + Project = table.Column(type: "nvarchar(max)", nullable: true), + Version = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + Eco = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + Validity = table.Column(type: "int", nullable: false), + ValidityUnit = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + ManageType = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + Elevel = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + IsPhantom = table.Column(type: "bit", nullable: false), + ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true), + ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: true), + CreationTime = table.Column(type: "datetime2", nullable: false), + CreatorId = table.Column(type: "uniqueidentifier", nullable: true), + LastModificationTime = table.Column(type: "datetime2", nullable: true), + LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + Remark = table.Column(type: "nvarchar(3072)", maxLength: 3072, nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_Basedata_ItemBasic", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "Basedata_ItemCategory", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + ItemCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + CategoryCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + Value = table.Column(type: "nvarchar(1024)", maxLength: 1024, nullable: false), + ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true), + ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: true), + CreationTime = table.Column(type: "datetime2", nullable: false), + CreatorId = table.Column(type: "uniqueidentifier", nullable: true), + LastModificationTime = table.Column(type: "datetime2", nullable: true), + LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + Remark = table.Column(type: "nvarchar(3072)", maxLength: 3072, nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_Basedata_ItemCategory", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "Basedata_ItemGuideBook", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + ItemCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + Name = table.Column(type: "nvarchar(max)", nullable: true), + Desc1 = table.Column(type: "nvarchar(max)", nullable: true), + Desc2 = table.Column(type: "nvarchar(max)", nullable: true), + Step = table.Column(type: "nvarchar(1024)", maxLength: 1024, nullable: true), + PictureBlobName = table.Column(type: "nvarchar(max)", nullable: true), + ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true), + ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: true), + CreationTime = table.Column(type: "datetime2", nullable: false), + CreatorId = table.Column(type: "uniqueidentifier", nullable: true), + LastModificationTime = table.Column(type: "datetime2", nullable: true), + LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + Remark = table.Column(type: "nvarchar(3072)", maxLength: 3072, nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_Basedata_ItemGuideBook", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "Basedata_ItemPack", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + PackCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + PackName = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + PackType = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + ItemCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + BasicUom = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + Qty = table.Column(type: "decimal(18,6)", nullable: false), + ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true), + ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: true), + CreationTime = table.Column(type: "datetime2", nullable: false), + CreatorId = table.Column(type: "uniqueidentifier", nullable: true), + LastModificationTime = table.Column(type: "datetime2", nullable: true), + LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + Remark = table.Column(type: "nvarchar(3072)", maxLength: 3072, nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_Basedata_ItemPack", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "Basedata_ItemQuality", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + ItemCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + SupplierCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + Status = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + Description = table.Column(type: "nvarchar(1024)", maxLength: 1024, nullable: true), + InspectType = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true), + ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: true), + CreationTime = table.Column(type: "datetime2", nullable: false), + CreatorId = table.Column(type: "uniqueidentifier", nullable: true), + LastModificationTime = table.Column(type: "datetime2", nullable: true), + LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + Remark = table.Column(type: "nvarchar(3072)", maxLength: 3072, nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_Basedata_ItemQuality", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "Basedata_ItemSafetyStock", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + ItemCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + WarehouseCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + StoreRelationType = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + StoreValue = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + MaxStock = table.Column(type: "decimal(18,6)", nullable: false), + MinStock = table.Column(type: "decimal(18,6)", nullable: false), + SafetyStock = table.Column(type: "decimal(18,6)", nullable: false), + FeedLine = table.Column(type: "decimal(18,6)", nullable: false), + FeedQty = table.Column(type: "decimal(18,6)", nullable: false), + FeedUM = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true), + ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: true), + CreationTime = table.Column(type: "datetime2", nullable: false), + CreatorId = table.Column(type: "uniqueidentifier", nullable: true), + LastModificationTime = table.Column(type: "datetime2", nullable: true), + LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + Remark = table.Column(type: "nvarchar(3072)", maxLength: 3072, nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_Basedata_ItemSafetyStock", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "Basedata_ItemStoreRelation", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + ItemCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + WarehouseCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + StoreRelationType = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + StoreValue = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + Enabled = table.Column(type: "bit", nullable: false), + StoreUM = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + UmQty = table.Column(type: "decimal(18,6)", nullable: false), + AltUm = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + AltUmQty = table.Column(type: "decimal(18,6)", nullable: false), + PramaryUM = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + IsFixed = table.Column(type: "bit", nullable: false), + MultiLoc = table.Column(type: "int", nullable: false), + ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true), + ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: true), + CreationTime = table.Column(type: "datetime2", nullable: false), + CreatorId = table.Column(type: "uniqueidentifier", nullable: true), + LastModificationTime = table.Column(type: "datetime2", nullable: true), + LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + Remark = table.Column(type: "nvarchar(3072)", maxLength: 3072, nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_Basedata_ItemStoreRelation", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "Basedata_Kitting", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + Code = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + Name = table.Column(type: "nvarchar(1024)", maxLength: 1024, nullable: true), + ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true), + ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: true), + CreationTime = table.Column(type: "datetime2", nullable: false), + CreatorId = table.Column(type: "uniqueidentifier", nullable: true), + LastModificationTime = table.Column(type: "datetime2", nullable: true), + LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + Remark = table.Column(type: "nvarchar(3072)", maxLength: 3072, nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_Basedata_Kitting", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "Basedata_Location", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + Code = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + Name = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + Description = table.Column(type: "nvarchar(1024)", maxLength: 1024, nullable: true), + Type = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + ErpLocationCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + WarehouseCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + AreaCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + LocationGroupCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + WorkGroupCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + ShelfCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + RowCode = table.Column(type: "int", nullable: false, defaultValue: 1), + ColumnCode = table.Column(type: "int", nullable: false, defaultValue: 1), + DefaultInventoryStatus = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + PickPriority = table.Column(type: "int", nullable: false, defaultValue: 0), + PickOrder = table.Column(type: "int", nullable: false, defaultValue: 0), + EnableMixItem = table.Column(type: "bit", nullable: false, defaultValue: true), + EnableMixLot = table.Column(type: "bit", nullable: false, defaultValue: true), + EnableMixStatus = table.Column(type: "bit", nullable: false, defaultValue: true), + EnableNegative = table.Column(type: "bit", nullable: false, defaultValue: true), + EnableKeepZero = table.Column(type: "bit", nullable: false, defaultValue: true), + EnableOpportunityCount = table.Column(type: "bit", nullable: false, defaultValue: true), + EnablePick = table.Column(type: "bit", nullable: false, defaultValue: true), + EnableOverPick = table.Column(type: "bit", nullable: false, defaultValue: true), + EnableWholeStore = table.Column(type: "bit", nullable: false, defaultValue: true), + EnableBreakStore = table.Column(type: "bit", nullable: false, defaultValue: true), + EnableShip = table.Column(type: "bit", nullable: false, defaultValue: true), + EnableReceive = table.Column(type: "bit", nullable: false, defaultValue: true), + EnableReturnToSupplier = table.Column(type: "bit", nullable: false, defaultValue: true), + EnableReturnFromCustomer = table.Column(type: "bit", nullable: false, defaultValue: true), + EnableSplitBox = table.Column(type: "bit", nullable: false, defaultValue: true), + EnableSplitPallet = table.Column(type: "bit", nullable: false, defaultValue: true), + ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true), + ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: true), + CreationTime = table.Column(type: "datetime2", nullable: false), + CreatorId = table.Column(type: "uniqueidentifier", nullable: true), + LastModificationTime = table.Column(type: "datetime2", nullable: true), + LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + Remark = table.Column(type: "nvarchar(3072)", maxLength: 3072, nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_Basedata_Location", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "Basedata_LocationGroup", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + Code = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + Name = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + Description = table.Column(type: "nvarchar(1024)", maxLength: 1024, nullable: true), + WarehouseCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + AreaCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + GroupType = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + DefaultInventoryStatus = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + PickPriority = table.Column(type: "int", nullable: false, defaultValue: 0), + OverflowLocationGroup = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + EnableMixItem = table.Column(type: "bit", nullable: false, defaultValue: true), + EnableMixLot = table.Column(type: "bit", nullable: false, defaultValue: true), + EnableMixStatus = table.Column(type: "bit", nullable: false, defaultValue: true), + EnableNegative = table.Column(type: "bit", nullable: false, defaultValue: true), + EnableKeepZero = table.Column(type: "bit", nullable: false, defaultValue: true), + EnableOpportunityCount = table.Column(type: "bit", nullable: false, defaultValue: true), + EnablePick = table.Column(type: "bit", nullable: false, defaultValue: true), + EnableOverPick = table.Column(type: "bit", nullable: false, defaultValue: true), + EnableWholeStore = table.Column(type: "bit", nullable: false, defaultValue: true), + EnableBreakStore = table.Column(type: "bit", nullable: false, defaultValue: true), + EnableShip = table.Column(type: "bit", nullable: false, defaultValue: true), + EnableReceive = table.Column(type: "bit", nullable: false, defaultValue: true), + EnableReturnToSupplier = table.Column(type: "bit", nullable: false, defaultValue: true), + EnableReturnFromCustomer = table.Column(type: "bit", nullable: false, defaultValue: true), + EnableSplitBox = table.Column(type: "bit", nullable: false, defaultValue: true), + EnableSplitPallet = table.Column(type: "bit", nullable: false, defaultValue: true), + ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true), + ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: true), + CreationTime = table.Column(type: "datetime2", nullable: false), + CreatorId = table.Column(type: "uniqueidentifier", nullable: true), + LastModificationTime = table.Column(type: "datetime2", nullable: true), + LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + Remark = table.Column(type: "nvarchar(3072)", maxLength: 3072, nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_Basedata_LocationGroup", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "Basedata_Machine", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + ProdLineId = table.Column(type: "uniqueidentifier", nullable: false), + WorkStationId = table.Column(type: "uniqueidentifier", nullable: false), + Name = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + Code = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + Description = table.Column(type: "nvarchar(1024)", maxLength: 1024, nullable: true), + Type = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true), + ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: true), + CreationTime = table.Column(type: "datetime2", nullable: false), + CreatorId = table.Column(type: "uniqueidentifier", nullable: true), + LastModificationTime = table.Column(type: "datetime2", nullable: true), + LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + Remark = table.Column(type: "nvarchar(3072)", maxLength: 3072, nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_Basedata_Machine", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "Basedata_PositionCode", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + Code = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + PartCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + PartName = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + PartDesc = table.Column(type: "nvarchar(max)", nullable: true), + BasicUom = table.Column(type: "nvarchar(max)", nullable: true), + LocationCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + LocationName = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + StdPackQty = table.Column(type: "decimal(18,6)", nullable: false), + Type = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true), + ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: true), + CreationTime = table.Column(type: "datetime2", nullable: false), + CreatorId = table.Column(type: "uniqueidentifier", nullable: true), + LastModificationTime = table.Column(type: "datetime2", nullable: true), + LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + Remark = table.Column(type: "nvarchar(3072)", maxLength: 3072, nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_Basedata_PositionCode", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "Basedata_ProductionLine", + columns: table => new + { + Code = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + Name = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + Description = table.Column(type: "nvarchar(1024)", maxLength: 1024, nullable: true), + Type = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + RawLocationCodeListJson = table.Column(type: "nvarchar(max)", nullable: true), + ProductLocationCodeListJson = table.Column(type: "nvarchar(max)", nullable: true), + WipLocationCodeListJson = table.Column(type: "nvarchar(max)", nullable: true), + Id = table.Column(type: "uniqueidentifier", nullable: false), + ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true), + ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: true), + CreationTime = table.Column(type: "datetime2", nullable: false), + CreatorId = table.Column(type: "uniqueidentifier", nullable: true), + LastModificationTime = table.Column(type: "datetime2", nullable: true), + LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + Remark = table.Column(type: "nvarchar(3072)", maxLength: 3072, nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_Basedata_ProductionLine", x => x.Code); + }); + + migrationBuilder.CreateTable( + name: "Basedata_ProductionLineItem", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + ProdLineCode = table.Column(type: "nvarchar(450)", nullable: false), + ItemCode = table.Column(type: "nvarchar(450)", nullable: false), + ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true), + ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: true), + CreationTime = table.Column(type: "datetime2", nullable: false), + CreatorId = table.Column(type: "uniqueidentifier", nullable: true), + LastModificationTime = table.Column(type: "datetime2", nullable: true), + LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + Remark = table.Column(type: "nvarchar(3072)", maxLength: 3072, nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_Basedata_ProductionLineItem", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "Basedata_Project", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + Code = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + Name = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + Description = table.Column(type: "nvarchar(1024)", maxLength: 1024, nullable: true), + CustomerCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + BeginTime = table.Column(type: "datetime2", nullable: true), + EndTime = table.Column(type: "datetime2", nullable: true), + ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true), + ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: true), + CreationTime = table.Column(type: "datetime2", nullable: false), + CreatorId = table.Column(type: "uniqueidentifier", nullable: true), + LastModificationTime = table.Column(type: "datetime2", nullable: true), + LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + Remark = table.Column(type: "nvarchar(3072)", maxLength: 3072, nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_Basedata_Project", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "Basedata_PurchasePriceSheet", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + ItemCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + SupplierCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + Description = table.Column(type: "nvarchar(1024)", maxLength: 1024, nullable: true), + PurchasePrice = table.Column(type: "decimal(18,6)", nullable: false), + ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true), + ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: true), + CreationTime = table.Column(type: "datetime2", nullable: false), + CreatorId = table.Column(type: "uniqueidentifier", nullable: true), + LastModificationTime = table.Column(type: "datetime2", nullable: true), + LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + Remark = table.Column(type: "nvarchar(3072)", maxLength: 3072, nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_Basedata_PurchasePriceSheet", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "Basedata_SalePriceSheet", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + CustomerCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + ItemCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + Description = table.Column(type: "nvarchar(1024)", maxLength: 1024, nullable: true), + SalePrice = table.Column(type: "decimal(18,6)", nullable: false), + ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true), + ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: true), + CreationTime = table.Column(type: "datetime2", nullable: false), + CreatorId = table.Column(type: "uniqueidentifier", nullable: true), + LastModificationTime = table.Column(type: "datetime2", nullable: true), + LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + Remark = table.Column(type: "nvarchar(3072)", maxLength: 3072, nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_Basedata_SalePriceSheet", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "Basedata_Shift", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + Code = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + Name = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + Description = table.Column(type: "nvarchar(1024)", maxLength: 1024, nullable: true), + BeginTime = table.Column(type: "datetime2", nullable: true), + EndTime = table.Column(type: "datetime2", nullable: true), + EndAtNextDay = table.Column(type: "bit", nullable: false), + ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true), + ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: true), + CreationTime = table.Column(type: "datetime2", nullable: false), + CreatorId = table.Column(type: "uniqueidentifier", nullable: true), + LastModificationTime = table.Column(type: "datetime2", nullable: true), + LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + Remark = table.Column(type: "nvarchar(3072)", maxLength: 3072, nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_Basedata_Shift", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "Basedata_SplitPackingRec", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + OprType = table.Column(type: "int", nullable: false), + FromPackingCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + FromTopPackingCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + FromStdPackQty = table.Column(type: "decimal(18,6)", nullable: false), + FromUom = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + FromQty = table.Column(type: "decimal(18,6)", precision: 18, scale: 6, nullable: false), + ToPackingCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + ToTopPackingCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + ToStdPackQty = table.Column(type: "decimal(18,6)", nullable: false), + ToUom = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + ToQty = table.Column(type: "decimal(18,6)", precision: 18, scale: 6, nullable: false), + ItemCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + ItemName = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + ItemDesc1 = table.Column(type: "nvarchar(1024)", maxLength: 1024, nullable: true), + ItemDesc2 = table.Column(type: "nvarchar(1024)", maxLength: 1024, nullable: true), + FromLot = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + ToLot = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + PurchaseInfo_PoNumber = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + PurchaseInfo_AsnNumber = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + ArrivalNoticNumber = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + TaskOrderNumber = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + ReceiptRecNumber = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + PutOnShelfNumber = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + LabelType = table.Column(type: "int", nullable: false), + ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true), + ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: true), + CreationTime = table.Column(type: "datetime2", nullable: false), + CreatorId = table.Column(type: "uniqueidentifier", nullable: true), + LastModificationTime = table.Column(type: "datetime2", nullable: true), + LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + Remark = table.Column(type: "nvarchar(max)", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_Basedata_SplitPackingRec", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "Basedata_StdCostPriceSheet", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + ItemCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + Description = table.Column(type: "nvarchar(1024)", maxLength: 1024, nullable: true), + StdCostPrice = table.Column(type: "decimal(18,6)", nullable: false), + ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true), + ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: true), + CreationTime = table.Column(type: "datetime2", nullable: false), + CreatorId = table.Column(type: "uniqueidentifier", nullable: true), + LastModificationTime = table.Column(type: "datetime2", nullable: true), + LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + Remark = table.Column(type: "nvarchar(3072)", maxLength: 3072, nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_Basedata_StdCostPriceSheet", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "Basedata_Supplier", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + Code = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + Name = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + ShortName = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + Address = table.Column(type: "nvarchar(1024)", maxLength: 1024, nullable: true), + Country = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + City = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + Phone = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + Fax = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + PostID = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + Contacts = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + Bank = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + Currency = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + TaxRate = table.Column(type: "decimal(18,6)", nullable: false), + IsActive = table.Column(type: "bit", nullable: false, defaultValue: true), + Type = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true), + ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: true), + CreationTime = table.Column(type: "datetime2", nullable: false), + CreatorId = table.Column(type: "uniqueidentifier", nullable: true), + LastModificationTime = table.Column(type: "datetime2", nullable: true), + LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + Remark = table.Column(type: "nvarchar(3072)", maxLength: 3072, nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_Basedata_Supplier", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "Basedata_SupplierItem", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + SupplierCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + SupplierSimpleName = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + ItemCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + ItemName = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + SupplierItemCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + Version = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + SupplierPackUom = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + SupplierPackQty = table.Column(type: "decimal(18,6)", nullable: false), + QtyPerPallet = table.Column(type: "decimal(18,6)", nullable: false), + ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true), + ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: true), + CreationTime = table.Column(type: "datetime2", nullable: false), + CreatorId = table.Column(type: "uniqueidentifier", nullable: true), + LastModificationTime = table.Column(type: "datetime2", nullable: true), + LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + Remark = table.Column(type: "nvarchar(3072)", maxLength: 3072, nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_Basedata_SupplierItem", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "Basedata_SupplierTimeWindow", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + SupplierCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + SupplierName = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + TimeSlot = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + Week = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true), + ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: true), + CreationTime = table.Column(type: "datetime2", nullable: false), + CreatorId = table.Column(type: "uniqueidentifier", nullable: true), + LastModificationTime = table.Column(type: "datetime2", nullable: true), + LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + Remark = table.Column(type: "nvarchar(3072)", maxLength: 3072, nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_Basedata_SupplierTimeWindow", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "Basedata_Team", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + Code = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + Name = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + Description = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + Members = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true), + ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: true), + CreationTime = table.Column(type: "datetime2", nullable: false), + CreatorId = table.Column(type: "uniqueidentifier", nullable: true), + LastModificationTime = table.Column(type: "datetime2", nullable: true), + LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + Remark = table.Column(type: "nvarchar(3072)", maxLength: 3072, nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_Basedata_Team", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "Basedata_TransactionType", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + TransType = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + TransSubType = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + Description = table.Column(type: "nvarchar(1024)", maxLength: 1024, nullable: false), + InLocationTypes = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + OutLocationTypes = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + InLocationAreas = table.Column(type: "nvarchar(max)", nullable: true), + OutLocationAreas = table.Column(type: "nvarchar(max)", nullable: true), + ItemStatuses = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + ItemTypes = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + InInventoryStatuses = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + OutInventoryStatuses = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + AutoSubmitRequest = table.Column(type: "bit", nullable: false), + AutoAgreeRequest = table.Column(type: "bit", nullable: false), + AutoHandleRequest = table.Column(type: "bit", nullable: false), + AutoCompleteJob = table.Column(type: "bit", nullable: false), + DirectCreateNote = table.Column(type: "bit", nullable: false), + Enabled = table.Column(type: "bit", nullable: false), + ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true), + ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: true), + CreationTime = table.Column(type: "datetime2", nullable: false), + CreatorId = table.Column(type: "uniqueidentifier", nullable: true), + LastModificationTime = table.Column(type: "datetime2", nullable: true), + LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + Remark = table.Column(type: "nvarchar(3072)", maxLength: 3072, nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_Basedata_TransactionType", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "Basedata_Uom", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + Name = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + Code = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + Description = table.Column(type: "nvarchar(1024)", maxLength: 1024, nullable: true), + Type = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true), + ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: true), + CreationTime = table.Column(type: "datetime2", nullable: false), + CreatorId = table.Column(type: "uniqueidentifier", nullable: true), + LastModificationTime = table.Column(type: "datetime2", nullable: true), + LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + Remark = table.Column(type: "nvarchar(3072)", maxLength: 3072, nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_Basedata_Uom", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "Basedata_Warehouse", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + Code = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + Name = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + Description = table.Column(type: "nvarchar(1024)", maxLength: 1024, nullable: true), + ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true), + ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: true), + CreationTime = table.Column(type: "datetime2", nullable: false), + CreatorId = table.Column(type: "uniqueidentifier", nullable: true), + LastModificationTime = table.Column(type: "datetime2", nullable: true), + LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + Remark = table.Column(type: "nvarchar(3072)", maxLength: 3072, nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_Basedata_Warehouse", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "Basedata_WorkGroup", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + Code = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + Name = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + Description = table.Column(type: "nvarchar(1024)", maxLength: 1024, nullable: true), + WarehouseCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true), + ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: true), + CreationTime = table.Column(type: "datetime2", nullable: false), + CreatorId = table.Column(type: "uniqueidentifier", nullable: true), + LastModificationTime = table.Column(type: "datetime2", nullable: true), + LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + Remark = table.Column(type: "nvarchar(3072)", maxLength: 3072, nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_Basedata_WorkGroup", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "Basedata_WorkShop", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + Code = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + Name = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + Description = table.Column(type: "nvarchar(1024)", maxLength: 1024, nullable: true), + ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true), + ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: true), + CreationTime = table.Column(type: "datetime2", nullable: false), + CreatorId = table.Column(type: "uniqueidentifier", nullable: true), + LastModificationTime = table.Column(type: "datetime2", nullable: true), + LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + Remark = table.Column(type: "nvarchar(3072)", maxLength: 3072, nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_Basedata_WorkShop", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "Basedata_WorkStation", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + Code = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + Name = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + Description = table.Column(type: "nvarchar(1024)", maxLength: 1024, nullable: true), + ProductionLineCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + RawLocationCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + ProductLocationCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + Type = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true), + ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: true), + CreationTime = table.Column(type: "datetime2", nullable: false), + CreatorId = table.Column(type: "uniqueidentifier", nullable: true), + LastModificationTime = table.Column(type: "datetime2", nullable: true), + LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + Remark = table.Column(type: "nvarchar(3072)", maxLength: 3072, nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_Basedata_WorkStation", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "Basedata_DictItem", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + MasterId = table.Column(type: "uniqueidentifier", nullable: false), + Code = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + Name = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + Value = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + Description = table.Column(type: "nvarchar(1024)", maxLength: 1024, nullable: true), + Enabled = table.Column(type: "bit", nullable: false), + Remark = table.Column(type: "nvarchar(3072)", maxLength: 3072, nullable: true), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + CreationTime = table.Column(type: "datetime2", nullable: false), + CreatorId = table.Column(type: "uniqueidentifier", nullable: true), + LastModificationTime = table.Column(type: "datetime2", nullable: true), + LastModifierId = table.Column(type: "uniqueidentifier", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_Basedata_DictItem", x => x.Id); + table.ForeignKey( + name: "FK_Basedata_DictItem_Basedata_Dict_MasterId", + column: x => x.MasterId, + principalTable: "Basedata_Dict", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }); + + migrationBuilder.CreateTable( + name: "Basedata_KittingDetail", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + MasterId = table.Column(type: "uniqueidentifier", nullable: false), + PartCode = table.Column(type: "nvarchar(max)", nullable: true), + Desc1 = table.Column(type: "nvarchar(1024)", maxLength: 1024, nullable: true), + Desc2 = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + Qty = table.Column(type: "decimal(18,2)", nullable: false), + Conf = table.Column(type: "nvarchar(max)", nullable: true), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + Remark = table.Column(type: "nvarchar(3072)", maxLength: 3072, nullable: true), + CreationTime = table.Column(type: "datetime2", nullable: false), + CreatorId = table.Column(type: "uniqueidentifier", nullable: true), + LastModificationTime = table.Column(type: "datetime2", nullable: true), + LastModifierId = table.Column(type: "uniqueidentifier", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_Basedata_KittingDetail", x => x.Id); + table.ForeignKey( + name: "FK_Basedata_KittingDetail_Basedata_Kitting_MasterId", + column: x => x.MasterId, + principalTable: "Basedata_Kitting", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }); + + migrationBuilder.CreateIndex( + name: "IX_Basedata_AQL_SupplierCode_ItemCode_FloorQty", + table: "Basedata_AQL", + columns: new[] { "SupplierCode", "ItemCode", "FloorQty" }, + unique: true); + + migrationBuilder.CreateIndex( + name: "IX_Basedata_Area_Code", + table: "Basedata_Area", + column: "Code", + unique: true); + + migrationBuilder.CreateIndex( + name: "IX_Basedata_Bom_Product_Component", + table: "Basedata_Bom", + columns: new[] { "Product", "Component" }, + unique: true); + + migrationBuilder.CreateIndex( + name: "IX_Basedata_Calendar_Module", + table: "Basedata_Calendar", + column: "Module", + unique: true, + filter: "[Module] IS NOT NULL"); + + migrationBuilder.CreateIndex( + name: "IX_Basedata_Category_Code", + table: "Basedata_Category", + column: "Code", + unique: true); + + migrationBuilder.CreateIndex( + name: "IX_Basedata_Currency_Code", + table: "Basedata_Currency", + column: "Code", + unique: true); + + migrationBuilder.CreateIndex( + name: "IX_Basedata_CurrencyExchange_CurrencyId_BasicCurrencyId", + table: "Basedata_CurrencyExchange", + columns: new[] { "CurrencyId", "BasicCurrencyId" }, + unique: true); + + migrationBuilder.CreateIndex( + name: "IX_Basedata_Customer_Code", + table: "Basedata_Customer", + column: "Code", + unique: true); + + migrationBuilder.CreateIndex( + name: "IX_Basedata_CustomerAddress_Code_CustomerCode", + table: "Basedata_CustomerAddress", + columns: new[] { "Code", "CustomerCode" }, + unique: true); + + migrationBuilder.CreateIndex( + name: "IX_Basedata_CustomerItem_CustomerCode_ItemCode", + table: "Basedata_CustomerItem", + columns: new[] { "CustomerCode", "ItemCode" }, + unique: true); + + migrationBuilder.CreateIndex( + name: "IX_Basedata_Dict_Code", + table: "Basedata_Dict", + column: "Code", + unique: true); + + migrationBuilder.CreateIndex( + name: "IX_Basedata_DictItem_MasterId", + table: "Basedata_DictItem", + column: "MasterId"); + + migrationBuilder.CreateIndex( + name: "IX_Basedata_Dock_Code", + table: "Basedata_Dock", + column: "Code", + unique: true); + + migrationBuilder.CreateIndex( + name: "IX_Basedata_DocumentSetting_Code", + table: "Basedata_DocumentSetting", + column: "Code", + unique: true); + + migrationBuilder.CreateIndex( + name: "IX_Basedata_Equipment_Code", + table: "Basedata_Equipment", + column: "Code", + unique: true); + + migrationBuilder.CreateIndex( + name: "IX_Basedata_EquipmentLoc_Code_LocCode", + table: "Basedata_EquipmentLoc", + columns: new[] { "Code", "LocCode" }, + unique: true); + + migrationBuilder.CreateIndex( + name: "IX_Basedata_EquipmentLocCap_Code", + table: "Basedata_EquipmentLocCap", + column: "Code", + unique: true); + + migrationBuilder.CreateIndex( + name: "IX_Basedata_EquipmentPartCode_Code_PartCode", + table: "Basedata_EquipmentPartCode", + columns: new[] { "Code", "PartCode" }, + unique: true); + + migrationBuilder.CreateIndex( + name: "IX_Basedata_ErpLocation_Code", + table: "Basedata_ErpLocation", + column: "Code", + unique: true); + + migrationBuilder.CreateIndex( + name: "IX_Basedata_InterfaceCalendar_Code", + table: "Basedata_InterfaceCalendar", + column: "Code", + unique: true); + + migrationBuilder.CreateIndex( + name: "IX_Basedata_ItemBasic_Code", + table: "Basedata_ItemBasic", + column: "Code", + unique: true); + + migrationBuilder.CreateIndex( + name: "IX_Basedata_ItemCategory_CategoryCode_ItemCode", + table: "Basedata_ItemCategory", + columns: new[] { "CategoryCode", "ItemCode" }, + unique: true); + + migrationBuilder.CreateIndex( + name: "IX_Basedata_ItemGuideBook_ItemCode", + table: "Basedata_ItemGuideBook", + column: "ItemCode", + unique: true); + + migrationBuilder.CreateIndex( + name: "IX_Basedata_ItemPack_ItemCode_PackCode", + table: "Basedata_ItemPack", + columns: new[] { "ItemCode", "PackCode" }, + unique: true); + + migrationBuilder.CreateIndex( + name: "IX_Basedata_ItemQuality_ItemCode_SupplierCode", + table: "Basedata_ItemQuality", + columns: new[] { "ItemCode", "SupplierCode" }, + unique: true); + + migrationBuilder.CreateIndex( + name: "IX_Basedata_ItemSafetyStock_ItemCode_WarehouseCode_StoreRelationType_StoreValue", + table: "Basedata_ItemSafetyStock", + columns: new[] { "ItemCode", "WarehouseCode", "StoreRelationType", "StoreValue" }, + unique: true, + filter: "[StoreValue] IS NOT NULL"); + + migrationBuilder.CreateIndex( + name: "IX_Basedata_ItemStoreRelation_ItemCode_StoreRelationType_StoreValue", + table: "Basedata_ItemStoreRelation", + columns: new[] { "ItemCode", "StoreRelationType", "StoreValue" }, + unique: true, + filter: "[StoreValue] IS NOT NULL"); + + migrationBuilder.CreateIndex( + name: "IX_Basedata_Kitting_Code", + table: "Basedata_Kitting", + column: "Code", + unique: true); + + migrationBuilder.CreateIndex( + name: "IX_Basedata_KittingDetail_MasterId", + table: "Basedata_KittingDetail", + column: "MasterId"); + + migrationBuilder.CreateIndex( + name: "IX_Basedata_Location_Code", + table: "Basedata_Location", + column: "Code", + unique: true); + + migrationBuilder.CreateIndex( + name: "IX_Basedata_LocationGroup_Code", + table: "Basedata_LocationGroup", + column: "Code", + unique: true); + + migrationBuilder.CreateIndex( + name: "IX_Basedata_Machine_Code", + table: "Basedata_Machine", + column: "Code", + unique: true); + + migrationBuilder.CreateIndex( + name: "IX_Basedata_PositionCode_Code", + table: "Basedata_PositionCode", + column: "Code", + unique: true); + + migrationBuilder.CreateIndex( + name: "IX_Basedata_PositionCode_Code_PartCode_LocationCode", + table: "Basedata_PositionCode", + columns: new[] { "Code", "PartCode", "LocationCode" }, + unique: true, + filter: "[PartCode] IS NOT NULL AND [LocationCode] IS NOT NULL"); + + migrationBuilder.CreateIndex( + name: "IX_Basedata_PositionCode_PartCode", + table: "Basedata_PositionCode", + column: "PartCode", + unique: true, + filter: "[PartCode] IS NOT NULL"); + + migrationBuilder.CreateIndex( + name: "IX_Basedata_ProductionLine_Code", + table: "Basedata_ProductionLine", + column: "Code", + unique: true); + + migrationBuilder.CreateIndex( + name: "IX_Basedata_ProductionLineItem_ProdLineCode_ItemCode", + table: "Basedata_ProductionLineItem", + columns: new[] { "ProdLineCode", "ItemCode" }, + unique: true); + + migrationBuilder.CreateIndex( + name: "IX_Basedata_Project_Code", + table: "Basedata_Project", + column: "Code", + unique: true); + + migrationBuilder.CreateIndex( + name: "IX_Basedata_PurchasePriceSheet_ItemCode_SupplierCode", + table: "Basedata_PurchasePriceSheet", + columns: new[] { "ItemCode", "SupplierCode" }, + unique: true, + filter: "[ItemCode] IS NOT NULL AND [SupplierCode] IS NOT NULL"); + + migrationBuilder.CreateIndex( + name: "IX_Basedata_SalePriceSheet_CustomerCode_ItemCode", + table: "Basedata_SalePriceSheet", + columns: new[] { "CustomerCode", "ItemCode" }, + unique: true, + filter: "[CustomerCode] IS NOT NULL"); + + migrationBuilder.CreateIndex( + name: "IX_Basedata_Shift_Code", + table: "Basedata_Shift", + column: "Code", + unique: true); + + migrationBuilder.CreateIndex( + name: "IX_Basedata_SplitPackingRec_FromPackingCode_ToPackingCode", + table: "Basedata_SplitPackingRec", + columns: new[] { "FromPackingCode", "ToPackingCode" }); + + migrationBuilder.CreateIndex( + name: "IX_Basedata_SplitPackingRec_ToPackingCode", + table: "Basedata_SplitPackingRec", + column: "ToPackingCode"); + + migrationBuilder.CreateIndex( + name: "IX_Basedata_StdCostPriceSheet_ItemCode", + table: "Basedata_StdCostPriceSheet", + column: "ItemCode", + unique: true); + + migrationBuilder.CreateIndex( + name: "IX_Basedata_Supplier_Code", + table: "Basedata_Supplier", + column: "Code", + unique: true); + + migrationBuilder.CreateIndex( + name: "IX_Basedata_SupplierItem_SupplierCode_ItemCode", + table: "Basedata_SupplierItem", + columns: new[] { "SupplierCode", "ItemCode" }, + unique: true); + + migrationBuilder.CreateIndex( + name: "IX_Basedata_SupplierTimeWindow_SupplierCode_TimeSlot_Week", + table: "Basedata_SupplierTimeWindow", + columns: new[] { "SupplierCode", "TimeSlot", "Week" }, + unique: true); + + migrationBuilder.CreateIndex( + name: "IX_Basedata_Team_Code", + table: "Basedata_Team", + column: "Code", + unique: true); + + migrationBuilder.CreateIndex( + name: "IX_Basedata_TransactionType_TransType_TransSubType", + table: "Basedata_TransactionType", + columns: new[] { "TransType", "TransSubType" }, + unique: true); + + migrationBuilder.CreateIndex( + name: "IX_Basedata_Uom_Code", + table: "Basedata_Uom", + column: "Code", + unique: true); + + migrationBuilder.CreateIndex( + name: "IX_Basedata_Warehouse_Code", + table: "Basedata_Warehouse", + column: "Code", + unique: true); + + migrationBuilder.CreateIndex( + name: "IX_Basedata_WorkGroup_Code", + table: "Basedata_WorkGroup", + column: "Code", + unique: true); + + migrationBuilder.CreateIndex( + name: "IX_Basedata_WorkShop_Code", + table: "Basedata_WorkShop", + column: "Code", + unique: true); + + migrationBuilder.CreateIndex( + name: "IX_Basedata_WorkStation_Code", + table: "Basedata_WorkStation", + column: "Code", + unique: true); + } + + protected override void Down(MigrationBuilder migrationBuilder) + { + migrationBuilder.DropTable( + name: "Basedata_AQL"); + + migrationBuilder.DropTable( + name: "Basedata_Area"); + + migrationBuilder.DropTable( + name: "Basedata_Bom"); + + migrationBuilder.DropTable( + name: "Basedata_Calendar"); + + migrationBuilder.DropTable( + name: "Basedata_Category"); + + migrationBuilder.DropTable( + name: "Basedata_Currency"); + + migrationBuilder.DropTable( + name: "Basedata_CurrencyExchange"); + + migrationBuilder.DropTable( + name: "Basedata_Customer"); + + migrationBuilder.DropTable( + name: "Basedata_CustomerAddress"); + + migrationBuilder.DropTable( + name: "Basedata_CustomerItem"); + + migrationBuilder.DropTable( + name: "Basedata_DictItem"); + + migrationBuilder.DropTable( + name: "Basedata_Dock"); + + migrationBuilder.DropTable( + name: "Basedata_DocumentSetting"); + + migrationBuilder.DropTable( + name: "Basedata_Equipment"); + + migrationBuilder.DropTable( + name: "Basedata_EquipmentLoc"); + + migrationBuilder.DropTable( + name: "Basedata_EquipmentLocCap"); + + migrationBuilder.DropTable( + name: "Basedata_EquipmentPartCode"); + + migrationBuilder.DropTable( + name: "Basedata_ErpLocation"); + + migrationBuilder.DropTable( + name: "Basedata_InterfaceCalendar"); + + migrationBuilder.DropTable( + name: "Basedata_ItemBasic"); + + migrationBuilder.DropTable( + name: "Basedata_ItemCategory"); + + migrationBuilder.DropTable( + name: "Basedata_ItemGuideBook"); + + migrationBuilder.DropTable( + name: "Basedata_ItemPack"); + + migrationBuilder.DropTable( + name: "Basedata_ItemQuality"); + + migrationBuilder.DropTable( + name: "Basedata_ItemSafetyStock"); + + migrationBuilder.DropTable( + name: "Basedata_ItemStoreRelation"); + + migrationBuilder.DropTable( + name: "Basedata_KittingDetail"); + + migrationBuilder.DropTable( + name: "Basedata_Location"); + + migrationBuilder.DropTable( + name: "Basedata_LocationGroup"); + + migrationBuilder.DropTable( + name: "Basedata_Machine"); + + migrationBuilder.DropTable( + name: "Basedata_PositionCode"); + + migrationBuilder.DropTable( + name: "Basedata_ProductionLine"); + + migrationBuilder.DropTable( + name: "Basedata_ProductionLineItem"); + + migrationBuilder.DropTable( + name: "Basedata_Project"); + + migrationBuilder.DropTable( + name: "Basedata_PurchasePriceSheet"); + + migrationBuilder.DropTable( + name: "Basedata_SalePriceSheet"); + + migrationBuilder.DropTable( + name: "Basedata_Shift"); + + migrationBuilder.DropTable( + name: "Basedata_SplitPackingRec"); + + migrationBuilder.DropTable( + name: "Basedata_StdCostPriceSheet"); + + migrationBuilder.DropTable( + name: "Basedata_Supplier"); + + migrationBuilder.DropTable( + name: "Basedata_SupplierItem"); + + migrationBuilder.DropTable( + name: "Basedata_SupplierTimeWindow"); + + migrationBuilder.DropTable( + name: "Basedata_Team"); + + migrationBuilder.DropTable( + name: "Basedata_TransactionType"); + + migrationBuilder.DropTable( + name: "Basedata_Uom"); + + migrationBuilder.DropTable( + name: "Basedata_Warehouse"); + + migrationBuilder.DropTable( + name: "Basedata_WorkGroup"); + + migrationBuilder.DropTable( + name: "Basedata_WorkShop"); + + migrationBuilder.DropTable( + name: "Basedata_WorkStation"); + + migrationBuilder.DropTable( + name: "Basedata_Dict"); + + migrationBuilder.DropTable( + name: "Basedata_Kitting"); + } + } +} diff --git a/be/Modules/BaseData/src/Win_in.Sfs.Basedata.EntityFrameworkCore/Migrations/BasedataDbContextModelSnapshot.cs b/be/Modules/BaseData/src/Win_in.Sfs.Basedata.EntityFrameworkCore/Migrations/BasedataDbContextModelSnapshot.cs new file mode 100644 index 000000000..02214cf52 --- /dev/null +++ b/be/Modules/BaseData/src/Win_in.Sfs.Basedata.EntityFrameworkCore/Migrations/BasedataDbContextModelSnapshot.cs @@ -0,0 +1,4156 @@ +// +using System; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Metadata; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; +using Volo.Abp.EntityFrameworkCore; +using Win_in.Sfs.Basedata.EntityFrameworkCore; + +#nullable disable + +namespace Win_in.Sfs.Basedata.Migrations +{ + [DbContext(typeof(BasedataDbContext))] + partial class BasedataDbContextModelSnapshot : ModelSnapshot + { + protected override void BuildModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder + .HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.SqlServer) + .HasAnnotation("ProductVersion", "6.0.13") + .HasAnnotation("Relational:MaxIdentifierLength", 128); + + SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder, 1L, 1); + + modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.AQL", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AbcClass") + .HasColumnType("nvarchar(max)"); + + b.Property("CeilingQty") + .HasColumnType("decimal(18,6)"); + + 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("FloorQty") + .HasColumnType("decimal(18,6)"); + + b.Property("IsUsePercent") + .HasColumnType("bit"); + + b.Property("ItemCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("SamplePercent") + .HasColumnType("decimal(18,6)"); + + b.Property("SampleQty") + .HasColumnType("decimal(18,6)"); + + b.Property("SupplierCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("SupplierCode", "ItemCode", "FloorQty") + .IsUnique(); + + b.ToTable("Basedata_AQL", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.Area", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AreaType") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + 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("Description") + .HasMaxLength(1024) + .HasColumnType("nvarchar(1024)"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("IsFunctional") + .HasColumnType("bit"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Name") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("WarehouseCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.HasKey("Id"); + + b.HasIndex("Code") + .IsUnique(); + + b.ToTable("Basedata_Area", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.Bom", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("BeginTime") + .HasColumnType("datetime2"); + + b.Property("Component") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ComponentQty") + .HasColumnType("decimal(18,6)"); + + b.Property("ComponentUom") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + 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("DistributionType") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ERPOp") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("EndTime") + .HasColumnType("datetime2"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Layer") + .ValueGeneratedOnAdd() + .HasMaxLength(64) + .HasColumnType("int") + .HasDefaultValue(1); + + b.Property("MFGOp") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("PlannedSplitRule") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Product") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("TruncType") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.HasKey("Id"); + + b.HasIndex("Product", "Component") + .IsUnique(); + + b.ToTable("Basedata_Bom", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.Calendar", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("BeginTime") + .HasColumnType("datetime2"); + + 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("EndTime") + .HasColumnType("datetime2"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Module") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)"); + + b.Property("Status") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("Module") + .IsUnique() + .HasFilter("[Module] IS NOT NULL"); + + b.ToTable("Basedata_Calendar", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.Category", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + 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("Description") + .HasMaxLength(1024) + .HasColumnType("nvarchar(1024)"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Name") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("Code") + .IsUnique(); + + b.ToTable("Basedata_Category", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.Currency", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + 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("Description") + .HasMaxLength(1024) + .HasColumnType("nvarchar(1024)"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("IsBasicCurrency") + .HasColumnType("bit"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("Code") + .IsUnique(); + + b.ToTable("Basedata_Currency", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.CurrencyExchange", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("BasicCurrencyId") + .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("CurrencyId") + .HasColumnType("uniqueidentifier"); + + b.Property("EfficetiveTime") + .HasColumnType("datetime2"); + + b.Property("ExpireTime") + .HasColumnType("datetime2"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Rate") + .HasColumnType("decimal(18,6)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("CurrencyId", "BasicCurrencyId") + .IsUnique(); + + b.ToTable("Basedata_CurrencyExchange", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.Customer", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Address") + .HasMaxLength(1024) + .HasColumnType("nvarchar(1024)"); + + b.Property("City") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("Contacts") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Country") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("Currency") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("Fax") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("IsActive") + .HasColumnType("bit"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Name") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Phone") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("PostID") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("ShortName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Type") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.HasKey("Id"); + + b.HasIndex("Code") + .IsUnique(); + + b.ToTable("Basedata_Customer", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.CustomerAddress", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Address") + .HasMaxLength(1024) + .HasColumnType("nvarchar(1024)"); + + b.Property("City") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("Contact") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("CustomerCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Desc") + .HasMaxLength(1024) + .HasColumnType("nvarchar(1024)"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("LocationCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Name") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Remark") + .HasMaxLength(1024) + .HasColumnType("nvarchar(1024)") + .HasColumnName("Remark"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("WarehouseCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.HasKey("Id"); + + b.HasIndex("Code", "CustomerCode") + .IsUnique(); + + b.ToTable("Basedata_CustomerAddress", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.CustomerItem", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("BeginTime") + .HasColumnType("datetime2"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("CustomerCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("CustomerItemCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("CustomerPackQty") + .HasColumnType("decimal(18,6)"); + + b.Property("CustomerPackUom") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("EndTime") + .HasColumnType("datetime2"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("ItemCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Version") + .HasMaxLength(1024) + .HasColumnType("nvarchar(1024)"); + + b.HasKey("Id"); + + b.HasIndex("CustomerCode", "ItemCode") + .IsUnique(); + + b.ToTable("Basedata_CustomerItem", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.Dict", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + 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("Description") + .HasMaxLength(1024) + .HasColumnType("nvarchar(1024)"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Name") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("Code") + .IsUnique(); + + b.ToTable("Basedata_Dict", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.DictItem", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("Description") + .HasMaxLength(1024) + .HasColumnType("nvarchar(1024)"); + + b.Property("Enabled") + .HasColumnType("bit"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("MasterId") + .HasColumnType("uniqueidentifier"); + + b.Property("Name") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Value") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.HasKey("Id"); + + b.HasIndex("MasterId"); + + b.ToTable("Basedata_DictItem", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.Dock", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + 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("DefaultLocationCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Description") + .HasMaxLength(1024) + .HasColumnType("nvarchar(1024)"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Name") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("WarehouseCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.HasKey("Id"); + + b.HasIndex("Code") + .IsUnique(); + + b.ToTable("Basedata_Dock", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.DocumentSetting", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + 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("Description") + .HasMaxLength(1024) + .HasColumnType("nvarchar(1024)"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Name") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("NumberFormat") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("NumberPrefix") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("NumberSeparator") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("NumberSerialLength") + .HasColumnType("int"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("TransactionType") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.HasKey("Id"); + + b.HasIndex("Code") + .IsUnique(); + + b.ToTable("Basedata_DocumentSetting", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.Equipment", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreatTime") + .HasColumnType("datetime2"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("Creator") + .HasColumnType("nvarchar(max)"); + + 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("LocCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Model") + .HasMaxLength(64) + .HasColumnType("int"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("State") + .HasColumnType("int"); + + b.Property("StdQty") + .HasColumnType("decimal(18,6)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Type") + .HasMaxLength(64) + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("Code") + .IsUnique(); + + b.ToTable("Basedata_Equipment", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.EquipmentLoc", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + 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("LocCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("State") + .HasColumnType("int"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("Code", "LocCode") + .IsUnique(); + + b.ToTable("Basedata_EquipmentLoc", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.EquipmentLocCap", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + 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("PartCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Percent") + .HasColumnType("decimal(18,6)"); + + b.Property("Qty") + .HasColumnType("decimal(18,6)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("StdQty") + .HasColumnType("decimal(18,6)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("Code") + .IsUnique(); + + b.ToTable("Basedata_EquipmentLocCap", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.EquipmentPartCode", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + 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("PartCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("State") + .HasColumnType("int"); + + b.Property("StdQty") + .HasColumnType("decimal(18,2)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Unit") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("Code", "PartCode") + .IsUnique(); + + b.ToTable("Basedata_EquipmentPartCode", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.ErpLocation", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + 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("Description") + .HasMaxLength(1024) + .HasColumnType("nvarchar(1024)"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Name") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Type") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("WarehouseCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.HasKey("Id"); + + b.HasIndex("Code") + .IsUnique(); + + b.ToTable("Basedata_ErpLocation", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.InterfaceCalendar", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("BeginTime") + .HasColumnType("datetime2"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("ConvertToTime") + .HasColumnType("datetime2"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("Description") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("EndTime") + .HasColumnType("datetime2"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Month") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Remark") + .HasColumnType("nvarchar(max)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Year") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.HasKey("Id"); + + b.HasIndex("Code") + .IsUnique(); + + b.ToTable("Basedata_InterfaceCalendar", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.ItemBasic", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AbcClass") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("BasicUom") + .HasColumnType("nvarchar(max)"); + + b.Property("CanBuy") + .HasColumnType("bit"); + + b.Property("CanMake") + .HasColumnType("bit"); + + b.Property("CanOutsourcing") + .HasColumnType("bit"); + + b.Property("Category") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Color") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("Configuration") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("Desc1") + .HasMaxLength(1024) + .HasColumnType("nvarchar(1024)"); + + b.Property("Desc2") + .HasMaxLength(1024) + .HasColumnType("nvarchar(1024)"); + + b.Property("Eco") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Elevel") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("Group") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("IsPhantom") + .HasColumnType("bit"); + + b.Property("IsRecycled") + .HasColumnType("bit"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("ManageType") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Name") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Project") + .HasColumnType("nvarchar(max)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("Status") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("StdPackQty") + .HasColumnType("decimal(18,6)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Type") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Validity") + .HasColumnType("int"); + + b.Property("ValidityUnit") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Version") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.HasKey("Id"); + + b.HasIndex("Code") + .IsUnique(); + + b.ToTable("Basedata_ItemBasic", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.ItemCategory", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CategoryCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + 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("ItemCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Value") + .IsRequired() + .HasMaxLength(1024) + .HasColumnType("nvarchar(1024)"); + + b.HasKey("Id"); + + b.HasIndex("CategoryCode", "ItemCode") + .IsUnique(); + + b.ToTable("Basedata_ItemCategory", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.ItemGuideBook", b => + { + b.Property("Id") + .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("Desc1") + .HasColumnType("nvarchar(max)"); + + b.Property("Desc2") + .HasColumnType("nvarchar(max)"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("ItemCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Name") + .HasColumnType("nvarchar(max)"); + + b.Property("PictureBlobName") + .HasColumnType("nvarchar(max)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("Step") + .HasMaxLength(1024) + .HasColumnType("nvarchar(1024)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("ItemCode") + .IsUnique(); + + b.ToTable("Basedata_ItemGuideBook", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.ItemPack", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("BasicUom") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + 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("ItemCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("PackCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("PackName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("PackType") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Qty") + .HasColumnType("decimal(18,6)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("ItemCode", "PackCode") + .IsUnique(); + + b.ToTable("Basedata_ItemPack", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.ItemQuality", b => + { + b.Property("Id") + .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("Description") + .HasMaxLength(1024) + .HasColumnType("nvarchar(1024)"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("InspectType") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ItemCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("Status") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("SupplierCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("ItemCode", "SupplierCode") + .IsUnique(); + + b.ToTable("Basedata_ItemQuality", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.ItemSafetyStock", b => + { + b.Property("Id") + .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("FeedLine") + .HasColumnType("decimal(18,6)"); + + b.Property("FeedQty") + .HasColumnType("decimal(18,6)"); + + b.Property("FeedUM") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ItemCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("MaxStock") + .HasColumnType("decimal(18,6)"); + + b.Property("MinStock") + .HasColumnType("decimal(18,6)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("SafetyStock") + .HasColumnType("decimal(18,6)"); + + b.Property("StoreRelationType") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("StoreValue") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("WarehouseCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.HasKey("Id"); + + b.HasIndex("ItemCode", "WarehouseCode", "StoreRelationType", "StoreValue") + .IsUnique() + .HasFilter("[StoreValue] IS NOT NULL"); + + b.ToTable("Basedata_ItemSafetyStock", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.ItemStoreRelation", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AltUm") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("AltUmQty") + .HasColumnType("decimal(18,6)"); + + 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("Enabled") + .HasColumnType("bit"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("IsFixed") + .HasColumnType("bit"); + + b.Property("ItemCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("MultiLoc") + .HasColumnType("int"); + + b.Property("PramaryUM") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("StoreRelationType") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("StoreUM") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("StoreValue") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("UmQty") + .HasColumnType("decimal(18,6)"); + + b.Property("WarehouseCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.HasKey("Id"); + + b.HasIndex("ItemCode", "StoreRelationType", "StoreValue") + .IsUnique() + .HasFilter("[StoreValue] IS NOT NULL"); + + b.ToTable("Basedata_ItemStoreRelation", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.Kitting", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + 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("Name") + .HasMaxLength(1024) + .HasColumnType("nvarchar(1024)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("Code") + .IsUnique(); + + b.ToTable("Basedata_Kitting", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.KittingDetail", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("Conf") + .HasColumnType("nvarchar(max)"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("Desc1") + .HasMaxLength(1024) + .HasColumnType("nvarchar(1024)"); + + b.Property("Desc2") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("MasterId") + .HasColumnType("uniqueidentifier"); + + b.Property("PartCode") + .HasColumnType("nvarchar(max)"); + + b.Property("Qty") + .HasColumnType("decimal(18,2)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("MasterId"); + + b.ToTable("Basedata_KittingDetail", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.Location", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AreaCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ColumnCode") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasDefaultValue(1); + + 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("DefaultInventoryStatus") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Description") + .HasMaxLength(1024) + .HasColumnType("nvarchar(1024)"); + + b.Property("EnableBreakStore") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(true); + + b.Property("EnableKeepZero") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(true); + + b.Property("EnableMixItem") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(true); + + b.Property("EnableMixLot") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(true); + + b.Property("EnableMixStatus") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(true); + + b.Property("EnableNegative") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(true); + + b.Property("EnableOpportunityCount") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(true); + + b.Property("EnableOverPick") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(true); + + b.Property("EnablePick") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(true); + + b.Property("EnableReceive") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(true); + + b.Property("EnableReturnFromCustomer") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(true); + + b.Property("EnableReturnToSupplier") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(true); + + b.Property("EnableShip") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(true); + + b.Property("EnableSplitBox") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(true); + + b.Property("EnableSplitPallet") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(true); + + b.Property("EnableWholeStore") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(true); + + b.Property("ErpLocationCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("LocationGroupCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Name") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("PickOrder") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasDefaultValue(0); + + b.Property("PickPriority") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasDefaultValue(0); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("RowCode") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasDefaultValue(1); + + b.Property("ShelfCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Type") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("WarehouseCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("WorkGroupCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.HasKey("Id"); + + b.HasIndex("Code") + .IsUnique(); + + b.ToTable("Basedata_Location", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.LocationGroup", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AreaCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + 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("DefaultInventoryStatus") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Description") + .HasMaxLength(1024) + .HasColumnType("nvarchar(1024)"); + + b.Property("EnableBreakStore") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(true); + + b.Property("EnableKeepZero") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(true); + + b.Property("EnableMixItem") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(true); + + b.Property("EnableMixLot") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(true); + + b.Property("EnableMixStatus") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(true); + + b.Property("EnableNegative") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(true); + + b.Property("EnableOpportunityCount") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(true); + + b.Property("EnableOverPick") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(true); + + b.Property("EnablePick") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(true); + + b.Property("EnableReceive") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(true); + + b.Property("EnableReturnFromCustomer") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(true); + + b.Property("EnableReturnToSupplier") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(true); + + b.Property("EnableShip") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(true); + + b.Property("EnableSplitBox") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(true); + + b.Property("EnableSplitPallet") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(true); + + b.Property("EnableWholeStore") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(true); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("GroupType") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Name") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("OverflowLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("PickPriority") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasDefaultValue(0); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("WarehouseCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.HasKey("Id"); + + b.HasIndex("Code") + .IsUnique(); + + b.ToTable("Basedata_LocationGroup", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.Machine", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + 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("Description") + .HasMaxLength(1024) + .HasColumnType("nvarchar(1024)"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ProdLineId") + .HasColumnType("uniqueidentifier"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Type") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("WorkStationId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("Code") + .IsUnique(); + + b.ToTable("Basedata_Machine", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.PositionCode", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("BasicUom") + .HasColumnType("nvarchar(max)"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + 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("LocationCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("LocationName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("PartCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("PartDesc") + .HasColumnType("nvarchar(max)"); + + b.Property("PartName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("StdPackQty") + .HasColumnType("decimal(18,6)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Type") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.HasKey("Id"); + + b.HasIndex("Code") + .IsUnique(); + + b.HasIndex("PartCode") + .IsUnique() + .HasFilter("[PartCode] IS NOT NULL"); + + b.HasIndex("Code", "PartCode", "LocationCode") + .IsUnique() + .HasFilter("[PartCode] IS NOT NULL AND [LocationCode] IS NOT NULL"); + + b.ToTable("Basedata_PositionCode", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.ProductionLine", b => + { + b.Property("Code") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + 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("Description") + .HasMaxLength(1024) + .HasColumnType("nvarchar(1024)"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Name") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ProductLocationCodeListJson") + .HasColumnType("nvarchar(max)"); + + b.Property("RawLocationCodeListJson") + .HasColumnType("nvarchar(max)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Type") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("WipLocationCodeListJson") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Code"); + + b.HasIndex("Code") + .IsUnique(); + + b.ToTable("Basedata_ProductionLine", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.ProductionLineItem", b => + { + b.Property("Id") + .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("ItemCode") + .IsRequired() + .HasColumnType("nvarchar(450)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("ProdLineCode") + .IsRequired() + .HasColumnType("nvarchar(450)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("ProdLineCode", "ItemCode") + .IsUnique(); + + b.ToTable("Basedata_ProductionLineItem", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.Project", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("BeginTime") + .HasColumnType("datetime2"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + 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(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Description") + .HasMaxLength(1024) + .HasColumnType("nvarchar(1024)"); + + b.Property("EndTime") + .HasColumnType("datetime2"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Name") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("Code") + .IsUnique(); + + b.ToTable("Basedata_Project", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.PurchasePriceSheet", b => + { + b.Property("Id") + .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("Description") + .HasMaxLength(1024) + .HasColumnType("nvarchar(1024)"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("ItemCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("PurchasePrice") + .HasColumnType("decimal(18,6)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("SupplierCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("ItemCode", "SupplierCode") + .IsUnique() + .HasFilter("[ItemCode] IS NOT NULL AND [SupplierCode] IS NOT NULL"); + + b.ToTable("Basedata_PurchasePriceSheet", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.SalePriceSheet", b => + { + b.Property("Id") + .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(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Description") + .HasMaxLength(1024) + .HasColumnType("nvarchar(1024)"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("ItemCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("SalePrice") + .HasColumnType("decimal(18,6)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("CustomerCode", "ItemCode") + .IsUnique() + .HasFilter("[CustomerCode] IS NOT NULL"); + + b.ToTable("Basedata_SalePriceSheet", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.Shift", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("BeginTime") + .HasColumnType("datetime2"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + 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("Description") + .HasMaxLength(1024) + .HasColumnType("nvarchar(1024)"); + + b.Property("EndAtNextDay") + .HasColumnType("bit"); + + b.Property("EndTime") + .HasColumnType("datetime2"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Name") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("Code") + .IsUnique(); + + b.ToTable("Basedata_Shift", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.SplitPackingRec", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ArrivalNoticNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + 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("FromLot") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("FromPackingCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("FromQty") + .HasPrecision(18, 6) + .HasColumnType("decimal(18,6)"); + + b.Property("FromStdPackQty") + .HasColumnType("decimal(18,6)"); + + b.Property("FromTopPackingCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("FromUom") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ItemCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ItemDesc1") + .HasMaxLength(1024) + .HasColumnType("nvarchar(1024)"); + + b.Property("ItemDesc2") + .HasMaxLength(1024) + .HasColumnType("nvarchar(1024)"); + + b.Property("ItemName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("LabelType") + .HasColumnType("int"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("OprType") + .HasColumnType("int"); + + b.Property("PurchaseInfo_AsnNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("PurchaseInfo_PoNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("PutOnShelfNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ReceiptRecNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Remark") + .HasColumnType("nvarchar(max)"); + + b.Property("TaskOrderNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("ToLot") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ToPackingCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ToQty") + .HasPrecision(18, 6) + .HasColumnType("decimal(18,6)"); + + b.Property("ToStdPackQty") + .HasColumnType("decimal(18,6)"); + + b.Property("ToTopPackingCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ToUom") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.HasKey("Id"); + + b.HasIndex("ToPackingCode"); + + b.HasIndex("FromPackingCode", "ToPackingCode"); + + b.ToTable("Basedata_SplitPackingRec", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.StdCostPriceSheet", b => + { + b.Property("Id") + .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("Description") + .HasMaxLength(1024) + .HasColumnType("nvarchar(1024)"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("ItemCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("StdCostPrice") + .HasColumnType("decimal(18,6)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("ItemCode") + .IsUnique(); + + b.ToTable("Basedata_StdCostPriceSheet", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.Supplier", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Address") + .HasMaxLength(1024) + .HasColumnType("nvarchar(1024)"); + + b.Property("Bank") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("City") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("Contacts") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Country") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("Currency") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("Fax") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("IsActive") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(true); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Phone") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("PostID") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("ShortName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("TaxRate") + .HasColumnType("decimal(18,6)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Type") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.HasKey("Id"); + + b.HasIndex("Code") + .IsUnique(); + + b.ToTable("Basedata_Supplier", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.SupplierItem", b => + { + b.Property("Id") + .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("ItemCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ItemName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("QtyPerPallet") + .HasColumnType("decimal(18,6)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("SupplierCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("SupplierItemCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("SupplierPackQty") + .HasColumnType("decimal(18,6)"); + + b.Property("SupplierPackUom") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("SupplierSimpleName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Version") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.HasKey("Id"); + + b.HasIndex("SupplierCode", "ItemCode") + .IsUnique(); + + b.ToTable("Basedata_SupplierItem", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.SupplierTimeWindow", b => + { + b.Property("Id") + .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("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("SupplierCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("SupplierName") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("TimeSlot") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Week") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.HasKey("Id"); + + b.HasIndex("SupplierCode", "TimeSlot", "Week") + .IsUnique(); + + b.ToTable("Basedata_SupplierTimeWindow", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.Team", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + 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("Description") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Members") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Name") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("Code") + .IsUnique(); + + b.ToTable("Basedata_Team", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.TransactionType", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AutoAgreeRequest") + .HasColumnType("bit"); + + b.Property("AutoCompleteJob") + .HasColumnType("bit"); + + b.Property("AutoHandleRequest") + .HasColumnType("bit"); + + b.Property("AutoSubmitRequest") + .HasColumnType("bit"); + + 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("Description") + .IsRequired() + .HasMaxLength(1024) + .HasColumnType("nvarchar(1024)"); + + b.Property("DirectCreateNote") + .HasColumnType("bit"); + + b.Property("Enabled") + .HasColumnType("bit"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("InInventoryStatuses") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("InLocationAreas") + .HasColumnType("nvarchar(max)"); + + b.Property("InLocationTypes") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ItemStatuses") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ItemTypes") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("OutInventoryStatuses") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("OutLocationAreas") + .HasColumnType("nvarchar(max)"); + + b.Property("OutLocationTypes") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("TransSubType") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("TransType") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.HasKey("Id"); + + b.HasIndex("TransType", "TransSubType") + .IsUnique(); + + b.ToTable("Basedata_TransactionType", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.Uom", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + 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("Description") + .HasMaxLength(1024) + .HasColumnType("nvarchar(1024)"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Name") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Type") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.HasKey("Id"); + + b.HasIndex("Code") + .IsUnique(); + + b.ToTable("Basedata_Uom", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.Warehouse", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + 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("Description") + .HasMaxLength(1024) + .HasColumnType("nvarchar(1024)"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Name") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("Code") + .IsUnique(); + + b.ToTable("Basedata_Warehouse", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.WorkGroup", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + 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("Description") + .HasMaxLength(1024) + .HasColumnType("nvarchar(1024)"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Name") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("WarehouseCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.HasKey("Id"); + + b.HasIndex("Code") + .IsUnique(); + + b.ToTable("Basedata_WorkGroup", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.WorkShop", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + 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("Description") + .HasMaxLength(1024) + .HasColumnType("nvarchar(1024)"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("Code") + .IsUnique(); + + b.ToTable("Basedata_WorkShop", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.WorkStation", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + 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("Description") + .HasMaxLength(1024) + .HasColumnType("nvarchar(1024)"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ProductLocationCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ProductionLineCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("RawLocationCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Type") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.HasKey("Id"); + + b.HasIndex("Code") + .IsUnique(); + + b.ToTable("Basedata_WorkStation", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.DictItem", b => + { + b.HasOne("Win_in.Sfs.Basedata.Domain.Dict", null) + .WithMany("Items") + .HasForeignKey("MasterId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.KittingDetail", b => + { + b.HasOne("Win_in.Sfs.Basedata.Domain.Kitting", null) + .WithMany("Details") + .HasForeignKey("MasterId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.Dict", b => + { + b.Navigation("Items"); + }); + + modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.Kitting", b => + { + b.Navigation("Details"); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/be/Modules/BaseData/src/Win_in.Sfs.Basedata.EntityFrameworkCore/ProductionLines/ProductionLineDbContextModelCreatingExtensions.cs b/be/Modules/BaseData/src/Win_in.Sfs.Basedata.EntityFrameworkCore/ProductionLines/ProductionLineDbContextModelCreatingExtensions.cs index 91460e9e0..e9484173b 100644 --- a/be/Modules/BaseData/src/Win_in.Sfs.Basedata.EntityFrameworkCore/ProductionLines/ProductionLineDbContextModelCreatingExtensions.cs +++ b/be/Modules/BaseData/src/Win_in.Sfs.Basedata.EntityFrameworkCore/ProductionLines/ProductionLineDbContextModelCreatingExtensions.cs @@ -20,11 +20,8 @@ public static class ProductionLineDbContextModelCreatingExtensions b.Property(x => x.Name).HasMaxLength(SfsPropertyConst.CodeLength); b.Property(x => x.Description).HasMaxLength(SfsPropertyConst.DescLength); b.Property(x => x.Type).IsRequired().HasMaxLength(SfsPropertyConst.NameLength).HasConversion(); - b.Property(q => q.WorkshopCode).HasMaxLength(SfsPropertyConst.CodeLength); - b.Property(q => q.RawLocationCode).HasMaxLength(SfsPropertyConst.CodeLength); - b.Property(q => q.ProductLocationCode).HasMaxLength(SfsPropertyConst.CodeLength); - b.Property(q => q.RawLocationGroupCode).HasMaxLength(SfsPropertyConst.CodeLength); b.Property(q => q.Remark).HasMaxLength(SfsPropertyConst.RemarkLength); + b.HasKey(q => q.Code); b.HasIndex(x => new { x.Code }).IsUnique(); }); diff --git a/be/Modules/BaseData/src/Win_in.Sfs.Basedata.EntityFrameworkCore/ProductionLines/ProductionLineEfCoreRepository.cs b/be/Modules/BaseData/src/Win_in.Sfs.Basedata.EntityFrameworkCore/ProductionLines/ProductionLineEfCoreRepository.cs index f5305dac7..4f4d9f20d 100644 --- a/be/Modules/BaseData/src/Win_in.Sfs.Basedata.EntityFrameworkCore/ProductionLines/ProductionLineEfCoreRepository.cs +++ b/be/Modules/BaseData/src/Win_in.Sfs.Basedata.EntityFrameworkCore/ProductionLines/ProductionLineEfCoreRepository.cs @@ -29,7 +29,6 @@ public class ProductionLineEfCoreRepository : SfsBaseDataEfCoreRepositoryBase + + + + diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/MaterialRequests/InjectionRequests/DTOs/InjectionRequestDTO.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/MaterialRequests/InjectionRequests/DTOs/InjectionRequestDTO.cs index b57dece0c..654107abe 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/MaterialRequests/InjectionRequests/DTOs/InjectionRequestDTO.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/MaterialRequests/InjectionRequests/DTOs/InjectionRequestDTO.cs @@ -5,33 +5,36 @@ namespace Win_in.Sfs.Wms.Store.Application.Contracts; public class InjectionRequestDTO : SfsStoreRequestDTOBase, IHasNumber { /// - /// 叫料类型 + /// 叫料类型 /// [Display(Name = "叫料类型")] public string Type { get; set; } /// - /// 备料计划单号 + /// 生产线 /// - [Display(Name = "备料计划单号")] - public string PreparationPlanNumber { get; set; } + [Display(Name = "生产线")] + public string ProdLine { get; set; } /// - /// 生产线 + /// 是否使用在途库 /// - [Display(Name = "生产线")] - public string ProdLine { get; set; } + [Display(Name = "是否使用在途库")] + public bool IsUseOnTheWayLocation { get; set; } /// - /// 车间 + /// 可用来源库位Json集合 /// - [Display(Name = "车间")] - public string Workshop { get; set; } + public string FromLocationCodeJsonList { get; set; } /// - /// 使用在途库 + /// 叫料库位 /// - [Display(Name = "使用在途库")] - public bool UseOnTheWayLocation { get; set; } + public string ToLocationCode { get; set; } + /// + /// 目标ERP储位 + /// + [Display(Name = "目标ERP储位")] + public string ToLocationErpCode { get; set; } } diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/MaterialRequests/InjectionRequests/DTOs/InjectionRequestDetailDTO.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/MaterialRequests/InjectionRequests/DTOs/InjectionRequestDetailDTO.cs index 6116135fb..45f7be885 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/MaterialRequests/InjectionRequests/DTOs/InjectionRequestDetailDTO.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/MaterialRequests/InjectionRequests/DTOs/InjectionRequestDetailDTO.cs @@ -7,51 +7,7 @@ using Win_in.Sfs.Shared.Domain.Shared; namespace Win_in.Sfs.Wms.Store.Application.Contracts; public class InjectionRequestDetailDTO : SfsStoreDetailWithQtyDTOBase - { - - /// - /// 目标库位 - /// - [Display(Name = "目标库位")] - public string ToLocationCode { get; set; } - - /// - /// 来源库区 - /// - [Display(Name = "来源库区")] - [StringLength(SfsEfCorePropertyConst.CodeLength, ErrorMessage = "{0}最多输入{1}个字符")] - public string FromLocationArea { get; set; } - - // /// - // /// 在途库库位 - // /// - // public string OnTheWayLocationCode { get; set; } - - /// - /// 生产线 - /// - [Display(Name = "生产线")] - public string ProdLine { get; set; } - - /// - /// 工作中心 - /// - [Display(Name = "工作中心")] - public string WorkStation { get; set; } - - /// - /// 过期时间 - /// - [Display(Name = "过期时间")] - public DateTime ExpiredTime { get; set; } - - /// - /// 目标ERP储位 - /// - [Display(Name = "目标ERP储位")] - public string ToLocationErpCode { get; set; } - /// /// 已发数量 /// diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/MaterialRequests/InjectionRequests/IInjectionRequestAppService.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/MaterialRequests/InjectionRequests/IInjectionRequestAppService.cs index bde30d873..dd2cf5639 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/MaterialRequests/InjectionRequests/IInjectionRequestAppService.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/MaterialRequests/InjectionRequests/IInjectionRequestAppService.cs @@ -9,27 +9,5 @@ public interface IInjectionRequestAppService : ISfsStoreRequestMasterAppServiceBase { - Task CreateAndHandleAsync(InjectionRequestEditInput input); - - /// - /// 根据备料计划生成 叫料请求 - /// - /// - Task CreateAndHandleByPreparationPlan(string productionPlanNumber); - - Task CreateAndHandleByAPIAsync(InjectionRequestEditInput input); - - /// - /// 根据类型获取叫料请求 - /// - /// - /// 叫料请求类型 - /// - /// - /// - Task> GetListByTypeAsync(SfsStoreRequestInputBase requestInput, - string type, bool includeDetails = false, CancellationToken cancellationToken = default); - - Task> GetListByTypeAsync(string type); - + } diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/MaterialRequests/CoatingMaterialRequests/CoatingMaterialRequestAppService.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/MaterialRequests/CoatingMaterialRequests/CoatingMaterialRequestAppService.cs index cfff288b0..05fd60fef 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/MaterialRequests/CoatingMaterialRequests/CoatingMaterialRequestAppService.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/MaterialRequests/CoatingMaterialRequests/CoatingMaterialRequestAppService.cs @@ -235,20 +235,20 @@ public class CoatingMaterialRequestAppService : SfsStoreRequestAppServiceBase(input); foreach (var detail in entity.Details) { var toLocationDto = await _locationAppService.GetByCodeAsync(detail.ToLocationCode).ConfigureAwait(false); - var productionLineDto = await _productionLineAppService.GetByLocationGroupCodeAsync(toLocationDto.LocationGroupCode).ConfigureAwait(false); + //var productionLineDto = await _productionLineAppService.GetByLocationGroupCodeAsync(toLocationDto.LocationGroupCode).ConfigureAwait(false); detail.ToLocationArea = toLocationDto.AreaCode; detail.ToLocationErpCode = toLocationDto.ErpLocationCode; diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/MaterialRequests/InjectionRequests/InjectionRequestAppService.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/MaterialRequests/InjectionRequests/InjectionRequestAppService.cs index e3d7400db..c12bd69d5 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/MaterialRequests/InjectionRequests/InjectionRequestAppService.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/MaterialRequests/InjectionRequests/InjectionRequestAppService.cs @@ -25,6 +25,7 @@ using Win_in.Sfs.Wms.Store.Domain.Shared; namespace Win_in.Sfs.Wms.Store.Application; +//注塑叫料 [Authorize] [Route($"{StoreConsts.RootPath}injection-request")] public class InjectionRequestAppService : SfsStoreRequestAppServiceBase - /// 用来重写 导入数据时可以加工数据 - /// - /// - /// - protected override async Task> ImportProcessingEntityAsync( - Dictionary dictionary) - { - var addList = dictionary.Where(p => p.Value == EntityState.Added).Select(p => p.Key); - - foreach (var injectionRequest in addList) - { - injectionRequest.Worker = CurrentUser.GetUserName(); - injectionRequest.CreatorId = CurrentUser.Id; - if (injectionRequest.Type == EnumTransSubType.Issue_Manual.GetDisplayName()) - { - injectionRequest.Type = EnumTransSubType.Issue_Manual.ToString(); - } - - foreach (var detail in injectionRequest.Details) - { - var locationDto= await _locationAppService.GetByCodeAsync(detail.ToLocationCode).ConfigureAwait(false); - CheckLocation(locationDto,detail.ToLocationCode); - - var itemBasicDto=await _itemBasicAppService.GetByCodeAsync(detail.ItemCode).ConfigureAwait(false); - CheckItemBasic(itemBasicDto,detail.ItemCode); - - detail.ToLocationArea = locationDto.AreaCode; - detail.ToLocationErpCode = locationDto.ErpLocationCode; - detail.ToLocationGroup = locationDto.LocationGroupCode; - detail.ToWarehouseCode = locationDto.WarehouseCode; - detail.ItemDesc1 = itemBasicDto.Desc1; - detail.ItemDesc2= itemBasicDto.Desc2; - detail.ItemName= itemBasicDto.Name; - detail.Uom = itemBasicDto.BasicUom; - } - } - return dictionary; - } + #region 东阳V2 public override async Task HandleAsync(Guid id) { - var entity=await _repository.GetAsync(id).ConfigureAwait(false); + var entity = await _repository.GetAsync(id).ConfigureAwait(false); await LocalEventBus.PublishAsync(new SfsHandledEntityEventData(entity), false).ConfigureAwait(false); return ObjectMapper.Map(entity); } - #region 校验 - - private void CheckItemBasic(ItemBasicDTO ItemBasicDto, string itemCode) - { - if (ItemBasicDto == null) - { - throw new UserFriendlyException($"物品代码为【{itemCode}】不存在"); - } - } - - private void CheckLocation(LocationDTO LocationDto, string LocationCode) - { - if (LocationDto == null) - { - throw new UserFriendlyException($"库位代码为【{LocationCode}】不存在"); - } - - if (LocationDto.Type != EnumLocationType.WIP) - { - throw new UserFriendlyException($"库位代码【{LocationCode}】不是【{EnumLocationType.WIP.GetDisplayName()}】类型"); - } - } - - - #endregion - - #endregion - [HttpPost("")] //[Authorize(InjectionRequestPermissions.Create)] public override async Task CreateAsync(InjectionRequestEditInput input) - { - foreach (var item in input.Details) - { - if (item.Qty <= 0) - { - throw new UserFriendlyException($"{item.ItemCode} 物料的需求量必须大于 0"); - } - } - - //检验备料计划是否存在要料请求 - if (!string.IsNullOrWhiteSpace(input.PreparationPlanNumber)) - { - var exist = await CheckExistByPreparationPlanAsync(input.PreparationPlanNumber).ConfigureAwait(false); - if (exist.Count > 0) - { - throw new UserFriendlyException($"{input.PreparationPlanNumber} 备料计划已存在要料申请"); - } - } - - foreach (var item in input.Details) //赋值生产线 - { - var location = await LocationAclService.GetByCodeAsync(item.ToLocationCode).ConfigureAwait(false); - item.ProdLine = location.LocationGroupCode; - input.ProdLine = location.LocationGroupCode; - } - - var entity = ObjectMapper.Map(input); - - var result = await _injectionRequestManager.CreateAsync(entity).ConfigureAwait(false); - - var dto = ObjectMapper.Map(result); - return dto; - } - - /// - /// 创建并且执行叫料请求 - /// - /// - /// - /// - [HttpPost("create-and-handle-api")] - //[Authorize(InjectionRequestPermissions.Create)] - public virtual async Task CreateAndHandleByAPIAsync(InjectionRequestEditInput input) - { - foreach (var item in input.Details) - { - if (item.Qty <= 0) - { - throw new UserFriendlyException($"{item.ItemCode} 物料的需求量必须大于 0"); - } - } - - - input.AutoSubmit = true; - input.AutoAgree = true; - input.AutoHandle = true; - input.AutoCompleteJob = false; - input.DirectCreateNote = false; - - foreach (var detailInput in input.Details) - { - var toLocationDto= await _locationAppService.GetByCodeAsync(detailInput.ToLocationCode).ConfigureAwait(false); - CheckLocation(toLocationDto, detailInput.ToLocationCode); - var itemBasicDto = await _itemBasicAppService.GetByCodeAsync(detailInput.ItemCode).ConfigureAwait(false); - CheckItemBasic(itemBasicDto, detailInput.ItemCode); - detailInput.ItemDesc1 = itemBasicDto.Desc1; - if(detailInput.PositionCode.Contains('W')) - { - detailInput.RecommendType = EnumRecommendType.W; - } - else if(detailInput.PositionCode.Contains('Q')) - { - detailInput.RecommendType = EnumRecommendType.Q; - } - else if(detailInput.PositionCode.Contains('K')) - { - detailInput.RecommendType = EnumRecommendType.K; - } - else - { - detailInput.RecommendType = EnumRecommendType.None; - } - - var productionLineDto = await _productionLineAppService.GetByLocationGroupCodeAsync(toLocationDto.LocationGroupCode).ConfigureAwait(false); - - detailInput.ToLocationCode = toLocationDto.ErpLocationCode; - if (productionLineDto != null) - { - detailInput.ProdLine = productionLineDto.Code; - } - } - - var entity = ObjectMapper.Map(input); - foreach (var detail in entity.Details) - { - var toLocationDto = await _locationAppService.GetByCodeAsync(detail.ToLocationCode).ConfigureAwait(false); - var productionLineDto = await _productionLineAppService.GetByLocationGroupCodeAsync(toLocationDto.LocationGroupCode).ConfigureAwait(false); - - detail.ToLocationArea= toLocationDto.AreaCode; - detail.ToLocationErpCode = toLocationDto.ErpLocationCode; - detail.ToLocationGroup = toLocationDto.LocationGroupCode; - detail.ToWarehouseCode= toLocationDto.WarehouseCode; - } - - entity.UseOnTheWayLocation = false; - - var result = await _injectionRequestManager.CreateBynNumberAsync(entity).ConfigureAwait(false); - - var dto = ObjectMapper.Map(result); - - return dto; - } - - /// - /// 创建并且执行叫料请求 - /// - /// - /// - /// - [HttpPost("create-and-handle")] - //[Authorize(InjectionRequestPermissions.Create)] - public virtual async Task CreateAndHandleAsync(InjectionRequestEditInput input) { foreach (var item in input.Details) { @@ -279,16 +83,6 @@ public class InjectionRequestAppService : SfsStoreRequestAppServiceBase 0) - { - throw new UserFriendlyException($"{input.PreparationPlanNumber} 备料计划已存在要料申请"); - } - } - foreach (var detailInput in input.Details) //赋值生产线 { var toLocationDto = await _locationAppService.GetByCodeAsync(detailInput.ToLocationCode).ConfigureAwait(false); @@ -296,10 +90,8 @@ public class InjectionRequestAppService : SfsStoreRequestAppServiceBase - /// 根据备料计划生成 叫料请求 - /// - /// - [HttpPost("create-and-handle-by-preparation-plan/{number}")] - public virtual async Task CreateAndHandleByPreparationPlan(string number) + //[Authorize(InjectionRequestPermissions.Create)] + [HttpPost("create-and-handle")] + public async Task CreateAndHandleAsync(InjectionRequestEditInput input) { - var prodPreparationPlan = await _preparationPlanManager.GetByNumberAsync(number).ConfigureAwait(false); + var injectionRequestDto = await CreateAsync(input).ConfigureAwait(false); - var injectionRequestCreateInput = new InjectionRequestEditInput { Worker = CurrentUser.GetUserName() }; + await HandleAsync(injectionRequestDto.Id).ConfigureAwait(false); - foreach (var preparationPlanDetail in prodPreparationPlan.Details) - { - var detail = new InjectionRequestDetailInput - { - ItemCode = preparationPlanDetail.ItemCode, - ItemName = preparationPlanDetail.ItemName, - ItemDesc1 = preparationPlanDetail.ItemDesc1, - ItemDesc2 = preparationPlanDetail.ItemDesc2, - Uom = preparationPlanDetail.Uom, - Qty = preparationPlanDetail.Qty, - StdPackQty = preparationPlanDetail.StdPackQty, - ToLocationCode = preparationPlanDetail.ToLocationCode - }; - - injectionRequestCreateInput.Details.Add(detail); - } - - var dto = await CreateAndHandleAsync(injectionRequestCreateInput).ConfigureAwait(false); - - return dto; + return injectionRequestDto; } + #endregion + /// - /// 检验备料计划是否存在要料请求 + /// 根据类型 获取叫料申请 /// - /// + /// /// - private async Task> CheckExistByPreparationPlanAsync(string preparationPlanNumber) + [HttpGet("list/by-type/{type}")] + public virtual async Task> GetListByTypeAsync(string type) { - var entities = await _repository.GetListAsync(c => c.PreparationPlanNumber == preparationPlanNumber) - .ConfigureAwait(false); - return entities; + var entities = await _repository.GetListAsync(c => c.Type == type).ConfigureAwait(false); + + var dtos = ObjectMapper.Map, List>(entities); + + return dtos; } + #region 导入 + /// - /// 根据类型获取叫料请求 + /// 用来重写 导入数据时可以加工数据 /// - /// - /// - /// 叫料请求类型: - /// 人工拉动:Issue_Manual; - /// 线边拉动:Issue_WIP; - /// - /// - /// + /// /// - [HttpPost("by-type/{type}")] - public virtual async Task> GetListByTypeAsync( - SfsStoreRequestInputBase requestInput, - string type, - bool includeDetails = false, - CancellationToken cancellationToken = default) + protected override async Task> ImportProcessingEntityAsync( + Dictionary dictionary) { - Expression> expression = p => p.Type == type; - if (requestInput.Condition.Filters?.Count > 0) + var addList = dictionary.Where(p => p.Value == EntityState.Added).Select(p => p.Key); + + foreach (var injectionRequest in addList) { - expression = expression.And(requestInput.Condition.Filters.ToLambda()); + injectionRequest.Worker = CurrentUser.GetUserName(); + injectionRequest.CreatorId = CurrentUser.Id; + if (injectionRequest.Type == EnumTransSubType.Issue_Manual.GetDisplayName()) + { + injectionRequest.Type = EnumTransSubType.Issue_Manual.ToString(); + } + + foreach (var detail in injectionRequest.Details) + { + var locationDto = await _locationAppService.GetByCodeAsync(detail.ToLocationCode).ConfigureAwait(false); + CheckLocation(locationDto, detail.ToLocationCode); + + var itemBasicDto = await _itemBasicAppService.GetByCodeAsync(detail.ItemCode).ConfigureAwait(false); + CheckItemBasic(itemBasicDto, detail.ItemCode); + + detail.ToLocationArea = locationDto.AreaCode; + detail.ToLocationErpCode = locationDto.ErpLocationCode; + detail.ToLocationGroup = locationDto.LocationGroupCode; + detail.ToWarehouseCode = locationDto.WarehouseCode; + detail.ItemDesc1 = itemBasicDto.Desc1; + detail.ItemDesc2 = itemBasicDto.Desc2; + detail.ItemName = itemBasicDto.Name; + detail.Uom = itemBasicDto.BasicUom; + } } - return await GetPagedListAsync(expression, requestInput.SkipCount, requestInput.MaxResultCount, - requestInput.Sorting, includeDetails, cancellationToken).ConfigureAwait(false); + return dictionary; } - #region 导入 - - /// /// 导入验证 /// @@ -486,18 +272,29 @@ public class InjectionRequestAppService : SfsStoreRequestAppServiceBase - /// 根据类型 获取叫料申请 - /// - /// - /// - [HttpGet("list/by-type/{type}")] - public virtual async Task> GetListByTypeAsync(string type) + #region 校验 + + private void CheckItemBasic(ItemBasicDTO ItemBasicDto, string itemCode) { - var entities = await _repository.GetListAsync(c => c.Type == type).ConfigureAwait(false); + if (ItemBasicDto == null) + { + throw new UserFriendlyException($"物品代码为【{itemCode}】不存在"); + } + } - var dtos = ObjectMapper.Map, List>(entities); + private void CheckLocation(LocationDTO LocationDto, string LocationCode) + { + if (LocationDto == null) + { + throw new UserFriendlyException($"库位代码为【{LocationCode}】不存在"); + } - return dtos; + if (LocationDto.Type != EnumLocationType.WIP) + { + throw new UserFriendlyException($"库位代码【{LocationCode}】不是【{EnumLocationType.WIP.GetDisplayName()}】类型"); + } } + + + #endregion } diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/MaterialRequests/MaterialRequestAppService.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/MaterialRequests/MaterialRequestAppService.cs index 64d689dbc..ec28cb71a 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/MaterialRequests/MaterialRequestAppService.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/MaterialRequests/MaterialRequestAppService.cs @@ -231,20 +231,20 @@ public class MaterialRequestAppService : SfsStoreRequestAppServiceBase(input); foreach (var detail in entity.Details) { var toLocationDto = await _locationAppService.GetByCodeAsync(detail.ToLocationCode).ConfigureAwait(false); - var productionLineDto = await _productionLineAppService.GetByLocationGroupCodeAsync(toLocationDto.LocationGroupCode).ConfigureAwait(false); + //var productionLineDto = await _productionLineAppService.GetByLocationGroupCodeAsync(toLocationDto.LocationGroupCode).ConfigureAwait(false); detail.ToLocationArea= toLocationDto.AreaCode; detail.ToLocationErpCode = toLocationDto.ErpLocationCode; diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Plans/PreparationPlans/PreparationPlanManager.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Plans/PreparationPlans/PreparationPlanManager.cs index 5b105482d..d271fa0b5 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Plans/PreparationPlans/PreparationPlanManager.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Plans/PreparationPlans/PreparationPlanManager.cs @@ -31,78 +31,78 @@ public class PreparationPlanManager : SfsStoreManagerBase CreateFromProductionPlanAsync(ProductionPlan productionPlan) { - //判断 - Check.NotNull(productionPlan, nameof(productionPlan)); - var prodLine = productionPlan.ProdLine; - - //开始生产计划时,生成备料计划,开关控制 - - //①根据BOM拆分备料记录:备料计划的数量 = bom的用量 * 生产计划的计划数量 - //②bom的父物料号 = 生产计划的Item_code - var preparationPlan = BuildPreparationPlan(productionPlan); - - var boms = new List(); - //根据生产计划明细获取一层BOM信息,如果子零件为虚零件则下穿一层 - foreach (var productionPlanDetail in productionPlan.Details.Where(productionPlanDetail => - productionPlanDetail.PlanQty > 0)) - { - //获得BOM信息 - var productBoms = await _bomAppService.GetPlanListAsync(productionPlanDetail.ItemCode, prodLine).ConfigureAwait(false); - if (productBoms.Count == 0) - { - throw new UserFriendlyException( - $"生成备料计划失败:{productionPlanDetail.ItemCode} 在 {prodLine} 缺少对应的Bom信息!"); - } - productBoms.ForEach(p => p.Product = productionPlanDetail.ItemCode); - boms.AddRange(productBoms); - - } - - var productionLine = await _productionLineAppService.GetByCodeAsync(prodLine).ConfigureAwait(false); - Check.NotNull(productionLine, "生产线代码", $"生产线 {prodLine} 不存在"); - - var rawLocationCodeOfProductionLine = productionLine.RawLocationCode; - - //将BOM按子零件分组 - var bomGroupByItemCode = boms.GroupBy(p => p.Component); - - foreach (var bomGroup in bomGroupByItemCode) - { - var itemCode = bomGroup.Key; - var item = await ItemBasicAppService.GetByCodeAsync(itemCode).ConfigureAwait(false); - Check.NotNull(item, "物品代码", $"物品 {itemCode} 不存在"); - //成品零件号 - var productItemCode = bomGroup.First().Product; - //取整方式 - var trunkType = bomGroup.First().TruncType; - //计量单位 - var uom = bomGroup.First().ComponentUom; - //子零件的BOM用量为各个BOM用量的汇总 - var bomGroupQty = bomGroup.Sum(p => p.ComponentQty); - //从生产计划明细中获得 - var planQty = productionPlan.Details.First(p => p.ItemCode == productItemCode).PlanQty; - //实际需求量为成品计划生产量 * 汇总BOM用量 - var sumQty = planQty * bomGroupQty; - //获取标包数量,计算备料数量 - var (stdPackQty, detailQty) = await CalcDetailQtyAsync(sumQty, item.StdPackQty, trunkType).ConfigureAwait(false); - - //TODO 从物料存储关系中根据 库位组 = 生产线代码 查找是一个预定假设,需要改成可配置的 - //从物料存储关系中查找 库位组 = 生产线代码 的库位 - var locationCodeFromItemStoreRelation = - await GetFirstLocationFromItemStoreRelationAsync(prodLine, itemCode).ConfigureAwait(false); - //备料的物料没有物料存储关系,则目标库位取生产线的原料库位 - var locationCode = string.IsNullOrEmpty(locationCodeFromItemStoreRelation) - ? rawLocationCodeOfProductionLine - : locationCodeFromItemStoreRelation; - //构造备料计划明细 - var detail = BuildPreparationPlanDetail(item, detailQty, stdPackQty, locationCode); - - preparationPlan.Details.Add(detail); - } - - await CreateAsync(preparationPlan).ConfigureAwait(false); - - return preparationPlan; + ////判断 + //Check.NotNull(productionPlan, nameof(productionPlan)); + //var prodLine = productionPlan.ProdLine; + + ////开始生产计划时,生成备料计划,开关控制 + + ////①根据BOM拆分备料记录:备料计划的数量 = bom的用量 * 生产计划的计划数量 + ////②bom的父物料号 = 生产计划的Item_code + //var preparationPlan = BuildPreparationPlan(productionPlan); + + //var boms = new List(); + ////根据生产计划明细获取一层BOM信息,如果子零件为虚零件则下穿一层 + //foreach (var productionPlanDetail in productionPlan.Details.Where(productionPlanDetail => + // productionPlanDetail.PlanQty > 0)) + //{ + // //获得BOM信息 + // var productBoms = await _bomAppService.GetPlanListAsync(productionPlanDetail.ItemCode, prodLine).ConfigureAwait(false); + // if (productBoms.Count == 0) + // { + // throw new UserFriendlyException( + // $"生成备料计划失败:{productionPlanDetail.ItemCode} 在 {prodLine} 缺少对应的Bom信息!"); + // } + // productBoms.ForEach(p => p.Product = productionPlanDetail.ItemCode); + // boms.AddRange(productBoms); + + //} + + //var productionLine = await _productionLineAppService.GetByCodeAsync(prodLine).ConfigureAwait(false); + //Check.NotNull(productionLine, "生产线代码", $"生产线 {prodLine} 不存在"); + + ////将BOM按子零件分组 + //var bomGroupByItemCode = boms.GroupBy(p => p.Component); + + //foreach (var bomGroup in bomGroupByItemCode) + //{ + // var itemCode = bomGroup.Key; + // var item = await ItemBasicAppService.GetByCodeAsync(itemCode).ConfigureAwait(false); + // Check.NotNull(item, "物品代码", $"物品 {itemCode} 不存在"); + // //成品零件号 + // var productItemCode = bomGroup.First().Product; + // //取整方式 + // var trunkType = bomGroup.First().TruncType; + // //计量单位 + // var uom = bomGroup.First().ComponentUom; + // //子零件的BOM用量为各个BOM用量的汇总 + // var bomGroupQty = bomGroup.Sum(p => p.ComponentQty); + // //从生产计划明细中获得 + // var planQty = productionPlan.Details.First(p => p.ItemCode == productItemCode).PlanQty; + // //实际需求量为成品计划生产量 * 汇总BOM用量 + // var sumQty = planQty * bomGroupQty; + // //获取标包数量,计算备料数量 + // var (stdPackQty, detailQty) = await CalcDetailQtyAsync(sumQty, item.StdPackQty, trunkType).ConfigureAwait(false); + + // //TODO 从物料存储关系中根据 库位组 = 生产线代码 查找是一个预定假设,需要改成可配置的 + // //从物料存储关系中查找 库位组 = 生产线代码 的库位 + // var locationCodeFromItemStoreRelation = + // await GetFirstLocationFromItemStoreRelationAsync(prodLine, itemCode).ConfigureAwait(false); + // //备料的物料没有物料存储关系,则目标库位取生产线的原料库位 + // var locationCode = string.IsNullOrEmpty(locationCodeFromItemStoreRelation) + // ? rawLocationCodeOfProductionLine + // : locationCodeFromItemStoreRelation; + // //构造备料计划明细 + // var detail = BuildPreparationPlanDetail(item, detailQty, stdPackQty, locationCode); + + // preparationPlan.Details.Add(detail); + //} + + //await CreateAsync(preparationPlan).ConfigureAwait(false); + + //return preparationPlan; + + return null; } private async Task GetFirstLocationFromItemStoreRelationAsync(string prodLine, string itemCode) diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Requests/MaterialRequests/InjectionRequests/InjectionRequest.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Requests/MaterialRequests/InjectionRequests/InjectionRequest.cs index c6058c8ae..cbd538565 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Requests/MaterialRequests/InjectionRequests/InjectionRequest.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Requests/MaterialRequests/InjectionRequests/InjectionRequest.cs @@ -16,24 +16,12 @@ public class InjectionRequest : SfsStoreRequestAggregateRootBase - /// 备料计划单号 - /// - [IgnoreUpdate] - public string PreparationPlanNumber { get; set; } - /// /// 生产线 /// [IgnoreUpdate] public string ProdLine { get; set; } - /// - /// 车间 - /// - [IgnoreUpdate] - public string Workshop { get; set; } - /// /// 使用在途库 /// diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Requests/MaterialRequests/InjectionRequests/InjectionRequestManager.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Requests/MaterialRequests/InjectionRequests/InjectionRequestManager.cs index 53b2f4cee..b00a4833e 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Requests/MaterialRequests/InjectionRequests/InjectionRequestManager.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Requests/MaterialRequests/InjectionRequests/InjectionRequestManager.cs @@ -25,6 +25,12 @@ public class InjectionRequestManager _issueJobRepository = issueJobRepository; } + + #region 东阳V2 + + #endregion + + /// /// 创建 /// @@ -58,7 +64,7 @@ public class InjectionRequestManager SetMaterialRequestDetailStatus(detail); } - await SetMaterialRequestStatus(oldEntity).ConfigureAwait(false); + await SetMaterialRequestStatusAsync(oldEntity).ConfigureAwait(false); await Repository.UpdateAsync(oldEntity).ConfigureAwait(false); } @@ -77,7 +83,7 @@ public class InjectionRequestManager } } - private async Task SetMaterialRequestStatus(InjectionRequest materialRequest) + private async Task SetMaterialRequestStatusAsync(InjectionRequest materialRequest) { if (materialRequest.Details.All(p => p.Status == EnumStatus.Close)) { diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/Jobs/IssueJobs/CoatingIssueJobDbContextModelCreatingExtensions.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/Jobs/IssueJobs/CoatingIssueJob/CoatingIssueJobDbContextModelCreatingExtensions.cs similarity index 100% rename from be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/Jobs/IssueJobs/CoatingIssueJobDbContextModelCreatingExtensions.cs rename to be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/Jobs/IssueJobs/CoatingIssueJob/CoatingIssueJobDbContextModelCreatingExtensions.cs diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/Jobs/IssueJobs/CoatingIssueJobEfCoreRepository.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/Jobs/IssueJobs/CoatingIssueJob/CoatingIssueJobEfCoreRepository.cs similarity index 100% rename from be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/Jobs/IssueJobs/CoatingIssueJobEfCoreRepository.cs rename to be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/Jobs/IssueJobs/CoatingIssueJob/CoatingIssueJobEfCoreRepository.cs diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/Migrations/20240328035332_Update_2024_03_28_ProductLine.Designer.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/Migrations/20240328035332_Update_2024_03_28_ProductLine.Designer.cs new file mode 100644 index 000000000..e22cdcc7a --- /dev/null +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/Migrations/20240328035332_Update_2024_03_28_ProductLine.Designer.cs @@ -0,0 +1,26195 @@ +// +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_in.Sfs.Wms.Store.EntityFrameworkCore; + +#nullable disable + +namespace Win_in.Sfs.Wms.Store.Migrations +{ + [DbContext(typeof(StoreDbContext))] + [Migration("20240328035332_Update_2024_03_28_ProductLine")] + partial class Update_2024_03_28_ProductLine + { + protected override void BuildTargetModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder + .HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.SqlServer) + .HasAnnotation("ProductVersion", "6.0.13") + .HasAnnotation("Relational:MaxIdentifierLength", 128); + + SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder, 1L, 1); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.BackFlushNote", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ActiveDate") + .HasColumnType("datetime2"); + + b.Property("ArriveDate") + .HasColumnType("datetime2"); + + b.Property("CompleteTime") + .HasColumnType("datetime2"); + + 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("ExpireDate") + .HasColumnType("datetime2"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("ItemCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemCode"); + + b.Property("ItemDesc1") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc1"); + + b.Property("ItemDesc2") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc2"); + + b.Property("ItemName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemName"); + + b.Property("JobNumber") + .HasColumnType("nvarchar(max)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("LocationArea") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationArea"); + + b.Property("LocationCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationCode"); + + b.Property("LocationErpCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationErpCode"); + + b.Property("LocationGroup") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationGroup"); + + b.Property("Lot") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Lot"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("PackingCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ProdLine") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ProduceDate") + .HasColumnType("datetime2"); + + b.Property("ProductReceiptNumber") + .HasColumnType("nvarchar(max)"); + + b.Property("ProductRecycleNumber") + .HasColumnType("nvarchar(max)"); + + b.Property("ProductionPlanNumber") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Qty") + .HasPrecision(18, 6) + .HasColumnType("decimal(18,6)") + .HasColumnName("Qty"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("Shift") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("SupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("SupplierBatch"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Uom") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Uom"); + + b.Property("WarehouseCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("WarehouseCode"); + + b.Property("Worker") + .HasColumnType("nvarchar(max)"); + + b.Property("Workshop") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.HasKey("Id"); + + b.HasIndex("Number") + .IsUnique(); + + b.ToTable("Store_BackFlushNote", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.BackFlushNoteDetail", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ArriveDate") + .HasColumnType("datetime2"); + + b.Property("BomVersion") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ContainerCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ContainerCode"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("ExpireDate") + .HasColumnType("datetime2"); + + b.Property("IsOffLine") + .HasColumnType("bit"); + + b.Property("ItemCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemCode"); + + b.Property("ItemDesc1") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc1"); + + b.Property("ItemDesc2") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc2"); + + b.Property("ItemName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemName"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("LocationArea") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationArea"); + + b.Property("LocationCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationCode"); + + b.Property("LocationErpCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationErpCode"); + + b.Property("LocationGroup") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationGroup"); + + b.Property("Lot") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Lot"); + + b.Property("MasterID") + .HasColumnType("uniqueidentifier"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("PackingCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("PackingCode"); + + b.Property("ProduceDate") + .HasColumnType("datetime2"); + + b.Property("Qty") + .HasPrecision(18, 6) + .HasColumnType("decimal(18,6)") + .HasColumnName("Qty"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("Status") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("StdPackQty") + .HasColumnType("decimal(18,6)"); + + b.Property("SupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("SupplierBatch"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Uom") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Uom"); + + b.Property("WarehouseCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("WarehouseCode"); + + b.HasKey("Id"); + + b.HasIndex("MasterID"); + + b.HasIndex("Number", "ItemCode", "Lot") + .IsUnique() + .HasFilter("[Lot] IS NOT NULL"); + + b.ToTable("Store_BackFlushNoteDetail", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.CheckJob", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AcceptTime") + .HasColumnType("datetime2"); + + b.Property("AcceptUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("AcceptUserName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("CompleteTime") + .HasColumnType("datetime2"); + + b.Property("CompleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CompleteUserName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + 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("DeliverNoteNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("IsAutoComplete") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false); + + b.Property("JobDescription") + .HasMaxLength(1024) + .HasColumnType("nvarchar(1024)"); + + b.Property("JobStatus") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("JobType") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Priority") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasDefaultValue(0); + + b.Property("PriorityIncrement") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasDefaultValue(0); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("UpStreamJobNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("WarehouseCode") + .HasColumnType("nvarchar(max)"); + + b.Property("WorkGroupCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Worker") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("Number") + .IsUnique(); + + b.ToTable("Job_CheckJob", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.CheckJobDetail", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ArriveDate") + .HasColumnType("datetime2"); + + b.Property("ContainerCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ContainerCode"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("CustomerItemCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ExpireDate") + .HasColumnType("datetime2"); + + b.Property("ItemCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemCode"); + + b.Property("ItemDesc1") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc1"); + + b.Property("ItemDesc2") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc2"); + + b.Property("ItemName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemName"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("LocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationArea"); + + b.Property("LocationCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationCode"); + + b.Property("LocationErpCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationErpCode"); + + b.Property("LocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationGroup"); + + b.Property("Lot") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Lot"); + + b.Property("MasterID") + .HasColumnType("uniqueidentifier"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Order") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("PackingCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("PackingCode"); + + b.Property("ProduceDate") + .HasColumnType("datetime2"); + + b.Property("Qty") + .HasPrecision(18, 6) + .HasColumnType("decimal(18,6)") + .HasColumnName("Qty"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("Status") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("StdPackQty") + .HasColumnType("decimal(18,6)"); + + b.Property("SupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("SupplierBatch"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Uom") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Uom"); + + b.Property("WarehouseCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("WarehouseCode"); + + b.HasKey("Id"); + + b.HasIndex("MasterID"); + + b.ToTable("Job_CheckJobDetail", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ContainerBindNote", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ActiveDate") + .HasColumnType("datetime2"); + + b.Property("BindTime") + .HasColumnType("datetime2"); + + b.Property("BindType") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("ContainerCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + 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("LocationCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Worker") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("Number") + .IsUnique(); + + b.ToTable("Store_ContainerBindNote", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ContainerBindNoteDetail", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ArriveDate") + .HasColumnType("datetime2"); + + b.Property("ContainerCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ContainerCode"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("ExpireDate") + .HasColumnType("datetime2"); + + b.Property("ItemCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemCode"); + + b.Property("ItemDesc1") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc1"); + + b.Property("ItemDesc2") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc2"); + + b.Property("ItemName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemName"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Lot") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Lot"); + + b.Property("MasterID") + .HasColumnType("uniqueidentifier"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("PackingCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("PackingCode"); + + b.Property("ProduceDate") + .HasColumnType("datetime2"); + + b.Property("Qty") + .HasPrecision(18, 6) + .HasColumnType("decimal(18,6)") + .HasColumnName("Qty"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("StdPackQty") + .HasColumnType("decimal(18,6)"); + + b.Property("SupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("SupplierBatch"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Uom") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Uom"); + + b.HasKey("Id"); + + b.HasIndex("MasterID"); + + b.HasIndex("Number", "PackingCode") + .IsUnique(); + + b.ToTable("Store_ContainerBindNoteDetail", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ContainerJob", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AcceptTime") + .HasColumnType("datetime2"); + + b.Property("AcceptUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("AcceptUserName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("CompleteTime") + .HasColumnType("datetime2"); + + b.Property("CompleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CompleteUserName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("ContainerRequestNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ContainerType") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("IsAutoComplete") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false); + + b.Property("JobDescription") + .HasMaxLength(1024) + .HasColumnType("nvarchar(1024)"); + + b.Property("JobStatus") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("JobType") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Priority") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasDefaultValue(0); + + b.Property("PriorityIncrement") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasDefaultValue(0); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("RequestLocationCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("SpecificationsType") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("UpStreamJobNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("WarehouseCode") + .HasColumnType("nvarchar(max)"); + + b.Property("WorkGroupCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Worker") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("Number") + .IsUnique(); + + b.ToTable("Job_ContainerJob", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ContainerJobDetail", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("FromLocationCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("HandledArriveDate") + .HasColumnType("datetime2"); + + b.Property("HandledContainerCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledContainerCode"); + + b.Property("HandledExpireDate") + .HasColumnType("datetime2"); + + b.Property("HandledFromLocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledFromLocationArea"); + + b.Property("HandledFromLocationCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledFromLocationCode"); + + b.Property("HandledFromLocationErpCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledFromLocationErpCode"); + + b.Property("HandledFromLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledFromLocationGroup"); + + b.Property("HandledFromWarehouseCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledFromWarehouseCode"); + + b.Property("HandledLot") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledLot"); + + b.Property("HandledPackingCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledPackingCode"); + + b.Property("HandledProduceDate") + .HasColumnType("datetime2"); + + b.Property("HandledQty") + .HasColumnType("decimal(18,6)"); + + b.Property("HandledSupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledSupplierBatch"); + + b.Property("ItemCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemCode"); + + b.Property("ItemDesc1") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc1"); + + b.Property("ItemDesc2") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc2"); + + b.Property("ItemName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemName"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("MasterID") + .HasColumnType("uniqueidentifier"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("RecommendArriveDate") + .HasColumnType("datetime2"); + + b.Property("RecommendContainerCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendContainerCode"); + + b.Property("RecommendExpireDate") + .HasColumnType("datetime2"); + + b.Property("RecommendFromLocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendFromLocationArea"); + + b.Property("RecommendFromLocationCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendFromLocationCode"); + + b.Property("RecommendFromLocationErpCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendFromLocationErpCode"); + + b.Property("RecommendFromLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendFromLocationGroup"); + + b.Property("RecommendFromWarehouseCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendFromWarehouseCode"); + + b.Property("RecommendLot") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendLot"); + + b.Property("RecommendPackingCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendPackingCode"); + + b.Property("RecommendProduceDate") + .HasColumnType("datetime2"); + + b.Property("RecommendQty") + .HasColumnType("decimal(18,6)"); + + b.Property("RecommendSupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendSupplierBatch"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("Status") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("StdPackQty") + .HasColumnType("decimal(18,6)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("ToLocationCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Uom") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("MasterID"); + + b.ToTable("Job_ContainerJobDetail", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ContainerNote", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ActiveDate") + .HasColumnType("datetime2"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("ConfirmTime") + .HasColumnType("datetime2"); + + b.Property("Confirmed") + .HasColumnType("bit"); + + b.Property("ContainerRequestNumber") + .HasColumnType("nvarchar(max)"); + + b.Property("ContainerType") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("JobNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("JobNumber"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("RequestLocationCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("SpecificationsType") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Worker") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("Number") + .IsUnique(); + + b.ToTable("Store_ContainerNote", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ContainerNoteDetail", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ArriveDate") + .HasColumnType("datetime2"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("ExpireDate") + .HasColumnType("datetime2"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("FromContainerCode") + .HasColumnType("nvarchar(max)"); + + b.Property("FromLocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromLocationArea"); + + b.Property("FromLocationCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromLocationCode"); + + b.Property("FromLocationErpCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromLocationErpCode"); + + b.Property("FromLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromLocationGroup"); + + b.Property("FromLot") + .HasColumnType("nvarchar(max)"); + + b.Property("FromPackingCode") + .HasColumnType("nvarchar(max)"); + + b.Property("FromStatus") + .HasColumnType("int"); + + b.Property("FromWarehouseCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromWarehouseCode"); + + b.Property("HandledArriveDate") + .HasColumnType("datetime2"); + + b.Property("HandledContainerCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledContainerCode"); + + b.Property("HandledExpireDate") + .HasColumnType("datetime2"); + + b.Property("HandledFromLocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledFromLocationArea"); + + b.Property("HandledFromLocationCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledFromLocationCode"); + + b.Property("HandledFromLocationErpCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledFromLocationErpCode"); + + b.Property("HandledFromLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledFromLocationGroup"); + + b.Property("HandledFromWarehouseCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledFromWarehouseCode"); + + b.Property("HandledLot") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledLot"); + + b.Property("HandledPackingCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledPackingCode"); + + b.Property("HandledProduceDate") + .HasColumnType("datetime2"); + + b.Property("HandledQty") + .HasColumnType("decimal(18,6)"); + + b.Property("HandledSupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledSupplierBatch"); + + b.Property("ItemCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemCode"); + + b.Property("ItemDesc1") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc1"); + + b.Property("ItemDesc2") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc2"); + + b.Property("ItemName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemName"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("MasterID") + .HasColumnType("uniqueidentifier"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("ProduceDate") + .HasColumnType("datetime2"); + + b.Property("Qty") + .HasPrecision(18, 6) + .HasColumnType("decimal(18,6)") + .HasColumnName("Qty"); + + b.Property("RecommendArriveDate") + .HasColumnType("datetime2"); + + b.Property("RecommendContainerCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendContainerCode"); + + b.Property("RecommendExpireDate") + .HasColumnType("datetime2"); + + b.Property("RecommendFromLocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendFromLocationArea"); + + b.Property("RecommendFromLocationCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendFromLocationCode"); + + b.Property("RecommendFromLocationErpCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendFromLocationErpCode"); + + b.Property("RecommendFromLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendFromLocationGroup"); + + b.Property("RecommendFromWarehouseCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendFromWarehouseCode"); + + b.Property("RecommendLot") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendLot"); + + b.Property("RecommendPackingCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendPackingCode"); + + b.Property("RecommendProduceDate") + .HasColumnType("datetime2"); + + b.Property("RecommendQty") + .HasColumnType("decimal(18,6)"); + + b.Property("RecommendSupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendSupplierBatch"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("StdPackQty") + .HasColumnType("decimal(18,6)"); + + b.Property("SupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("SupplierBatch"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("ToContainerCode") + .HasColumnType("nvarchar(max)"); + + b.Property("ToLocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToLocationArea"); + + b.Property("ToLocationCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToLocationCode"); + + b.Property("ToLocationErpCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToLocationErpCode"); + + b.Property("ToLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToLocationGroup"); + + b.Property("ToLot") + .HasColumnType("nvarchar(max)"); + + b.Property("ToPackingCode") + .HasColumnType("nvarchar(max)"); + + b.Property("ToStatus") + .HasColumnType("int"); + + b.Property("ToWarehouseCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToWarehouseCode"); + + b.Property("Uom") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Uom"); + + b.HasKey("Id"); + + b.HasIndex("MasterID"); + + b.HasIndex("Number") + .IsUnique(); + + b.ToTable("Store_ContainerNoteDetail", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ContainerRequest", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ActiveDate") + .HasColumnType("datetime2"); + + b.Property("AutoAgree") + .HasColumnType("bit"); + + b.Property("AutoCompleteJob") + .HasColumnType("bit"); + + b.Property("AutoHandle") + .HasColumnType("bit"); + + b.Property("AutoSubmit") + .HasColumnType("bit"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("ContainerType") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DirectCreateNote") + .HasColumnType("bit"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("RequestLocationCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("RequestStatus") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("SpecificationsType") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Worker") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("Number") + .IsUnique(); + + b.ToTable("Store_ContainerRequest", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ContainerRequestDetail", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("ItemCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemCode"); + + b.Property("ItemDesc1") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc1"); + + b.Property("ItemDesc2") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc2"); + + b.Property("ItemName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemName"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("MasterID") + .HasColumnType("uniqueidentifier"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("Qty") + .HasPrecision(18, 6) + .HasColumnType("decimal(18,6)") + .HasColumnName("Qty"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("StdPackQty") + .HasColumnType("decimal(18,6)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("ToLocationCode") + .HasColumnType("nvarchar(max)"); + + b.Property("Uom") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Uom"); + + b.HasKey("Id"); + + b.HasIndex("MasterID"); + + b.HasIndex("Number") + .IsUnique(); + + b.ToTable("Store_ContainerRequestDetail", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.CountAdjustNote", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ActiveDate") + .HasColumnType("datetime2"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CountAdjustRequestNumber") + .HasColumnType("nvarchar(max)"); + + b.Property("CountNoteNumber") + .HasColumnType("nvarchar(max)"); + + b.Property("CountPlanNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("IsAdjusted") + .HasColumnType("bit"); + + b.Property("JobNumber") + .HasColumnType("nvarchar(max)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Type") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Worker") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("Number") + .IsUnique(); + + b.ToTable("Store_CountAdjustNote", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.CountAdjustNoteDetail", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AdjustQty") + .HasColumnType("decimal(18,6)"); + + b.Property("ArriveDate") + .HasColumnType("datetime2"); + + b.Property("ContainerCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ContainerCode"); + + b.Property("CountLabel") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("CountQty") + .HasColumnType("decimal(18,6)"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("ExpireDate") + .HasColumnType("datetime2"); + + b.Property("InventoryQty") + .HasColumnType("decimal(18,6)"); + + b.Property("ItemCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemCode"); + + b.Property("ItemDesc1") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc1"); + + b.Property("ItemDesc2") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc2"); + + b.Property("ItemName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemName"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("LocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationArea"); + + b.Property("LocationCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationCode"); + + b.Property("LocationErpCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationErpCode"); + + b.Property("LocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationGroup"); + + b.Property("Lot") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Lot"); + + b.Property("MasterID") + .HasColumnType("uniqueidentifier"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("PackingCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("PackingCode"); + + b.Property("ProduceDate") + .HasColumnType("datetime2"); + + b.Property("ReasonCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("Status") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("StdPackQty") + .HasColumnType("decimal(18,6)"); + + b.Property("SupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("SupplierBatch"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("TransInOut") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Uom") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("WarehouseCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("WarehouseCode"); + + b.HasKey("Id"); + + b.HasIndex("MasterID"); + + b.HasIndex("Number", "CountLabel", "ItemCode", "LocationCode", "Lot", "Status", "PackingCode") + .IsUnique() + .HasFilter("[Lot] IS NOT NULL"); + + b.ToTable("Store_CountAdjustNoteDetail", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.CountAdjustRequest", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ActiveDate") + .HasColumnType("datetime2"); + + b.Property("AutoAgree") + .HasColumnType("bit"); + + b.Property("AutoCompleteJob") + .HasColumnType("bit"); + + b.Property("AutoHandle") + .HasColumnType("bit"); + + b.Property("AutoSubmit") + .HasColumnType("bit"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CountNoteNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("CountPlanNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DirectCreateNote") + .HasColumnType("bit"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("RequestStatus") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Worker") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("Number") + .IsUnique(); + + b.ToTable("Store_CountAdjustRequest", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.CountAdjustRequestDetail", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ArriveDate") + .HasColumnType("datetime2"); + + b.Property("ContainerCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ContainerCode"); + + b.Property("CountQty") + .HasColumnType("decimal(18,6)"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("ExpireDate") + .HasColumnType("datetime2"); + + b.Property("InventoryQty") + .HasColumnType("decimal(18,6)"); + + b.Property("ItemCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemCode"); + + b.Property("ItemDesc1") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc1"); + + b.Property("ItemDesc2") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc2"); + + b.Property("ItemName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemName"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("LocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationArea"); + + b.Property("LocationCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationCode"); + + b.Property("LocationErpCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationErpCode"); + + b.Property("LocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationGroup"); + + b.Property("Lot") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Lot"); + + b.Property("MasterID") + .HasColumnType("uniqueidentifier"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("PackingCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("PackingCode"); + + b.Property("ProduceDate") + .HasColumnType("datetime2"); + + b.Property("Qty") + .HasPrecision(18, 6) + .HasColumnType("decimal(18,6)") + .HasColumnName("Qty"); + + b.Property("ReasonCode") + .HasColumnType("nvarchar(max)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("Status") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("StdPackQty") + .HasColumnType("decimal(18,6)"); + + b.Property("SupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("SupplierBatch"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Uom") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Uom"); + + b.Property("WarehouseCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("WarehouseCode"); + + b.HasKey("Id"); + + b.HasIndex("MasterID"); + + b.HasIndex("Number", "ItemCode", "LocationCode", "Lot", "Status", "PackingCode") + .IsUnique() + .HasFilter("[Lot] IS NOT NULL"); + + b.ToTable("Store_CountAdjustRequestDetail", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.CountJob", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AcceptTime") + .HasColumnType("datetime2"); + + b.Property("AcceptUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("AcceptUserName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("CompleteTime") + .HasColumnType("datetime2"); + + b.Property("CompleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CompleteUserName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CountMethod") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("CountPlanNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("CountStage") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("Description") + .HasColumnType("nvarchar(max)"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("IsAutoComplete") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false); + + b.Property("ItemCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("JobDescription") + .HasMaxLength(1024) + .HasColumnType("nvarchar(1024)"); + + b.Property("JobStatus") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("JobType") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("LocationCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Priority") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasDefaultValue(0); + + b.Property("PriorityIncrement") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasDefaultValue(0); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Type") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("UpStreamJobNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("WarehouseCode") + .HasColumnType("nvarchar(max)"); + + b.Property("WorkGroupCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Worker") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("Number") + .IsUnique(); + + b.ToTable("Job_CountJob", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.CountJobDetail", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ArriveDate") + .HasColumnType("datetime2"); + + b.Property("ContainerCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ContainerCode"); + + b.Property("CountDescription") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("CountLabel") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("CountOperator") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("CountQty") + .HasColumnType("decimal(18,6)"); + + b.Property("CountTime") + .HasColumnType("datetime2"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("ExpireDate") + .HasColumnType("datetime2"); + + b.Property("InventoryLocationCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("InventoryQty") + .HasColumnType("decimal(18,6)"); + + b.Property("ItemCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemCode"); + + b.Property("ItemDesc1") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc1"); + + b.Property("ItemDesc2") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc2"); + + b.Property("ItemName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemName"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("LocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationArea"); + + b.Property("LocationCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationCode"); + + b.Property("LocationErpCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationErpCode"); + + b.Property("LocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationGroup"); + + b.Property("Lot") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Lot"); + + b.Property("MasterID") + .HasColumnType("uniqueidentifier"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("PackingCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("PackingCode"); + + b.Property("ProduceDate") + .HasColumnType("datetime2"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("Status") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("StdPackQty") + .HasColumnType("decimal(18,6)"); + + b.Property("SupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("SupplierBatch"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Uom") + .HasColumnType("nvarchar(max)"); + + b.Property("WarehouseCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("WarehouseCode"); + + b.HasKey("Id"); + + b.HasIndex("MasterID"); + + b.ToTable("Job_CountJobDetail", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.CountNote", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ActiveDate") + .HasColumnType("datetime2"); + + b.Property("Adjusted") + .HasColumnType("bit"); + + b.Property("BeginTime") + .HasColumnType("datetime2"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CountPlanNumber") + .HasColumnType("nvarchar(max)"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("Description") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("EndTime") + .HasColumnType("datetime2"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("Stage") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Type") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Worker") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("Number") + .IsUnique(); + + b.ToTable("Store_CountNote", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.CountNoteDetail", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Adjusted") + .HasColumnType("bit"); + + b.Property("ArriveDate") + .HasColumnType("datetime2"); + + b.Property("AuditCountDescription") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("AuditCountOperator") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("AuditCountQty") + .HasPrecision(18, 6) + .HasColumnType("decimal(18,6)"); + + b.Property("AuditCountTime") + .HasColumnType("datetime2"); + + b.Property("ContainerCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ContainerCode"); + + b.Property("CountLabel") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("CountPlanNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DetailStatus") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ExpireDate") + .HasColumnType("datetime2"); + + b.Property("FinalCountQty") + .HasPrecision(18, 6) + .HasColumnType("decimal(18,6)"); + + b.Property("FirstCountDescription") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("FirstCountOperator") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("FirstCountQty") + .HasPrecision(18, 6) + .HasColumnType("decimal(18,6)"); + + b.Property("FirstCountTime") + .HasColumnType("datetime2"); + + b.Property("InventoryQty") + .HasColumnType("decimal(18,6)"); + + b.Property("ItemCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemCode"); + + b.Property("ItemDesc1") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc1"); + + b.Property("ItemDesc2") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc2"); + + b.Property("ItemName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemName"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("LocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationArea"); + + b.Property("LocationCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationCode"); + + b.Property("LocationErpCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationErpCode"); + + b.Property("LocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationGroup"); + + b.Property("Lot") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Lot"); + + b.Property("MasterID") + .HasColumnType("uniqueidentifier"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("PackingCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("PackingCode"); + + b.Property("ProduceDate") + .HasColumnType("datetime2"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("RepeatCountDescription") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("RepeatCountOperator") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("RepeatCountQty") + .HasPrecision(18, 6) + .HasColumnType("decimal(18,6)"); + + b.Property("RepeatCountTime") + .HasColumnType("datetime2"); + + b.Property("Stage") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Status") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("StdPackQty") + .HasColumnType("decimal(18,6)"); + + b.Property("SupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("SupplierBatch"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Uom") + .HasColumnType("nvarchar(max)"); + + b.Property("WarehouseCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("WarehouseCode"); + + b.HasKey("Id"); + + b.HasIndex("MasterID"); + + b.HasIndex("Number", "CountLabel") + .IsUnique(); + + b.ToTable("Store_CountNoteDetail", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.CountPlan", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ActiveDate") + .HasColumnType("datetime2"); + + b.Property("AutoAgree") + .HasColumnType("bit"); + + b.Property("AutoCompleteJob") + .HasColumnType("bit"); + + b.Property("AutoHandle") + .HasColumnType("bit"); + + b.Property("AutoSubmit") + .HasColumnType("bit"); + + b.Property("BeginTime") + .HasColumnType("datetime2"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CountMethod") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("Description") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("DirectCreateNote") + .HasColumnType("bit"); + + b.Property("EndTime") + .HasColumnType("datetime2"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("JsonInventoryStatus") + .HasColumnType("nvarchar(max)"); + + b.Property("JsonItemCodes") + .HasColumnType("nvarchar(max)"); + + b.Property("JsonLocationCodes") + .HasColumnType("nvarchar(max)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("PlanTime") + .HasColumnType("datetime2"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("RequestStatus") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("RequestType") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Stage") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Type") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Worker") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("Number") + .IsUnique(); + + b.ToTable("Store_CountPlan", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.CountPlanDetail", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ArriveDate") + .HasColumnType("datetime2"); + + b.Property("AuditCountDescription") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("AuditCountOperator") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("AuditCountQty") + .HasPrecision(18, 6) + .HasColumnType("decimal(18,6)"); + + b.Property("AuditCountTime") + .HasColumnType("datetime2"); + + b.Property("ContainerCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ContainerCode"); + + b.Property("CountLabel") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DetailStatus") + .HasColumnType("int"); + + b.Property("ExpireDate") + .HasColumnType("datetime2"); + + b.Property("FinalCountQty") + .HasPrecision(18, 6) + .HasColumnType("decimal(18,6)"); + + b.Property("FirstCountDescription") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("FirstCountOperator") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("FirstCountQty") + .HasPrecision(18, 6) + .HasColumnType("decimal(18,6)"); + + b.Property("FirstCountTime") + .HasColumnType("datetime2"); + + b.Property("InventoryQty") + .HasColumnType("decimal(18,6)"); + + b.Property("ItemCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemCode"); + + b.Property("ItemDesc1") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc1"); + + b.Property("ItemDesc2") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc2"); + + b.Property("ItemName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemName"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("LocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationArea"); + + b.Property("LocationCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationCode"); + + b.Property("LocationErpCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationErpCode"); + + b.Property("LocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationGroup"); + + b.Property("Lot") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Lot"); + + b.Property("MasterID") + .HasColumnType("uniqueidentifier"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("PackingCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("PackingCode"); + + b.Property("ProduceDate") + .HasColumnType("datetime2"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("RepeatCountDescription") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("RepeatCountOperator") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("RepeatCountQty") + .HasPrecision(18, 6) + .HasColumnType("decimal(18,6)"); + + b.Property("RepeatCountTime") + .HasColumnType("datetime2"); + + b.Property("Stage") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Status") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("StdPackQty") + .HasColumnType("decimal(18,6)"); + + b.Property("SupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("SupplierBatch"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Uom") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("WarehouseCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("WarehouseCode"); + + b.HasKey("Id"); + + b.HasIndex("MasterID"); + + b.HasIndex("Number", "CountLabel") + .IsUnique(); + + b.ToTable("Store_CountPlanDetail", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.CustomerAsn", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ActiveDate") + .HasColumnType("datetime2"); + + b.Property("BeginTime") + .HasColumnType("datetime2"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("ContactEmail") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ContactName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ContactPhone") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("CustomerCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("DockCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("EndTime") + .HasColumnType("datetime2"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("SoNumber") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Status") + .HasColumnType("int"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Worker") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("CustomerCode"); + + b.HasIndex("Number") + .IsUnique(); + + b.ToTable("Store_CustomerAsn", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.CustomerAsnDetail", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("ItemCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemCode"); + + b.Property("ItemDesc1") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc1"); + + b.Property("ItemDesc2") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc2"); + + b.Property("ItemName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemName"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("MasterID") + .HasColumnType("uniqueidentifier"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("Qty") + .HasPrecision(18, 6) + .HasColumnType("decimal(18,6)") + .HasColumnName("Qty"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("SoLine") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("SoNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("StdPackQty") + .HasColumnType("decimal(18,6)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Uom") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Uom"); + + b.HasKey("Id"); + + b.HasIndex("MasterID"); + + b.HasIndex("Number", "ItemCode") + .IsUnique(); + + b.ToTable("Store_CustomerAsnDetail", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.CustomerReturnNote", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ActiveDate") + .HasColumnType("datetime2"); + + 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("Customer") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("JobNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("JobNumber"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("ReturnTime") + .HasColumnType("datetime2"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Worker") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("Number") + .IsUnique(); + + b.ToTable("Store_CustomerReturnNote", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.CustomerReturnNoteDetail", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ArriveDate") + .HasColumnType("datetime2"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("ExpireDate") + .HasColumnType("datetime2"); + + b.Property("FromContainerCode") + .HasColumnType("nvarchar(max)"); + + b.Property("FromLocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromLocationArea"); + + b.Property("FromLocationCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromLocationCode"); + + b.Property("FromLocationErpCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromLocationErpCode"); + + b.Property("FromLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromLocationGroup"); + + b.Property("FromLot") + .HasColumnType("nvarchar(max)"); + + b.Property("FromPackingCode") + .HasColumnType("nvarchar(450)"); + + b.Property("FromStatus") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("FromWarehouseCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromWarehouseCode"); + + b.Property("ItemCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemCode"); + + b.Property("ItemDesc1") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc1"); + + b.Property("ItemDesc2") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc2"); + + b.Property("ItemName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemName"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("MasterID") + .HasColumnType("uniqueidentifier"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("ProduceDate") + .HasColumnType("datetime2"); + + b.Property("Qty") + .HasPrecision(18, 6) + .HasColumnType("decimal(18,6)") + .HasColumnName("Qty"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("StdPackQty") + .HasColumnType("decimal(18,6)"); + + b.Property("SupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("SupplierBatch"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("ToContainerCode") + .HasColumnType("nvarchar(max)"); + + b.Property("ToLocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToLocationArea"); + + b.Property("ToLocationCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToLocationCode"); + + b.Property("ToLocationErpCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToLocationErpCode"); + + b.Property("ToLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToLocationGroup"); + + b.Property("ToLot") + .HasColumnType("nvarchar(max)"); + + b.Property("ToPackingCode") + .HasColumnType("nvarchar(max)"); + + b.Property("ToStatus") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ToWarehouseCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToWarehouseCode"); + + b.Property("Uom") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Uom"); + + b.HasKey("Id"); + + b.HasIndex("MasterID"); + + b.HasIndex("Number", "FromPackingCode", "FromLocationCode", "ToLocationCode") + .IsUnique() + .HasFilter("[FromPackingCode] IS NOT NULL"); + + b.ToTable("Store_CustomerReturnNoteDetail", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.DeliverJob", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AcceptTime") + .HasColumnType("datetime2"); + + b.Property("AcceptUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("AcceptUserName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("CompleteTime") + .HasColumnType("datetime2"); + + b.Property("CompleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CompleteUserName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + 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("CustomerAddressCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("CustomerCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("DeliverPlanNumber") + .HasColumnType("nvarchar(max)"); + + b.Property("DeliverRequestNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("DeliverTime") + .HasColumnType("datetime2"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("IsAutoComplete") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false); + + b.Property("JobDescription") + .HasMaxLength(1024) + .HasColumnType("nvarchar(1024)"); + + b.Property("JobStatus") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("JobType") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Priority") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasDefaultValue(0); + + b.Property("PriorityIncrement") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasDefaultValue(0); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("UpStreamJobNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("WarehouseCode") + .HasColumnType("nvarchar(max)"); + + b.Property("WorkGroupCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Worker") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("Number") + .IsUnique(); + + b.ToTable("Job_DeliverJob", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.DeliverJobDetail", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("HandledArriveDate") + .HasColumnType("datetime2"); + + b.Property("HandledContainerCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledContainerCode"); + + b.Property("HandledExpireDate") + .HasColumnType("datetime2"); + + b.Property("HandledFromLocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledFromLocationArea"); + + b.Property("HandledFromLocationCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledFromLocationCode"); + + b.Property("HandledFromLocationErpCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledFromLocationErpCode"); + + b.Property("HandledFromLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledFromLocationGroup"); + + b.Property("HandledFromWarehouseCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledFromWarehouseCode"); + + b.Property("HandledLot") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledLot"); + + b.Property("HandledPackingCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledPackingCode"); + + b.Property("HandledProduceDate") + .HasColumnType("datetime2"); + + b.Property("HandledQty") + .HasColumnType("decimal(18,6)"); + + b.Property("HandledSupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledSupplierBatch"); + + b.Property("ItemCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemCode"); + + b.Property("ItemDesc1") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc1"); + + b.Property("ItemDesc2") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc2"); + + b.Property("ItemName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemName"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("MasterID") + .HasColumnType("uniqueidentifier"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("OnTheWayLocationCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("RecommendArriveDate") + .HasColumnType("datetime2"); + + b.Property("RecommendContainerCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendContainerCode"); + + b.Property("RecommendExpireDate") + .HasColumnType("datetime2"); + + b.Property("RecommendFromLocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendFromLocationArea"); + + b.Property("RecommendFromLocationCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendFromLocationCode"); + + b.Property("RecommendFromLocationErpCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendFromLocationErpCode"); + + b.Property("RecommendFromLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendFromLocationGroup"); + + b.Property("RecommendFromWarehouseCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendFromWarehouseCode"); + + b.Property("RecommendLot") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendLot"); + + b.Property("RecommendPackingCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendPackingCode"); + + b.Property("RecommendProduceDate") + .HasColumnType("datetime2"); + + b.Property("RecommendQty") + .HasColumnType("decimal(18,6)"); + + b.Property("RecommendSupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendSupplierBatch"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("Status") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("StdPackQty") + .HasColumnType("decimal(18,6)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("ToLocationArea") + .HasColumnType("nvarchar(max)"); + + b.Property("ToLocationCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ToLocationErpCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ToLocationGroup") + .HasColumnType("nvarchar(max)"); + + b.Property("ToWarehouseCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Uom") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("MasterID"); + + b.ToTable("Job_DeliverJobDetail", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.DeliverNote", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ActiveDate") + .HasColumnType("datetime2"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CountPrint") + .HasColumnType("int"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("CustomerAddressCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("CustomerCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("DeliverPlanNumber") + .HasColumnType("nvarchar(max)"); + + b.Property("DeliverRequestNumber") + .HasColumnType("nvarchar(max)"); + + b.Property("DeliverRequestType") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("DeliverTime") + .HasColumnType("datetime2"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("JobNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("JobNumber"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Worker") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("Number") + .IsUnique(); + + b.ToTable("Store_DeliverNote", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.DeliverNoteDetail", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ArriveDate") + .HasColumnType("datetime2"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("ExpireDate") + .HasColumnType("datetime2"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("FromContainerCode") + .HasColumnType("nvarchar(max)"); + + b.Property("FromLocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromLocationArea"); + + b.Property("FromLocationCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromLocationCode"); + + b.Property("FromLocationErpCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromLocationErpCode"); + + b.Property("FromLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromLocationGroup"); + + b.Property("FromLot") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("FromPackingCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("FromStatus") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("FromWarehouseCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromWarehouseCode"); + + b.Property("HandledArriveDate") + .HasColumnType("datetime2"); + + b.Property("HandledContainerCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledContainerCode"); + + b.Property("HandledExpireDate") + .HasColumnType("datetime2"); + + b.Property("HandledFromLocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledFromLocationArea"); + + b.Property("HandledFromLocationCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledFromLocationCode"); + + b.Property("HandledFromLocationErpCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledFromLocationErpCode"); + + b.Property("HandledFromLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledFromLocationGroup"); + + b.Property("HandledFromWarehouseCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledFromWarehouseCode"); + + b.Property("HandledLot") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledLot"); + + b.Property("HandledPackingCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledPackingCode"); + + b.Property("HandledProduceDate") + .HasColumnType("datetime2"); + + b.Property("HandledQty") + .HasColumnType("decimal(18,6)"); + + b.Property("HandledSupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledSupplierBatch"); + + b.Property("ItemCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemCode"); + + b.Property("ItemDesc1") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc1"); + + b.Property("ItemDesc2") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc2"); + + b.Property("ItemName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemName"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("MasterID") + .HasColumnType("uniqueidentifier"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("ProduceDate") + .HasColumnType("datetime2"); + + b.Property("Qty") + .HasPrecision(18, 6) + .HasColumnType("decimal(18,6)") + .HasColumnName("Qty"); + + b.Property("RecommendArriveDate") + .HasColumnType("datetime2"); + + b.Property("RecommendContainerCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendContainerCode"); + + b.Property("RecommendExpireDate") + .HasColumnType("datetime2"); + + b.Property("RecommendFromLocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendFromLocationArea"); + + b.Property("RecommendFromLocationCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendFromLocationCode"); + + b.Property("RecommendFromLocationErpCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendFromLocationErpCode"); + + b.Property("RecommendFromLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendFromLocationGroup"); + + b.Property("RecommendFromWarehouseCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendFromWarehouseCode"); + + b.Property("RecommendLot") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendLot"); + + b.Property("RecommendPackingCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendPackingCode"); + + b.Property("RecommendProduceDate") + .HasColumnType("datetime2"); + + b.Property("RecommendQty") + .HasColumnType("decimal(18,6)"); + + b.Property("RecommendSupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendSupplierBatch"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("StdPackQty") + .HasColumnType("decimal(18,6)"); + + b.Property("SupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("SupplierBatch"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("ToContainerCode") + .HasColumnType("nvarchar(max)"); + + b.Property("ToLocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToLocationArea"); + + b.Property("ToLocationCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToLocationCode"); + + b.Property("ToLocationErpCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToLocationErpCode"); + + b.Property("ToLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToLocationGroup"); + + b.Property("ToLot") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ToPackingCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ToStatus") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ToWarehouseCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToWarehouseCode"); + + b.Property("Uom") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Uom"); + + b.HasKey("Id"); + + b.HasIndex("MasterID"); + + b.HasIndex("Number", "ItemCode", "FromPackingCode", "FromLot", "FromLocationCode", "ToLocationCode") + .IsUnique(); + + b.ToTable("Store_DeliverNoteDetail", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.DeliverPlan", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ActiveDate") + .HasColumnType("datetime2"); + + b.Property("AutoAgree") + .HasColumnType("bit"); + + b.Property("AutoCompleteJob") + .HasColumnType("bit"); + + b.Property("AutoHandle") + .HasColumnType("bit"); + + b.Property("AutoSubmit") + .HasColumnType("bit"); + + 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("CustomerAddressCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("CustomerCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("DirectCreateNote") + .HasColumnType("bit"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("PlanDate") + .HasColumnType("datetime2"); + + b.Property("PlanTime") + .HasColumnType("datetime2"); + + b.Property("Project") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("RequestStatus") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("SoNumber") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Worker") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("Number") + .IsUnique(); + + b.ToTable("Store_DeliverPlan", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.DeliverPlanDetail", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("ItemCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemCode"); + + b.Property("ItemDesc1") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc1"); + + b.Property("ItemDesc2") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc2"); + + b.Property("ItemName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemName"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("MasterID") + .HasColumnType("uniqueidentifier"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("Qty") + .HasPrecision(18, 6) + .HasColumnType("decimal(18,6)") + .HasColumnName("Qty"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("SoLine") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("SoNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("StdPackQty") + .HasColumnType("decimal(18,6)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Uom") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Uom"); + + b.HasKey("Id"); + + b.HasIndex("MasterID"); + + b.HasIndex("Number", "SoNumber", "SoLine") + .IsUnique() + .HasFilter("[SoNumber] IS NOT NULL AND [SoLine] IS NOT NULL"); + + b.ToTable("Store_DeliverPlanDetail", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.DeliverRequest", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ActiveDate") + .HasColumnType("datetime2"); + + b.Property("AutoAgree") + .HasColumnType("bit"); + + b.Property("AutoCompleteJob") + .HasColumnType("bit"); + + b.Property("AutoHandle") + .HasColumnType("bit"); + + b.Property("AutoSubmit") + .HasColumnType("bit"); + + 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("CustomerAddressCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("CustomerCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("DeliverPlanNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("DeliverRequestType") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("DeliverTime") + .HasColumnType("datetime2"); + + b.Property("DirectCreateNote") + .HasColumnType("bit"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("RequestStatus") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Worker") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("Number") + .IsUnique(); + + b.ToTable("Store_DeliverRequest", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.DeliverRequestDetail", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AreaCode") + .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("ItemCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemCode"); + + b.Property("ItemDesc1") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc1"); + + b.Property("ItemDesc2") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc2"); + + b.Property("ItemName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemName"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("MasterID") + .HasColumnType("uniqueidentifier"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("Qty") + .HasPrecision(18, 6) + .HasColumnType("decimal(18,6)") + .HasColumnName("Qty"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("StdPackQty") + .HasColumnType("decimal(18,6)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Uom") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Uom"); + + b.HasKey("Id"); + + b.HasIndex("MasterID"); + + b.HasIndex("Number", "ItemCode") + .IsUnique(); + + b.ToTable("Store_DeliverRequestDetail", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ExchangeData", b => + { + b.Property("Id") + .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("DataAction") + .HasColumnType("int"); + + b.Property("DataContent") + .HasColumnType("nvarchar(max)"); + + b.Property("DataIdentityCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("DataType") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("DestinationSystem") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("EffectiveDate") + .HasColumnType("datetime2"); + + b.Property("ErrorCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ErrorMessage") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Number") + .HasColumnType("bigint"); + + b.Property("ReadTime") + .HasColumnType("datetime2"); + + b.Property("Reader") + .HasColumnType("nvarchar(max)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("RetryTimes") + .HasColumnType("int"); + + b.Property("SourceSystem") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Status") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("TyrpNumber") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("WriteTime") + .HasColumnType("datetime2"); + + b.Property("Writer") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.ToTable("Store_ExchangeData", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.InjectionJob", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AcceptTime") + .HasColumnType("datetime2"); + + b.Property("AcceptUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("AcceptUserName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("CompleteTime") + .HasColumnType("datetime2"); + + b.Property("CompleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CompleteUserName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + 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("InjectionRequestNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("IsAutoComplete") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false); + + b.Property("JobDescription") + .HasMaxLength(1024) + .HasColumnType("nvarchar(1024)"); + + b.Property("JobStatus") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("JobType") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Priority") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasDefaultValue(0); + + b.Property("PriorityIncrement") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasDefaultValue(0); + + b.Property("ProdLine") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("RequestType") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("UpStreamJobNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("UseOnTheWayLocation") + .HasColumnType("bit"); + + b.Property("WarehouseCode") + .HasColumnType("nvarchar(max)"); + + b.Property("WorkGroupCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Worker") + .HasColumnType("nvarchar(max)"); + + b.Property("Workshop") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.HasKey("Id"); + + b.HasIndex("Number") + .IsUnique(); + + b.ToTable("Job_InjectionJob", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.InjectionJobDetail", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DeliveryQty") + .HasColumnType("decimal(18,6)"); + + b.Property("DistributionType") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ExpiredTime") + .HasColumnType("datetime2"); + + b.Property("HandledArriveDate") + .HasColumnType("datetime2"); + + b.Property("HandledContainerCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledContainerCode"); + + b.Property("HandledExpireDate") + .HasColumnType("datetime2"); + + b.Property("HandledFromLocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledFromLocationArea"); + + b.Property("HandledFromLocationCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledFromLocationCode"); + + b.Property("HandledFromLocationErpCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledFromLocationErpCode"); + + b.Property("HandledFromLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledFromLocationGroup"); + + b.Property("HandledFromWarehouseCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledFromWarehouseCode"); + + b.Property("HandledLot") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledLot"); + + b.Property("HandledPackingCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledPackingCode"); + + b.Property("HandledProduceDate") + .HasColumnType("datetime2"); + + b.Property("HandledQty") + .HasColumnType("decimal(18,6)"); + + b.Property("HandledSupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledSupplierBatch"); + + b.Property("ItemCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemCode"); + + b.Property("ItemDesc1") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc1"); + + b.Property("ItemDesc2") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc2"); + + b.Property("ItemName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemName"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("MasterID") + .HasColumnType("uniqueidentifier"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("OnTheWayLocationCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Operation") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("PlanBeginTime") + .HasColumnType("datetime2"); + + b.Property("PlannedSplitRule") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("PositionCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ProdLine") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("RecommendArriveDate") + .HasColumnType("datetime2"); + + b.Property("RecommendContainerCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendContainerCode"); + + b.Property("RecommendExpireDate") + .HasColumnType("datetime2"); + + b.Property("RecommendFromLocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendFromLocationArea"); + + b.Property("RecommendFromLocationCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendFromLocationCode"); + + b.Property("RecommendFromLocationErpCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendFromLocationErpCode"); + + b.Property("RecommendFromLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendFromLocationGroup"); + + b.Property("RecommendFromWarehouseCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendFromWarehouseCode"); + + b.Property("RecommendLot") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendLot"); + + b.Property("RecommendPackingCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendPackingCode"); + + b.Property("RecommendProduceDate") + .HasColumnType("datetime2"); + + b.Property("RecommendQty") + .HasColumnType("decimal(18,6)"); + + b.Property("RecommendSupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendSupplierBatch"); + + b.Property("RecommendType") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("RequestLocationCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("RoundedQty") + .HasColumnType("decimal(18,6)"); + + b.Property("Status") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("StdPackQty") + .HasColumnType("decimal(18,6)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("ToLocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ToLocationCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ToLocationErpCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ToLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ToWarehouseCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("TruncType") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Uom") + .HasColumnType("nvarchar(max)"); + + b.Property("WorkStation") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.HasKey("Id"); + + b.HasIndex("MasterID"); + + b.ToTable("Job_InjectionJobDetail", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.InjectionNote", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ActiveDate") + .HasColumnType("datetime2"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("ConfirmTime") + .HasColumnType("datetime2"); + + b.Property("Confirmed") + .HasColumnType("bit"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("JobNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("JobNumber"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("RequestNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("RequestType") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("UseOnTheWayLocation") + .HasColumnType("bit"); + + b.Property("Worker") + .HasColumnType("nvarchar(max)"); + + b.Property("Workshop") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.HasKey("Id"); + + b.HasIndex("Number") + .IsUnique(); + + b.ToTable("Store_InjectionNote", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.InjectionNoteDetail", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ArriveDate") + .HasColumnType("datetime2"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("ExpireDate") + .HasColumnType("datetime2"); + + b.Property("ExpiredTime") + .HasColumnType("datetime2"); + + b.Property("FromContainerCode") + .HasColumnType("nvarchar(max)"); + + b.Property("FromLocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromLocationArea"); + + b.Property("FromLocationCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromLocationCode"); + + b.Property("FromLocationErpCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromLocationErpCode"); + + b.Property("FromLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromLocationGroup"); + + b.Property("FromLot") + .HasColumnType("nvarchar(max)"); + + b.Property("FromPackingCode") + .HasColumnType("nvarchar(450)"); + + b.Property("FromStatus") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("FromWarehouseCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromWarehouseCode"); + + b.Property("HandledArriveDate") + .HasColumnType("datetime2"); + + b.Property("HandledContainerCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledContainerCode"); + + b.Property("HandledExpireDate") + .HasColumnType("datetime2"); + + b.Property("HandledFromLocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledFromLocationArea"); + + b.Property("HandledFromLocationCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledFromLocationCode"); + + b.Property("HandledFromLocationErpCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledFromLocationErpCode"); + + b.Property("HandledFromLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledFromLocationGroup"); + + b.Property("HandledFromWarehouseCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledFromWarehouseCode"); + + b.Property("HandledLot") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledLot"); + + b.Property("HandledPackingCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledPackingCode"); + + b.Property("HandledProduceDate") + .HasColumnType("datetime2"); + + b.Property("HandledQty") + .HasColumnType("decimal(18,6)"); + + b.Property("HandledSupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledSupplierBatch"); + + b.Property("IssueTime") + .HasColumnType("datetime2"); + + b.Property("ItemCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemCode"); + + b.Property("ItemDesc1") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc1"); + + b.Property("ItemDesc2") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc2"); + + b.Property("ItemName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemName"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("MasterID") + .HasColumnType("uniqueidentifier"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("OnTheWayLocationCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("PositionCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ProdLine") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ProduceDate") + .HasColumnType("datetime2"); + + b.Property("Qty") + .HasPrecision(18, 6) + .HasColumnType("decimal(18,6)") + .HasColumnName("Qty"); + + b.Property("RecommendArriveDate") + .HasColumnType("datetime2"); + + b.Property("RecommendContainerCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendContainerCode"); + + b.Property("RecommendExpireDate") + .HasColumnType("datetime2"); + + b.Property("RecommendFromLocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendFromLocationArea"); + + b.Property("RecommendFromLocationCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendFromLocationCode"); + + b.Property("RecommendFromLocationErpCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendFromLocationErpCode"); + + b.Property("RecommendFromLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendFromLocationGroup"); + + b.Property("RecommendFromWarehouseCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendFromWarehouseCode"); + + b.Property("RecommendLot") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendLot"); + + b.Property("RecommendPackingCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendPackingCode"); + + b.Property("RecommendProduceDate") + .HasColumnType("datetime2"); + + b.Property("RecommendQty") + .HasColumnType("decimal(18,6)"); + + b.Property("RecommendSupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendSupplierBatch"); + + b.Property("RecommendType") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("StdPackQty") + .HasColumnType("decimal(18,6)"); + + b.Property("SupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("SupplierBatch"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("ToContainerCode") + .HasColumnType("nvarchar(max)"); + + b.Property("ToLocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToLocationArea"); + + b.Property("ToLocationCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToLocationCode"); + + b.Property("ToLocationErpCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToLocationErpCode"); + + b.Property("ToLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToLocationGroup"); + + b.Property("ToLot") + .HasColumnType("nvarchar(max)"); + + b.Property("ToPackingCode") + .HasColumnType("nvarchar(max)"); + + b.Property("ToStatus") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ToWarehouseCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToWarehouseCode"); + + b.Property("Uom") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Uom"); + + b.Property("WorkStation") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.HasKey("Id"); + + b.HasIndex("FromPackingCode"); + + b.HasIndex("MasterID"); + + b.HasIndex("Number", "FromPackingCode", "FromLocationCode", "ToLocationCode") + .IsUnique() + .HasFilter("[FromPackingCode] IS NOT NULL"); + + b.ToTable("Store_InjectionNoteDetail", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.InjectionRequest", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ActiveDate") + .HasColumnType("datetime2"); + + b.Property("AutoAgree") + .HasColumnType("bit"); + + b.Property("AutoCompleteJob") + .HasColumnType("bit"); + + b.Property("AutoHandle") + .HasColumnType("bit"); + + b.Property("AutoSubmit") + .HasColumnType("bit"); + + 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("DirectCreateNote") + .HasColumnType("bit"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("PreparationPlanNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ProdLine") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("RequestStatus") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Type") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("UseOnTheWayLocation") + .HasColumnType("bit"); + + b.Property("Worker") + .HasColumnType("nvarchar(max)"); + + b.Property("Workshop") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.HasKey("Id"); + + b.HasIndex("Number") + .IsUnique(); + + b.ToTable("Store_InjectionRequest", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.InjectionRequestDetail", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("ExpiredTime") + .HasColumnType("datetime2"); + + b.Property("FromLocationArea") + .HasColumnType("nvarchar(max)"); + + b.Property("IssuedQty") + .HasPrecision(18, 6) + .HasColumnType("decimal(18,6)"); + + b.Property("ItemCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemCode"); + + b.Property("ItemDesc1") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc1"); + + b.Property("ItemDesc2") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc2"); + + b.Property("ItemName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemName"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("MasterID") + .HasColumnType("uniqueidentifier"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("PositionCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ProdLine") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Qty") + .HasPrecision(18, 6) + .HasColumnType("decimal(18,6)") + .HasColumnName("Qty"); + + b.Property("ReceivedQty") + .HasPrecision(18, 6) + .HasColumnType("decimal(18,6)"); + + b.Property("RecommendType") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("Status") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("StdPackQty") + .HasColumnType("decimal(18,6)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("ToLocationArea") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ToLocationCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ToLocationErpCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ToLocationGroup") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ToWarehouseCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Uom") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Uom"); + + b.Property("WorkStation") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.HasKey("Id"); + + b.HasIndex("ItemCode"); + + b.HasIndex("MasterID"); + + b.HasIndex("Number", "ItemCode", "ToLocationCode") + .IsUnique(); + + b.ToTable("Store_InjectionRequestDetail", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.InspectAbnormalNote", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ActiveDate") + .HasColumnType("datetime2"); + + 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("InspectNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("ReceiptNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("SupplierCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Worker") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("Number") + .IsUnique(); + + b.ToTable("Store_InspectAbnormalNote", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.InspectAbnormalNoteDetail", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AbnormalType") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ArriveDate") + .HasColumnType("datetime2"); + + b.Property("ContainerCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ContainerCode"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("ExpireDate") + .HasColumnType("datetime2"); + + b.Property("ItemCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemCode"); + + b.Property("ItemDesc1") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc1"); + + b.Property("ItemDesc2") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc2"); + + b.Property("ItemName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemName"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Lot") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Lot"); + + b.Property("MasterID") + .HasColumnType("uniqueidentifier"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("PackingCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("PackingCode"); + + b.Property("Photos") + .HasColumnType("nvarchar(max)"); + + b.Property("ProduceDate") + .HasColumnType("datetime2"); + + b.Property("Qty") + .HasPrecision(18, 6) + .HasColumnType("decimal(18,6)") + .HasColumnName("Qty"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("StdPackQty") + .HasColumnType("decimal(18,6)"); + + b.Property("SupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("SupplierBatch"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Uom") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Uom"); + + b.HasKey("Id"); + + b.HasIndex("MasterID"); + + b.HasIndex("Number", "PackingCode") + .IsUnique(); + + b.ToTable("Store_InspectAbnormalNoteDetail", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.InspectJob", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AcceptTime") + .HasColumnType("datetime2"); + + b.Property("AcceptUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("AcceptUserName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("AsnNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("CompleteTime") + .HasColumnType("datetime2"); + + b.Property("CompleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CompleteUserName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + 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("InspectNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("IsAutoComplete") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false); + + b.Property("JobDescription") + .HasMaxLength(1024) + .HasColumnType("nvarchar(1024)"); + + b.Property("JobStatus") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("JobType") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("NextAction") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("PoNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Priority") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasDefaultValue(0); + + b.Property("PriorityIncrement") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasDefaultValue(0); + + b.Property("PurchaseReceiptRequestNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ReceiptNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("RpNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("SupplierCode") + .HasColumnType("nvarchar(max)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("UpStreamJobNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("WarehouseCode") + .HasColumnType("nvarchar(max)"); + + b.Property("WorkGroupCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Worker") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("Number") + .IsUnique(); + + b.ToTable("Job_InspectJob", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.InspectJobDetail", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AbcClass") + .HasColumnType("nvarchar(max)"); + + b.Property("Appearance") + .HasColumnType("nvarchar(max)"); + + b.Property("ArriveDate") + .HasColumnType("datetime2"); + + b.Property("ContainerCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ContainerCode"); + + b.Property("CrackQty") + .ValueGeneratedOnAdd() + .HasColumnType("decimal(18,6)") + .HasDefaultValue(0m); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DetailInspectStatus") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ExpireDate") + .HasColumnType("datetime2"); + + b.Property("FailedQty") + .ValueGeneratedOnAdd() + .HasColumnType("decimal(18,6)") + .HasDefaultValue(0m); + + b.Property("FailedReason") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("GoodQty") + .ValueGeneratedOnAdd() + .HasColumnType("decimal(18,6)") + .HasDefaultValue(0m); + + b.Property("InspectQty") + .HasColumnType("decimal(18,6)"); + + b.Property("InspectType") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("InspectUser") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ItemCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemCode"); + + b.Property("ItemDesc1") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc1"); + + b.Property("ItemDesc2") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc2"); + + b.Property("ItemName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemName"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("LocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationArea"); + + b.Property("LocationCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationCode"); + + b.Property("LocationErpCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationErpCode"); + + b.Property("LocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationGroup"); + + b.Property("Lot") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Lot"); + + b.Property("MasterID") + .HasColumnType("uniqueidentifier"); + + b.Property("NotPassedQty") + .ValueGeneratedOnAdd() + .HasColumnType("decimal(18,6)") + .HasDefaultValue(0m); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("OtherPropertyJson") + .HasColumnType("nvarchar(max)"); + + b.Property("PackingCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("PackingCode"); + + b.Property("PoLine") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("PoNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ProduceDate") + .HasColumnType("datetime2"); + + b.Property("ReceiveQty") + .HasColumnType("decimal(18,6)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("SamplePercent") + .HasColumnType("decimal(18,6)"); + + b.Property("Status") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("StdPackQty") + .HasColumnType("decimal(18,6)"); + + b.Property("SupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("SupplierBatch"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Uom") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Volume") + .HasColumnType("nvarchar(max)"); + + b.Property("WarehouseCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("WarehouseCode"); + + b.Property("Weight") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("MasterID"); + + b.ToTable("Job_InspectJobDetail", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.InspectJobSummaryDetail", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AbcClass") + .HasColumnType("nvarchar(max)"); + + b.Property("ArriveDate") + .HasColumnType("datetime2"); + + b.Property("CrackQty") + .ValueGeneratedOnAdd() + .HasColumnType("decimal(18,6)") + .HasDefaultValue(0m); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("ExpireDate") + .HasColumnType("datetime2"); + + b.Property("FailedQty") + .ValueGeneratedOnAdd() + .HasColumnType("decimal(18,6)") + .HasDefaultValue(0m); + + b.Property("FailedReason") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("GoodQty") + .ValueGeneratedOnAdd() + .HasColumnType("decimal(18,6)") + .HasDefaultValue(0m); + + b.Property("InspectQty") + .HasColumnType("decimal(18,6)"); + + b.Property("InspectReport") + .HasColumnType("nvarchar(max)"); + + b.Property("InspectType") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("InspectUser") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ItemCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemCode"); + + b.Property("ItemDesc1") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc1"); + + b.Property("ItemDesc2") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc2"); + + b.Property("ItemName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemName"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Lot") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Lot"); + + b.Property("MasterID") + .HasColumnType("uniqueidentifier"); + + b.Property("NotPassedQty") + .ValueGeneratedOnAdd() + .HasColumnType("decimal(18,6)") + .HasDefaultValue(0m); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("PoLine") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("PoNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ProduceDate") + .HasColumnType("datetime2"); + + b.Property("ReceiveQty") + .HasColumnType("decimal(18,6)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("SamplePercent") + .HasColumnType("decimal(18,6)"); + + b.Property("StdPackQty") + .HasColumnType("decimal(18,6)"); + + b.Property("SummaryInspectStatus") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("SupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("SupplierBatch"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Uom") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.HasKey("Id"); + + b.HasIndex("MasterID"); + + b.ToTable("Job_InspectJobSummaryDetail", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.InspectNote", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ActiveDate") + .HasColumnType("datetime2"); + + b.Property("AsnNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + 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("InspectNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("JobNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("JobNumber"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("NextAction") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("PoNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("PurchaseReceiptRequestNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ReceiptNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("RpNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("SupplierCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Worker") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("Number") + .IsUnique(); + + b.ToTable("Store_InspectNote", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.InspectNoteDetail", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AbcClass") + .HasColumnType("nvarchar(max)"); + + b.Property("Appearance") + .HasColumnType("nvarchar(max)"); + + b.Property("ArriveDate") + .HasColumnType("datetime2"); + + b.Property("ContainerCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ContainerCode"); + + b.Property("CrackQty") + .ValueGeneratedOnAdd() + .HasColumnType("decimal(18,6)") + .HasDefaultValue(0m); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DetailInspectStatus") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ExpireDate") + .HasColumnType("datetime2"); + + b.Property("FailedQty") + .ValueGeneratedOnAdd() + .HasColumnType("decimal(18,6)") + .HasDefaultValue(0m); + + b.Property("FailedReason") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("GoodQty") + .ValueGeneratedOnAdd() + .HasColumnType("decimal(18,6)") + .HasDefaultValue(0m); + + b.Property("InspectDate") + .HasColumnType("datetime2"); + + b.Property("InspectQty") + .ValueGeneratedOnAdd() + .HasColumnType("decimal(18,6)") + .HasDefaultValue(0m); + + b.Property("InspectType") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("InspectUser") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ItemCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemCode"); + + b.Property("ItemDesc1") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc1"); + + b.Property("ItemDesc2") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc2"); + + b.Property("ItemName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemName"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("LocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationArea"); + + b.Property("LocationCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationCode"); + + b.Property("LocationErpCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationErpCode"); + + b.Property("LocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationGroup"); + + b.Property("Lot") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Lot"); + + b.Property("MasterID") + .HasColumnType("uniqueidentifier"); + + b.Property("NotPassedQty") + .HasColumnType("decimal(18,6)"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("OtherPropertyJson") + .HasColumnType("nvarchar(max)"); + + b.Property("PackingCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("PackingCode"); + + b.Property("Photos") + .HasColumnType("nvarchar(max)"); + + b.Property("PoLine") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("PoLine"); + + b.Property("PoNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("PoNumber"); + + b.Property("ProduceDate") + .HasColumnType("datetime2"); + + b.Property("ReceiveQty") + .HasColumnType("decimal(18,6)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("SamplePercent") + .ValueGeneratedOnAdd() + .HasColumnType("decimal(18,6)") + .HasDefaultValue(0m); + + b.Property("Status") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("StdPackQty") + .HasColumnType("decimal(18,6)"); + + b.Property("SupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("SupplierBatch"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Uom") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Volume") + .HasColumnType("nvarchar(max)"); + + b.Property("WarehouseCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("WarehouseCode"); + + b.Property("Weight") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("MasterID"); + + b.HasIndex("Number", "PackingCode") + .IsUnique(); + + b.ToTable("Store_InspectNoteDetail", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.InspectNoteSummaryDetail", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AbcClass") + .HasColumnType("nvarchar(max)"); + + b.Property("ArriveDate") + .HasColumnType("datetime2"); + + b.Property("CrackQty") + .ValueGeneratedOnAdd() + .HasColumnType("decimal(18,6)") + .HasDefaultValue(0m); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("ExpireDate") + .HasColumnType("datetime2"); + + b.Property("FailedQty") + .ValueGeneratedOnAdd() + .HasColumnType("decimal(18,6)") + .HasDefaultValue(0m); + + b.Property("FailedReason") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("GoodQty") + .ValueGeneratedOnAdd() + .HasColumnType("decimal(18,6)") + .HasDefaultValue(0m); + + b.Property("InspectQty") + .ValueGeneratedOnAdd() + .HasColumnType("decimal(18,6)") + .HasDefaultValue(0m); + + b.Property("InspectType") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("InspectUser") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ItemCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemCode"); + + b.Property("ItemDesc1") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc1"); + + b.Property("ItemDesc2") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc2"); + + b.Property("ItemName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemName"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Lot") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Lot"); + + b.Property("MasterID") + .HasColumnType("uniqueidentifier"); + + b.Property("NotPassedQty") + .HasColumnType("decimal(18,6)"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("PoLine") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("PoLine"); + + b.Property("PoNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("PoNumber"); + + b.Property("ProduceDate") + .HasColumnType("datetime2"); + + b.Property("ReceiveQty") + .HasColumnType("decimal(18,6)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("SamplePercent") + .ValueGeneratedOnAdd() + .HasColumnType("decimal(18,6)") + .HasDefaultValue(0m); + + b.Property("StdPackQty") + .HasColumnType("decimal(18,6)"); + + b.Property("SummaryInspectStatus") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("SupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("SupplierBatch"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Uom") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.HasKey("Id"); + + b.HasIndex("MasterID"); + + b.HasIndex("Number", "ItemCode") + .IsUnique(); + + b.ToTable("Store_InspectNoteSummaryDetail", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.InspectRequest", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ActiveDate") + .HasColumnType("datetime2"); + + b.Property("AsnNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("AutoAgree") + .HasColumnType("bit"); + + b.Property("AutoCompleteJob") + .HasColumnType("bit"); + + b.Property("AutoHandle") + .HasColumnType("bit"); + + b.Property("AutoSubmit") + .HasColumnType("bit"); + + 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("DirectCreateNote") + .HasColumnType("bit"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("PoNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("PurchaseReceiptRequestNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ReceiptNumber") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("RequestStatus") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("RpNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("SupplierCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("WarehouseCode") + .HasColumnType("nvarchar(max)"); + + b.Property("Worker") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("Number") + .IsUnique(); + + b.ToTable("Store_InspectRequest", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.InspectRequestDetail", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AbcClass") + .HasColumnType("nvarchar(max)"); + + b.Property("ArriveDate") + .HasColumnType("datetime2"); + + b.Property("Attributes") + .HasColumnType("nvarchar(max)"); + + b.Property("ContainerCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ContainerCode"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DetailInspectStatus") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ExpireDate") + .HasColumnType("datetime2"); + + b.Property("InspectQty") + .ValueGeneratedOnAdd() + .HasColumnType("decimal(18,6)") + .HasDefaultValue(0m); + + b.Property("InspectType") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ItemCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemCode"); + + b.Property("ItemDesc1") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc1"); + + b.Property("ItemDesc2") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc2"); + + b.Property("ItemName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemName"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("LocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationArea"); + + b.Property("LocationCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationCode"); + + b.Property("LocationErpCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationErpCode"); + + b.Property("LocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationGroup"); + + b.Property("Lot") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Lot"); + + b.Property("MasterID") + .HasColumnType("uniqueidentifier"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("PackingCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("PackingCode"); + + b.Property("PoLine") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("PoLine"); + + b.Property("PoNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("PoNumber"); + + b.Property("ProduceDate") + .HasColumnType("datetime2"); + + b.Property("ReceiveQty") + .HasColumnType("decimal(18,6)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("SamplePercent") + .ValueGeneratedOnAdd() + .HasColumnType("decimal(18,6)") + .HasDefaultValue(0m); + + b.Property("Status") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("StdPackQty") + .HasColumnType("decimal(18,6)"); + + b.Property("SupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("SupplierBatch"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Uom") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("WarehouseCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("WarehouseCode"); + + b.HasKey("Id"); + + b.HasIndex("MasterID"); + + b.HasIndex("Number", "PackingCode") + .IsUnique(); + + b.ToTable("Store_InspectRequestDetail", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.InspectRequestSummaryDetail", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AbcClass") + .HasColumnType("nvarchar(max)"); + + b.Property("ArriveDate") + .HasColumnType("datetime2"); + + b.Property("CrackQty") + .HasColumnType("decimal(18,6)"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("ExpireDate") + .HasColumnType("datetime2"); + + b.Property("FailedQty") + .HasColumnType("decimal(18,6)"); + + b.Property("GoodQty") + .HasColumnType("decimal(18,6)"); + + b.Property("InspectQty") + .ValueGeneratedOnAdd() + .HasColumnType("decimal(18,6)") + .HasDefaultValue(0m); + + b.Property("InspectReport") + .HasColumnType("nvarchar(max)"); + + b.Property("InspectType") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ItemCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemCode"); + + b.Property("ItemDesc1") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc1"); + + b.Property("ItemDesc2") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc2"); + + b.Property("ItemName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemName"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Lot") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Lot"); + + b.Property("MasterID") + .HasColumnType("uniqueidentifier"); + + b.Property("NotPassedQty") + .HasColumnType("decimal(18,6)"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("PoLine") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("PoLine"); + + b.Property("PoNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("PoNumber"); + + b.Property("ProduceDate") + .HasColumnType("datetime2"); + + b.Property("ReceiveQty") + .HasColumnType("decimal(18,6)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("SamplePercent") + .ValueGeneratedOnAdd() + .HasColumnType("decimal(18,6)") + .HasDefaultValue(0m); + + b.Property("StdPackQty") + .HasColumnType("decimal(18,6)"); + + b.Property("SummaryInspectStatus") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("SupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("SupplierBatch"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Uom") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.HasKey("Id"); + + b.HasIndex("MasterID"); + + b.HasIndex("Number", "ItemCode", "Lot") + .IsUnique() + .HasFilter("[Lot] IS NOT NULL"); + + b.ToTable("Store_InspectRequestSummaryDetail", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.InventoryInitialNote", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("ActiveDate") + .HasColumnType("datetime2"); + + 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("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("RequestNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Worker") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("Number") + .IsUnique(); + + b.ToTable("Store_InventoryInitialNote", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.InventoryInitialNoteDetail", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("ArriveDate") + .HasColumnType("datetime2"); + + b.Property("ContainerCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ContainerCode"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("ExpireDate") + .HasColumnType("datetime2"); + + b.Property("ItemCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemCode"); + + b.Property("ItemDesc1") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc1"); + + b.Property("ItemDesc2") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc2"); + + b.Property("ItemName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemName"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("LocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationArea"); + + b.Property("LocationCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationCode"); + + b.Property("LocationErpCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationErpCode"); + + b.Property("LocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationGroup"); + + b.Property("Lot") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Lot"); + + b.Property("MasterID") + .HasColumnType("uniqueidentifier"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("PackingCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("PackingCode"); + + b.Property("ProduceDate") + .HasColumnType("datetime2"); + + b.Property("Qty") + .HasPrecision(18, 6) + .HasColumnType("decimal(18,6)") + .HasColumnName("Qty"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("Status") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("StdPackQty") + .HasColumnType("decimal(18,6)"); + + b.Property("SupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("SupplierBatch"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Uom") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Uom"); + + b.Property("WarehouseCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("WarehouseCode"); + + b.HasKey("Id"); + + b.HasIndex("MasterID"); + + b.HasIndex("Number", "PackingCode", "ItemCode", "Lot", "Status") + .IsUnique() + .HasFilter("[Lot] IS NOT NULL"); + + b.ToTable("Store_InventoryInitialNoteDetail", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.InventoryTransferNote", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ActiveDate") + .HasColumnType("datetime2"); + + 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("JobNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("JobNumber"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("SupplierCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("TransferType") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Worker") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("Number") + .IsUnique(); + + b.ToTable("Store_InventoryTransferNote", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.InventoryTransferNoteDetail", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ArriveDate") + .HasColumnType("datetime2"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("ExpireDate") + .HasColumnType("datetime2"); + + b.Property("FromContainerCode") + .HasColumnType("nvarchar(max)"); + + b.Property("FromLocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromLocationArea"); + + b.Property("FromLocationCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromLocationCode"); + + b.Property("FromLocationErpCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromLocationErpCode"); + + b.Property("FromLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromLocationGroup"); + + b.Property("FromLot") + .HasColumnType("nvarchar(max)"); + + b.Property("FromPackingCode") + .HasColumnType("nvarchar(450)"); + + b.Property("FromStatus") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("FromWarehouseCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromWarehouseCode"); + + b.Property("ItemCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemCode"); + + b.Property("ItemDesc1") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc1"); + + b.Property("ItemDesc2") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc2"); + + b.Property("ItemName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemName"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("MasterID") + .HasColumnType("uniqueidentifier"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("ProduceDate") + .HasColumnType("datetime2"); + + b.Property("Qty") + .HasPrecision(18, 6) + .HasColumnType("decimal(18,6)") + .HasColumnName("Qty"); + + b.Property("Reason") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("StdPackQty") + .HasColumnType("decimal(18,6)"); + + b.Property("SupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("SupplierBatch"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("ToContainerCode") + .HasColumnType("nvarchar(max)"); + + b.Property("ToLocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToLocationArea"); + + b.Property("ToLocationCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToLocationCode"); + + b.Property("ToLocationErpCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToLocationErpCode"); + + b.Property("ToLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToLocationGroup"); + + b.Property("ToLot") + .HasColumnType("nvarchar(max)"); + + b.Property("ToPackingCode") + .HasColumnType("nvarchar(max)"); + + b.Property("ToStatus") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ToWarehouseCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToWarehouseCode"); + + b.Property("Uom") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Uom"); + + b.HasKey("Id"); + + b.HasIndex("MasterID"); + + b.HasIndex("Number", "FromPackingCode", "FromLocationCode", "ToLocationCode") + .IsUnique() + .HasFilter("[FromPackingCode] IS NOT NULL"); + + b.ToTable("Store_InventoryTransferNoteDetail", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.IsolationNote", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ActiveDate") + .HasColumnType("datetime2"); + + 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("JobNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("JobNumber"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Worker") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("Number") + .IsUnique(); + + b.ToTable("Store_IsolationNote", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.IsolationNoteDetail", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ArriveDate") + .HasColumnType("datetime2"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("ExpireDate") + .HasColumnType("datetime2"); + + b.Property("FromContainerCode") + .HasColumnType("nvarchar(max)"); + + b.Property("FromLocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromLocationArea"); + + b.Property("FromLocationCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromLocationCode"); + + b.Property("FromLocationErpCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromLocationErpCode"); + + b.Property("FromLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromLocationGroup"); + + b.Property("FromLot") + .HasColumnType("nvarchar(max)"); + + b.Property("FromPackingCode") + .HasColumnType("nvarchar(450)"); + + b.Property("FromStatus") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("FromWarehouseCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromWarehouseCode"); + + b.Property("ItemCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemCode"); + + b.Property("ItemDesc1") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc1"); + + b.Property("ItemDesc2") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc2"); + + b.Property("ItemName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemName"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("MasterID") + .HasColumnType("uniqueidentifier"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("ProduceDate") + .HasColumnType("datetime2"); + + b.Property("Qty") + .HasPrecision(18, 6) + .HasColumnType("decimal(18,6)") + .HasColumnName("Qty"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("StdPackQty") + .HasColumnType("decimal(18,6)"); + + b.Property("SupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("SupplierBatch"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("ToContainerCode") + .HasColumnType("nvarchar(max)"); + + b.Property("ToLocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToLocationArea"); + + b.Property("ToLocationCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToLocationCode"); + + b.Property("ToLocationErpCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToLocationErpCode"); + + b.Property("ToLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToLocationGroup"); + + b.Property("ToLot") + .HasColumnType("nvarchar(max)"); + + b.Property("ToPackingCode") + .HasColumnType("nvarchar(max)"); + + b.Property("ToStatus") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ToWarehouseCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToWarehouseCode"); + + b.Property("Uom") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Uom"); + + b.HasKey("Id"); + + b.HasIndex("FromPackingCode"); + + b.HasIndex("MasterID"); + + b.HasIndex("Number", "FromPackingCode", "FromLocationCode", "ToLocationCode") + .IsUnique() + .HasFilter("[FromPackingCode] IS NOT NULL"); + + b.ToTable("Store_IsolationNoteDetail", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.IssueJob", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AcceptTime") + .HasColumnType("datetime2"); + + b.Property("AcceptUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("AcceptUserName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("CompleteTime") + .HasColumnType("datetime2"); + + b.Property("CompleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CompleteUserName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + 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("IsAutoComplete") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false); + + b.Property("JobDescription") + .HasMaxLength(1024) + .HasColumnType("nvarchar(1024)"); + + b.Property("JobStatus") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("JobType") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("MaterialRequestNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Priority") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasDefaultValue(0); + + b.Property("PriorityIncrement") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasDefaultValue(0); + + b.Property("ProdLine") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("RequestType") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("UpStreamJobNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("UseOnTheWayLocation") + .HasColumnType("bit"); + + b.Property("WarehouseCode") + .HasColumnType("nvarchar(max)"); + + b.Property("WorkGroupCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Worker") + .HasColumnType("nvarchar(max)"); + + b.Property("Workshop") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.HasKey("Id"); + + b.HasIndex("Number") + .IsUnique(); + + b.ToTable("Job_IssueJob", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.IssueJobDetail", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DeliveryQty") + .HasColumnType("decimal(18,6)"); + + b.Property("DistributionType") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ExpiredTime") + .HasColumnType("datetime2"); + + b.Property("HandledArriveDate") + .HasColumnType("datetime2"); + + b.Property("HandledContainerCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledContainerCode"); + + b.Property("HandledExpireDate") + .HasColumnType("datetime2"); + + b.Property("HandledFromLocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledFromLocationArea"); + + b.Property("HandledFromLocationCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledFromLocationCode"); + + b.Property("HandledFromLocationErpCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledFromLocationErpCode"); + + b.Property("HandledFromLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledFromLocationGroup"); + + b.Property("HandledFromWarehouseCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledFromWarehouseCode"); + + b.Property("HandledLot") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledLot"); + + b.Property("HandledPackingCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledPackingCode"); + + b.Property("HandledProduceDate") + .HasColumnType("datetime2"); + + b.Property("HandledQty") + .HasColumnType("decimal(18,6)"); + + b.Property("HandledSupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledSupplierBatch"); + + b.Property("ItemCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemCode"); + + b.Property("ItemDesc1") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc1"); + + b.Property("ItemDesc2") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc2"); + + b.Property("ItemName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemName"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("MasterID") + .HasColumnType("uniqueidentifier"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("OnTheWayLocationCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Operation") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("PlanBeginTime") + .HasColumnType("datetime2"); + + b.Property("PlannedSplitRule") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("PositionCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ProdLine") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("RecommendArriveDate") + .HasColumnType("datetime2"); + + b.Property("RecommendContainerCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendContainerCode"); + + b.Property("RecommendExpireDate") + .HasColumnType("datetime2"); + + b.Property("RecommendFromLocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendFromLocationArea"); + + b.Property("RecommendFromLocationCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendFromLocationCode"); + + b.Property("RecommendFromLocationErpCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendFromLocationErpCode"); + + b.Property("RecommendFromLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendFromLocationGroup"); + + b.Property("RecommendFromWarehouseCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendFromWarehouseCode"); + + b.Property("RecommendLot") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendLot"); + + b.Property("RecommendPackingCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendPackingCode"); + + b.Property("RecommendProduceDate") + .HasColumnType("datetime2"); + + b.Property("RecommendQty") + .HasColumnType("decimal(18,6)"); + + b.Property("RecommendSupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendSupplierBatch"); + + b.Property("RecommendType") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("RequestLocationCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("RoundedQty") + .HasColumnType("decimal(18,6)"); + + b.Property("Status") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("StdPackQty") + .HasColumnType("decimal(18,6)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("ToLocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ToLocationCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ToLocationErpCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ToLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ToWarehouseCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("TruncType") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Uom") + .HasColumnType("nvarchar(max)"); + + b.Property("WorkStation") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.HasKey("Id"); + + b.HasIndex("MasterID"); + + b.ToTable("Job_IssueJobDetail", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.IssueNote", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ActiveDate") + .HasColumnType("datetime2"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("ConfirmTime") + .HasColumnType("datetime2"); + + b.Property("Confirmed") + .HasColumnType("bit"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("JobNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("JobNumber"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("RequestNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("RequestType") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("UseOnTheWayLocation") + .HasColumnType("bit"); + + b.Property("Worker") + .HasColumnType("nvarchar(max)"); + + b.Property("Workshop") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.HasKey("Id"); + + b.HasIndex("Number") + .IsUnique(); + + b.ToTable("Store_IssueNote", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.IssueNoteDetail", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ArriveDate") + .HasColumnType("datetime2"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("ExpireDate") + .HasColumnType("datetime2"); + + b.Property("ExpiredTime") + .HasColumnType("datetime2"); + + b.Property("FromContainerCode") + .HasColumnType("nvarchar(max)"); + + b.Property("FromLocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromLocationArea"); + + b.Property("FromLocationCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromLocationCode"); + + b.Property("FromLocationErpCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromLocationErpCode"); + + b.Property("FromLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromLocationGroup"); + + b.Property("FromLot") + .HasColumnType("nvarchar(max)"); + + b.Property("FromPackingCode") + .HasColumnType("nvarchar(450)"); + + b.Property("FromStatus") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("FromWarehouseCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromWarehouseCode"); + + b.Property("HandledArriveDate") + .HasColumnType("datetime2"); + + b.Property("HandledContainerCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledContainerCode"); + + b.Property("HandledExpireDate") + .HasColumnType("datetime2"); + + b.Property("HandledFromLocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledFromLocationArea"); + + b.Property("HandledFromLocationCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledFromLocationCode"); + + b.Property("HandledFromLocationErpCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledFromLocationErpCode"); + + b.Property("HandledFromLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledFromLocationGroup"); + + b.Property("HandledFromWarehouseCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledFromWarehouseCode"); + + b.Property("HandledLot") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledLot"); + + b.Property("HandledPackingCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledPackingCode"); + + b.Property("HandledProduceDate") + .HasColumnType("datetime2"); + + b.Property("HandledQty") + .HasColumnType("decimal(18,6)"); + + b.Property("HandledSupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledSupplierBatch"); + + b.Property("IssueTime") + .HasColumnType("datetime2"); + + b.Property("ItemCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemCode"); + + b.Property("ItemDesc1") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc1"); + + b.Property("ItemDesc2") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc2"); + + b.Property("ItemName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemName"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("MasterID") + .HasColumnType("uniqueidentifier"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("OnTheWayLocationCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("PositionCode") + .HasColumnType("nvarchar(max)"); + + b.Property("ProdLine") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ProduceDate") + .HasColumnType("datetime2"); + + b.Property("Qty") + .HasPrecision(18, 6) + .HasColumnType("decimal(18,6)") + .HasColumnName("Qty"); + + b.Property("RecommendArriveDate") + .HasColumnType("datetime2"); + + b.Property("RecommendContainerCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendContainerCode"); + + b.Property("RecommendExpireDate") + .HasColumnType("datetime2"); + + b.Property("RecommendFromLocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendFromLocationArea"); + + b.Property("RecommendFromLocationCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendFromLocationCode"); + + b.Property("RecommendFromLocationErpCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendFromLocationErpCode"); + + b.Property("RecommendFromLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendFromLocationGroup"); + + b.Property("RecommendFromWarehouseCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendFromWarehouseCode"); + + b.Property("RecommendLot") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendLot"); + + b.Property("RecommendPackingCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendPackingCode"); + + b.Property("RecommendProduceDate") + .HasColumnType("datetime2"); + + b.Property("RecommendQty") + .HasColumnType("decimal(18,6)"); + + b.Property("RecommendSupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendSupplierBatch"); + + b.Property("RecommendType") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("StdPackQty") + .HasColumnType("decimal(18,6)"); + + b.Property("SupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("SupplierBatch"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("ToContainerCode") + .HasColumnType("nvarchar(max)"); + + b.Property("ToLocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToLocationArea"); + + b.Property("ToLocationCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToLocationCode"); + + b.Property("ToLocationErpCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToLocationErpCode"); + + b.Property("ToLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToLocationGroup"); + + b.Property("ToLot") + .HasColumnType("nvarchar(max)"); + + b.Property("ToPackingCode") + .HasColumnType("nvarchar(max)"); + + b.Property("ToStatus") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ToWarehouseCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToWarehouseCode"); + + b.Property("Uom") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Uom"); + + b.Property("WorkStation") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.HasKey("Id"); + + b.HasIndex("FromPackingCode"); + + b.HasIndex("MasterID"); + + b.HasIndex("Number", "FromPackingCode", "FromLocationCode", "ToLocationCode") + .IsUnique() + .HasFilter("[FromPackingCode] IS NOT NULL"); + + b.ToTable("Store_IssueNoteDetail", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ItemTransformNote", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ActiveDate") + .HasColumnType("datetime2"); + + 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("JobNumber") + .HasColumnType("nvarchar(max)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("RequestNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Worker") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("Number") + .IsUnique(); + + b.ToTable("Store_ItemTransformNote", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ItemTransformNoteDetail", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ConcurrencyStamp") + .HasColumnType("nvarchar(max)"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("FromArriveDate") + .HasColumnType("datetime2"); + + b.Property("FromContainerCode") + .HasColumnType("nvarchar(max)"); + + b.Property("FromExpireDate") + .HasColumnType("datetime2"); + + b.Property("FromLocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromLocationArea"); + + b.Property("FromLocationCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromLocationCode"); + + b.Property("FromLocationErpCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromLocationErpCode"); + + b.Property("FromLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromLocationGroup"); + + b.Property("FromLot") + .HasColumnType("nvarchar(max)"); + + b.Property("FromPackingCode") + .HasColumnType("nvarchar(450)"); + + b.Property("FromProduceDate") + .HasColumnType("datetime2"); + + b.Property("FromQty") + .HasColumnType("decimal(18,6)"); + + b.Property("FromStatus") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("FromSupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("FromWarehouseCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromWarehouseCode"); + + b.Property("ItemCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemCode"); + + b.Property("ItemDesc1") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc1"); + + b.Property("ItemDesc2") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc2"); + + b.Property("ItemName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemName"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("MasterID") + .HasColumnType("uniqueidentifier"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("ReasonCode") + .HasColumnType("nvarchar(max)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("ToArriveDate") + .HasColumnType("datetime2"); + + b.Property("ToContainerCode") + .HasColumnType("nvarchar(max)"); + + b.Property("ToExpireDate") + .HasColumnType("datetime2"); + + b.Property("ToItemCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ToItemDesc1") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ToItemDesc2") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ToItemName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ToLocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToLocationArea"); + + b.Property("ToLocationCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToLocationCode"); + + b.Property("ToLocationErpCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToLocationErpCode"); + + b.Property("ToLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToLocationGroup"); + + b.Property("ToLot") + .HasColumnType("nvarchar(max)"); + + b.Property("ToPackingCode") + .HasColumnType("nvarchar(450)"); + + b.Property("ToProduceDate") + .HasColumnType("datetime2"); + + b.Property("ToQty") + .HasColumnType("decimal(18,6)"); + + b.Property("ToStatus") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ToSupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ToWarehouseCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToWarehouseCode"); + + b.Property("Uom") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.HasKey("Id"); + + b.HasIndex("MasterID"); + + b.HasIndex("Number", "FromPackingCode", "FromStatus", "ToPackingCode", "ToStatus") + .IsUnique() + .HasFilter("[FromPackingCode] IS NOT NULL AND [ToPackingCode] IS NOT NULL"); + + b.ToTable("Store_ItemTransformNoteDetail", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ItemTransformRequest", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ActiveDate") + .HasColumnType("datetime2"); + + b.Property("AutoAgree") + .HasColumnType("bit"); + + b.Property("AutoCompleteJob") + .HasColumnType("bit"); + + b.Property("AutoHandle") + .HasColumnType("bit"); + + b.Property("AutoSubmit") + .HasColumnType("bit"); + + 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("DirectCreateNote") + .HasColumnType("bit"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("RequestStatus") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Worker") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("Number") + .IsUnique(); + + b.ToTable("Store_ItemTransformRequest", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ItemTransformRequestDetail", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("FromArriveDate") + .HasColumnType("datetime2"); + + b.Property("FromContainerCode") + .HasColumnType("nvarchar(max)"); + + b.Property("FromExpireDate") + .HasColumnType("datetime2"); + + b.Property("FromLocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromLocationArea"); + + b.Property("FromLocationCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromLocationCode"); + + b.Property("FromLocationErpCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromLocationErpCode"); + + b.Property("FromLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromLocationGroup"); + + b.Property("FromLot") + .HasColumnType("nvarchar(max)"); + + b.Property("FromPackingCode") + .HasColumnType("nvarchar(450)"); + + b.Property("FromProduceDate") + .HasColumnType("datetime2"); + + b.Property("FromQty") + .HasColumnType("decimal(18,6)"); + + b.Property("FromStatus") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("FromSupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("FromWarehouseCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromWarehouseCode"); + + b.Property("ItemCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemCode"); + + b.Property("ItemDesc1") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc1"); + + b.Property("ItemDesc2") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc2"); + + b.Property("ItemName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemName"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("MasterID") + .HasColumnType("uniqueidentifier"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("ReasonCode") + .HasColumnType("nvarchar(max)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("ToArriveDate") + .HasColumnType("datetime2"); + + b.Property("ToContainerCode") + .HasColumnType("nvarchar(max)"); + + b.Property("ToExpireDate") + .HasColumnType("datetime2"); + + b.Property("ToItemCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ToItemDesc1") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ToItemDesc2") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ToItemName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ToLocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToLocationArea"); + + b.Property("ToLocationCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToLocationCode"); + + b.Property("ToLocationErpCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToLocationErpCode"); + + b.Property("ToLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToLocationGroup"); + + b.Property("ToLot") + .HasColumnType("nvarchar(max)"); + + b.Property("ToPackingCode") + .HasColumnType("nvarchar(450)"); + + b.Property("ToProduceDate") + .HasColumnType("datetime2"); + + b.Property("ToQty") + .HasColumnType("decimal(18,6)"); + + b.Property("ToStatus") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ToSupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ToWarehouseCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToWarehouseCode"); + + b.Property("Uom") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.HasKey("Id"); + + b.HasIndex("MasterID"); + + b.HasIndex("Number", "FromPackingCode", "FromStatus", "ToPackingCode", "ToStatus") + .IsUnique() + .HasFilter("[FromPackingCode] IS NOT NULL AND [ToPackingCode] IS NOT NULL"); + + b.ToTable("Store_ItemTransformRequestDetail", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.JisDeliverJob", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AcceptTime") + .HasColumnType("datetime2"); + + b.Property("AcceptUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("AcceptUserName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("CompleteTime") + .HasColumnType("datetime2"); + + b.Property("CompleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CompleteUserName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("ContainerQty") + .HasColumnType("decimal(18,6)"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("Customer") + .HasColumnType("nvarchar(max)"); + + b.Property("CustomerAddressCode") + .HasColumnType("nvarchar(max)"); + + b.Property("CustomerLocationCode") + .HasColumnType("nvarchar(max)"); + + b.Property("CustomerWarehouseCode") + .HasColumnType("nvarchar(max)"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("IsAutoComplete") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false); + + b.Property("ItemQty") + .HasColumnType("decimal(18,6)"); + + b.Property("JobDescription") + .HasMaxLength(1024) + .HasColumnType("nvarchar(1024)"); + + b.Property("JobStatus") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("JobType") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("PlanTime") + .HasColumnType("datetime2"); + + b.Property("Position") + .HasColumnType("nvarchar(max)"); + + b.Property("Priority") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasDefaultValue(0); + + b.Property("PriorityIncrement") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasDefaultValue(0); + + b.Property("ProjectCode") + .HasColumnType("nvarchar(max)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("UpStreamJobNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("WarehouseCode") + .HasColumnType("nvarchar(max)"); + + b.Property("WorkGroupCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Worker") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("Number") + .IsUnique(); + + b.ToTable("Job_JisDeliverJob", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.JisDeliverJobDetail", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ContainerCode") + .HasColumnType("nvarchar(max)"); + + b.Property("ContainerDesc") + .HasColumnType("nvarchar(max)"); + + b.Property("ContainerName") + .HasColumnType("nvarchar(max)"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("FromLocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("FromLocationCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("FromLocationErpCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("FromLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("FromWarehouseCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ItemQty") + .HasColumnType("decimal(18,6)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("MasterID") + .HasColumnType("uniqueidentifier"); + + b.Property("Number") + .HasColumnType("nvarchar(max)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("Status") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("ToLocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ToLocationCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ToLocationErpCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ToLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ToWarehouseCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.HasKey("Id"); + + b.HasIndex("MasterID"); + + b.ToTable("Job_JisDeliverJobDetail", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.JisDeliverNote", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ActiveDate") + .HasColumnType("datetime2"); + + b.Property("ArrivalTime") + .HasColumnType("datetime2"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("ContainerQty") + .HasColumnType("decimal(18,6)"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("Customer") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("CustomerAddressCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("DeliverTime") + .HasColumnType("datetime2"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("ItemQty") + .HasColumnType("decimal(18,6)"); + + b.Property("JobNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("JobNumber"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("ProjectCode") + .HasColumnType("nvarchar(max)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("TotalPackCapacity") + .HasColumnType("nvarchar(max)"); + + b.Property("Worker") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("Number") + .IsUnique(); + + b.ToTable("Store_JisDeliverNote", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.JisDeliverNoteDetail", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ArriveDate") + .HasColumnType("datetime2"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DeliverTime") + .HasColumnType("datetime2"); + + b.Property("ExpireDate") + .HasColumnType("datetime2"); + + b.Property("ExpiredTime") + .HasColumnType("datetime2"); + + b.Property("FromContainerCode") + .HasColumnType("nvarchar(max)"); + + b.Property("FromLocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromLocationArea"); + + b.Property("FromLocationCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromLocationCode"); + + b.Property("FromLocationErpCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromLocationErpCode"); + + b.Property("FromLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromLocationGroup"); + + b.Property("FromLot") + .HasColumnType("nvarchar(max)"); + + b.Property("FromPackingCode") + .HasColumnType("nvarchar(450)"); + + b.Property("FromStatus") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("FromWarehouseCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromWarehouseCode"); + + b.Property("ItemCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemCode"); + + b.Property("ItemDesc1") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc1"); + + b.Property("ItemDesc2") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc2"); + + b.Property("ItemName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemName"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("MasterID") + .HasColumnType("uniqueidentifier"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("OnlineType") + .HasColumnType("nvarchar(max)"); + + b.Property("PackCapacity") + .HasColumnType("nvarchar(max)"); + + b.Property("Position") + .HasColumnType("nvarchar(max)"); + + b.Property("ProduceDate") + .HasColumnType("datetime2"); + + b.Property("ProductNo") + .HasColumnType("nvarchar(max)"); + + b.Property("ProjectCode") + .HasColumnType("nvarchar(max)"); + + b.Property("Qty") + .HasPrecision(18, 6) + .HasColumnType("decimal(18,6)") + .HasColumnName("Qty"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("SeqNo") + .HasColumnType("nvarchar(max)"); + + b.Property("Stage") + .HasColumnType("nvarchar(max)"); + + b.Property("StdPackQty") + .HasColumnType("decimal(18,6)"); + + b.Property("SupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("SupplierBatch"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("ToContainerCode") + .HasColumnType("nvarchar(max)"); + + b.Property("ToLocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToLocationArea"); + + b.Property("ToLocationCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToLocationCode"); + + b.Property("ToLocationErpCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToLocationErpCode"); + + b.Property("ToLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToLocationGroup"); + + b.Property("ToLot") + .HasColumnType("nvarchar(max)"); + + b.Property("ToPackingCode") + .HasColumnType("nvarchar(max)"); + + b.Property("ToStatus") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ToWarehouseCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToWarehouseCode"); + + b.Property("Uom") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Uom"); + + b.Property("UsedFor") + .HasColumnType("nvarchar(max)"); + + b.Property("Year") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("MasterID"); + + b.HasIndex("Number", "FromPackingCode", "FromLocationCode", "ToLocationCode") + .IsUnique() + .HasFilter("[FromPackingCode] IS NOT NULL"); + + b.ToTable("Store_JisDeliverNoteDetail", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.JisProductReceiptNote", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ActiveDate") + .HasColumnType("datetime2"); + + b.Property("CompleteTime") + .HasColumnType("datetime2"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("ContainerQty") + .HasColumnType("decimal(18,6)"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("ItemQty") + .HasColumnType("decimal(18,6)"); + + b.Property("JobNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("JobNumber"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("LocationCode") + .HasColumnType("nvarchar(max)"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("ProdLine") + .HasColumnType("nvarchar(max)"); + + b.Property("ProductionPlanNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("RawLocationCode") + .HasColumnType("nvarchar(max)"); + + b.Property("ReceiptType") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("Shift") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("SourceNumber") + .HasColumnType("nvarchar(max)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("WarehouseCode") + .HasColumnType("nvarchar(max)"); + + b.Property("WorkShop") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Worker") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("Number") + .IsUnique(); + + b.ToTable("Store_JisProductReceiptNote", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.JisProductReceiptNoteDetail", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ArriveDate") + .HasColumnType("datetime2"); + + b.Property("BomVersion") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ContainerCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ContainerCode"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("ExpireDate") + .HasColumnType("datetime2"); + + b.Property("ItemCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemCode"); + + b.Property("ItemDesc1") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc1"); + + b.Property("ItemDesc2") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc2"); + + b.Property("ItemName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemName"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("LocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationArea"); + + b.Property("LocationCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationCode"); + + b.Property("LocationErpCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationErpCode"); + + b.Property("LocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationGroup"); + + b.Property("Lot") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Lot"); + + b.Property("MasterID") + .HasColumnType("uniqueidentifier"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("PackingCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("PackingCode"); + + b.Property("Position") + .HasColumnType("nvarchar(max)"); + + b.Property("ProdLine") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ProduceDate") + .HasColumnType("datetime2"); + + b.Property("ProductNo") + .HasColumnType("nvarchar(max)"); + + b.Property("ProjectCode") + .HasColumnType("nvarchar(max)"); + + b.Property("Qty") + .HasPrecision(18, 6) + .HasColumnType("decimal(18,6)") + .HasColumnName("Qty"); + + b.Property("RawLocationCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("SeqNo") + .HasColumnType("nvarchar(max)"); + + b.Property("Status") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("StdPackQty") + .HasColumnType("decimal(18,6)"); + + b.Property("SupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("SupplierBatch"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Uom") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Uom"); + + b.Property("WarehouseCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("WarehouseCode"); + + b.Property("Year") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("MasterID"); + + b.HasIndex("Number", "PackingCode") + .IsUnique(); + + b.ToTable("Store_JisProductReceiptNoteDetail", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.MaterialRequest", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ActiveDate") + .HasColumnType("datetime2"); + + b.Property("AutoAgree") + .HasColumnType("bit"); + + b.Property("AutoCompleteJob") + .HasColumnType("bit"); + + b.Property("AutoHandle") + .HasColumnType("bit"); + + b.Property("AutoSubmit") + .HasColumnType("bit"); + + 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("DirectCreateNote") + .HasColumnType("bit"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("PreparationPlanNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ProdLine") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("RequestStatus") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Type") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("UseOnTheWayLocation") + .HasColumnType("bit"); + + b.Property("Worker") + .HasColumnType("nvarchar(max)"); + + b.Property("Workshop") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.HasKey("Id"); + + b.HasIndex("Number") + .IsUnique(); + + b.ToTable("Store_MaterialRequest", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.MaterialRequestDetail", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("ExpiredTime") + .HasColumnType("datetime2"); + + b.Property("FromLocationArea") + .HasColumnType("nvarchar(max)"); + + b.Property("IssuedQty") + .HasPrecision(18, 6) + .HasColumnType("decimal(18,6)"); + + b.Property("ItemCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemCode"); + + b.Property("ItemDesc1") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc1"); + + b.Property("ItemDesc2") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc2"); + + b.Property("ItemName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemName"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("MasterID") + .HasColumnType("uniqueidentifier"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("PositionCode") + .HasColumnType("nvarchar(max)"); + + b.Property("ProdLine") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Qty") + .HasPrecision(18, 6) + .HasColumnType("decimal(18,6)") + .HasColumnName("Qty"); + + b.Property("ReceivedQty") + .HasPrecision(18, 6) + .HasColumnType("decimal(18,6)"); + + b.Property("RecommendType") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("Status") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("StdPackQty") + .HasColumnType("decimal(18,6)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("ToLocationArea") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ToLocationCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ToLocationErpCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ToLocationGroup") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ToWarehouseCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Uom") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Uom"); + + b.Property("WorkStation") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.HasKey("Id"); + + b.HasIndex("ItemCode"); + + b.HasIndex("MasterID"); + + b.HasIndex("Number", "ItemCode", "ToLocationCode") + .IsUnique(); + + b.ToTable("Store_MaterialRequestDetail", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.NoOkConvertOkNote", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ActiveDate") + .HasColumnType("datetime2"); + + 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("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Worker") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("Number") + .IsUnique(); + + b.ToTable("Store_NoOkConvertOkNote", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.NoOkConvertOkNoteDetail", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ArriveDate") + .HasColumnType("datetime2"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("ExpireDate") + .HasColumnType("datetime2"); + + b.Property("FromContainerCode") + .HasColumnType("nvarchar(max)"); + + b.Property("FromLocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromLocationArea"); + + b.Property("FromLocationCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromLocationCode"); + + b.Property("FromLocationErpCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromLocationErpCode"); + + b.Property("FromLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromLocationGroup"); + + b.Property("FromLot") + .HasColumnType("nvarchar(max)"); + + b.Property("FromPackingCode") + .HasColumnType("nvarchar(450)"); + + b.Property("FromStatus") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("FromWarehouseCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromWarehouseCode"); + + b.Property("ItemCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemCode"); + + b.Property("ItemDesc1") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc1"); + + b.Property("ItemDesc2") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc2"); + + b.Property("ItemName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemName"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("MasterID") + .HasColumnType("uniqueidentifier"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("ProduceDate") + .HasColumnType("datetime2"); + + b.Property("Qty") + .HasPrecision(18, 6) + .HasColumnType("decimal(18,6)") + .HasColumnName("Qty"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("StdPackQty") + .HasColumnType("decimal(18,6)"); + + b.Property("SupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("SupplierBatch"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("ToContainerCode") + .HasColumnType("nvarchar(max)"); + + b.Property("ToLocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToLocationArea"); + + b.Property("ToLocationCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToLocationCode"); + + b.Property("ToLocationErpCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToLocationErpCode"); + + b.Property("ToLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToLocationGroup"); + + b.Property("ToLot") + .HasColumnType("nvarchar(max)"); + + b.Property("ToPackingCode") + .HasColumnType("nvarchar(max)"); + + b.Property("ToStatus") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ToWarehouseCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToWarehouseCode"); + + b.Property("Uom") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Uom"); + + b.HasKey("Id"); + + b.HasIndex("MasterID"); + + b.HasIndex("Number", "FromPackingCode", "FromLocationCode", "ToLocationCode") + .IsUnique() + .HasFilter("[FromPackingCode] IS NOT NULL"); + + b.ToTable("Store_NoOkConvertOkNoteDetail", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.OfflineSettlementNote", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ActiveDate") + .HasColumnType("datetime2"); + + 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("JobNumber") + .HasColumnType("nvarchar(max)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("ProductReceiptNumber") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Worker") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("Number") + .IsUnique(); + + b.ToTable("Store_OfflineSettlementNote", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.OfflineSettlementNoteDetail", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ArriveDate") + .HasColumnType("datetime2"); + + b.Property("ContainerCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ContainerCode"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("ExpireDate") + .HasColumnType("datetime2"); + + b.Property("ItemCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemCode"); + + b.Property("ItemDesc1") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc1"); + + b.Property("ItemDesc2") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc2"); + + b.Property("ItemName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemName"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("LocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationArea"); + + b.Property("LocationCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationCode"); + + b.Property("LocationErpCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationErpCode"); + + b.Property("LocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationGroup"); + + b.Property("Lot") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Lot"); + + b.Property("MasterID") + .HasColumnType("uniqueidentifier"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("PackingCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("PackingCode"); + + b.Property("ProduceDate") + .HasColumnType("datetime2"); + + b.Property("Qty") + .HasPrecision(18, 6) + .HasColumnType("decimal(18,6)") + .HasColumnName("Qty"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("Status") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("StdPackQty") + .HasColumnType("decimal(18,6)"); + + b.Property("SupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("SupplierBatch"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Uom") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Uom"); + + b.Property("WarehouseCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("WarehouseCode"); + + b.HasKey("Id"); + + b.HasIndex("MasterID"); + + b.HasIndex("Number") + .IsUnique(); + + b.ToTable("Store_OfflineSettlementNoteDetail", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.PreparationPlan", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ActiveDate") + .HasColumnType("datetime2"); + + 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("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("PlanDate") + .HasColumnType("datetime2"); + + b.Property("PlanTime") + .HasColumnType("datetime2"); + + b.Property("ProdLine") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ProductionPlanNumber") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("Shift") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Status") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Team") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Worker") + .HasColumnType("nvarchar(max)"); + + b.Property("Workshop") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.HasKey("Id"); + + b.HasIndex("Number") + .IsUnique(); + + b.ToTable("Store_PreparationPlan", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.PreparationPlanDetail", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("ItemCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemCode"); + + b.Property("ItemDesc1") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc1"); + + b.Property("ItemDesc2") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc2"); + + b.Property("ItemName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemName"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("LatestTime") + .HasColumnType("datetime2"); + + b.Property("LineStatus") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("MasterID") + .HasColumnType("uniqueidentifier"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("Qty") + .HasPrecision(18, 6) + .HasColumnType("decimal(18,6)") + .HasColumnName("Qty"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("StdPackQty") + .HasColumnType("decimal(18,6)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("ToLocationCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Uom") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Uom"); + + b.Property("WorkStation") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.HasKey("Id"); + + b.HasIndex("MasterID"); + + b.HasIndex("Number", "ItemCode") + .IsUnique(); + + b.ToTable("Store_PreparationPlanDetail", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ProductionPlan", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ActiveDate") + .HasColumnType("datetime2"); + + b.Property("AutoAgree") + .HasColumnType("bit"); + + b.Property("AutoCompleteJob") + .HasColumnType("bit"); + + b.Property("AutoHandle") + .HasColumnType("bit"); + + b.Property("AutoSubmit") + .HasColumnType("bit"); + + 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("DirectCreateNote") + .HasColumnType("bit"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("PlanDate") + .HasColumnType("datetime2"); + + b.Property("PlanTime") + .HasColumnType("datetime2"); + + b.Property("ProdLine") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("RequestStatus") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Shift") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Team") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Worker") + .HasColumnType("nvarchar(max)"); + + b.Property("Workshop") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.HasKey("Id"); + + b.HasIndex("Number") + .IsUnique(); + + b.ToTable("Store_ProductionPlan", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ProductionPlanDetail", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ArriveDate") + .HasColumnType("datetime2"); + + b.Property("BomVersion") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("ExpireDate") + .HasColumnType("datetime2"); + + b.Property("GoodQty") + .ValueGeneratedOnAdd() + .HasColumnType("decimal(18,6)") + .HasDefaultValue(1m); + + b.Property("ItemCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemCode"); + + b.Property("ItemDesc1") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc1"); + + b.Property("ItemDesc2") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc2"); + + b.Property("ItemName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemName"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("LineStatus") + .HasColumnType("int"); + + b.Property("Lot") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Lot"); + + b.Property("MasterID") + .HasColumnType("uniqueidentifier"); + + b.Property("NoGoodQty") + .ValueGeneratedOnAdd() + .HasColumnType("decimal(18,6)") + .HasDefaultValue(1m); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("PlanQty") + .HasColumnType("decimal(18,6)"); + + b.Property("ProduceDate") + .HasColumnType("datetime2"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("SupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("SupplierBatch"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Uom") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.HasKey("Id"); + + b.HasIndex("MasterID"); + + b.HasIndex("Number", "ItemCode") + .IsUnique(); + + b.ToTable("Store_ProductionPlanDetail", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ProductionReturnJob", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AcceptTime") + .HasColumnType("datetime2"); + + b.Property("AcceptUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("AcceptUserName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("CompleteTime") + .HasColumnType("datetime2"); + + b.Property("CompleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CompleteUserName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + 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("IsAutoComplete") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false); + + b.Property("JobDescription") + .HasMaxLength(1024) + .HasColumnType("nvarchar(1024)"); + + b.Property("JobStatus") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("JobType") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Priority") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasDefaultValue(0); + + b.Property("PriorityIncrement") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasDefaultValue(0); + + b.Property("ProductionReturnRequestNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("UpStreamJobNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("WarehouseCode") + .HasColumnType("nvarchar(max)"); + + b.Property("WorkGroupCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Worker") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("Number") + .IsUnique(); + + b.ToTable("Job_ProductionReturnJob", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ProductionReturnJobDetail", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("FromLocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("FromLocationCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("FromLocationErpCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("FromLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("FromWarehouseCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("HandledArriveDate") + .HasColumnType("datetime2"); + + b.Property("HandledContainerCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledContainerCode"); + + b.Property("HandledExpireDate") + .HasColumnType("datetime2"); + + b.Property("HandledLot") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledLot"); + + b.Property("HandledPackingCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledPackingCode"); + + b.Property("HandledProduceDate") + .HasColumnType("datetime2"); + + b.Property("HandledQty") + .HasColumnType("decimal(18,6)"); + + b.Property("HandledSupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledSupplierBatch"); + + b.Property("HandledToLocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledToLocationArea"); + + b.Property("HandledToLocationCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledToLocationCode"); + + b.Property("HandledToLocationErpCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledToLocationErpCode"); + + b.Property("HandledToLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledToLocationGroup"); + + b.Property("HandledToWarehouseCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledToWarehouseCode"); + + b.Property("ItemCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemCode"); + + b.Property("ItemDesc1") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc1"); + + b.Property("ItemDesc2") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc2"); + + b.Property("ItemName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemName"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("MasterID") + .HasColumnType("uniqueidentifier"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("RecommendArriveDate") + .HasColumnType("datetime2"); + + b.Property("RecommendContainerCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendContainerCode"); + + b.Property("RecommendExpireDate") + .HasColumnType("datetime2"); + + b.Property("RecommendLot") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendLot"); + + b.Property("RecommendPackingCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendPackingCode"); + + b.Property("RecommendProduceDate") + .HasColumnType("datetime2"); + + b.Property("RecommendQty") + .HasColumnType("decimal(18,6)"); + + b.Property("RecommendSupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendSupplierBatch"); + + b.Property("RecommendToLocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendToLocationArea"); + + b.Property("RecommendToLocationCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendToLocationCode"); + + b.Property("RecommendToLocationErpCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendToLocationErpCode"); + + b.Property("RecommendToLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendToLocationGroup"); + + b.Property("RecommendToWarehouseCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendToWarehouseCode"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("Status") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("StdPackQty") + .HasColumnType("decimal(18,6)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Uom") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("MasterID"); + + b.ToTable("Job_ProductionReturnJobDetail", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ProductionReturnNote", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ActiveDate") + .HasColumnType("datetime2"); + + 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("JobNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("JobNumber"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("ProductionReturnRequestNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("ReturnTime") + .HasColumnType("datetime2"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Worker") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("Number") + .IsUnique(); + + b.ToTable("Store_ProductionReturnNote", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ProductionReturnNoteDetail", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ArriveDate") + .HasColumnType("datetime2"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("ExpireDate") + .HasColumnType("datetime2"); + + b.Property("FromContainerCode") + .HasColumnType("nvarchar(max)"); + + b.Property("FromLocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromLocationArea"); + + b.Property("FromLocationCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromLocationCode"); + + b.Property("FromLocationErpCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromLocationErpCode"); + + b.Property("FromLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromLocationGroup"); + + b.Property("FromLot") + .HasColumnType("nvarchar(max)"); + + b.Property("FromPackingCode") + .HasColumnType("nvarchar(450)"); + + b.Property("FromStatus") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("FromWarehouseCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromWarehouseCode"); + + b.Property("HandledArriveDate") + .HasColumnType("datetime2"); + + b.Property("HandledContainerCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledContainerCode"); + + b.Property("HandledExpireDate") + .HasColumnType("datetime2"); + + b.Property("HandledLot") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledLot"); + + b.Property("HandledPackingCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledPackingCode"); + + b.Property("HandledProduceDate") + .HasColumnType("datetime2"); + + b.Property("HandledQty") + .HasColumnType("decimal(18,6)"); + + b.Property("HandledSupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledSupplierBatch"); + + b.Property("HandledToLocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledToLocationArea"); + + b.Property("HandledToLocationCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledToLocationCode"); + + b.Property("HandledToLocationErpCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledToLocationErpCode"); + + b.Property("HandledToLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledToLocationGroup"); + + b.Property("HandledToWarehouseCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledToWarehouseCode"); + + b.Property("ItemCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemCode"); + + b.Property("ItemDesc1") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc1"); + + b.Property("ItemDesc2") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc2"); + + b.Property("ItemName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemName"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("MasterID") + .HasColumnType("uniqueidentifier"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("ProduceDate") + .HasColumnType("datetime2"); + + b.Property("Qty") + .HasPrecision(18, 6) + .HasColumnType("decimal(18,6)") + .HasColumnName("Qty"); + + b.Property("RecommendArriveDate") + .HasColumnType("datetime2"); + + b.Property("RecommendContainerCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendContainerCode"); + + b.Property("RecommendExpireDate") + .HasColumnType("datetime2"); + + b.Property("RecommendLot") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendLot"); + + b.Property("RecommendPackingCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendPackingCode"); + + b.Property("RecommendProduceDate") + .HasColumnType("datetime2"); + + b.Property("RecommendQty") + .HasColumnType("decimal(18,6)"); + + b.Property("RecommendSupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendSupplierBatch"); + + b.Property("RecommendToLocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendToLocationArea"); + + b.Property("RecommendToLocationCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendToLocationCode"); + + b.Property("RecommendToLocationErpCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendToLocationErpCode"); + + b.Property("RecommendToLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendToLocationGroup"); + + b.Property("RecommendToWarehouseCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendToWarehouseCode"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("StdPackQty") + .HasColumnType("decimal(18,6)"); + + b.Property("SupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("SupplierBatch"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("ToContainerCode") + .HasColumnType("nvarchar(max)"); + + b.Property("ToLocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToLocationArea"); + + b.Property("ToLocationCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToLocationCode"); + + b.Property("ToLocationErpCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToLocationErpCode"); + + b.Property("ToLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToLocationGroup"); + + b.Property("ToLot") + .HasColumnType("nvarchar(max)"); + + b.Property("ToPackingCode") + .HasColumnType("nvarchar(450)"); + + b.Property("ToStatus") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ToWarehouseCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToWarehouseCode"); + + b.Property("Uom") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Uom"); + + b.HasKey("Id"); + + b.HasIndex("MasterID"); + + b.HasIndex("Number", "ItemCode", "FromPackingCode", "ToPackingCode", "FromLocationCode", "ToLocationCode") + .IsUnique() + .HasFilter("[FromPackingCode] IS NOT NULL AND [ToPackingCode] IS NOT NULL"); + + b.ToTable("Store_ProductionReturnNoteDetail", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ProductionReturnRequest", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ActiveDate") + .HasColumnType("datetime2"); + + b.Property("AutoAgree") + .HasColumnType("bit"); + + b.Property("AutoCompleteJob") + .HasColumnType("bit"); + + b.Property("AutoHandle") + .HasColumnType("bit"); + + b.Property("AutoSubmit") + .HasColumnType("bit"); + + 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("DirectCreateNote") + .HasColumnType("bit"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("RequestStatus") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Worker") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("Number") + .IsUnique(); + + b.ToTable("Store_ProductionReturnRequest", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ProductionReturnRequestDetail", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ArriveDate") + .HasColumnType("datetime2"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("ExpireDate") + .HasColumnType("datetime2"); + + b.Property("FromContainerCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("FromLocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromLocationArea"); + + b.Property("FromLocationCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromLocationCode"); + + b.Property("FromLocationErpCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromLocationErpCode"); + + b.Property("FromLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromLocationGroup"); + + b.Property("FromLot") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("FromPackingCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("FromStatus") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("FromWarehouseCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromWarehouseCode"); + + b.Property("ItemCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemCode"); + + b.Property("ItemDesc1") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc1"); + + b.Property("ItemDesc2") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc2"); + + b.Property("ItemName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemName"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("MasterID") + .HasColumnType("uniqueidentifier"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("ProduceDate") + .HasColumnType("datetime2"); + + b.Property("Qty") + .HasPrecision(18, 6) + .HasColumnType("decimal(18,6)") + .HasColumnName("Qty"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("StdPackQty") + .HasColumnType("decimal(18,6)"); + + b.Property("SupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("SupplierBatch"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("ToContainerCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ToLocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToLocationArea"); + + b.Property("ToLocationCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToLocationCode"); + + b.Property("ToLocationErpCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToLocationErpCode"); + + b.Property("ToLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToLocationGroup"); + + b.Property("ToLot") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ToPackingCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ToStatus") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ToWarehouseCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToWarehouseCode"); + + b.Property("Uom") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Uom"); + + b.HasKey("Id"); + + b.HasIndex("ItemCode"); + + b.HasIndex("MasterID"); + + b.HasIndex("Number", "ItemCode", "FromLocationCode") + .IsUnique(); + + b.ToTable("Store_ProductionReturnRequestDetail", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ProductL7PartsNote", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ActiveDate") + .HasColumnType("datetime2"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("Configuration") + .HasColumnType("nvarchar(max)"); + + b.Property("ContainerCode") + .HasColumnType("nvarchar(max)"); + + b.Property("CreateDate") + .HasColumnType("datetime2"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("FATA") + .HasColumnType("nvarchar(max)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("Position") + .HasColumnType("nvarchar(max)"); + + b.Property("ProductNo") + .HasColumnType("nvarchar(max)"); + + b.Property("Program") + .HasColumnType("nvarchar(max)"); + + b.Property("ReceiptNumber") + .HasColumnType("nvarchar(max)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("State") + .HasColumnType("int"); + + b.Property("Status") + .HasColumnType("int"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Worker") + .HasColumnType("nvarchar(max)"); + + b.Property("Year") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("Number") + .IsUnique(); + + b.ToTable("Store_ProductL7PartsNote", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ProductL7PartsNoteDetail", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CanBuy") + .HasColumnType("bit"); + + b.Property("CanMake") + .HasColumnType("bit"); + + b.Property("Configuration") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("CreateDate") + .HasColumnType("datetime2"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("FATA") + .HasColumnType("nvarchar(max)"); + + b.Property("ItemCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemCode"); + + b.Property("ItemDesc1") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc1"); + + b.Property("ItemDesc2") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc2"); + + b.Property("ItemName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemName"); + + b.Property("L7Part") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("LocationCode") + .HasColumnType("nvarchar(max)"); + + b.Property("MasterID") + .HasColumnType("uniqueidentifier"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("Position") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ProdLine") + .HasColumnType("nvarchar(max)"); + + b.Property("ProductNo") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Program") + .HasColumnType("nvarchar(max)"); + + b.Property("Qty") + .HasColumnType("int"); + + b.Property("RawLocationCode") + .HasColumnType("nvarchar(max)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("RowID") + .HasColumnType("int"); + + b.Property("State") + .HasColumnType("int"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("MasterID"); + + b.HasIndex("Number", "ProductNo", "Position", "Configuration", "L7Part") + .IsUnique() + .HasFilter("[ProductNo] IS NOT NULL AND [Position] IS NOT NULL AND [Configuration] IS NOT NULL AND [L7Part] IS NOT NULL"); + + b.ToTable("Store_ProductL7PartsNoteDetail", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ProductReceiptNote", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ActiveDate") + .HasColumnType("datetime2"); + + b.Property("CompleteTime") + .HasColumnType("datetime2"); + + 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("JobNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("JobNumber"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("ProductReceiptRequestNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ProductionPlanNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ReceiptType") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("Shift") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("SourceNumber") + .HasColumnType("nvarchar(max)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Type") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("WarehouseCode") + .HasColumnType("nvarchar(max)"); + + b.Property("WorkShop") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Worker") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("Number") + .IsUnique(); + + b.ToTable("Store_ProductReceiptNote", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ProductReceiptNoteDetail", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ArriveDate") + .HasColumnType("datetime2"); + + b.Property("BomVersion") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ContainerCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ContainerCode"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("ExpireDate") + .HasColumnType("datetime2"); + + b.Property("HandledArriveDate") + .HasColumnType("datetime2"); + + b.Property("HandledContainerCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledContainerCode"); + + b.Property("HandledExpireDate") + .HasColumnType("datetime2"); + + b.Property("HandledLot") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledLot"); + + b.Property("HandledPackingCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledPackingCode"); + + b.Property("HandledProduceDate") + .HasColumnType("datetime2"); + + b.Property("HandledQty") + .HasColumnType("decimal(18,6)"); + + b.Property("HandledSupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledSupplierBatch"); + + b.Property("HandledToLocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledToLocationArea"); + + b.Property("HandledToLocationCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledToLocationCode"); + + b.Property("HandledToLocationErpCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledToLocationErpCode"); + + b.Property("HandledToLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledToLocationGroup"); + + b.Property("HandledToWarehouseCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledToWarehouseCode"); + + b.Property("ItemCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemCode"); + + b.Property("ItemDesc1") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc1"); + + b.Property("ItemDesc2") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc2"); + + b.Property("ItemName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemName"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("LocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationArea"); + + b.Property("LocationCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationCode"); + + b.Property("LocationErpCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationErpCode"); + + b.Property("LocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationGroup"); + + b.Property("Lot") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Lot"); + + b.Property("MasterID") + .HasColumnType("uniqueidentifier"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("PackingCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("PackingCode"); + + b.Property("ProdLine") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ProduceDate") + .HasColumnType("datetime2"); + + b.Property("Qty") + .HasPrecision(18, 6) + .HasColumnType("decimal(18,6)") + .HasColumnName("Qty"); + + b.Property("RawArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("RawLocationCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("RecommendArriveDate") + .HasColumnType("datetime2"); + + b.Property("RecommendContainerCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendContainerCode"); + + b.Property("RecommendExpireDate") + .HasColumnType("datetime2"); + + b.Property("RecommendLot") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendLot"); + + b.Property("RecommendPackingCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendPackingCode"); + + b.Property("RecommendProduceDate") + .HasColumnType("datetime2"); + + b.Property("RecommendQty") + .HasColumnType("decimal(18,6)"); + + b.Property("RecommendSupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendSupplierBatch"); + + b.Property("RecommendToLocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendToLocationArea"); + + b.Property("RecommendToLocationCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendToLocationCode"); + + b.Property("RecommendToLocationErpCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendToLocationErpCode"); + + b.Property("RecommendToLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendToLocationGroup"); + + b.Property("RecommendToWarehouseCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendToWarehouseCode"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("ReturnQty") + .ValueGeneratedOnAdd() + .HasColumnType("decimal(18,6)") + .HasDefaultValue(0m); + + b.Property("Status") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("StdPackQty") + .HasColumnType("decimal(18,6)"); + + b.Property("SupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("SupplierBatch"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Uom") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Uom"); + + b.Property("WarehouseCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("WarehouseCode"); + + b.HasKey("Id"); + + b.HasIndex("MasterID"); + + b.HasIndex("Number", "ItemCode", "PackingCode", "Lot", "Status") + .IsUnique() + .HasFilter("[Lot] IS NOT NULL"); + + b.ToTable("Store_ProductReceiptNoteDetail", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ProductReceiptRequest", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ActiveDate") + .HasColumnType("datetime2"); + + b.Property("AutoAgree") + .HasColumnType("bit"); + + b.Property("AutoCompleteJob") + .HasColumnType("bit"); + + b.Property("AutoHandle") + .HasColumnType("bit"); + + b.Property("AutoSubmit") + .HasColumnType("bit"); + + 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("DirectCreateNote") + .HasColumnType("bit"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("PlanDate") + .HasColumnType("datetime2"); + + b.Property("ProdLine") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ProductionPlanNumber") + .HasColumnType("nvarchar(max)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("RequestStatus") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Shift") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Team") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Type") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Worker") + .HasColumnType("nvarchar(max)"); + + b.Property("Workshop") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.HasKey("Id"); + + b.HasIndex("Number") + .IsUnique(); + + b.ToTable("Store_ProductReceiptRequest", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ProductReceiptRequestDetail", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ArriveDate") + .HasColumnType("datetime2"); + + b.Property("BomVersion") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("ExpireDate") + .HasColumnType("datetime2"); + + b.Property("ItemCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemCode"); + + b.Property("ItemDesc1") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc1"); + + b.Property("ItemDesc2") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc2"); + + b.Property("ItemName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemName"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("LocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationArea"); + + b.Property("LocationCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationCode"); + + b.Property("LocationErpCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationErpCode"); + + b.Property("LocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationGroup"); + + b.Property("Lot") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Lot"); + + b.Property("MasterID") + .HasColumnType("uniqueidentifier"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("ProduceDate") + .HasColumnType("datetime2"); + + b.Property("Qty") + .HasPrecision(18, 6) + .HasColumnType("decimal(18,6)") + .HasColumnName("Qty"); + + b.Property("RawArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("ReturnQty") + .ValueGeneratedOnAdd() + .HasColumnType("decimal(18,6)") + .HasDefaultValue(0m); + + b.Property("StdPackQty") + .HasColumnType("decimal(18,6)"); + + b.Property("SupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("SupplierBatch"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Uom") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Uom"); + + b.Property("WarehouseCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("WarehouseCode"); + + b.HasKey("Id"); + + b.HasIndex("MasterID"); + + b.HasIndex("Number", "ItemCode", "LocationCode") + .IsUnique(); + + b.ToTable("Store_ProductReceiptRequestDetail", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ProductReceiveJob", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AcceptTime") + .HasColumnType("datetime2"); + + b.Property("AcceptUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("AcceptUserName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("CompleteTime") + .HasColumnType("datetime2"); + + b.Property("CompleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CompleteUserName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + 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("IsAutoComplete") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false); + + b.Property("JobDescription") + .HasMaxLength(1024) + .HasColumnType("nvarchar(1024)"); + + b.Property("JobStatus") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("JobType") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Priority") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasDefaultValue(0); + + b.Property("PriorityIncrement") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasDefaultValue(0); + + b.Property("ProductionPlanNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("Shift") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("UpStreamJobNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("WarehouseCode") + .HasColumnType("nvarchar(max)"); + + b.Property("WorkGroupCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Worker") + .HasColumnType("nvarchar(max)"); + + b.Property("Workshop") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.HasKey("Id"); + + b.HasIndex("Number") + .IsUnique(); + + b.ToTable("Job_ProductReceiveJob", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ProductReceiveJobDetail", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("HandledArriveDate") + .HasColumnType("datetime2"); + + b.Property("HandledContainerCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledContainerCode"); + + b.Property("HandledExpireDate") + .HasColumnType("datetime2"); + + b.Property("HandledLot") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledLot"); + + b.Property("HandledPackingCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledPackingCode"); + + b.Property("HandledProduceDate") + .HasColumnType("datetime2"); + + b.Property("HandledQty") + .HasColumnType("decimal(18,6)"); + + b.Property("HandledSupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledSupplierBatch"); + + b.Property("HandledToLocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledToLocationArea"); + + b.Property("HandledToLocationCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledToLocationCode"); + + b.Property("HandledToLocationErpCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledToLocationErpCode"); + + b.Property("HandledToLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledToLocationGroup"); + + b.Property("HandledToWarehouseCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledToWarehouseCode"); + + b.Property("ItemCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemCode"); + + b.Property("ItemDesc1") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc1"); + + b.Property("ItemDesc2") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc2"); + + b.Property("ItemName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemName"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("MasterID") + .HasColumnType("uniqueidentifier"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ProdLine") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("RawLocationCode") + .HasColumnType("nvarchar(max)"); + + b.Property("RecommendArriveDate") + .HasColumnType("datetime2"); + + b.Property("RecommendContainerCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendContainerCode"); + + b.Property("RecommendExpireDate") + .HasColumnType("datetime2"); + + b.Property("RecommendLot") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendLot"); + + b.Property("RecommendPackingCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendPackingCode"); + + b.Property("RecommendProduceDate") + .HasColumnType("datetime2"); + + b.Property("RecommendQty") + .HasColumnType("decimal(18,6)"); + + b.Property("RecommendSupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendSupplierBatch"); + + b.Property("RecommendToLocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendToLocationArea"); + + b.Property("RecommendToLocationCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendToLocationCode"); + + b.Property("RecommendToLocationErpCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendToLocationErpCode"); + + b.Property("RecommendToLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendToLocationGroup"); + + b.Property("RecommendToWarehouseCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendToWarehouseCode"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("Status") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("StdPackQty") + .HasColumnType("decimal(18,6)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Uom") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("MasterID"); + + b.ToTable("Job_ProductReceiveJobDetail", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ProductRecycleJob", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AcceptTime") + .HasColumnType("datetime2"); + + b.Property("AcceptUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("AcceptUserName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("CompleteTime") + .HasColumnType("datetime2"); + + b.Property("CompleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CompleteUserName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + 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("IsAutoComplete") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false); + + b.Property("JobDescription") + .HasMaxLength(1024) + .HasColumnType("nvarchar(1024)"); + + b.Property("JobStatus") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("JobType") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Priority") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasDefaultValue(0); + + b.Property("PriorityIncrement") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasDefaultValue(0); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("Shift") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("UpStreamJobNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("WarehouseCode") + .HasColumnType("nvarchar(max)"); + + b.Property("WorkGroupCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Worker") + .HasColumnType("nvarchar(max)"); + + b.Property("Workshop") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.HasKey("Id"); + + b.HasIndex("Number") + .IsUnique(); + + b.ToTable("Job_ProductRecycleJob", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ProductRecycleJobDetail", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("BomVersion") + .HasColumnType("nvarchar(max)"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("HandledArriveDate") + .HasColumnType("datetime2"); + + b.Property("HandledContainerCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledContainerCode"); + + b.Property("HandledExpireDate") + .HasColumnType("datetime2"); + + b.Property("HandledLot") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledLot"); + + b.Property("HandledPackingCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledPackingCode"); + + b.Property("HandledProduceDate") + .HasColumnType("datetime2"); + + b.Property("HandledQty") + .HasColumnType("decimal(18,6)"); + + b.Property("HandledSupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledSupplierBatch"); + + b.Property("HandledToLocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledToLocationArea"); + + b.Property("HandledToLocationCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledToLocationCode"); + + b.Property("HandledToLocationErpCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledToLocationErpCode"); + + b.Property("HandledToLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledToLocationGroup"); + + b.Property("HandledToWarehouseCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledToWarehouseCode"); + + b.Property("ItemCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemCode"); + + b.Property("ItemDesc1") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc1"); + + b.Property("ItemDesc2") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc2"); + + b.Property("ItemName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemName"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("LocationArea") + .HasColumnType("nvarchar(max)"); + + b.Property("LocationCode") + .HasColumnType("nvarchar(max)"); + + b.Property("LocationErpCode") + .HasColumnType("nvarchar(max)"); + + b.Property("LocationGroup") + .HasColumnType("nvarchar(max)"); + + b.Property("MasterID") + .HasColumnType("uniqueidentifier"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Qty") + .HasColumnType("decimal(18,6)"); + + b.Property("RawLocationArea") + .HasColumnType("nvarchar(max)"); + + b.Property("RawLocationCode") + .HasColumnType("nvarchar(max)"); + + b.Property("RawLocationErpCode") + .HasColumnType("nvarchar(max)"); + + b.Property("RawLocationGroup") + .HasColumnType("nvarchar(max)"); + + b.Property("RawWarehouseCode") + .HasColumnType("nvarchar(max)"); + + b.Property("RecommendArriveDate") + .HasColumnType("datetime2"); + + b.Property("RecommendContainerCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendContainerCode"); + + b.Property("RecommendExpireDate") + .HasColumnType("datetime2"); + + b.Property("RecommendLot") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendLot"); + + b.Property("RecommendPackingCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendPackingCode"); + + b.Property("RecommendProduceDate") + .HasColumnType("datetime2"); + + b.Property("RecommendQty") + .HasColumnType("decimal(18,6)"); + + b.Property("RecommendSupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendSupplierBatch"); + + b.Property("RecommendToLocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendToLocationArea"); + + b.Property("RecommendToLocationCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendToLocationCode"); + + b.Property("RecommendToLocationErpCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendToLocationErpCode"); + + b.Property("RecommendToLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendToLocationGroup"); + + b.Property("RecommendToWarehouseCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendToWarehouseCode"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("Status") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("StdPackQty") + .HasColumnType("decimal(18,6)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Uom") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("WarehouseCode") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("MasterID"); + + b.ToTable("Job_ProductRecycleJobDetail", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ProductRecycleMaterialDetail", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ArriveDate") + .HasColumnType("datetime2"); + + b.Property("BomVersion") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ContainerCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ContainerCode"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("ExpireDate") + .HasColumnType("datetime2"); + + b.Property("ItemCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemCode"); + + b.Property("ItemDesc1") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc1"); + + b.Property("ItemDesc2") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc2"); + + b.Property("ItemName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemName"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("LocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationArea"); + + b.Property("LocationCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationCode"); + + b.Property("LocationErpCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationErpCode"); + + b.Property("LocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationGroup"); + + b.Property("Lot") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Lot"); + + b.Property("MasterID") + .HasColumnType("uniqueidentifier"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("PackingCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("PackingCode"); + + b.Property("ProduceDate") + .HasColumnType("datetime2"); + + b.Property("ProductItemCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ProductItemDesc1") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ProductItemDesc2") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ProductItemName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ProductLot") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ProductPackingCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Qty") + .HasPrecision(18, 6) + .HasColumnType("decimal(18,6)") + .HasColumnName("Qty"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("Status") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("StdPackQty") + .HasColumnType("decimal(18,6)"); + + b.Property("SupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("SupplierBatch"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Uom") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Uom"); + + b.Property("WarehouseCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("WarehouseCode"); + + b.HasKey("Id"); + + b.HasIndex("MasterID"); + + b.HasIndex("Number", "ProductItemCode", "ItemCode"); + + b.ToTable("Store_ProductRecycleMaterialDetail", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ProductRecycleNote", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ActiveDate") + .HasColumnType("datetime2"); + + 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("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("RecycleTime") + .HasColumnType("datetime2"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("RequestNumber") + .HasColumnType("nvarchar(max)"); + + b.Property("Shift") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Worker") + .HasColumnType("nvarchar(max)"); + + b.Property("Workshop") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.HasKey("Id"); + + b.HasIndex("Number") + .IsUnique(); + + b.ToTable("Store_ProductRecycleNote", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ProductRecycleNoteDetail", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ArriveDate") + .HasColumnType("datetime2"); + + b.Property("ContainerCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ContainerCode"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("ExpireDate") + .HasColumnType("datetime2"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("ItemCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemCode"); + + b.Property("ItemDesc1") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc1"); + + b.Property("ItemDesc2") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc2"); + + b.Property("ItemName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemName"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("LocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationArea"); + + b.Property("LocationCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationCode"); + + b.Property("LocationErpCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationErpCode"); + + b.Property("LocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationGroup"); + + b.Property("Lot") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Lot"); + + b.Property("MasterID") + .HasColumnType("uniqueidentifier"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("PackingCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("PackingCode"); + + b.Property("ProduceDate") + .HasColumnType("datetime2"); + + b.Property("Qty") + .HasPrecision(18, 6) + .HasColumnType("decimal(18,6)") + .HasColumnName("Qty"); + + b.Property("ReasonCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("Status") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("StdPackQty") + .HasColumnType("decimal(18,6)"); + + b.Property("SupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("SupplierBatch"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Uom") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Uom"); + + b.Property("WarehouseCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("WarehouseCode"); + + b.HasKey("Id"); + + b.HasIndex("MasterID"); + + b.HasIndex("Number", "ItemCode") + .IsUnique(); + + b.ToTable("Store_ProductRecycleNoteDetail", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ProductRecycleRequest", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ActiveDate") + .HasColumnType("datetime2"); + + b.Property("AutoAgree") + .HasColumnType("bit"); + + b.Property("AutoCompleteJob") + .HasColumnType("bit"); + + b.Property("AutoHandle") + .HasColumnType("bit"); + + b.Property("AutoSubmit") + .HasColumnType("bit"); + + 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("DirectCreateNote") + .HasColumnType("bit"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("RequestStatus") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Shift") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Worker") + .HasColumnType("nvarchar(max)"); + + b.Property("Workshop") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.HasKey("Id"); + + b.HasIndex("Number") + .IsUnique(); + + b.ToTable("Store_ProductRecycleRequest", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ProductRecycleRequestDetail", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("BomVersion") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("ItemCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemCode"); + + b.Property("ItemDesc1") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc1"); + + b.Property("ItemDesc2") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc2"); + + b.Property("ItemName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemName"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("LocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationArea"); + + b.Property("LocationCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationCode"); + + b.Property("LocationErpCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationErpCode"); + + b.Property("LocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationGroup"); + + b.Property("MasterID") + .HasColumnType("uniqueidentifier"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("Qty") + .HasPrecision(18, 6) + .HasColumnType("decimal(18,6)") + .HasColumnName("Qty"); + + b.Property("RawLocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("RawLocationCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("RawLocationErpCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("RawLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("RawWarehouseCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("Status") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Uom") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Uom"); + + b.Property("WarehouseCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("WarehouseCode"); + + b.HasKey("Id"); + + b.HasIndex("MasterID"); + + b.HasIndex("Number", "ItemCode") + .IsUnique(); + + b.ToTable("Store_ProductRecycleRequestDetail", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.PurchaseOrder", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ActiveDate") + .HasColumnType("datetime2"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("ContactEmail") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ContactName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ContactPhone") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DueDate") + .HasColumnType("datetime2"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("IsConsignment") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("OrderDate") + .HasColumnType("datetime2"); + + b.Property("OrderStatus") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("PoType") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("SupplierAddress") + .HasColumnType("nvarchar(max)"); + + b.Property("SupplierCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("SupplierName") + .HasColumnType("nvarchar(max)"); + + b.Property("TaxRate") + .ValueGeneratedOnAdd() + .HasColumnType("decimal(18,6)") + .HasDefaultValue(0m); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Version") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Worker") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("Number") + .IsUnique(); + + b.ToTable("Store_PurchaseOrder", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.PurchaseOrderDetail", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ConvertRate") + .ValueGeneratedOnAdd() + .HasColumnType("decimal(18,6)") + .HasDefaultValue(1m); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("Ctype") + .HasColumnType("nvarchar(max)"); + + b.Property("ExpireDate") + .HasColumnType("datetime2"); + + b.Property("IsConsignment") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false); + + b.Property("ItemCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemCode"); + + b.Property("ItemDesc1") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc1"); + + b.Property("ItemDesc2") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc2"); + + b.Property("ItemName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemName"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("LineStatus") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("LocationErpCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Lot") + .HasColumnType("nvarchar(max)"); + + b.Property("MasterID") + .HasColumnType("uniqueidentifier"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("OrderRemark") + .HasColumnType("nvarchar(max)"); + + b.Property("PlanArriveDate") + .HasColumnType("datetime2"); + + b.Property("PlanUserCode") + .HasColumnType("nvarchar(max)"); + + b.Property("PoLine") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ProduceDate") + .HasColumnType("datetime2"); + + b.Property("ProjectCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("PutAwayQty") + .HasColumnType("decimal(18,6)"); + + b.Property("Qty") + .HasPrecision(18, 6) + .HasColumnType("decimal(18,6)") + .HasColumnName("Qty"); + + b.Property("ReceivedQty") + .HasColumnType("decimal(18,6)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("ReturnedQty") + .HasColumnType("decimal(18,6)"); + + b.Property("ShippedQty") + .HasColumnType("decimal(18,6)"); + + b.Property("StdPackQty") + .HasColumnType("decimal(18,6)"); + + b.Property("SupplierPackQty") + .HasColumnType("decimal(18,6)"); + + b.Property("SupplierPackUom") + .HasColumnType("nvarchar(max)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Uom") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Uom"); + + b.HasKey("Id"); + + b.HasIndex("MasterID"); + + b.HasIndex("ItemCode", "Number", "PoLine") + .IsUnique() + .HasFilter("[PoLine] IS NOT NULL"); + + b.ToTable("Store_PurchaseOrderDetail", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.PurchaseReceiptJob", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AcceptTime") + .HasColumnType("datetime2"); + + b.Property("AcceptUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("AcceptUserName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("AsnNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("CompleteTime") + .HasColumnType("datetime2"); + + b.Property("CompleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CompleteUserName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + 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("IsAutoComplete") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false); + + b.Property("JobDescription") + .HasMaxLength(1024) + .HasColumnType("nvarchar(1024)"); + + b.Property("JobStatus") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("JobType") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("PlanArriveDate") + .HasColumnType("datetime2"); + + b.Property("PoNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Priority") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasDefaultValue(0); + + b.Property("PriorityIncrement") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasDefaultValue(0); + + b.Property("PurchaseReceiptRequestNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("RpNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("SupplierAddress") + .HasColumnType("nvarchar(max)"); + + b.Property("SupplierCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("SupplierName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("TimeWindow") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Type") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("UpStreamJobNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("WarehouseCode") + .HasColumnType("nvarchar(max)"); + + b.Property("WorkGroupCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Worker") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("Number") + .IsUnique(); + + b.ToTable("Job_PurchaseReceiptJob", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.PurchaseReceiptJobDetail", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ArriveDate") + .HasColumnType("datetime2"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("FailedReason") + .HasColumnType("nvarchar(max)"); + + b.Property("HandledArriveDate") + .HasColumnType("datetime2"); + + b.Property("HandledContainerCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledContainerCode"); + + b.Property("HandledExpireDate") + .HasColumnType("datetime2"); + + b.Property("HandledLot") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledLot"); + + b.Property("HandledPackingCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledPackingCode"); + + b.Property("HandledProduceDate") + .HasColumnType("datetime2"); + + b.Property("HandledQty") + .HasColumnType("decimal(18,6)"); + + b.Property("HandledSupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledSupplierBatch"); + + b.Property("HandledToLocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledToLocationArea"); + + b.Property("HandledToLocationCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledToLocationCode"); + + b.Property("HandledToLocationErpCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledToLocationErpCode"); + + b.Property("HandledToLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledToLocationGroup"); + + b.Property("HandledToWarehouseCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledToWarehouseCode"); + + b.Property("InspectPhotoJson") + .HasColumnType("nvarchar(max)"); + + b.Property("ItemCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemCode"); + + b.Property("ItemDesc1") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc1"); + + b.Property("ItemDesc2") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc2"); + + b.Property("ItemName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemName"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("MassDefect") + .HasColumnType("nvarchar(max)"); + + b.Property("MasterID") + .HasColumnType("uniqueidentifier"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("PoLine") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("PoNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("PurchaseReceiptInspectStatus") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("RecommendArriveDate") + .HasColumnType("datetime2"); + + b.Property("RecommendContainerCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendContainerCode"); + + b.Property("RecommendExpireDate") + .HasColumnType("datetime2"); + + b.Property("RecommendLot") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendLot"); + + b.Property("RecommendPackingCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendPackingCode"); + + b.Property("RecommendProduceDate") + .HasColumnType("datetime2"); + + b.Property("RecommendQty") + .HasColumnType("decimal(18,6)"); + + b.Property("RecommendSupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendSupplierBatch"); + + b.Property("RecommendToLocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendToLocationArea"); + + b.Property("RecommendToLocationCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendToLocationCode"); + + b.Property("RecommendToLocationErpCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendToLocationErpCode"); + + b.Property("RecommendToLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendToLocationGroup"); + + b.Property("RecommendToWarehouseCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendToWarehouseCode"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("Status") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("StdPackQty") + .HasColumnType("decimal(18,6)"); + + b.Property("SupplierPackQty") + .HasColumnType("decimal(18,6)"); + + b.Property("SupplierPackUom") + .HasColumnType("nvarchar(max)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Uom") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("MasterID"); + + b.ToTable("Job_PurchaseReceiptJobDetail", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.PurchaseReceiptNote", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ActiveDate") + .HasColumnType("datetime2"); + + b.Property("AsnNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + 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("JobNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("JobNumber"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("PoNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("PurchaseReceiptRequestNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ReceiveTime") + .HasColumnType("datetime2"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("RpNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Status") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("SupplierAddress") + .HasColumnType("nvarchar(max)"); + + b.Property("SupplierCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("SupplierName") + .HasColumnType("nvarchar(max)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Type") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("WarehouseCode") + .HasColumnType("nvarchar(max)"); + + b.Property("Worker") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("Number") + .IsUnique(); + + b.HasIndex("SupplierCode"); + + b.ToTable("Store_PurchaseReceiptNote", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.PurchaseReceiptNoteDetail", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ArriveDate") + .HasColumnType("datetime2"); + + b.Property("ContainerCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ContainerCode"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("ExpireDate") + .HasColumnType("datetime2"); + + b.Property("FailedReason") + .HasColumnType("nvarchar(max)"); + + b.Property("HandledArriveDate") + .HasColumnType("datetime2"); + + b.Property("HandledContainerCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledContainerCode"); + + b.Property("HandledExpireDate") + .HasColumnType("datetime2"); + + b.Property("HandledLot") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledLot"); + + b.Property("HandledPackingCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledPackingCode"); + + b.Property("HandledProduceDate") + .HasColumnType("datetime2"); + + b.Property("HandledQty") + .HasColumnType("decimal(18,6)"); + + b.Property("HandledSupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledSupplierBatch"); + + b.Property("HandledToLocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledToLocationArea"); + + b.Property("HandledToLocationCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledToLocationCode"); + + b.Property("HandledToLocationErpCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledToLocationErpCode"); + + b.Property("HandledToLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledToLocationGroup"); + + b.Property("HandledToWarehouseCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledToWarehouseCode"); + + b.Property("InspectPhotoJson") + .HasColumnType("nvarchar(max)"); + + b.Property("ItemCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemCode"); + + b.Property("ItemDesc1") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc1"); + + b.Property("ItemDesc2") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc2"); + + b.Property("ItemName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemName"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("LocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationArea"); + + b.Property("LocationCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationCode"); + + b.Property("LocationErpCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationErpCode"); + + b.Property("LocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationGroup"); + + b.Property("Lot") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Lot"); + + b.Property("MassDefect") + .HasColumnType("nvarchar(max)"); + + b.Property("MasterID") + .HasColumnType("uniqueidentifier"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("PackingCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("PackingCode"); + + b.Property("PoLine") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("PoLine"); + + b.Property("PoNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("PoNumber"); + + b.Property("ProduceDate") + .HasColumnType("datetime2"); + + b.Property("PurchaseReceiptInspectStatus") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Qty") + .HasPrecision(18, 6) + .HasColumnType("decimal(18,6)") + .HasColumnName("Qty"); + + b.Property("RecommendArriveDate") + .HasColumnType("datetime2"); + + b.Property("RecommendContainerCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendContainerCode"); + + b.Property("RecommendExpireDate") + .HasColumnType("datetime2"); + + b.Property("RecommendLot") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendLot"); + + b.Property("RecommendPackingCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendPackingCode"); + + b.Property("RecommendProduceDate") + .HasColumnType("datetime2"); + + b.Property("RecommendQty") + .HasColumnType("decimal(18,6)"); + + b.Property("RecommendSupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendSupplierBatch"); + + b.Property("RecommendToLocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendToLocationArea"); + + b.Property("RecommendToLocationCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendToLocationCode"); + + b.Property("RecommendToLocationErpCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendToLocationErpCode"); + + b.Property("RecommendToLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendToLocationGroup"); + + b.Property("RecommendToWarehouseCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendToWarehouseCode"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("Status") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("StdPackQty") + .HasColumnType("decimal(18,6)"); + + b.Property("SupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("SupplierBatch"); + + b.Property("SupplierPackQty") + .HasColumnType("decimal(18,6)"); + + b.Property("SupplierPackUom") + .HasColumnType("nvarchar(max)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Uom") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Uom"); + + b.Property("WarehouseCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("WarehouseCode"); + + b.HasKey("Id"); + + b.HasIndex("MasterID"); + + b.ToTable("Store_PurchaseReceiptNoteDetail", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.PurchaseReceiptRequest", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ActiveDate") + .HasColumnType("datetime2"); + + b.Property("AsnNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("AutoAgree") + .HasColumnType("bit"); + + b.Property("AutoCompleteJob") + .HasColumnType("bit"); + + b.Property("AutoHandle") + .HasColumnType("bit"); + + b.Property("AutoSubmit") + .HasColumnType("bit"); + + 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("DirectCreateNote") + .HasColumnType("bit"); + + b.Property("DockCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("PlanArriveDate") + .HasColumnType("datetime2"); + + b.Property("PoNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("RequestStatus") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("RpNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("SupplierAddress") + .HasColumnType("nvarchar(max)"); + + b.Property("SupplierCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("SupplierName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("TimeWindow") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("TruckNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Worker") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("Number") + .IsUnique(); + + b.HasIndex("SupplierCode"); + + b.ToTable("Store_PurchaseReceiptRequest", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.PurchaseReceiptRequestDetail", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ArriveDate") + .HasColumnType("datetime2"); + + b.Property("ContainerCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ContainerCode"); + + b.Property("ConvertRate") + .HasColumnType("decimal(18,6)"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("ExpireDate") + .HasColumnType("datetime2"); + + b.Property("ItemCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemCode"); + + b.Property("ItemDesc1") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc1"); + + b.Property("ItemDesc2") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc2"); + + b.Property("ItemName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemName"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Lot") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Lot"); + + b.Property("MasterID") + .HasColumnType("uniqueidentifier"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("PackingCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("PackingCode"); + + b.Property("PoLine") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("PoLine"); + + b.Property("PoNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("PoNumber"); + + b.Property("ProduceDate") + .HasColumnType("datetime2"); + + b.Property("Qty") + .HasPrecision(18, 6) + .HasColumnType("decimal(18,6)") + .HasColumnName("Qty"); + + b.Property("RecommendErpCode") + .HasColumnType("nvarchar(max)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("StdPackQty") + .HasColumnType("decimal(18,6)"); + + b.Property("SupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("SupplierBatch"); + + b.Property("SupplierPackQty") + .HasColumnType("decimal(18,6)"); + + b.Property("SupplierPackUom") + .HasColumnType("nvarchar(max)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Uom") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Uom"); + + b.HasKey("Id"); + + b.HasIndex("MasterID"); + + b.HasIndex("Number", "PackingCode") + .IsUnique(); + + b.ToTable("Store_PurchaseReceiptRequestDetail", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.PurchaseReturnJob", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AcceptTime") + .HasColumnType("datetime2"); + + b.Property("AcceptUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("AcceptUserName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("AsnNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("CompleteTime") + .HasColumnType("datetime2"); + + b.Property("CompleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CompleteUserName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + 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("IsAutoComplete") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false); + + b.Property("JobDescription") + .HasMaxLength(1024) + .HasColumnType("nvarchar(1024)"); + + b.Property("JobStatus") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("JobType") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("PoNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Priority") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasDefaultValue(0); + + b.Property("PriorityIncrement") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasDefaultValue(0); + + b.Property("PurchaseReturnRequestNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("ReturnReason") + .HasColumnType("nvarchar(max)"); + + b.Property("ReturnTime") + .HasColumnType("datetime2"); + + b.Property("ReturnType") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("RpNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("SupplierCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("UpStreamJobNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("WarehouseCode") + .HasColumnType("nvarchar(max)"); + + b.Property("WorkGroupCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Worker") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("Number") + .IsUnique(); + + b.ToTable("Job_PurchaseReturnJob", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.PurchaseReturnJobDetail", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("HandledArriveDate") + .HasColumnType("datetime2"); + + b.Property("HandledContainerCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledContainerCode"); + + b.Property("HandledExpireDate") + .HasColumnType("datetime2"); + + b.Property("HandledFromLocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledFromLocationArea"); + + b.Property("HandledFromLocationCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledFromLocationCode"); + + b.Property("HandledFromLocationErpCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledFromLocationErpCode"); + + b.Property("HandledFromLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledFromLocationGroup"); + + b.Property("HandledFromWarehouseCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledFromWarehouseCode"); + + b.Property("HandledLot") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledLot"); + + b.Property("HandledPackingCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledPackingCode"); + + b.Property("HandledProduceDate") + .HasColumnType("datetime2"); + + b.Property("HandledQty") + .HasColumnType("decimal(18,6)"); + + b.Property("HandledSupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledSupplierBatch"); + + b.Property("ItemCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemCode"); + + b.Property("ItemDesc1") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc1"); + + b.Property("ItemDesc2") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc2"); + + b.Property("ItemName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemName"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("MasterID") + .HasColumnType("uniqueidentifier"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("PoLine") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("PoNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Reason") + .HasColumnType("nvarchar(max)"); + + b.Property("RecommendArriveDate") + .HasColumnType("datetime2"); + + b.Property("RecommendContainerCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendContainerCode"); + + b.Property("RecommendExpireDate") + .HasColumnType("datetime2"); + + b.Property("RecommendFromLocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendFromLocationArea"); + + b.Property("RecommendFromLocationCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendFromLocationCode"); + + b.Property("RecommendFromLocationErpCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendFromLocationErpCode"); + + b.Property("RecommendFromLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendFromLocationGroup"); + + b.Property("RecommendFromWarehouseCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendFromWarehouseCode"); + + b.Property("RecommendLot") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendLot"); + + b.Property("RecommendPackingCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendPackingCode"); + + b.Property("RecommendProduceDate") + .HasColumnType("datetime2"); + + b.Property("RecommendQty") + .HasColumnType("decimal(18,6)"); + + b.Property("RecommendSupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendSupplierBatch"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("Status") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("StdPackQty") + .HasColumnType("decimal(18,6)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Uom") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("MasterID"); + + b.ToTable("Job_PurchaseReturnJobDetail", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.PurchaseReturnNote", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ActiveDate") + .HasColumnType("datetime2"); + + b.Property("AsnNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + 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("JobNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("JobNumber"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("PoNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("PurchaseReturnRequestNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("ReturnReason") + .HasColumnType("nvarchar(max)"); + + b.Property("ReturnTime") + .HasColumnType("datetime2"); + + b.Property("ReturnType") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("RpNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Status") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("SupplierCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Worker") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("Number") + .IsUnique(); + + b.ToTable("Store_PurchaseReturnNote", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.PurchaseReturnNoteDetail", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ArriveDate") + .HasColumnType("datetime2"); + + b.Property("ContainerCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ContainerCode"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("ExpireDate") + .HasColumnType("datetime2"); + + b.Property("HandledArriveDate") + .HasColumnType("datetime2"); + + b.Property("HandledContainerCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledContainerCode"); + + b.Property("HandledExpireDate") + .HasColumnType("datetime2"); + + b.Property("HandledFromLocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledFromLocationArea"); + + b.Property("HandledFromLocationCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledFromLocationCode"); + + b.Property("HandledFromLocationErpCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledFromLocationErpCode"); + + b.Property("HandledFromLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledFromLocationGroup"); + + b.Property("HandledFromWarehouseCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledFromWarehouseCode"); + + b.Property("HandledLot") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledLot"); + + b.Property("HandledPackingCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledPackingCode"); + + b.Property("HandledProduceDate") + .HasColumnType("datetime2"); + + b.Property("HandledQty") + .HasColumnType("decimal(18,6)"); + + b.Property("HandledSupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledSupplierBatch"); + + b.Property("ItemCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemCode"); + + b.Property("ItemDesc1") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc1"); + + b.Property("ItemDesc2") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc2"); + + b.Property("ItemName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemName"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("LocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationArea"); + + b.Property("LocationCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationCode"); + + b.Property("LocationErpCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationErpCode"); + + b.Property("LocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationGroup"); + + b.Property("Lot") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Lot"); + + b.Property("MasterID") + .HasColumnType("uniqueidentifier"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("PackingCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("PackingCode"); + + b.Property("PoLine") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("PoLine"); + + b.Property("PoNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("PoNumber"); + + b.Property("ProduceDate") + .HasColumnType("datetime2"); + + b.Property("Qty") + .HasPrecision(18, 6) + .HasColumnType("decimal(18,6)") + .HasColumnName("Qty"); + + b.Property("Reason") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("RecommendArriveDate") + .HasColumnType("datetime2"); + + b.Property("RecommendContainerCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendContainerCode"); + + b.Property("RecommendExpireDate") + .HasColumnType("datetime2"); + + b.Property("RecommendFromLocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendFromLocationArea"); + + b.Property("RecommendFromLocationCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendFromLocationCode"); + + b.Property("RecommendFromLocationErpCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendFromLocationErpCode"); + + b.Property("RecommendFromLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendFromLocationGroup"); + + b.Property("RecommendFromWarehouseCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendFromWarehouseCode"); + + b.Property("RecommendLot") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendLot"); + + b.Property("RecommendPackingCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendPackingCode"); + + b.Property("RecommendProduceDate") + .HasColumnType("datetime2"); + + b.Property("RecommendQty") + .HasColumnType("decimal(18,6)"); + + b.Property("RecommendSupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendSupplierBatch"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("Status") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("StdPackQty") + .HasColumnType("decimal(18,6)"); + + b.Property("SupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("SupplierBatch"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Uom") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Uom"); + + b.Property("WarehouseCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("WarehouseCode"); + + b.HasKey("Id"); + + b.HasIndex("MasterID"); + + b.HasIndex("Number", "PackingCode") + .IsUnique(); + + b.ToTable("Store_PurchaseReturnNoteDetail", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.PurchaseReturnRequest", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ActiveDate") + .HasColumnType("datetime2"); + + b.Property("AsnNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("AutoAgree") + .HasColumnType("bit"); + + b.Property("AutoCompleteJob") + .HasColumnType("bit"); + + b.Property("AutoHandle") + .HasColumnType("bit"); + + b.Property("AutoSubmit") + .HasColumnType("bit"); + + 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("DirectCreateNote") + .HasColumnType("bit"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("PoNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("RequestStatus") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ReturnTime") + .HasColumnType("datetime2"); + + b.Property("ReturnType") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("RpNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("SupplierCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Worker") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("Number") + .IsUnique(); + + b.ToTable("Store_PurchaseReturnRequest", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.PurchaseReturnRequestDetail", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ArriveDate") + .HasColumnType("datetime2"); + + b.Property("ContainerCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ContainerCode"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("ExpireDate") + .HasColumnType("datetime2"); + + b.Property("ItemCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemCode"); + + b.Property("ItemDesc1") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc1"); + + b.Property("ItemDesc2") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc2"); + + b.Property("ItemName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemName"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("LocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationArea"); + + b.Property("LocationCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationCode"); + + b.Property("LocationErpCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationErpCode"); + + b.Property("LocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationGroup"); + + b.Property("Lot") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Lot"); + + b.Property("MasterID") + .HasColumnType("uniqueidentifier"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("PackingCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("PackingCode"); + + b.Property("PoLine") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("PoLine"); + + b.Property("PoNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("PoNumber"); + + b.Property("ProduceDate") + .HasColumnType("datetime2"); + + b.Property("Qty") + .HasPrecision(18, 6) + .HasColumnType("decimal(18,6)") + .HasColumnName("Qty"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("Status") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("StdPackQty") + .HasColumnType("decimal(18,6)"); + + b.Property("SupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("SupplierBatch"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Uom") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Uom"); + + b.Property("WarehouseCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("WarehouseCode"); + + b.HasKey("Id"); + + b.HasIndex("MasterID"); + + b.HasIndex("Number", "PackingCode") + .IsUnique(); + + b.ToTable("Store_PurchaseReturnRequestDetail", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.PutawayJob", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AcceptTime") + .HasColumnType("datetime2"); + + b.Property("AcceptUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("AcceptUserName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("AsnNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("CompleteTime") + .HasColumnType("datetime2"); + + b.Property("CompleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CompleteUserName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + 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("InspectNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("IsAutoComplete") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false); + + b.Property("JobDescription") + .HasMaxLength(1024) + .HasColumnType("nvarchar(1024)"); + + b.Property("JobStatus") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("JobType") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("PoNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Priority") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasDefaultValue(0); + + b.Property("PriorityIncrement") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasDefaultValue(0); + + b.Property("ProductReceiptNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("PurchaseReceiptRequestNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("PutawayMode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ReceiptNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("RpNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("SupplierCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Type") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("UpStreamJobNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("WarehouseCode") + .HasColumnType("nvarchar(max)"); + + b.Property("WorkGroupCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Worker") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("Number") + .IsUnique(); + + b.ToTable("Job_PutawayJob", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.PutawayJobDetail", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("FromLocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("FromLocationCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("FromLocationErpCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("FromLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("FromWarehouseCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("HandledArriveDate") + .HasColumnType("datetime2"); + + b.Property("HandledContainerCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledContainerCode"); + + b.Property("HandledExpireDate") + .HasColumnType("datetime2"); + + b.Property("HandledLot") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledLot"); + + b.Property("HandledPackingCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledPackingCode"); + + b.Property("HandledProduceDate") + .HasColumnType("datetime2"); + + b.Property("HandledQty") + .HasColumnType("decimal(18,6)"); + + b.Property("HandledSupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledSupplierBatch"); + + b.Property("HandledToLocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledToLocationArea"); + + b.Property("HandledToLocationCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledToLocationCode"); + + b.Property("HandledToLocationErpCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledToLocationErpCode"); + + b.Property("HandledToLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledToLocationGroup"); + + b.Property("HandledToWarehouseCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledToWarehouseCode"); + + b.Property("ItemCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemCode"); + + b.Property("ItemDesc1") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc1"); + + b.Property("ItemDesc2") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc2"); + + b.Property("ItemName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemName"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("MasterID") + .HasColumnType("uniqueidentifier"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("PoLine") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("PoNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Qty") + .HasPrecision(18, 6) + .HasColumnType("decimal(18,6)") + .HasColumnName("Qty"); + + b.Property("RecommendArriveDate") + .HasColumnType("datetime2"); + + b.Property("RecommendContainerCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendContainerCode"); + + b.Property("RecommendExpireDate") + .HasColumnType("datetime2"); + + b.Property("RecommendLot") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendLot"); + + b.Property("RecommendPackingCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendPackingCode"); + + b.Property("RecommendProduceDate") + .HasColumnType("datetime2"); + + b.Property("RecommendQty") + .HasColumnType("decimal(18,6)"); + + b.Property("RecommendSupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendSupplierBatch"); + + b.Property("RecommendToLocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendToLocationArea"); + + b.Property("RecommendToLocationCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendToLocationCode"); + + b.Property("RecommendToLocationErpCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendToLocationErpCode"); + + b.Property("RecommendToLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendToLocationGroup"); + + b.Property("RecommendToWarehouseCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendToWarehouseCode"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("Status") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("StdPackQty") + .HasColumnType("decimal(18,6)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Uom") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Uom"); + + b.HasKey("Id"); + + b.HasIndex("MasterID"); + + b.ToTable("Job_PutawayJobDetail", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.PutawayNote", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ActiveDate") + .HasColumnType("datetime2"); + + b.Property("AsnNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + 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("InspectNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("JobNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("JobNumber"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("ProductReceiptNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("PurchaseReceiptRequestNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ReceiptNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("RpNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("SupplierCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Type") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Worker") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("Number") + .IsUnique(); + + b.ToTable("Store_PutawayNote", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.PutawayNoteDetail", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ArriveDate") + .HasColumnType("datetime2"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("ExpireDate") + .HasColumnType("datetime2"); + + b.Property("FromContainerCode") + .HasColumnType("nvarchar(max)"); + + b.Property("FromLocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromLocationArea"); + + b.Property("FromLocationCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromLocationCode"); + + b.Property("FromLocationErpCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromLocationErpCode"); + + b.Property("FromLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromLocationGroup"); + + b.Property("FromLot") + .HasColumnType("nvarchar(max)"); + + b.Property("FromPackingCode") + .HasColumnType("nvarchar(450)"); + + b.Property("FromStatus") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("FromWarehouseCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromWarehouseCode"); + + b.Property("HandledArriveDate") + .HasColumnType("datetime2"); + + b.Property("HandledContainerCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledContainerCode"); + + b.Property("HandledExpireDate") + .HasColumnType("datetime2"); + + b.Property("HandledLot") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledLot"); + + b.Property("HandledPackingCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledPackingCode"); + + b.Property("HandledProduceDate") + .HasColumnType("datetime2"); + + b.Property("HandledQty") + .HasColumnType("decimal(18,6)"); + + b.Property("HandledSupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledSupplierBatch"); + + b.Property("HandledToLocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledToLocationArea"); + + b.Property("HandledToLocationCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledToLocationCode"); + + b.Property("HandledToLocationErpCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledToLocationErpCode"); + + b.Property("HandledToLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledToLocationGroup"); + + b.Property("HandledToWarehouseCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledToWarehouseCode"); + + b.Property("ItemCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemCode"); + + b.Property("ItemDesc1") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc1"); + + b.Property("ItemDesc2") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc2"); + + b.Property("ItemName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemName"); + + b.Property("JobNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("JobNumber"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("MasterID") + .HasColumnType("uniqueidentifier"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("PoLine") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("PoLine"); + + b.Property("PoNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("PoNumber"); + + b.Property("ProduceDate") + .HasColumnType("datetime2"); + + b.Property("Qty") + .HasPrecision(18, 6) + .HasColumnType("decimal(18,6)") + .HasColumnName("Qty"); + + b.Property("RecommendArriveDate") + .HasColumnType("datetime2"); + + b.Property("RecommendContainerCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendContainerCode"); + + b.Property("RecommendExpireDate") + .HasColumnType("datetime2"); + + b.Property("RecommendLot") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendLot"); + + b.Property("RecommendPackingCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendPackingCode"); + + b.Property("RecommendProduceDate") + .HasColumnType("datetime2"); + + b.Property("RecommendQty") + .HasColumnType("decimal(18,6)"); + + b.Property("RecommendSupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendSupplierBatch"); + + b.Property("RecommendToLocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendToLocationArea"); + + b.Property("RecommendToLocationCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendToLocationCode"); + + b.Property("RecommendToLocationErpCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendToLocationErpCode"); + + b.Property("RecommendToLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendToLocationGroup"); + + b.Property("RecommendToWarehouseCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendToWarehouseCode"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("StdPackQty") + .HasColumnType("decimal(18,6)"); + + b.Property("SupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("SupplierBatch"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("ToContainerCode") + .HasColumnType("nvarchar(max)"); + + b.Property("ToLocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToLocationArea"); + + b.Property("ToLocationCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToLocationCode"); + + b.Property("ToLocationErpCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToLocationErpCode"); + + b.Property("ToLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToLocationGroup"); + + b.Property("ToLot") + .HasColumnType("nvarchar(max)"); + + b.Property("ToPackingCode") + .HasColumnType("nvarchar(450)"); + + b.Property("ToStatus") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ToWarehouseCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToWarehouseCode"); + + b.Property("Uom") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Uom"); + + b.HasKey("Id"); + + b.HasIndex("MasterID"); + + b.HasIndex("Number", "FromPackingCode", "FromLocationCode", "ToLocationCode", "ToPackingCode") + .IsUnique() + .HasFilter("[FromPackingCode] IS NOT NULL AND [ToPackingCode] IS NOT NULL"); + + b.ToTable("Store_PutawayNoteDetail", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.PutawayRequest", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ActiveDate") + .HasColumnType("datetime2"); + + b.Property("AsnNumber") + .HasColumnType("nvarchar(max)"); + + b.Property("AutoAgree") + .HasColumnType("bit"); + + b.Property("AutoCompleteJob") + .HasColumnType("bit"); + + b.Property("AutoHandle") + .HasColumnType("bit"); + + b.Property("AutoSubmit") + .HasColumnType("bit"); + + 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("DirectCreateNote") + .HasColumnType("bit"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("InspectNumber") + .HasColumnType("nvarchar(max)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("PoNumber") + .HasColumnType("nvarchar(max)"); + + b.Property("ProductReceiptNumber") + .HasColumnType("nvarchar(max)"); + + b.Property("PurchaseReceiptRequestNumber") + .HasColumnType("nvarchar(max)"); + + b.Property("PutawayMode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ReceiptNumber") + .HasColumnType("nvarchar(max)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("RequestNumber") + .HasColumnType("nvarchar(max)"); + + b.Property("RequestStatus") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("RpNumber") + .HasColumnType("nvarchar(max)"); + + b.Property("SupplierCode") + .HasColumnType("nvarchar(max)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Type") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Worker") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("Number") + .IsUnique(); + + b.ToTable("Store_PutawayRequest", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.PutawayRequestDetail", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ArriveDate") + .HasColumnType("datetime2"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("ExpireDate") + .HasColumnType("datetime2"); + + b.Property("FromContainerCode") + .HasColumnType("nvarchar(max)"); + + b.Property("FromLocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromLocationArea"); + + b.Property("FromLocationCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromLocationCode"); + + b.Property("FromLocationErpCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromLocationErpCode"); + + b.Property("FromLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromLocationGroup"); + + b.Property("FromLot") + .HasColumnType("nvarchar(max)"); + + b.Property("FromPackingCode") + .HasColumnType("nvarchar(max)"); + + b.Property("FromStatus") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("FromWarehouseCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromWarehouseCode"); + + b.Property("InventoryQty") + .HasColumnType("decimal(18,6)"); + + b.Property("ItemCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemCode"); + + b.Property("ItemDesc1") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc1"); + + b.Property("ItemDesc2") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc2"); + + b.Property("ItemName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemName"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("MasterID") + .HasColumnType("uniqueidentifier"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("PoLine") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("PoLine"); + + b.Property("PoNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("PoNumber"); + + b.Property("ProduceDate") + .HasColumnType("datetime2"); + + b.Property("Qty") + .HasPrecision(18, 6) + .HasColumnType("decimal(18,6)") + .HasColumnName("Qty"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("StdPackQty") + .HasColumnType("decimal(18,6)"); + + b.Property("SupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("SupplierBatch"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("ToContainerCode") + .HasColumnType("nvarchar(max)"); + + b.Property("ToLocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToLocationArea"); + + b.Property("ToLocationCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToLocationCode"); + + b.Property("ToLocationErpCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToLocationErpCode"); + + b.Property("ToLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToLocationGroup"); + + b.Property("ToLot") + .HasColumnType("nvarchar(max)"); + + b.Property("ToPackingCode") + .HasColumnType("nvarchar(max)"); + + b.Property("ToStatus") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ToWarehouseCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToWarehouseCode"); + + b.Property("Uom") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Uom"); + + b.HasKey("Id"); + + b.HasIndex("MasterID"); + + b.ToTable("Store_PutawayRequestDetail", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ReceiptAbnormalNote", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ActiveDate") + .HasColumnType("datetime2"); + + b.Property("AsnNumber") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + 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("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("ReceiptNumber") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("SupplierCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Worker") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("SupplierCode"); + + b.HasIndex("AsnNumber", "Number", "SupplierCode", "ReceiptNumber") + .IsUnique(); + + b.ToTable("Store_ReceiptAbnormalNote", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ReceiptAbnormalNoteDetail", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AbnormalType") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ArriveDate") + .HasColumnType("datetime2"); + + b.Property("ContainerCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ContainerCode"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("ExpireDate") + .HasColumnType("datetime2"); + + b.Property("ItemCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemCode"); + + b.Property("ItemDesc1") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc1"); + + b.Property("ItemDesc2") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc2"); + + b.Property("ItemName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemName"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("LocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationArea"); + + b.Property("LocationCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationCode"); + + b.Property("LocationErpCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationErpCode"); + + b.Property("LocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationGroup"); + + b.Property("Lot") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Lot"); + + b.Property("MasterID") + .HasColumnType("uniqueidentifier"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("PackingCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("PackingCode"); + + b.Property("Photos") + .HasColumnType("nvarchar(max)"); + + b.Property("ProduceDate") + .HasColumnType("datetime2"); + + b.Property("Qty") + .HasPrecision(18, 6) + .HasColumnType("decimal(18,6)") + .HasColumnName("Qty"); + + b.Property("ReceiptNumber") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("Status") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("StdPackQty") + .HasColumnType("decimal(18,6)"); + + b.Property("SupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("SupplierBatch"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Uom") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Uom"); + + b.Property("WarehouseCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("WarehouseCode"); + + b.HasKey("Id"); + + b.HasIndex("MasterID"); + + b.HasIndex("Number", "PackingCode", "ReceiptNumber") + .IsUnique(); + + b.ToTable("Store_ReceiptAbnormalNoteDetail", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.RecycledMaterialReceiptNote", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ActiveDate") + .HasColumnType("datetime2"); + + 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("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Worker") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("Number") + .IsUnique(); + + b.ToTable("Store_RecycledMaterialReceiptNote", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.RecycledMaterialReceiptNoteDetail", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ArriveDate") + .HasColumnType("datetime2"); + + b.Property("ContainerCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ContainerCode"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("ExpireDate") + .HasColumnType("datetime2"); + + b.Property("ItemCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemCode"); + + b.Property("ItemDesc1") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc1"); + + b.Property("ItemDesc2") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc2"); + + b.Property("ItemName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemName"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("LocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationArea"); + + b.Property("LocationCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationCode"); + + b.Property("LocationErpCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationErpCode"); + + b.Property("LocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationGroup"); + + b.Property("Lot") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Lot"); + + b.Property("MasterID") + .HasColumnType("uniqueidentifier"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("PackingCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("PackingCode"); + + b.Property("ProduceDate") + .HasColumnType("datetime2"); + + b.Property("Qty") + .HasPrecision(18, 6) + .HasColumnType("decimal(18,6)") + .HasColumnName("Qty"); + + b.Property("ReasonCode") + .HasColumnType("nvarchar(max)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("Status") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("StdPackQty") + .HasColumnType("decimal(18,6)"); + + b.Property("SupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("SupplierBatch"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Uom") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Uom"); + + b.Property("WarehouseCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("WarehouseCode"); + + b.HasKey("Id"); + + b.HasIndex("MasterID"); + + b.HasIndex("Number", "PackingCode") + .IsUnique(); + + b.ToTable("Store_RecycledMaterialReceiptNoteDetail", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.SaleOrder", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ActiveDate") + .HasColumnType("datetime2"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("ContactEmail") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ContactName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ContactPhone") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("CustomerCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("DueDate") + .HasColumnType("datetime2"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("OrderDate") + .HasColumnType("datetime2"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("SoStatus") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("SoType") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("TaxRate") + .ValueGeneratedOnAdd() + .HasColumnType("decimal(18,6)") + .HasDefaultValue(0m); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Version") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Worker") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("CustomerCode"); + + b.HasIndex("Number") + .IsUnique(); + + b.ToTable("Store_SaleOrder", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.SaleOrderDetail", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ConvertRate") + .ValueGeneratedOnAdd() + .HasColumnType("decimal(18,6)") + .HasDefaultValue(1m); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("CustomerPackQty") + .HasColumnType("decimal(18,6)"); + + b.Property("CustomerPackUom") + .HasColumnType("nvarchar(max)"); + + b.Property("ItemCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemCode"); + + b.Property("ItemDesc1") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc1"); + + b.Property("ItemDesc2") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc2"); + + b.Property("ItemName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemName"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("LineStatus") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("MasterID") + .HasColumnType("uniqueidentifier"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("Qty") + .HasPrecision(18, 6) + .HasColumnType("decimal(18,6)") + .HasColumnName("Qty"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("SoLine") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("StdPackQty") + .HasColumnType("decimal(18,6)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Uom") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Uom"); + + b.HasKey("Id"); + + b.HasIndex("MasterID"); + + b.HasIndex("Number", "SoLine", "ItemCode") + .IsUnique(); + + b.ToTable("Store_SaleOrderDetail", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ScrapNote", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ActiveDate") + .HasColumnType("datetime2"); + + 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("JobNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("JobNumber"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("ScrapRequestNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Type") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Worker") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("Number") + .IsUnique(); + + b.ToTable("Store_ScrapNote", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ScrapNoteDetail", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ArriveDate") + .HasColumnType("datetime2"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("ExpireDate") + .HasColumnType("datetime2"); + + b.Property("FromContainerCode") + .HasColumnType("nvarchar(max)"); + + b.Property("FromLocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromLocationArea"); + + b.Property("FromLocationCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromLocationCode"); + + b.Property("FromLocationErpCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromLocationErpCode"); + + b.Property("FromLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromLocationGroup"); + + b.Property("FromLot") + .HasColumnType("nvarchar(450)"); + + b.Property("FromPackingCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("FromStatus") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("FromWarehouseCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromWarehouseCode"); + + b.Property("ItemCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemCode"); + + b.Property("ItemDesc1") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc1"); + + b.Property("ItemDesc2") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc2"); + + b.Property("ItemName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemName"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("MasterID") + .HasColumnType("uniqueidentifier"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("ProduceDate") + .HasColumnType("datetime2"); + + b.Property("Qty") + .HasPrecision(18, 6) + .HasColumnType("decimal(18,6)") + .HasColumnName("Qty"); + + b.Property("ReasonCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("StdPackQty") + .HasColumnType("decimal(18,6)"); + + b.Property("SupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("SupplierBatch"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("ToContainerCode") + .HasColumnType("nvarchar(max)"); + + b.Property("ToLocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToLocationArea"); + + b.Property("ToLocationCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToLocationCode"); + + b.Property("ToLocationErpCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToLocationErpCode"); + + b.Property("ToLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToLocationGroup"); + + b.Property("ToLot") + .HasColumnType("nvarchar(max)"); + + b.Property("ToPackingCode") + .HasColumnType("nvarchar(max)"); + + b.Property("ToStatus") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ToWarehouseCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToWarehouseCode"); + + b.Property("Uom") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Uom"); + + b.HasKey("Id"); + + b.HasIndex("MasterID"); + + b.HasIndex("Number", "ItemCode", "FromPackingCode", "FromLocationCode", "ToLocationCode", "FromLot", "FromStatus") + .IsUnique() + .HasFilter("[FromPackingCode] IS NOT NULL AND [FromLot] IS NOT NULL"); + + b.ToTable("Store_ScrapNoteDetail", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ScrapRequest", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ActiveDate") + .HasColumnType("datetime2"); + + b.Property("AutoAgree") + .HasColumnType("bit"); + + b.Property("AutoCompleteJob") + .HasColumnType("bit"); + + b.Property("AutoHandle") + .HasColumnType("bit"); + + b.Property("AutoSubmit") + .HasColumnType("bit"); + + 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("DirectCreateNote") + .HasColumnType("bit"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("RequestStatus") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Type") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Worker") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("Number") + .IsUnique(); + + b.ToTable("Store_ScrapRequest", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ScrapRequestDetail", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("ItemCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemCode"); + + b.Property("ItemDesc1") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc1"); + + b.Property("ItemDesc2") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc2"); + + b.Property("ItemName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemName"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("LocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationArea"); + + b.Property("LocationCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationCode"); + + b.Property("LocationErpCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationErpCode"); + + b.Property("LocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationGroup"); + + b.Property("MasterID") + .HasColumnType("uniqueidentifier"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("Qty") + .HasPrecision(18, 6) + .HasColumnType("decimal(18,6)") + .HasColumnName("Qty"); + + b.Property("ReasonCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("StdPackQty") + .HasColumnType("decimal(18,6)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Uom") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Uom"); + + b.Property("WarehouseCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("WarehouseCode"); + + b.HasKey("Id"); + + b.HasIndex("MasterID"); + + b.HasIndex("Number", "ItemCode", "LocationCode") + .IsUnique(); + + b.ToTable("Store_ScrapRequestDetail", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.SupplierAsn", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ActiveDate") + .HasColumnType("datetime2"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("ContactEmail") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ContactName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ContactPhone") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("CreateType") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("Ctype") + .HasColumnType("nvarchar(max)"); + + b.Property("DockCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("DueDate") + .HasColumnType("datetime2"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("PlanArriveDate") + .HasColumnType("datetime2"); + + b.Property("PlanUserCode") + .HasColumnType("nvarchar(max)"); + + b.Property("PoNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("RpNumber") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ShipDate") + .HasColumnType("datetime2"); + + b.Property("Status") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("SupplierAddress") + .HasColumnType("nvarchar(max)"); + + b.Property("SupplierCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("SupplierName") + .HasColumnType("nvarchar(max)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("TimeWindow") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("TruckNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Worker") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("Number") + .IsUnique(); + + b.HasIndex("SupplierCode"); + + b.ToTable("Store_SupplierAsn", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.SupplierAsnDetail", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ArriveDate") + .HasColumnType("datetime2"); + + b.Property("ContainerCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ContainerCode"); + + b.Property("ConvertRate") + .HasColumnType("decimal(18,6)"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("Ctype") + .HasColumnType("nvarchar(max)"); + + b.Property("ExpireDate") + .HasColumnType("datetime2"); + + b.Property("ItemCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemCode"); + + b.Property("ItemDesc1") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc1"); + + b.Property("ItemDesc2") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc2"); + + b.Property("ItemName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemName"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Lot") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Lot"); + + b.Property("MasterID") + .HasColumnType("uniqueidentifier"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("PackingCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("PackingCode"); + + b.Property("PlanUserCode") + .HasColumnType("nvarchar(max)"); + + b.Property("PoLine") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("PoLine"); + + b.Property("PoNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("PoNumber"); + + b.Property("ProduceDate") + .HasColumnType("datetime2"); + + b.Property("ProjectCode") + .HasColumnType("nvarchar(max)"); + + b.Property("Qty") + .HasPrecision(18, 6) + .HasColumnType("decimal(18,6)") + .HasColumnName("Qty"); + + b.Property("RecommendErpCode") + .HasColumnType("nvarchar(max)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("StdPackQty") + .HasColumnType("decimal(18,6)"); + + b.Property("SupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("SupplierBatch"); + + b.Property("SupplierPackQty") + .HasColumnType("decimal(18,6)"); + + b.Property("SupplierPackUom") + .HasColumnType("nvarchar(max)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Uom") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Uom"); + + b.HasKey("Id"); + + b.HasIndex("MasterID"); + + b.HasIndex("Number", "ItemCode", "PackingCode") + .IsUnique(); + + b.ToTable("Store_SupplierAsnDetail", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.TransferLibJob", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AcceptTime") + .HasColumnType("datetime2"); + + b.Property("AcceptUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("AcceptUserName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("CompleteTime") + .HasColumnType("datetime2"); + + b.Property("CompleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CompleteUserName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("ConfirmTime") + .HasColumnType("datetime2"); + + b.Property("Confirmed") + .HasColumnType("bit"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("IsAutoComplete") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false); + + b.Property("JobDescription") + .HasMaxLength(1024) + .HasColumnType("nvarchar(1024)"); + + b.Property("JobNumber") + .HasColumnType("nvarchar(max)"); + + b.Property("JobStatus") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("JobType") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Priority") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasDefaultValue(0); + + b.Property("PriorityIncrement") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasDefaultValue(0); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("RequestNumber") + .HasColumnType("nvarchar(max)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Type") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("UpStreamJobNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("UseOnTheWayLocation") + .HasColumnType("bit"); + + b.Property("WarehouseCode") + .HasColumnType("nvarchar(max)"); + + b.Property("WorkGroupCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Worker") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("Number") + .IsUnique(); + + b.ToTable("Job_TransferLibJob", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.TransferLibJobDetail", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ArriveDate") + .HasColumnType("datetime2"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("ExpireDate") + .HasColumnType("datetime2"); + + b.Property("FromContainerCode") + .HasColumnType("nvarchar(max)"); + + b.Property("FromLocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromLocationArea"); + + b.Property("FromLocationCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromLocationCode"); + + b.Property("FromLocationErpCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromLocationErpCode"); + + b.Property("FromLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromLocationGroup"); + + b.Property("FromLot") + .HasColumnType("nvarchar(max)"); + + b.Property("FromPackingCode") + .HasColumnType("nvarchar(max)"); + + b.Property("FromStatus") + .HasColumnType("int"); + + b.Property("FromWarehouseCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromWarehouseCode"); + + b.Property("ItemCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemCode"); + + b.Property("ItemDesc1") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc1"); + + b.Property("ItemDesc2") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc2"); + + b.Property("ItemName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemName"); + + b.Property("JobStatus") + .HasColumnType("int"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("MasterID") + .HasColumnType("uniqueidentifier"); + + b.Property("Number") + .HasColumnType("nvarchar(max)"); + + b.Property("OnTheWayLocationCode") + .HasColumnType("nvarchar(max)"); + + b.Property("ProduceDate") + .HasColumnType("datetime2"); + + b.Property("Qty") + .HasPrecision(18, 6) + .HasColumnType("decimal(18,6)") + .HasColumnName("Qty"); + + b.Property("Reason") + .HasColumnType("nvarchar(max)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("StdPackQty") + .HasColumnType("decimal(18,6)"); + + b.Property("SupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("SupplierBatch"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("ToContainerCode") + .HasColumnType("nvarchar(max)"); + + b.Property("ToLocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToLocationArea"); + + b.Property("ToLocationCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToLocationCode"); + + b.Property("ToLocationErpCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToLocationErpCode"); + + b.Property("ToLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToLocationGroup"); + + b.Property("ToLot") + .HasColumnType("nvarchar(max)"); + + b.Property("ToPackingCode") + .HasColumnType("nvarchar(max)"); + + b.Property("ToStatus") + .HasColumnType("int"); + + b.Property("ToWarehouseCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToWarehouseCode"); + + b.Property("Uom") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Uom"); + + b.HasKey("Id"); + + b.HasIndex("MasterID"); + + b.ToTable("Job_TransferLibJobDetail", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.TransferLibNote", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ActiveDate") + .HasColumnType("datetime2"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("ConfirmTime") + .HasColumnType("datetime2"); + + b.Property("Confirmed") + .HasColumnType("bit"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("JobNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("JobNumber"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("RequestNumber") + .HasColumnType("nvarchar(max)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Type") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("UseOnTheWayLocation") + .HasColumnType("bit"); + + b.Property("Worker") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("Number") + .IsUnique(); + + b.ToTable("Store_TransferLibNote", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.TransferLibNoteDetail", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ArriveDate") + .HasColumnType("datetime2"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("ExpireDate") + .HasColumnType("datetime2"); + + b.Property("FromContainerCode") + .HasColumnType("nvarchar(max)"); + + b.Property("FromLocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromLocationArea"); + + b.Property("FromLocationCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromLocationCode"); + + b.Property("FromLocationErpCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromLocationErpCode"); + + b.Property("FromLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromLocationGroup"); + + b.Property("FromLot") + .HasColumnType("nvarchar(max)"); + + b.Property("FromPackingCode") + .HasColumnType("nvarchar(450)"); + + b.Property("FromStatus") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("FromWarehouseCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromWarehouseCode"); + + b.Property("ItemCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemCode"); + + b.Property("ItemDesc1") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc1"); + + b.Property("ItemDesc2") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc2"); + + b.Property("ItemName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemName"); + + b.Property("JobStatus") + .HasColumnType("int"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("MasterID") + .HasColumnType("uniqueidentifier"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("OnTheWayLocationCode") + .HasColumnType("nvarchar(max)"); + + b.Property("ProduceDate") + .HasColumnType("datetime2"); + + b.Property("Qty") + .HasPrecision(18, 6) + .HasColumnType("decimal(18,6)") + .HasColumnName("Qty"); + + b.Property("Reason") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("StdPackQty") + .HasColumnType("decimal(18,6)"); + + b.Property("SupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("SupplierBatch"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("ToContainerCode") + .HasColumnType("nvarchar(max)"); + + b.Property("ToLocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToLocationArea"); + + b.Property("ToLocationCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToLocationCode"); + + b.Property("ToLocationErpCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToLocationErpCode"); + + b.Property("ToLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToLocationGroup"); + + b.Property("ToLot") + .HasColumnType("nvarchar(max)"); + + b.Property("ToPackingCode") + .HasColumnType("nvarchar(max)"); + + b.Property("ToStatus") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ToWarehouseCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToWarehouseCode"); + + b.Property("Uom") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Uom"); + + b.HasKey("Id"); + + b.HasIndex("MasterID"); + + b.HasIndex("Number", "FromPackingCode", "FromLocationCode", "ToLocationCode", "FromStatus", "ToStatus") + .IsUnique() + .HasFilter("[FromPackingCode] IS NOT NULL"); + + b.ToTable("Store_TransferLibNoteDetail", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.TransferLibRequest", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ActiveDate") + .HasColumnType("datetime2"); + + b.Property("AutoAgree") + .HasColumnType("bit"); + + b.Property("AutoCompleteJob") + .HasColumnType("bit"); + + b.Property("AutoHandle") + .HasColumnType("bit"); + + b.Property("AutoSubmit") + .HasColumnType("bit"); + + 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("DirectCreateNote") + .HasColumnType("bit"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("RequestStatus") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Type") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("UseOnTheWayLocation") + .HasColumnType("bit"); + + b.Property("Worker") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("Number") + .IsUnique(); + + b.ToTable("Store_TransferLibRequest", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.TransferLibRequestDetail", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ArriveDate") + .HasColumnType("datetime2"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("ExpireDate") + .HasColumnType("datetime2"); + + b.Property("FromContainerCode") + .HasColumnType("nvarchar(max)"); + + b.Property("FromLocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromLocationArea"); + + b.Property("FromLocationCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromLocationCode"); + + b.Property("FromLocationErpCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromLocationErpCode"); + + b.Property("FromLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromLocationGroup"); + + b.Property("FromLot") + .HasColumnType("nvarchar(max)"); + + b.Property("FromPackingCode") + .HasColumnType("nvarchar(max)"); + + b.Property("FromStatus") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("FromWarehouseCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromWarehouseCode"); + + b.Property("ItemCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemCode"); + + b.Property("ItemDesc1") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc1"); + + b.Property("ItemDesc2") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc2"); + + b.Property("ItemName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemName"); + + b.Property("JobStatus") + .HasColumnType("int"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("MasterID") + .HasColumnType("uniqueidentifier"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("ProduceDate") + .HasColumnType("datetime2"); + + b.Property("Qty") + .HasPrecision(18, 6) + .HasColumnType("decimal(18,6)") + .HasColumnName("Qty"); + + b.Property("Reason") + .HasColumnType("nvarchar(max)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("StdPackQty") + .HasColumnType("decimal(18,6)"); + + b.Property("SupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("SupplierBatch"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("ToContainerCode") + .HasColumnType("nvarchar(max)"); + + b.Property("ToLocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToLocationArea"); + + b.Property("ToLocationCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToLocationCode"); + + b.Property("ToLocationErpCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToLocationErpCode"); + + b.Property("ToLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToLocationGroup"); + + b.Property("ToLot") + .HasColumnType("nvarchar(max)"); + + b.Property("ToPackingCode") + .HasColumnType("nvarchar(max)"); + + b.Property("ToStatus") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ToWarehouseCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToWarehouseCode"); + + b.Property("Uom") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Uom"); + + b.HasKey("Id"); + + b.HasIndex("MasterID"); + + b.ToTable("Store_TransferLibRequestDetail", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.TransferNote", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ActiveDate") + .HasColumnType("datetime2"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("ConfirmTime") + .HasColumnType("datetime2"); + + b.Property("Confirmed") + .HasColumnType("bit"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("JobNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("JobNumber"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("RequestNumber") + .HasColumnType("nvarchar(max)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Type") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("UseOnTheWayLocation") + .HasColumnType("bit"); + + b.Property("Worker") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("Number") + .IsUnique(); + + b.ToTable("Store_TransferNote", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.TransferNoteDetail", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ArriveDate") + .HasColumnType("datetime2"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("ExpireDate") + .HasColumnType("datetime2"); + + b.Property("FromContainerCode") + .HasColumnType("nvarchar(max)"); + + b.Property("FromLocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromLocationArea"); + + b.Property("FromLocationCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromLocationCode"); + + b.Property("FromLocationErpCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromLocationErpCode"); + + b.Property("FromLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromLocationGroup"); + + b.Property("FromLot") + .HasColumnType("nvarchar(max)"); + + b.Property("FromPackingCode") + .HasColumnType("nvarchar(450)"); + + b.Property("FromStatus") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("FromWarehouseCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromWarehouseCode"); + + b.Property("ItemCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemCode"); + + b.Property("ItemDesc1") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc1"); + + b.Property("ItemDesc2") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc2"); + + b.Property("ItemName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemName"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("MasterID") + .HasColumnType("uniqueidentifier"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("OnTheWayLocationCode") + .HasColumnType("nvarchar(max)"); + + b.Property("ProduceDate") + .HasColumnType("datetime2"); + + b.Property("Qty") + .HasPrecision(18, 6) + .HasColumnType("decimal(18,6)") + .HasColumnName("Qty"); + + b.Property("Reason") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("StdPackQty") + .HasColumnType("decimal(18,6)"); + + b.Property("SupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("SupplierBatch"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("ToContainerCode") + .HasColumnType("nvarchar(max)"); + + b.Property("ToLocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToLocationArea"); + + b.Property("ToLocationCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToLocationCode"); + + b.Property("ToLocationErpCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToLocationErpCode"); + + b.Property("ToLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToLocationGroup"); + + b.Property("ToLot") + .HasColumnType("nvarchar(max)"); + + b.Property("ToPackingCode") + .HasColumnType("nvarchar(max)"); + + b.Property("ToStatus") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ToWarehouseCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToWarehouseCode"); + + b.Property("Uom") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Uom"); + + b.HasKey("Id"); + + b.HasIndex("MasterID"); + + b.HasIndex("Number", "FromPackingCode", "FromLocationCode", "ToLocationCode", "FromStatus", "ToStatus") + .IsUnique() + .HasFilter("[FromPackingCode] IS NOT NULL"); + + b.ToTable("Store_TransferNoteDetail", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.TransferRequest", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ActiveDate") + .HasColumnType("datetime2"); + + b.Property("AutoAgree") + .HasColumnType("bit"); + + b.Property("AutoCompleteJob") + .HasColumnType("bit"); + + b.Property("AutoHandle") + .HasColumnType("bit"); + + b.Property("AutoSubmit") + .HasColumnType("bit"); + + 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("DirectCreateNote") + .HasColumnType("bit"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("RequestStatus") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Type") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("UseOnTheWayLocation") + .HasColumnType("bit"); + + b.Property("Worker") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("Number") + .IsUnique(); + + b.ToTable("Store_TransferRequest", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.TransferRequestDetail", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ArriveDate") + .HasColumnType("datetime2"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("ExpireDate") + .HasColumnType("datetime2"); + + b.Property("FromContainerCode") + .HasColumnType("nvarchar(max)"); + + b.Property("FromLocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromLocationArea"); + + b.Property("FromLocationCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromLocationCode"); + + b.Property("FromLocationErpCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromLocationErpCode"); + + b.Property("FromLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromLocationGroup"); + + b.Property("FromLot") + .HasColumnType("nvarchar(max)"); + + b.Property("FromPackingCode") + .HasColumnType("nvarchar(max)"); + + b.Property("FromStatus") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("FromWarehouseCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromWarehouseCode"); + + b.Property("ItemCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemCode"); + + b.Property("ItemDesc1") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc1"); + + b.Property("ItemDesc2") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc2"); + + b.Property("ItemName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemName"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("MasterID") + .HasColumnType("uniqueidentifier"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("ProduceDate") + .HasColumnType("datetime2"); + + b.Property("Qty") + .HasPrecision(18, 6) + .HasColumnType("decimal(18,6)") + .HasColumnName("Qty"); + + b.Property("Reason") + .HasColumnType("nvarchar(max)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("StdPackQty") + .HasColumnType("decimal(18,6)"); + + b.Property("SupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("SupplierBatch"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("ToContainerCode") + .HasColumnType("nvarchar(max)"); + + b.Property("ToLocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToLocationArea"); + + b.Property("ToLocationCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToLocationCode"); + + b.Property("ToLocationErpCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToLocationErpCode"); + + b.Property("ToLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToLocationGroup"); + + b.Property("ToLot") + .HasColumnType("nvarchar(max)"); + + b.Property("ToPackingCode") + .HasColumnType("nvarchar(max)"); + + b.Property("ToStatus") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ToWarehouseCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToWarehouseCode"); + + b.Property("Uom") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Uom"); + + b.HasKey("Id"); + + b.HasIndex("MasterID"); + + b.ToTable("Store_TransferRequestDetail", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.UnplannedIssueJob", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AcceptTime") + .HasColumnType("datetime2"); + + b.Property("AcceptUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("AcceptUserName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("BuildDate") + .HasColumnType("datetime2"); + + b.Property("CompleteTime") + .HasColumnType("datetime2"); + + b.Property("CompleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CompleteUserName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + 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("DeptCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("DeptName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("IsAutoComplete") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false); + + b.Property("JobDescription") + .HasMaxLength(1024) + .HasColumnType("nvarchar(1024)"); + + b.Property("JobStatus") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("JobType") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("OANumber") + .HasColumnType("nvarchar(max)"); + + b.Property("Priority") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasDefaultValue(0); + + b.Property("PriorityIncrement") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasDefaultValue(0); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("UnplannedIssueRequestNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("UnplannedIssueType") + .HasColumnType("int"); + + b.Property("UpStreamJobNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("WarehouseCode") + .HasColumnType("nvarchar(max)"); + + b.Property("WorkGroupCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Worker") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("Number") + .IsUnique(); + + b.ToTable("Job_UnplannedIssueJob", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.UnplannedIssueJobDetail", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CaseCode") + .HasColumnType("nvarchar(max)"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("Explain") + .HasColumnType("nvarchar(max)"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("HandledArriveDate") + .HasColumnType("datetime2"); + + b.Property("HandledContainerCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledContainerCode"); + + b.Property("HandledExpireDate") + .HasColumnType("datetime2"); + + b.Property("HandledFromLocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledFromLocationArea"); + + b.Property("HandledFromLocationCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledFromLocationCode"); + + b.Property("HandledFromLocationErpCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledFromLocationErpCode"); + + b.Property("HandledFromLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledFromLocationGroup"); + + b.Property("HandledFromWarehouseCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledFromWarehouseCode"); + + b.Property("HandledLot") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledLot"); + + b.Property("HandledPackingCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledPackingCode"); + + b.Property("HandledProduceDate") + .HasColumnType("datetime2"); + + b.Property("HandledQty") + .HasColumnType("decimal(18,6)"); + + b.Property("HandledSupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledSupplierBatch"); + + b.Property("ItemCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemCode"); + + b.Property("ItemDesc1") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc1"); + + b.Property("ItemDesc2") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc2"); + + b.Property("ItemName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemName"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("MasterID") + .HasColumnType("uniqueidentifier"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("OnceBusiCode") + .HasColumnType("nvarchar(max)"); + + b.Property("ProjCapacityCode") + .HasColumnType("nvarchar(max)"); + + b.Property("ReasonCode") + .HasColumnType("nvarchar(max)"); + + b.Property("RecommendArriveDate") + .HasColumnType("datetime2"); + + b.Property("RecommendContainerCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendContainerCode"); + + b.Property("RecommendExpireDate") + .HasColumnType("datetime2"); + + b.Property("RecommendFromLocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendFromLocationArea"); + + b.Property("RecommendFromLocationCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendFromLocationCode"); + + b.Property("RecommendFromLocationErpCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendFromLocationErpCode"); + + b.Property("RecommendFromLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendFromLocationGroup"); + + b.Property("RecommendFromWarehouseCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendFromWarehouseCode"); + + b.Property("RecommendLot") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendLot"); + + b.Property("RecommendPackingCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendPackingCode"); + + b.Property("RecommendProduceDate") + .HasColumnType("datetime2"); + + b.Property("RecommendQty") + .HasColumnType("decimal(18,6)"); + + b.Property("RecommendSupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendSupplierBatch"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("Status") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("StdPackQty") + .HasColumnType("decimal(18,6)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Uom") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("MasterID"); + + b.ToTable("Job_UnplannedIssueJobDetail", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.UnplannedIssueNote", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ActiveDate") + .HasColumnType("datetime2"); + + b.Property("BuildDate") + .HasColumnType("datetime2"); + + 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("DeptCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("DeptName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("JobNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("OANumber") + .HasColumnType("nvarchar(max)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("UnplannedIssueRequestNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("UnplannedIssueType") + .HasColumnType("int"); + + b.Property("Worker") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("Number") + .IsUnique(); + + b.ToTable("Store_UnplannedIssueNote", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.UnplannedIssueNoteDetail", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ArriveDate") + .HasColumnType("datetime2"); + + b.Property("CaseCode") + .HasColumnType("nvarchar(max)"); + + b.Property("ContainerCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ContainerCode"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("ExpireDate") + .HasColumnType("datetime2"); + + b.Property("Explain") + .HasColumnType("nvarchar(max)"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("HandledArriveDate") + .HasColumnType("datetime2"); + + b.Property("HandledContainerCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledContainerCode"); + + b.Property("HandledExpireDate") + .HasColumnType("datetime2"); + + b.Property("HandledFromLocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledFromLocationArea"); + + b.Property("HandledFromLocationCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledFromLocationCode"); + + b.Property("HandledFromLocationErpCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledFromLocationErpCode"); + + b.Property("HandledFromLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledFromLocationGroup"); + + b.Property("HandledFromWarehouseCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledFromWarehouseCode"); + + b.Property("HandledLot") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledLot"); + + b.Property("HandledPackingCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledPackingCode"); + + b.Property("HandledProduceDate") + .HasColumnType("datetime2"); + + b.Property("HandledQty") + .HasColumnType("decimal(18,6)"); + + b.Property("HandledSupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledSupplierBatch"); + + b.Property("ItemCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemCode"); + + b.Property("ItemDesc1") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc1"); + + b.Property("ItemDesc2") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc2"); + + b.Property("ItemName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemName"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("LocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationArea"); + + b.Property("LocationCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationCode"); + + b.Property("LocationErpCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationErpCode"); + + b.Property("LocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationGroup"); + + b.Property("Lot") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Lot"); + + b.Property("MasterID") + .HasColumnType("uniqueidentifier"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("OnceBusiCode") + .HasColumnType("nvarchar(max)"); + + b.Property("PackingCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("PackingCode"); + + b.Property("ProduceDate") + .HasColumnType("datetime2"); + + b.Property("ProjCapacityCode") + .HasColumnType("nvarchar(max)"); + + b.Property("Qty") + .HasPrecision(18, 6) + .HasColumnType("decimal(18,6)") + .HasColumnName("Qty"); + + b.Property("ReasonCode") + .HasColumnType("nvarchar(max)"); + + b.Property("RecommendArriveDate") + .HasColumnType("datetime2"); + + b.Property("RecommendContainerCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendContainerCode"); + + b.Property("RecommendExpireDate") + .HasColumnType("datetime2"); + + b.Property("RecommendFromLocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendFromLocationArea"); + + b.Property("RecommendFromLocationCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendFromLocationCode"); + + b.Property("RecommendFromLocationErpCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendFromLocationErpCode"); + + b.Property("RecommendFromLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendFromLocationGroup"); + + b.Property("RecommendFromWarehouseCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendFromWarehouseCode"); + + b.Property("RecommendLot") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendLot"); + + b.Property("RecommendPackingCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendPackingCode"); + + b.Property("RecommendProduceDate") + .HasColumnType("datetime2"); + + b.Property("RecommendQty") + .HasColumnType("decimal(18,6)"); + + b.Property("RecommendSupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendSupplierBatch"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("Status") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("StdPackQty") + .HasColumnType("decimal(18,6)"); + + b.Property("SupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("SupplierBatch"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Uom") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Uom"); + + b.Property("WarehouseCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("WarehouseCode"); + + b.HasKey("Id"); + + b.HasIndex("MasterID"); + + b.HasIndex("Number", "PackingCode", "ItemCode", "Lot", "Status") + .IsUnique() + .HasFilter("[Lot] IS NOT NULL"); + + b.ToTable("Store_UnplannedIssueNoteDetail", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.UnplannedIssueRequest", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ActiveDate") + .HasColumnType("datetime2"); + + b.Property("AutoAgree") + .HasColumnType("bit"); + + b.Property("AutoCompleteJob") + .HasColumnType("bit"); + + b.Property("AutoHandle") + .HasColumnType("bit"); + + b.Property("AutoSubmit") + .HasColumnType("bit"); + + b.Property("BuildDate") + .HasColumnType("datetime2"); + + 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("DeptCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("DeptName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("DirectCreateNote") + .HasColumnType("bit"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("OANumber") + .HasColumnType("nvarchar(max)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("RequestStatus") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("UnplannedIssueType") + .HasColumnType("int"); + + b.Property("Worker") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("Number") + .IsUnique(); + + b.ToTable("Store_UnplannedIssueRequest", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.UnplannedIssueRequestDetail", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ArriveDate") + .HasColumnType("datetime2"); + + b.Property("CaseCode") + .HasColumnType("nvarchar(max)"); + + b.Property("ContainerCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ContainerCode"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("ExpireDate") + .HasColumnType("datetime2"); + + b.Property("Explain") + .HasColumnType("nvarchar(max)"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("ItemCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemCode"); + + b.Property("ItemDesc1") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc1"); + + b.Property("ItemDesc2") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc2"); + + b.Property("ItemName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemName"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("LocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationArea"); + + b.Property("LocationCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationCode"); + + b.Property("LocationErpCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationErpCode"); + + b.Property("LocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationGroup"); + + b.Property("Lot") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Lot"); + + b.Property("MasterID") + .HasColumnType("uniqueidentifier"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("OnceBusiCode") + .HasColumnType("nvarchar(max)"); + + b.Property("PackingCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("PackingCode"); + + b.Property("ProduceDate") + .HasColumnType("datetime2"); + + b.Property("ProjCapacityCode") + .HasColumnType("nvarchar(max)"); + + b.Property("Qty") + .HasPrecision(18, 6) + .HasColumnType("decimal(18,6)") + .HasColumnName("Qty"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("Status") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("StdPackQty") + .HasColumnType("decimal(18,6)"); + + b.Property("SupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("SupplierBatch"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Uom") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Uom"); + + b.Property("WarehouseCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("WarehouseCode"); + + b.HasKey("Id"); + + b.HasIndex("MasterID"); + + b.HasIndex("Number", "PackingCode", "ItemCode", "Lot", "Status") + .IsUnique() + .HasFilter("[Lot] IS NOT NULL"); + + b.ToTable("Store_UnplannedIssueRequestDetail", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.UnplannedReceiptJob", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AcceptTime") + .HasColumnType("datetime2"); + + b.Property("AcceptUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("AcceptUserName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("BuildDate") + .HasColumnType("datetime2"); + + b.Property("CompleteTime") + .HasColumnType("datetime2"); + + b.Property("CompleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CompleteUserName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + 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("DeptCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("DeptName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("IsAutoComplete") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false); + + b.Property("JobDescription") + .HasMaxLength(1024) + .HasColumnType("nvarchar(1024)"); + + b.Property("JobStatus") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("JobType") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("OANumber") + .HasColumnType("nvarchar(max)"); + + b.Property("Priority") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasDefaultValue(0); + + b.Property("PriorityIncrement") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasDefaultValue(0); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("UnplannedReceiptRequestNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("UnplannedReceiptType") + .HasColumnType("int"); + + b.Property("UpStreamJobNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("WarehouseCode") + .HasColumnType("nvarchar(max)"); + + b.Property("WorkGroupCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Worker") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("Number") + .IsUnique(); + + b.ToTable("Job_UnplannedReceiptJob", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.UnplannedReceiptJobDetail", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CaseCode") + .HasColumnType("nvarchar(max)"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("Explain") + .HasColumnType("nvarchar(max)"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("HandledArriveDate") + .HasColumnType("datetime2"); + + b.Property("HandledContainerCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledContainerCode"); + + b.Property("HandledExpireDate") + .HasColumnType("datetime2"); + + b.Property("HandledLot") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledLot"); + + b.Property("HandledPackingCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledPackingCode"); + + b.Property("HandledProduceDate") + .HasColumnType("datetime2"); + + b.Property("HandledQty") + .HasColumnType("decimal(18,6)"); + + b.Property("HandledSupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledSupplierBatch"); + + b.Property("HandledToLocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledToLocationArea"); + + b.Property("HandledToLocationCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledToLocationCode"); + + b.Property("HandledToLocationErpCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledToLocationErpCode"); + + b.Property("HandledToLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledToLocationGroup"); + + b.Property("HandledToWarehouseCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledToWarehouseCode"); + + b.Property("ItemCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemCode"); + + b.Property("ItemDesc1") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc1"); + + b.Property("ItemDesc2") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc2"); + + b.Property("ItemName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemName"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("MasterID") + .HasColumnType("uniqueidentifier"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("OnceBusiCode") + .HasColumnType("nvarchar(max)"); + + b.Property("ProjCapacityCode") + .HasColumnType("nvarchar(max)"); + + b.Property("ReasonCode") + .HasColumnType("nvarchar(max)"); + + b.Property("RecommendArriveDate") + .HasColumnType("datetime2"); + + b.Property("RecommendContainerCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendContainerCode"); + + b.Property("RecommendExpireDate") + .HasColumnType("datetime2"); + + b.Property("RecommendLot") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendLot"); + + b.Property("RecommendPackingCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendPackingCode"); + + b.Property("RecommendProduceDate") + .HasColumnType("datetime2"); + + b.Property("RecommendQty") + .HasColumnType("decimal(18,6)"); + + b.Property("RecommendSupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendSupplierBatch"); + + b.Property("RecommendToLocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendToLocationArea"); + + b.Property("RecommendToLocationCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendToLocationCode"); + + b.Property("RecommendToLocationErpCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendToLocationErpCode"); + + b.Property("RecommendToLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendToLocationGroup"); + + b.Property("RecommendToWarehouseCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendToWarehouseCode"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("Status") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("StdPackQty") + .HasColumnType("decimal(18,6)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Uom") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("MasterID"); + + b.ToTable("Job_UnplannedReceiptJobDetail", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.UnplannedReceiptNote", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ActiveDate") + .HasColumnType("datetime2"); + + b.Property("BuildDate") + .HasColumnType("datetime2"); + + 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("DeptCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("DeptName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("JobNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("OANumber") + .HasColumnType("nvarchar(max)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("UnplannedReceiptRequestNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("UnplannedReceiptType") + .HasColumnType("int"); + + b.Property("Worker") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("Number") + .IsUnique(); + + b.ToTable("Store_UnplannedReceiptNote", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.UnplannedReceiptNoteDetail", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ArriveDate") + .HasColumnType("datetime2"); + + b.Property("CaseCode") + .HasColumnType("nvarchar(max)"); + + b.Property("ContainerCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ContainerCode"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("ExpireDate") + .HasColumnType("datetime2"); + + b.Property("Explain") + .HasColumnType("nvarchar(max)"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("HandledArriveDate") + .HasColumnType("datetime2"); + + b.Property("HandledContainerCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledContainerCode"); + + b.Property("HandledExpireDate") + .HasColumnType("datetime2"); + + b.Property("HandledLot") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledLot"); + + b.Property("HandledPackingCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledPackingCode"); + + b.Property("HandledProduceDate") + .HasColumnType("datetime2"); + + b.Property("HandledQty") + .HasColumnType("decimal(18,6)"); + + b.Property("HandledSupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledSupplierBatch"); + + b.Property("HandledToLocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledToLocationArea"); + + b.Property("HandledToLocationCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledToLocationCode"); + + b.Property("HandledToLocationErpCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledToLocationErpCode"); + + b.Property("HandledToLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledToLocationGroup"); + + b.Property("HandledToWarehouseCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledToWarehouseCode"); + + b.Property("ItemCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemCode"); + + b.Property("ItemDesc1") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc1"); + + b.Property("ItemDesc2") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc2"); + + b.Property("ItemName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemName"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("LocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationArea"); + + b.Property("LocationCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationCode"); + + b.Property("LocationErpCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationErpCode"); + + b.Property("LocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationGroup"); + + b.Property("Lot") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Lot"); + + b.Property("MasterID") + .HasColumnType("uniqueidentifier"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("OnceBusiCode") + .HasColumnType("nvarchar(max)"); + + b.Property("PackingCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("PackingCode"); + + b.Property("ProduceDate") + .HasColumnType("datetime2"); + + b.Property("ProjCapacityCode") + .HasColumnType("nvarchar(max)"); + + b.Property("Qty") + .HasPrecision(18, 6) + .HasColumnType("decimal(18,6)") + .HasColumnName("Qty"); + + b.Property("ReasonCode") + .HasColumnType("nvarchar(max)"); + + b.Property("RecommendArriveDate") + .HasColumnType("datetime2"); + + b.Property("RecommendContainerCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendContainerCode"); + + b.Property("RecommendExpireDate") + .HasColumnType("datetime2"); + + b.Property("RecommendLot") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendLot"); + + b.Property("RecommendPackingCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendPackingCode"); + + b.Property("RecommendProduceDate") + .HasColumnType("datetime2"); + + b.Property("RecommendQty") + .HasColumnType("decimal(18,6)"); + + b.Property("RecommendSupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendSupplierBatch"); + + b.Property("RecommendToLocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendToLocationArea"); + + b.Property("RecommendToLocationCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendToLocationCode"); + + b.Property("RecommendToLocationErpCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendToLocationErpCode"); + + b.Property("RecommendToLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendToLocationGroup"); + + b.Property("RecommendToWarehouseCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendToWarehouseCode"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("Status") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("StdPackQty") + .HasColumnType("decimal(18,6)"); + + b.Property("SupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("SupplierBatch"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Uom") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Uom"); + + b.Property("WarehouseCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("WarehouseCode"); + + b.HasKey("Id"); + + b.HasIndex("MasterID"); + + b.HasIndex("Number", "PackingCode", "ItemCode", "Lot", "Status") + .IsUnique() + .HasFilter("[Lot] IS NOT NULL"); + + b.ToTable("Store_UnplannedReceiptNoteDetail", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.UnplannedReceiptRequest", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ActiveDate") + .HasColumnType("datetime2"); + + b.Property("AutoAgree") + .HasColumnType("bit"); + + b.Property("AutoCompleteJob") + .HasColumnType("bit"); + + b.Property("AutoHandle") + .HasColumnType("bit"); + + b.Property("AutoSubmit") + .HasColumnType("bit"); + + b.Property("BuildDate") + .HasColumnType("datetime2"); + + 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("DeptCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("DeptName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("DirectCreateNote") + .HasColumnType("bit"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("OANumber") + .HasColumnType("nvarchar(max)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("RequestStatus") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("UnplannedReceiptType") + .HasColumnType("int"); + + b.Property("Worker") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("Number") + .IsUnique(); + + b.ToTable("Store_UnplannedReceiptRequest", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.UnplannedReceiptRequestDetail", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ArriveDate") + .HasColumnType("datetime2"); + + b.Property("CaseCode") + .HasColumnType("nvarchar(max)"); + + b.Property("ContainerCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ContainerCode"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("ExpireDate") + .HasColumnType("datetime2"); + + b.Property("Explain") + .HasColumnType("nvarchar(max)"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("ItemCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemCode"); + + b.Property("ItemDesc1") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc1"); + + b.Property("ItemDesc2") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc2"); + + b.Property("ItemName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemName"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("LocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationArea"); + + b.Property("LocationCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationCode"); + + b.Property("LocationErpCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationErpCode"); + + b.Property("LocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationGroup"); + + b.Property("Lot") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Lot"); + + b.Property("MasterID") + .HasColumnType("uniqueidentifier"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("OnceBusiCode") + .HasColumnType("nvarchar(max)"); + + b.Property("PackingCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("PackingCode"); + + b.Property("ProduceDate") + .HasColumnType("datetime2"); + + b.Property("ProjCapacityCode") + .HasColumnType("nvarchar(max)"); + + b.Property("Qty") + .HasPrecision(18, 6) + .HasColumnType("decimal(18,6)") + .HasColumnName("Qty"); + + b.Property("ReasonCode") + .HasColumnType("nvarchar(max)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("Status") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("StdPackQty") + .HasColumnType("decimal(18,6)"); + + b.Property("SupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("SupplierBatch"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Uom") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Uom"); + + b.Property("WarehouseCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("WarehouseCode"); + + b.HasKey("Id"); + + b.HasIndex("MasterID"); + + b.HasIndex("Number", "PackingCode", "ItemCode", "Lot", "Status") + .IsUnique() + .HasFilter("[Lot] IS NOT NULL"); + + b.ToTable("Store_UnplannedReceiptRequestDetail", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.WarehouseTransferNote", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ActiveDate") + .HasColumnType("datetime2"); + + 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("JobNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("JobNumber"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("SupplierCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Worker") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("Number") + .IsUnique(); + + b.ToTable("Store_WarehouseTransferNote", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.WarehouseTransferNoteDetail", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ArriveDate") + .HasColumnType("datetime2"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("ExpireDate") + .HasColumnType("datetime2"); + + b.Property("FromContainerCode") + .HasColumnType("nvarchar(max)"); + + b.Property("FromLocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromLocationArea"); + + b.Property("FromLocationCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromLocationCode"); + + b.Property("FromLocationErpCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromLocationErpCode"); + + b.Property("FromLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromLocationGroup"); + + b.Property("FromLot") + .HasColumnType("nvarchar(max)"); + + b.Property("FromPackingCode") + .HasColumnType("nvarchar(450)"); + + b.Property("FromStatus") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("FromWarehouseCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromWarehouseCode"); + + b.Property("ItemCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemCode"); + + b.Property("ItemDesc1") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc1"); + + b.Property("ItemDesc2") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc2"); + + b.Property("ItemName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemName"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("MasterID") + .HasColumnType("uniqueidentifier"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("ProduceDate") + .HasColumnType("datetime2"); + + b.Property("Qty") + .HasPrecision(18, 6) + .HasColumnType("decimal(18,6)") + .HasColumnName("Qty"); + + b.Property("Reason") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("StdPackQty") + .HasColumnType("decimal(18,6)"); + + b.Property("SupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("SupplierBatch"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("ToContainerCode") + .HasColumnType("nvarchar(max)"); + + b.Property("ToLocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToLocationArea"); + + b.Property("ToLocationCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToLocationCode"); + + b.Property("ToLocationErpCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToLocationErpCode"); + + b.Property("ToLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToLocationGroup"); + + b.Property("ToLot") + .HasColumnType("nvarchar(max)"); + + b.Property("ToPackingCode") + .HasColumnType("nvarchar(max)"); + + b.Property("ToStatus") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ToWarehouseCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToWarehouseCode"); + + b.Property("Uom") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Uom"); + + b.HasKey("Id"); + + b.HasIndex("MasterID"); + + b.HasIndex("Number", "FromPackingCode", "FromLocationCode", "ToLocationCode") + .IsUnique() + .HasFilter("[FromPackingCode] IS NOT NULL"); + + b.ToTable("Store_WarehouseTransferNoteDetail", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.WipWarehouseAdjustNote", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ActiveDate") + .HasColumnType("datetime2"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("ConfirmTime") + .HasColumnType("datetime2"); + + b.Property("Confirmed") + .HasColumnType("bit"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("JobNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("JobNumber"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("RequestNumber") + .HasColumnType("nvarchar(max)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Type") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Worker") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("Number") + .IsUnique(); + + b.ToTable("Store_WipWarehouseAdjustNote", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.WipWarehouseAdjustNoteDetail", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ArriveDate") + .HasColumnType("datetime2"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("ExpireDate") + .HasColumnType("datetime2"); + + b.Property("FromContainerCode") + .HasColumnType("nvarchar(max)"); + + b.Property("FromLocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromLocationArea"); + + b.Property("FromLocationCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromLocationCode"); + + b.Property("FromLocationErpCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromLocationErpCode"); + + b.Property("FromLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromLocationGroup"); + + b.Property("FromLot") + .HasColumnType("nvarchar(max)"); + + b.Property("FromPackingCode") + .HasColumnType("nvarchar(450)"); + + b.Property("FromStatus") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("FromWarehouseCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromWarehouseCode"); + + b.Property("ItemCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemCode"); + + b.Property("ItemDesc1") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc1"); + + b.Property("ItemDesc2") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc2"); + + b.Property("ItemName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemName"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("MasterID") + .HasColumnType("uniqueidentifier"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("ProduceDate") + .HasColumnType("datetime2"); + + b.Property("Qty") + .HasPrecision(18, 6) + .HasColumnType("decimal(18,6)") + .HasColumnName("Qty"); + + b.Property("Reason") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ReasonCode") + .HasMaxLength(4096) + .HasColumnType("nvarchar(max)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("StdPackQty") + .HasColumnType("decimal(18,6)"); + + b.Property("SupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("SupplierBatch"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("ToContainerCode") + .HasColumnType("nvarchar(max)"); + + b.Property("ToLocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToLocationArea"); + + b.Property("ToLocationCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToLocationCode"); + + b.Property("ToLocationErpCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToLocationErpCode"); + + b.Property("ToLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToLocationGroup"); + + b.Property("ToLot") + .HasColumnType("nvarchar(max)"); + + b.Property("ToPackingCode") + .HasColumnType("nvarchar(max)"); + + b.Property("ToStatus") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ToWarehouseCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToWarehouseCode"); + + b.Property("Uom") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Uom"); + + b.HasKey("Id"); + + b.HasIndex("MasterID"); + + b.HasIndex("Number", "FromPackingCode", "FromLocationCode", "ToLocationCode", "FromStatus", "ToStatus") + .IsUnique() + .HasFilter("[FromPackingCode] IS NOT NULL"); + + b.ToTable("Store_WipWarehouseAdjustNoteDetail", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.WipWarehouseAdjustRequest", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ActiveDate") + .HasColumnType("datetime2"); + + b.Property("AutoAgree") + .HasColumnType("bit"); + + b.Property("AutoCompleteJob") + .HasColumnType("bit"); + + b.Property("AutoHandle") + .HasColumnType("bit"); + + b.Property("AutoSubmit") + .HasColumnType("bit"); + + 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("DirectCreateNote") + .HasColumnType("bit"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("RequestStatus") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Type") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Worker") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("Number") + .IsUnique(); + + b.ToTable("Store_WipWarehouseAdjustRequest", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.WipWarehouseAdjustRequestDetail", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ArriveDate") + .HasColumnType("datetime2"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("ExpireDate") + .HasColumnType("datetime2"); + + b.Property("FromContainerCode") + .HasColumnType("nvarchar(max)"); + + b.Property("FromLocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromLocationArea"); + + b.Property("FromLocationCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromLocationCode"); + + b.Property("FromLocationErpCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromLocationErpCode"); + + b.Property("FromLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromLocationGroup"); + + b.Property("FromLot") + .HasColumnType("nvarchar(max)"); + + b.Property("FromPackingCode") + .HasColumnType("nvarchar(max)"); + + b.Property("FromStatus") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("FromWarehouseCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromWarehouseCode"); + + b.Property("ItemCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemCode"); + + b.Property("ItemDesc1") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc1"); + + b.Property("ItemDesc2") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc2"); + + b.Property("ItemName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemName"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("MasterID") + .HasColumnType("uniqueidentifier"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("ProduceDate") + .HasColumnType("datetime2"); + + b.Property("Qty") + .HasPrecision(18, 6) + .HasColumnType("decimal(18,6)") + .HasColumnName("Qty"); + + b.Property("Reason") + .HasMaxLength(4096) + .HasColumnType("nvarchar(max)"); + + b.Property("ReasonCode") + .HasMaxLength(4096) + .HasColumnType("nvarchar(max)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("StdPackQty") + .HasColumnType("decimal(18,6)"); + + b.Property("SupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("SupplierBatch"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("ToContainerCode") + .HasColumnType("nvarchar(max)"); + + b.Property("ToLocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToLocationArea"); + + b.Property("ToLocationCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToLocationCode"); + + b.Property("ToLocationErpCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToLocationErpCode"); + + b.Property("ToLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToLocationGroup"); + + b.Property("ToLot") + .HasColumnType("nvarchar(max)"); + + b.Property("ToPackingCode") + .HasColumnType("nvarchar(max)"); + + b.Property("ToStatus") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ToWarehouseCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToWarehouseCode"); + + b.Property("Uom") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Uom"); + + b.HasKey("Id"); + + b.HasIndex("MasterID"); + + b.ToTable("Store_WipWarehouseAdjustRequestDetail", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.WorkOrder", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ActiveDate") + .HasColumnType("datetime2"); + + 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("EffectiveDate") + .HasColumnType("datetime2"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("ItemCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemCode"); + + b.Property("ItemDesc1") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc1"); + + b.Property("ItemDesc2") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc2"); + + b.Property("ItemName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemName"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("LocationCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("Op") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Qty") + .HasPrecision(18, 6) + .HasColumnType("decimal(18,6)") + .HasColumnName("Qty"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Type") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Uom") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Uom"); + + b.Property("WoStatus") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("WorkOrderId") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("WorkStation") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Worker") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("Number") + .IsUnique(); + + b.ToTable("Store_WorkOrder", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.WorkOrderDetail", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("EffectiveDate") + .HasColumnType("datetime2"); + + b.Property("ItemCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemCode"); + + b.Property("ItemDesc1") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc1"); + + b.Property("ItemDesc2") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc2"); + + b.Property("ItemName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemName"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("MasterID") + .HasColumnType("uniqueidentifier"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("Op") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("RawLocationCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("RawQty") + .HasColumnType("decimal(18,6)"); + + b.Property("RawUom") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("MasterID"); + + b.HasIndex("Number", "ItemCode") + .IsUnique(); + + b.ToTable("Store_WorkOrderDetail", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Equipments.EquipmentRecord", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("BarCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Batch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + 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("EqptCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("FromLocCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("PartCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Qty") + .HasColumnType("decimal(18,6)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("State") + .HasColumnType("int"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("ToLocCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Type") + .HasMaxLength(64) + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("EqptCode"); + + b.ToTable("Store_EquipmentRecord", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Jobs.IssueJobs.CoatingIssueJob", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("AcceptTime") + .HasColumnType("datetime2"); + + b.Property("AcceptUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("AcceptUserName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("CompleteTime") + .HasColumnType("datetime2"); + + b.Property("CompleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CompleteUserName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + 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("IsAutoComplete") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false); + + b.Property("JobDescription") + .HasMaxLength(1024) + .HasColumnType("nvarchar(1024)"); + + b.Property("JobStatus") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("JobType") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("MaterialRequestNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Priority") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasDefaultValue(0); + + b.Property("PriorityIncrement") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasDefaultValue(0); + + b.Property("ProdLine") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("RequestType") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("UpStreamJobNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("UseOnTheWayLocation") + .HasColumnType("bit"); + + b.Property("WarehouseCode") + .HasColumnType("nvarchar(max)"); + + b.Property("WorkGroupCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Worker") + .HasColumnType("nvarchar(max)"); + + b.Property("Workshop") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.HasKey("Id"); + + b.HasIndex("Number") + .IsUnique(); + + b.ToTable("Job_CoatingIssueJob", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Jobs.IssueJobs.CoatingIssueJobDetail", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DeliveryQty") + .HasColumnType("decimal(18,6)"); + + b.Property("DistributionType") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ExpiredTime") + .HasColumnType("datetime2"); + + b.Property("HandledArriveDate") + .HasColumnType("datetime2"); + + b.Property("HandledContainerCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledContainerCode"); + + b.Property("HandledExpireDate") + .HasColumnType("datetime2"); + + b.Property("HandledFromLocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledFromLocationArea"); + + b.Property("HandledFromLocationCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledFromLocationCode"); + + b.Property("HandledFromLocationErpCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledFromLocationErpCode"); + + b.Property("HandledFromLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledFromLocationGroup"); + + b.Property("HandledFromWarehouseCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledFromWarehouseCode"); + + b.Property("HandledLot") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledLot"); + + b.Property("HandledPackingCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledPackingCode"); + + b.Property("HandledProduceDate") + .HasColumnType("datetime2"); + + b.Property("HandledQty") + .HasColumnType("decimal(18,6)"); + + b.Property("HandledSupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledSupplierBatch"); + + b.Property("ItemCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemCode"); + + b.Property("ItemDesc1") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc1"); + + b.Property("ItemDesc2") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc2"); + + b.Property("ItemName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemName"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("MasterID") + .HasColumnType("uniqueidentifier"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("OnTheWayLocationCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Operation") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("PlanBeginTime") + .HasColumnType("datetime2"); + + b.Property("PlannedSplitRule") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("PositionCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ProdLine") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("RecommendArriveDate") + .HasColumnType("datetime2"); + + b.Property("RecommendContainerCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendContainerCode"); + + b.Property("RecommendExpireDate") + .HasColumnType("datetime2"); + + b.Property("RecommendFromLocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendFromLocationArea"); + + b.Property("RecommendFromLocationCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendFromLocationCode"); + + b.Property("RecommendFromLocationErpCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendFromLocationErpCode"); + + b.Property("RecommendFromLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendFromLocationGroup"); + + b.Property("RecommendFromWarehouseCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendFromWarehouseCode"); + + b.Property("RecommendLot") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendLot"); + + b.Property("RecommendPackingCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendPackingCode"); + + b.Property("RecommendProduceDate") + .HasColumnType("datetime2"); + + b.Property("RecommendQty") + .HasColumnType("decimal(18,6)"); + + b.Property("RecommendSupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendSupplierBatch"); + + b.Property("RecommendType") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("RequestLocationCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("RoundedQty") + .HasColumnType("decimal(18,6)"); + + b.Property("Status") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("StdPackQty") + .HasColumnType("decimal(18,6)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("ToLocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ToLocationCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ToLocationErpCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ToLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ToWarehouseCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("TruncType") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Uom") + .HasColumnType("nvarchar(max)"); + + b.Property("WorkStation") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.HasKey("Id"); + + b.HasIndex("MasterID"); + + b.ToTable("Job_CoatingIssueJobDetail", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Notes.IssueNotes.CoatingIssueNote", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("ActiveDate") + .HasColumnType("datetime2"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("ConfirmTime") + .HasColumnType("datetime2"); + + b.Property("Confirmed") + .HasColumnType("bit"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("JobNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("JobNumber"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("RequestNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("RequestType") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("UseOnTheWayLocation") + .HasColumnType("bit"); + + b.Property("Worker") + .HasColumnType("nvarchar(max)"); + + b.Property("Workshop") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.HasKey("Id"); + + b.HasIndex("Number") + .IsUnique(); + + b.ToTable("Store_CoatingIssueNote", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Notes.IssueNotes.CoatingIssueNoteDetail", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("ArriveDate") + .HasColumnType("datetime2"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("ExpireDate") + .HasColumnType("datetime2"); + + b.Property("ExpiredTime") + .HasColumnType("datetime2"); + + b.Property("FromContainerCode") + .HasColumnType("nvarchar(max)"); + + b.Property("FromLocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromLocationArea"); + + b.Property("FromLocationCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromLocationCode"); + + b.Property("FromLocationErpCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromLocationErpCode"); + + b.Property("FromLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromLocationGroup"); + + b.Property("FromLot") + .HasColumnType("nvarchar(max)"); + + b.Property("FromPackingCode") + .HasColumnType("nvarchar(450)"); + + b.Property("FromStatus") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("FromWarehouseCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromWarehouseCode"); + + b.Property("HandledArriveDate") + .HasColumnType("datetime2"); + + b.Property("HandledContainerCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledContainerCode"); + + b.Property("HandledExpireDate") + .HasColumnType("datetime2"); + + b.Property("HandledFromLocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledFromLocationArea"); + + b.Property("HandledFromLocationCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledFromLocationCode"); + + b.Property("HandledFromLocationErpCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledFromLocationErpCode"); + + b.Property("HandledFromLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledFromLocationGroup"); + + b.Property("HandledFromWarehouseCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledFromWarehouseCode"); + + b.Property("HandledLot") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledLot"); + + b.Property("HandledPackingCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledPackingCode"); + + b.Property("HandledProduceDate") + .HasColumnType("datetime2"); + + b.Property("HandledQty") + .HasColumnType("decimal(18,6)"); + + b.Property("HandledSupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledSupplierBatch"); + + b.Property("IssueTime") + .HasColumnType("datetime2"); + + b.Property("ItemCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemCode"); + + b.Property("ItemDesc1") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc1"); + + b.Property("ItemDesc2") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc2"); + + b.Property("ItemName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemName"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("MasterID") + .HasColumnType("uniqueidentifier"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("OnTheWayLocationCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("PositionCode") + .HasColumnType("nvarchar(max)"); + + b.Property("ProdLine") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ProduceDate") + .HasColumnType("datetime2"); + + b.Property("Qty") + .HasPrecision(18, 6) + .HasColumnType("decimal(18,6)") + .HasColumnName("Qty"); + + b.Property("RecommendArriveDate") + .HasColumnType("datetime2"); + + b.Property("RecommendContainerCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendContainerCode"); + + b.Property("RecommendExpireDate") + .HasColumnType("datetime2"); + + b.Property("RecommendFromLocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendFromLocationArea"); + + b.Property("RecommendFromLocationCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendFromLocationCode"); + + b.Property("RecommendFromLocationErpCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendFromLocationErpCode"); + + b.Property("RecommendFromLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendFromLocationGroup"); + + b.Property("RecommendFromWarehouseCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendFromWarehouseCode"); + + b.Property("RecommendLot") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendLot"); + + b.Property("RecommendPackingCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendPackingCode"); + + b.Property("RecommendProduceDate") + .HasColumnType("datetime2"); + + b.Property("RecommendQty") + .HasColumnType("decimal(18,6)"); + + b.Property("RecommendSupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendSupplierBatch"); + + b.Property("RecommendType") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("StdPackQty") + .HasColumnType("decimal(18,6)"); + + b.Property("SupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("SupplierBatch"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("ToContainerCode") + .HasColumnType("nvarchar(max)"); + + b.Property("ToLocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToLocationArea"); + + b.Property("ToLocationCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToLocationCode"); + + b.Property("ToLocationErpCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToLocationErpCode"); + + b.Property("ToLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToLocationGroup"); + + b.Property("ToLot") + .HasColumnType("nvarchar(max)"); + + b.Property("ToPackingCode") + .HasColumnType("nvarchar(max)"); + + b.Property("ToStatus") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ToWarehouseCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToWarehouseCode"); + + b.Property("Uom") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Uom"); + + b.Property("WorkStation") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.HasKey("Id"); + + b.HasIndex("FromPackingCode"); + + b.HasIndex("MasterID"); + + b.HasIndex("Number", "FromPackingCode", "FromLocationCode", "ToLocationCode") + .IsUnique() + .HasFilter("[FromPackingCode] IS NOT NULL"); + + b.ToTable("Store_CoatingIssueNoteDetail", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Requests.MaterialRequests.CoatingMaterialRequest", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("ActiveDate") + .HasColumnType("datetime2"); + + b.Property("AutoAgree") + .HasColumnType("bit"); + + b.Property("AutoCompleteJob") + .HasColumnType("bit"); + + b.Property("AutoHandle") + .HasColumnType("bit"); + + b.Property("AutoSubmit") + .HasColumnType("bit"); + + 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("DirectCreateNote") + .HasColumnType("bit"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("PreparationPlanNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ProdLine") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("RequestStatus") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Type") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("UseOnTheWayLocation") + .HasColumnType("bit"); + + b.Property("Worker") + .HasColumnType("nvarchar(max)"); + + b.Property("Workshop") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.HasKey("Id"); + + b.HasIndex("Number") + .IsUnique(); + + b.ToTable("Store_CoatingMaterialRequest", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Requests.MaterialRequests.CoatingMaterialRequestDetail", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("ExpiredTime") + .HasColumnType("datetime2"); + + b.Property("FromLocationArea") + .HasColumnType("nvarchar(max)"); + + b.Property("IssuedQty") + .HasPrecision(18, 6) + .HasColumnType("decimal(18,6)"); + + b.Property("ItemCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemCode"); + + b.Property("ItemDesc1") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc1"); + + b.Property("ItemDesc2") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc2"); + + b.Property("ItemName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemName"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("MasterID") + .HasColumnType("uniqueidentifier"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("PositionCode") + .HasColumnType("nvarchar(max)"); + + b.Property("ProdLine") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Qty") + .HasPrecision(18, 6) + .HasColumnType("decimal(18,6)") + .HasColumnName("Qty"); + + b.Property("ReceivedQty") + .HasPrecision(18, 6) + .HasColumnType("decimal(18,6)"); + + b.Property("RecommendType") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("Status") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("StdPackQty") + .HasColumnType("decimal(18,6)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("ToLocationArea") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ToLocationCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ToLocationErpCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ToLocationGroup") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ToWarehouseCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Uom") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Uom"); + + b.Property("WorkStation") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.HasKey("Id"); + + b.HasIndex("ItemCode"); + + b.HasIndex("MasterID"); + + b.HasIndex("Number", "ItemCode", "ToLocationCode") + .IsUnique(); + + b.ToTable("Store_CoatingMaterialRequestDetail", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.BackFlushNoteDetail", b => + { + b.HasOne("Win_in.Sfs.Wms.Store.Domain.BackFlushNote", null) + .WithMany("Details") + .HasForeignKey("MasterID") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.CheckJobDetail", b => + { + b.HasOne("Win_in.Sfs.Wms.Store.Domain.CheckJob", null) + .WithMany("Details") + .HasForeignKey("MasterID") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ContainerBindNoteDetail", b => + { + b.HasOne("Win_in.Sfs.Wms.Store.Domain.ContainerBindNote", null) + .WithMany("Details") + .HasForeignKey("MasterID") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ContainerJobDetail", b => + { + b.HasOne("Win_in.Sfs.Wms.Store.Domain.ContainerJob", null) + .WithMany("Details") + .HasForeignKey("MasterID") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ContainerNoteDetail", b => + { + b.HasOne("Win_in.Sfs.Wms.Store.Domain.ContainerNote", null) + .WithMany("Details") + .HasForeignKey("MasterID") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ContainerRequestDetail", b => + { + b.HasOne("Win_in.Sfs.Wms.Store.Domain.ContainerRequest", null) + .WithMany("Details") + .HasForeignKey("MasterID") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.CountAdjustNoteDetail", b => + { + b.HasOne("Win_in.Sfs.Wms.Store.Domain.CountAdjustNote", null) + .WithMany("Details") + .HasForeignKey("MasterID") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.CountAdjustRequestDetail", b => + { + b.HasOne("Win_in.Sfs.Wms.Store.Domain.CountAdjustRequest", null) + .WithMany("Details") + .HasForeignKey("MasterID") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.CountJobDetail", b => + { + b.HasOne("Win_in.Sfs.Wms.Store.Domain.CountJob", null) + .WithMany("Details") + .HasForeignKey("MasterID") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.CountNoteDetail", b => + { + b.HasOne("Win_in.Sfs.Wms.Store.Domain.CountNote", null) + .WithMany("Details") + .HasForeignKey("MasterID") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.CountPlanDetail", b => + { + b.HasOne("Win_in.Sfs.Wms.Store.Domain.CountPlan", null) + .WithMany("Details") + .HasForeignKey("MasterID") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.CustomerAsnDetail", b => + { + b.HasOne("Win_in.Sfs.Wms.Store.Domain.CustomerAsn", null) + .WithMany("Details") + .HasForeignKey("MasterID") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.CustomerReturnNoteDetail", b => + { + b.HasOne("Win_in.Sfs.Wms.Store.Domain.CustomerReturnNote", null) + .WithMany("Details") + .HasForeignKey("MasterID") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.DeliverJobDetail", b => + { + b.HasOne("Win_in.Sfs.Wms.Store.Domain.DeliverJob", null) + .WithMany("Details") + .HasForeignKey("MasterID") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.DeliverNoteDetail", b => + { + b.HasOne("Win_in.Sfs.Wms.Store.Domain.DeliverNote", null) + .WithMany("Details") + .HasForeignKey("MasterID") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.DeliverPlanDetail", b => + { + b.HasOne("Win_in.Sfs.Wms.Store.Domain.DeliverPlan", null) + .WithMany("Details") + .HasForeignKey("MasterID") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.DeliverRequestDetail", b => + { + b.HasOne("Win_in.Sfs.Wms.Store.Domain.DeliverRequest", null) + .WithMany("Details") + .HasForeignKey("MasterID") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.InjectionJobDetail", b => + { + b.HasOne("Win_in.Sfs.Wms.Store.Domain.InjectionJob", null) + .WithMany("Details") + .HasForeignKey("MasterID") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.InjectionNoteDetail", b => + { + b.HasOne("Win_in.Sfs.Wms.Store.Domain.InjectionNote", null) + .WithMany("Details") + .HasForeignKey("MasterID") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.InjectionRequestDetail", b => + { + b.HasOne("Win_in.Sfs.Wms.Store.Domain.InjectionRequest", null) + .WithMany("Details") + .HasForeignKey("MasterID") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.InspectAbnormalNoteDetail", b => + { + b.HasOne("Win_in.Sfs.Wms.Store.Domain.InspectAbnormalNote", null) + .WithMany("Details") + .HasForeignKey("MasterID") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.InspectJobDetail", b => + { + b.HasOne("Win_in.Sfs.Wms.Store.Domain.InspectJob", null) + .WithMany("Details") + .HasForeignKey("MasterID") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.InspectJobSummaryDetail", b => + { + b.HasOne("Win_in.Sfs.Wms.Store.Domain.InspectJob", null) + .WithMany("SummaryDetails") + .HasForeignKey("MasterID") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.InspectNoteDetail", b => + { + b.HasOne("Win_in.Sfs.Wms.Store.Domain.InspectNote", null) + .WithMany("Details") + .HasForeignKey("MasterID") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.InspectNoteSummaryDetail", b => + { + b.HasOne("Win_in.Sfs.Wms.Store.Domain.InspectNote", null) + .WithMany("SummaryDetails") + .HasForeignKey("MasterID") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.InspectRequestDetail", b => + { + b.HasOne("Win_in.Sfs.Wms.Store.Domain.InspectRequest", null) + .WithMany("Details") + .HasForeignKey("MasterID") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.InspectRequestSummaryDetail", b => + { + b.HasOne("Win_in.Sfs.Wms.Store.Domain.InspectRequest", null) + .WithMany("SummaryDetails") + .HasForeignKey("MasterID") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.InventoryInitialNoteDetail", b => + { + b.HasOne("Win_in.Sfs.Wms.Store.Domain.InventoryInitialNote", null) + .WithMany("Details") + .HasForeignKey("MasterID") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.InventoryTransferNoteDetail", b => + { + b.HasOne("Win_in.Sfs.Wms.Store.Domain.InventoryTransferNote", null) + .WithMany("Details") + .HasForeignKey("MasterID") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.IsolationNoteDetail", b => + { + b.HasOne("Win_in.Sfs.Wms.Store.Domain.IsolationNote", null) + .WithMany("Details") + .HasForeignKey("MasterID") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.IssueJobDetail", b => + { + b.HasOne("Win_in.Sfs.Wms.Store.Domain.IssueJob", null) + .WithMany("Details") + .HasForeignKey("MasterID") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.IssueNoteDetail", b => + { + b.HasOne("Win_in.Sfs.Wms.Store.Domain.IssueNote", null) + .WithMany("Details") + .HasForeignKey("MasterID") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ItemTransformNoteDetail", b => + { + b.HasOne("Win_in.Sfs.Wms.Store.Domain.ItemTransformNote", null) + .WithMany("Details") + .HasForeignKey("MasterID") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ItemTransformRequestDetail", b => + { + b.HasOne("Win_in.Sfs.Wms.Store.Domain.ItemTransformRequest", null) + .WithMany("Details") + .HasForeignKey("MasterID") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.JisDeliverJobDetail", b => + { + b.HasOne("Win_in.Sfs.Wms.Store.Domain.JisDeliverJob", null) + .WithMany("Details") + .HasForeignKey("MasterID") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.JisDeliverNoteDetail", b => + { + b.HasOne("Win_in.Sfs.Wms.Store.Domain.JisDeliverNote", null) + .WithMany("Details") + .HasForeignKey("MasterID") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.JisProductReceiptNoteDetail", b => + { + b.HasOne("Win_in.Sfs.Wms.Store.Domain.JisProductReceiptNote", null) + .WithMany("Details") + .HasForeignKey("MasterID") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.MaterialRequestDetail", b => + { + b.HasOne("Win_in.Sfs.Wms.Store.Domain.MaterialRequest", null) + .WithMany("Details") + .HasForeignKey("MasterID") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.NoOkConvertOkNoteDetail", b => + { + b.HasOne("Win_in.Sfs.Wms.Store.Domain.NoOkConvertOkNote", null) + .WithMany("Details") + .HasForeignKey("MasterID") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.OfflineSettlementNoteDetail", b => + { + b.HasOne("Win_in.Sfs.Wms.Store.Domain.OfflineSettlementNote", null) + .WithMany("Details") + .HasForeignKey("MasterID") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.PreparationPlanDetail", b => + { + b.HasOne("Win_in.Sfs.Wms.Store.Domain.PreparationPlan", null) + .WithMany("Details") + .HasForeignKey("MasterID") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ProductionPlanDetail", b => + { + b.HasOne("Win_in.Sfs.Wms.Store.Domain.ProductionPlan", null) + .WithMany("Details") + .HasForeignKey("MasterID") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ProductionReturnJobDetail", b => + { + b.HasOne("Win_in.Sfs.Wms.Store.Domain.ProductionReturnJob", null) + .WithMany("Details") + .HasForeignKey("MasterID") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ProductionReturnNoteDetail", b => + { + b.HasOne("Win_in.Sfs.Wms.Store.Domain.ProductionReturnNote", null) + .WithMany("Details") + .HasForeignKey("MasterID") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ProductionReturnRequestDetail", b => + { + b.HasOne("Win_in.Sfs.Wms.Store.Domain.ProductionReturnRequest", null) + .WithMany("Details") + .HasForeignKey("MasterID") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ProductL7PartsNoteDetail", b => + { + b.HasOne("Win_in.Sfs.Wms.Store.Domain.ProductL7PartsNote", null) + .WithMany("Details") + .HasForeignKey("MasterID") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ProductReceiptNoteDetail", b => + { + b.HasOne("Win_in.Sfs.Wms.Store.Domain.ProductReceiptNote", null) + .WithMany("Details") + .HasForeignKey("MasterID") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ProductReceiptRequestDetail", b => + { + b.HasOne("Win_in.Sfs.Wms.Store.Domain.ProductReceiptRequest", null) + .WithMany("Details") + .HasForeignKey("MasterID") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ProductReceiveJobDetail", b => + { + b.HasOne("Win_in.Sfs.Wms.Store.Domain.ProductReceiveJob", null) + .WithMany("Details") + .HasForeignKey("MasterID") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ProductRecycleJobDetail", b => + { + b.HasOne("Win_in.Sfs.Wms.Store.Domain.ProductRecycleJob", null) + .WithMany("Details") + .HasForeignKey("MasterID") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ProductRecycleMaterialDetail", b => + { + b.HasOne("Win_in.Sfs.Wms.Store.Domain.ProductRecycleNote", null) + .WithMany("MaterialDetails") + .HasForeignKey("MasterID") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ProductRecycleNoteDetail", b => + { + b.HasOne("Win_in.Sfs.Wms.Store.Domain.ProductRecycleNote", null) + .WithMany("Details") + .HasForeignKey("MasterID") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ProductRecycleRequestDetail", b => + { + b.HasOne("Win_in.Sfs.Wms.Store.Domain.ProductRecycleRequest", null) + .WithMany("Details") + .HasForeignKey("MasterID") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.PurchaseOrderDetail", b => + { + b.HasOne("Win_in.Sfs.Wms.Store.Domain.PurchaseOrder", null) + .WithMany("Details") + .HasForeignKey("MasterID") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.PurchaseReceiptJobDetail", b => + { + b.HasOne("Win_in.Sfs.Wms.Store.Domain.PurchaseReceiptJob", null) + .WithMany("Details") + .HasForeignKey("MasterID") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.PurchaseReceiptNoteDetail", b => + { + b.HasOne("Win_in.Sfs.Wms.Store.Domain.PurchaseReceiptNote", null) + .WithMany("Details") + .HasForeignKey("MasterID") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.PurchaseReceiptRequestDetail", b => + { + b.HasOne("Win_in.Sfs.Wms.Store.Domain.PurchaseReceiptRequest", null) + .WithMany("Details") + .HasForeignKey("MasterID") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.PurchaseReturnJobDetail", b => + { + b.HasOne("Win_in.Sfs.Wms.Store.Domain.PurchaseReturnJob", null) + .WithMany("Details") + .HasForeignKey("MasterID") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.PurchaseReturnNoteDetail", b => + { + b.HasOne("Win_in.Sfs.Wms.Store.Domain.PurchaseReturnNote", null) + .WithMany("Details") + .HasForeignKey("MasterID") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.PurchaseReturnRequestDetail", b => + { + b.HasOne("Win_in.Sfs.Wms.Store.Domain.PurchaseReturnRequest", null) + .WithMany("Details") + .HasForeignKey("MasterID") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.PutawayJobDetail", b => + { + b.HasOne("Win_in.Sfs.Wms.Store.Domain.PutawayJob", null) + .WithMany("Details") + .HasForeignKey("MasterID") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.PutawayNoteDetail", b => + { + b.HasOne("Win_in.Sfs.Wms.Store.Domain.PutawayNote", null) + .WithMany("Details") + .HasForeignKey("MasterID") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.PutawayRequestDetail", b => + { + b.HasOne("Win_in.Sfs.Wms.Store.Domain.PutawayRequest", null) + .WithMany("Details") + .HasForeignKey("MasterID") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ReceiptAbnormalNoteDetail", b => + { + b.HasOne("Win_in.Sfs.Wms.Store.Domain.ReceiptAbnormalNote", null) + .WithMany("Details") + .HasForeignKey("MasterID") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.RecycledMaterialReceiptNoteDetail", b => + { + b.HasOne("Win_in.Sfs.Wms.Store.Domain.RecycledMaterialReceiptNote", null) + .WithMany("Details") + .HasForeignKey("MasterID") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.SaleOrderDetail", b => + { + b.HasOne("Win_in.Sfs.Wms.Store.Domain.SaleOrder", null) + .WithMany("Details") + .HasForeignKey("MasterID") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ScrapNoteDetail", b => + { + b.HasOne("Win_in.Sfs.Wms.Store.Domain.ScrapNote", null) + .WithMany("Details") + .HasForeignKey("MasterID") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ScrapRequestDetail", b => + { + b.HasOne("Win_in.Sfs.Wms.Store.Domain.ScrapRequest", null) + .WithMany("Details") + .HasForeignKey("MasterID") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.SupplierAsnDetail", b => + { + b.HasOne("Win_in.Sfs.Wms.Store.Domain.SupplierAsn", null) + .WithMany("Details") + .HasForeignKey("MasterID") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.TransferLibJobDetail", b => + { + b.HasOne("Win_in.Sfs.Wms.Store.Domain.TransferLibJob", null) + .WithMany("Details") + .HasForeignKey("MasterID") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.TransferLibNoteDetail", b => + { + b.HasOne("Win_in.Sfs.Wms.Store.Domain.TransferLibNote", null) + .WithMany("Details") + .HasForeignKey("MasterID") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.TransferLibRequestDetail", b => + { + b.HasOne("Win_in.Sfs.Wms.Store.Domain.TransferLibRequest", null) + .WithMany("Details") + .HasForeignKey("MasterID") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.TransferNoteDetail", b => + { + b.HasOne("Win_in.Sfs.Wms.Store.Domain.TransferNote", null) + .WithMany("Details") + .HasForeignKey("MasterID") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.TransferRequestDetail", b => + { + b.HasOne("Win_in.Sfs.Wms.Store.Domain.TransferRequest", null) + .WithMany("Details") + .HasForeignKey("MasterID") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.UnplannedIssueJobDetail", b => + { + b.HasOne("Win_in.Sfs.Wms.Store.Domain.UnplannedIssueJob", null) + .WithMany("Details") + .HasForeignKey("MasterID") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.UnplannedIssueNoteDetail", b => + { + b.HasOne("Win_in.Sfs.Wms.Store.Domain.UnplannedIssueNote", null) + .WithMany("Details") + .HasForeignKey("MasterID") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.UnplannedIssueRequestDetail", b => + { + b.HasOne("Win_in.Sfs.Wms.Store.Domain.UnplannedIssueRequest", null) + .WithMany("Details") + .HasForeignKey("MasterID") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.UnplannedReceiptJobDetail", b => + { + b.HasOne("Win_in.Sfs.Wms.Store.Domain.UnplannedReceiptJob", null) + .WithMany("Details") + .HasForeignKey("MasterID") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.UnplannedReceiptNoteDetail", b => + { + b.HasOne("Win_in.Sfs.Wms.Store.Domain.UnplannedReceiptNote", null) + .WithMany("Details") + .HasForeignKey("MasterID") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.UnplannedReceiptRequestDetail", b => + { + b.HasOne("Win_in.Sfs.Wms.Store.Domain.UnplannedReceiptRequest", null) + .WithMany("Details") + .HasForeignKey("MasterID") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.WarehouseTransferNoteDetail", b => + { + b.HasOne("Win_in.Sfs.Wms.Store.Domain.WarehouseTransferNote", null) + .WithMany("Details") + .HasForeignKey("MasterID") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.WipWarehouseAdjustNoteDetail", b => + { + b.HasOne("Win_in.Sfs.Wms.Store.Domain.WipWarehouseAdjustNote", null) + .WithMany("Details") + .HasForeignKey("MasterID") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.WipWarehouseAdjustRequestDetail", b => + { + b.HasOne("Win_in.Sfs.Wms.Store.Domain.WipWarehouseAdjustRequest", null) + .WithMany("Details") + .HasForeignKey("MasterID") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.WorkOrderDetail", b => + { + b.HasOne("Win_in.Sfs.Wms.Store.Domain.WorkOrder", null) + .WithMany("Details") + .HasForeignKey("MasterID") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Jobs.IssueJobs.CoatingIssueJobDetail", b => + { + b.HasOne("Win_in.Sfs.Wms.Store.Jobs.IssueJobs.CoatingIssueJob", null) + .WithMany("Details") + .HasForeignKey("MasterID") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Notes.IssueNotes.CoatingIssueNoteDetail", b => + { + b.HasOne("Win_in.Sfs.Wms.Store.Notes.IssueNotes.CoatingIssueNote", null) + .WithMany("Details") + .HasForeignKey("MasterID") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Requests.MaterialRequests.CoatingMaterialRequestDetail", b => + { + b.HasOne("Win_in.Sfs.Wms.Store.Requests.MaterialRequests.CoatingMaterialRequest", null) + .WithMany("Details") + .HasForeignKey("MasterID") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.BackFlushNote", b => + { + b.Navigation("Details"); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.CheckJob", b => + { + b.Navigation("Details"); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ContainerBindNote", b => + { + b.Navigation("Details"); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ContainerJob", b => + { + b.Navigation("Details"); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ContainerNote", b => + { + b.Navigation("Details"); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ContainerRequest", b => + { + b.Navigation("Details"); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.CountAdjustNote", b => + { + b.Navigation("Details"); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.CountAdjustRequest", b => + { + b.Navigation("Details"); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.CountJob", b => + { + b.Navigation("Details"); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.CountNote", b => + { + b.Navigation("Details"); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.CountPlan", b => + { + b.Navigation("Details"); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.CustomerAsn", b => + { + b.Navigation("Details"); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.CustomerReturnNote", b => + { + b.Navigation("Details"); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.DeliverJob", b => + { + b.Navigation("Details"); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.DeliverNote", b => + { + b.Navigation("Details"); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.DeliverPlan", b => + { + b.Navigation("Details"); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.DeliverRequest", b => + { + b.Navigation("Details"); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.InjectionJob", b => + { + b.Navigation("Details"); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.InjectionNote", b => + { + b.Navigation("Details"); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.InjectionRequest", b => + { + b.Navigation("Details"); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.InspectAbnormalNote", b => + { + b.Navigation("Details"); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.InspectJob", b => + { + b.Navigation("Details"); + + b.Navigation("SummaryDetails"); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.InspectNote", b => + { + b.Navigation("Details"); + + b.Navigation("SummaryDetails"); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.InspectRequest", b => + { + b.Navigation("Details"); + + b.Navigation("SummaryDetails"); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.InventoryInitialNote", b => + { + b.Navigation("Details"); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.InventoryTransferNote", b => + { + b.Navigation("Details"); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.IsolationNote", b => + { + b.Navigation("Details"); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.IssueJob", b => + { + b.Navigation("Details"); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.IssueNote", b => + { + b.Navigation("Details"); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ItemTransformNote", b => + { + b.Navigation("Details"); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ItemTransformRequest", b => + { + b.Navigation("Details"); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.JisDeliverJob", b => + { + b.Navigation("Details"); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.JisDeliverNote", b => + { + b.Navigation("Details"); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.JisProductReceiptNote", b => + { + b.Navigation("Details"); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.MaterialRequest", b => + { + b.Navigation("Details"); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.NoOkConvertOkNote", b => + { + b.Navigation("Details"); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.OfflineSettlementNote", b => + { + b.Navigation("Details"); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.PreparationPlan", b => + { + b.Navigation("Details"); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ProductionPlan", b => + { + b.Navigation("Details"); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ProductionReturnJob", b => + { + b.Navigation("Details"); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ProductionReturnNote", b => + { + b.Navigation("Details"); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ProductionReturnRequest", b => + { + b.Navigation("Details"); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ProductL7PartsNote", b => + { + b.Navigation("Details"); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ProductReceiptNote", b => + { + b.Navigation("Details"); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ProductReceiptRequest", b => + { + b.Navigation("Details"); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ProductReceiveJob", b => + { + b.Navigation("Details"); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ProductRecycleJob", b => + { + b.Navigation("Details"); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ProductRecycleNote", b => + { + b.Navigation("Details"); + + b.Navigation("MaterialDetails"); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ProductRecycleRequest", b => + { + b.Navigation("Details"); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.PurchaseOrder", b => + { + b.Navigation("Details"); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.PurchaseReceiptJob", b => + { + b.Navigation("Details"); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.PurchaseReceiptNote", b => + { + b.Navigation("Details"); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.PurchaseReceiptRequest", b => + { + b.Navigation("Details"); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.PurchaseReturnJob", b => + { + b.Navigation("Details"); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.PurchaseReturnNote", b => + { + b.Navigation("Details"); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.PurchaseReturnRequest", b => + { + b.Navigation("Details"); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.PutawayJob", b => + { + b.Navigation("Details"); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.PutawayNote", b => + { + b.Navigation("Details"); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.PutawayRequest", b => + { + b.Navigation("Details"); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ReceiptAbnormalNote", b => + { + b.Navigation("Details"); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.RecycledMaterialReceiptNote", b => + { + b.Navigation("Details"); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.SaleOrder", b => + { + b.Navigation("Details"); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ScrapNote", b => + { + b.Navigation("Details"); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ScrapRequest", b => + { + b.Navigation("Details"); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.SupplierAsn", b => + { + b.Navigation("Details"); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.TransferLibJob", b => + { + b.Navigation("Details"); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.TransferLibNote", b => + { + b.Navigation("Details"); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.TransferLibRequest", b => + { + b.Navigation("Details"); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.TransferNote", b => + { + b.Navigation("Details"); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.TransferRequest", b => + { + b.Navigation("Details"); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.UnplannedIssueJob", b => + { + b.Navigation("Details"); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.UnplannedIssueNote", b => + { + b.Navigation("Details"); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.UnplannedIssueRequest", b => + { + b.Navigation("Details"); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.UnplannedReceiptJob", b => + { + b.Navigation("Details"); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.UnplannedReceiptNote", b => + { + b.Navigation("Details"); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.UnplannedReceiptRequest", b => + { + b.Navigation("Details"); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.WarehouseTransferNote", b => + { + b.Navigation("Details"); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.WipWarehouseAdjustNote", b => + { + b.Navigation("Details"); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.WipWarehouseAdjustRequest", b => + { + b.Navigation("Details"); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.WorkOrder", b => + { + b.Navigation("Details"); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Jobs.IssueJobs.CoatingIssueJob", b => + { + b.Navigation("Details"); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Notes.IssueNotes.CoatingIssueNote", b => + { + b.Navigation("Details"); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Requests.MaterialRequests.CoatingMaterialRequest", b => + { + b.Navigation("Details"); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/Migrations/20240328035332_Update_2024_03_28_ProductLine.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/Migrations/20240328035332_Update_2024_03_28_ProductLine.cs new file mode 100644 index 000000000..098d5c63a --- /dev/null +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/Migrations/20240328035332_Update_2024_03_28_ProductLine.cs @@ -0,0 +1,801 @@ +using System; +using Microsoft.EntityFrameworkCore.Migrations; + +#nullable disable + +namespace Win_in.Sfs.Wms.Store.Migrations +{ + public partial class Update_2024_03_28_ProductLine : Migration + { + protected override void Up(MigrationBuilder migrationBuilder) + { + migrationBuilder.AddColumn( + name: "Confirmed", + table: "Job_TransferLibJob", + type: "bit", + nullable: false, + defaultValue: false); + + migrationBuilder.CreateTable( + name: "Job_CoatingIssueJob", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + RequestType = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + ProdLine = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + MaterialRequestNumber = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + Workshop = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + UseOnTheWayLocation = table.Column(type: "bit", nullable: false), + ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true), + ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: true), + CreationTime = table.Column(type: "datetime2", nullable: false), + CreatorId = table.Column(type: "uniqueidentifier", nullable: true), + LastModificationTime = table.Column(type: "datetime2", nullable: true), + LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + Remark = table.Column(type: "nvarchar(3072)", maxLength: 3072, nullable: true), + Worker = table.Column(type: "nvarchar(max)", nullable: true), + Number = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + UpStreamJobNumber = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + JobDescription = table.Column(type: "nvarchar(1024)", maxLength: 1024, nullable: true), + JobType = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + JobStatus = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + Priority = table.Column(type: "int", nullable: false, defaultValue: 0), + PriorityIncrement = table.Column(type: "int", nullable: false, defaultValue: 0), + WorkGroupCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + IsAutoComplete = table.Column(type: "bit", nullable: false, defaultValue: false), + AcceptUserId = table.Column(type: "uniqueidentifier", nullable: true), + AcceptUserName = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + AcceptTime = table.Column(type: "datetime2", nullable: true), + CompleteUserId = table.Column(type: "uniqueidentifier", nullable: true), + CompleteUserName = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + CompleteTime = table.Column(type: "datetime2", nullable: true), + WarehouseCode = table.Column(type: "nvarchar(max)", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_Job_CoatingIssueJob", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "Job_InjectionJob", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + RequestType = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + ProdLine = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + InjectionRequestNumber = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + Workshop = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + UseOnTheWayLocation = table.Column(type: "bit", nullable: false), + ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true), + ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: true), + CreationTime = table.Column(type: "datetime2", nullable: false), + CreatorId = table.Column(type: "uniqueidentifier", nullable: true), + LastModificationTime = table.Column(type: "datetime2", nullable: true), + LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + Remark = table.Column(type: "nvarchar(3072)", maxLength: 3072, nullable: true), + Worker = table.Column(type: "nvarchar(max)", nullable: true), + Number = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + UpStreamJobNumber = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + JobDescription = table.Column(type: "nvarchar(1024)", maxLength: 1024, nullable: true), + JobType = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + JobStatus = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + Priority = table.Column(type: "int", nullable: false, defaultValue: 0), + PriorityIncrement = table.Column(type: "int", nullable: false, defaultValue: 0), + WorkGroupCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + IsAutoComplete = table.Column(type: "bit", nullable: false, defaultValue: false), + AcceptUserId = table.Column(type: "uniqueidentifier", nullable: true), + AcceptUserName = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + AcceptTime = table.Column(type: "datetime2", nullable: true), + CompleteUserId = table.Column(type: "uniqueidentifier", nullable: true), + CompleteUserName = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + CompleteTime = table.Column(type: "datetime2", nullable: true), + WarehouseCode = table.Column(type: "nvarchar(max)", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_Job_InjectionJob", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "Store_CoatingIssueNote", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + JobNumber = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + Workshop = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + RequestNumber = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + RequestType = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + UseOnTheWayLocation = table.Column(type: "bit", nullable: false), + ConfirmTime = table.Column(type: "datetime2", nullable: true), + Confirmed = table.Column(type: "bit", nullable: false), + ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true), + ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: true), + CreationTime = table.Column(type: "datetime2", nullable: false), + CreatorId = table.Column(type: "uniqueidentifier", nullable: true), + LastModificationTime = table.Column(type: "datetime2", nullable: true), + LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + Remark = table.Column(type: "nvarchar(3072)", maxLength: 3072, nullable: true), + Worker = table.Column(type: "nvarchar(max)", nullable: true), + Number = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + ActiveDate = table.Column(type: "datetime2", nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_Store_CoatingIssueNote", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "Store_CoatingMaterialRequest", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + Type = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + PreparationPlanNumber = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + ProdLine = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + Workshop = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + UseOnTheWayLocation = table.Column(type: "bit", nullable: false), + ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true), + ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: true), + CreationTime = table.Column(type: "datetime2", nullable: false), + CreatorId = table.Column(type: "uniqueidentifier", nullable: true), + LastModificationTime = table.Column(type: "datetime2", nullable: true), + LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + Remark = table.Column(type: "nvarchar(3072)", maxLength: 3072, nullable: true), + Worker = table.Column(type: "nvarchar(max)", nullable: true), + Number = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + ActiveDate = table.Column(type: "datetime2", nullable: false), + AutoSubmit = table.Column(type: "bit", nullable: false), + AutoAgree = table.Column(type: "bit", nullable: false), + AutoHandle = table.Column(type: "bit", nullable: false), + AutoCompleteJob = table.Column(type: "bit", nullable: false), + DirectCreateNote = table.Column(type: "bit", nullable: false), + RequestStatus = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_Store_CoatingMaterialRequest", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "Store_InjectionNote", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + JobNumber = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + Workshop = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + RequestNumber = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + RequestType = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + UseOnTheWayLocation = table.Column(type: "bit", nullable: false), + ConfirmTime = table.Column(type: "datetime2", nullable: true), + Confirmed = table.Column(type: "bit", nullable: false), + ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true), + ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: true), + CreationTime = table.Column(type: "datetime2", nullable: false), + CreatorId = table.Column(type: "uniqueidentifier", nullable: true), + LastModificationTime = table.Column(type: "datetime2", nullable: true), + LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + Remark = table.Column(type: "nvarchar(3072)", maxLength: 3072, nullable: true), + Worker = table.Column(type: "nvarchar(max)", nullable: true), + Number = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + ActiveDate = table.Column(type: "datetime2", nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_Store_InjectionNote", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "Store_InjectionRequest", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + Type = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + PreparationPlanNumber = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + ProdLine = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + Workshop = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + UseOnTheWayLocation = table.Column(type: "bit", nullable: false), + ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true), + ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: true), + CreationTime = table.Column(type: "datetime2", nullable: false), + CreatorId = table.Column(type: "uniqueidentifier", nullable: true), + LastModificationTime = table.Column(type: "datetime2", nullable: true), + LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + Remark = table.Column(type: "nvarchar(3072)", maxLength: 3072, nullable: true), + Worker = table.Column(type: "nvarchar(max)", nullable: true), + Number = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + ActiveDate = table.Column(type: "datetime2", nullable: false), + AutoSubmit = table.Column(type: "bit", nullable: false), + AutoAgree = table.Column(type: "bit", nullable: false), + AutoHandle = table.Column(type: "bit", nullable: false), + AutoCompleteJob = table.Column(type: "bit", nullable: false), + DirectCreateNote = table.Column(type: "bit", nullable: false), + RequestStatus = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_Store_InjectionRequest", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "Job_CoatingIssueJobDetail", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + RequestLocationCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + ToLocationCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + ToLocationArea = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + ToLocationGroup = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + ToLocationErpCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + ToWarehouseCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + OnTheWayLocationCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + ProdLine = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + WorkStation = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + ExpiredTime = table.Column(type: "datetime2", nullable: false), + Operation = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + DistributionType = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + TruncType = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + RoundedQty = table.Column(type: "decimal(18,6)", nullable: false), + PlannedSplitRule = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + PlanBeginTime = table.Column(type: "datetime2", nullable: false), + DeliveryQty = table.Column(type: "decimal(18,6)", nullable: false), + PositionCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + RecommendType = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + CreationTime = table.Column(type: "datetime2", nullable: false), + CreatorId = table.Column(type: "uniqueidentifier", nullable: true), + LastModificationTime = table.Column(type: "datetime2", nullable: true), + LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), + MasterID = table.Column(type: "uniqueidentifier", nullable: false), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + Number = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + Remark = table.Column(type: "nvarchar(3072)", maxLength: 3072, nullable: true), + ItemName = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + ItemDesc1 = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + ItemDesc2 = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + ItemCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + StdPackQty = table.Column(type: "decimal(18,6)", nullable: false), + Status = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + RecommendContainerCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + RecommendPackingCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + RecommendSupplierBatch = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + RecommendArriveDate = table.Column(type: "datetime2", nullable: false), + RecommendProduceDate = table.Column(type: "datetime2", nullable: false), + RecommendExpireDate = table.Column(type: "datetime2", nullable: false), + RecommendLot = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + RecommendFromLocationCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + RecommendFromLocationArea = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + RecommendFromLocationGroup = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + RecommendFromLocationErpCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + RecommendFromWarehouseCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + Uom = table.Column(type: "nvarchar(max)", nullable: true), + RecommendQty = table.Column(type: "decimal(18,6)", nullable: false), + HandledContainerCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + HandledPackingCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + HandledSupplierBatch = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + HandledArriveDate = table.Column(type: "datetime2", nullable: false), + HandledProduceDate = table.Column(type: "datetime2", nullable: false), + HandledExpireDate = table.Column(type: "datetime2", nullable: false), + HandledLot = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + HandledFromLocationCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + HandledFromLocationArea = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + HandledFromLocationGroup = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + HandledFromLocationErpCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + HandledFromWarehouseCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + HandledQty = table.Column(type: "decimal(18,6)", nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_Job_CoatingIssueJobDetail", x => x.Id); + table.ForeignKey( + name: "FK_Job_CoatingIssueJobDetail_Job_CoatingIssueJob_MasterID", + column: x => x.MasterID, + principalTable: "Job_CoatingIssueJob", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }); + + migrationBuilder.CreateTable( + name: "Job_InjectionJobDetail", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + RequestLocationCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + ToLocationCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + ToLocationArea = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + ToLocationGroup = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + ToLocationErpCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + ToWarehouseCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + OnTheWayLocationCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + ProdLine = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + WorkStation = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + ExpiredTime = table.Column(type: "datetime2", nullable: false), + Operation = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + DistributionType = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + TruncType = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + RoundedQty = table.Column(type: "decimal(18,6)", nullable: false), + PlannedSplitRule = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + PlanBeginTime = table.Column(type: "datetime2", nullable: false), + DeliveryQty = table.Column(type: "decimal(18,6)", nullable: false), + PositionCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + RecommendType = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + CreationTime = table.Column(type: "datetime2", nullable: false), + CreatorId = table.Column(type: "uniqueidentifier", nullable: true), + LastModificationTime = table.Column(type: "datetime2", nullable: true), + LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), + MasterID = table.Column(type: "uniqueidentifier", nullable: false), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + Number = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + Remark = table.Column(type: "nvarchar(3072)", maxLength: 3072, nullable: true), + ItemName = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + ItemDesc1 = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + ItemDesc2 = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + ItemCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + StdPackQty = table.Column(type: "decimal(18,6)", nullable: false), + Status = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + RecommendContainerCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + RecommendPackingCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + RecommendSupplierBatch = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + RecommendArriveDate = table.Column(type: "datetime2", nullable: false), + RecommendProduceDate = table.Column(type: "datetime2", nullable: false), + RecommendExpireDate = table.Column(type: "datetime2", nullable: false), + RecommendLot = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + RecommendFromLocationCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + RecommendFromLocationArea = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + RecommendFromLocationGroup = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + RecommendFromLocationErpCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + RecommendFromWarehouseCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + Uom = table.Column(type: "nvarchar(max)", nullable: true), + RecommendQty = table.Column(type: "decimal(18,6)", nullable: false), + HandledContainerCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + HandledPackingCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + HandledSupplierBatch = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + HandledArriveDate = table.Column(type: "datetime2", nullable: false), + HandledProduceDate = table.Column(type: "datetime2", nullable: false), + HandledExpireDate = table.Column(type: "datetime2", nullable: false), + HandledLot = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + HandledFromLocationCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + HandledFromLocationArea = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + HandledFromLocationGroup = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + HandledFromLocationErpCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + HandledFromWarehouseCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + HandledQty = table.Column(type: "decimal(18,6)", nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_Job_InjectionJobDetail", x => x.Id); + table.ForeignKey( + name: "FK_Job_InjectionJobDetail_Job_InjectionJob_MasterID", + column: x => x.MasterID, + principalTable: "Job_InjectionJob", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }); + + migrationBuilder.CreateTable( + name: "Store_CoatingIssueNoteDetail", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + IssueTime = table.Column(type: "datetime2", nullable: false), + ExpiredTime = table.Column(type: "datetime2", nullable: false), + ProdLine = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + WorkStation = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + OnTheWayLocationCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + PositionCode = table.Column(type: "nvarchar(max)", nullable: true), + RecommendType = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + CreationTime = table.Column(type: "datetime2", nullable: false), + CreatorId = table.Column(type: "uniqueidentifier", nullable: true), + LastModificationTime = table.Column(type: "datetime2", nullable: true), + LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), + MasterID = table.Column(type: "uniqueidentifier", nullable: false), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + Number = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + Remark = table.Column(type: "nvarchar(3072)", maxLength: 3072, nullable: true), + ItemName = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + ItemDesc1 = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + ItemDesc2 = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + ItemCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + Uom = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + Qty = table.Column(type: "decimal(18,6)", precision: 18, scale: 6, nullable: false), + StdPackQty = table.Column(type: "decimal(18,6)", nullable: false), + FromPackingCode = table.Column(type: "nvarchar(450)", nullable: true), + ToPackingCode = table.Column(type: "nvarchar(max)", nullable: true), + FromContainerCode = table.Column(type: "nvarchar(max)", nullable: true), + ToContainerCode = table.Column(type: "nvarchar(max)", nullable: true), + FromLot = table.Column(type: "nvarchar(max)", nullable: true), + ToLot = table.Column(type: "nvarchar(max)", nullable: true), + SupplierBatch = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + ArriveDate = table.Column(type: "datetime2", nullable: false), + ProduceDate = table.Column(type: "datetime2", nullable: false), + ExpireDate = table.Column(type: "datetime2", nullable: false), + FromLocationCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + FromLocationArea = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + FromLocationGroup = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + FromLocationErpCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + FromWarehouseCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + FromStatus = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + ToLocationCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + ToLocationArea = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + ToLocationGroup = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + ToLocationErpCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + ToWarehouseCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + ToStatus = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + RecommendContainerCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + RecommendPackingCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + RecommendSupplierBatch = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + RecommendArriveDate = table.Column(type: "datetime2", nullable: false), + RecommendProduceDate = table.Column(type: "datetime2", nullable: false), + RecommendExpireDate = table.Column(type: "datetime2", nullable: false), + RecommendLot = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + RecommendFromLocationCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + RecommendFromLocationArea = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + RecommendFromLocationGroup = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + RecommendFromLocationErpCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + RecommendFromWarehouseCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + RecommendQty = table.Column(type: "decimal(18,6)", nullable: false), + HandledContainerCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + HandledPackingCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + HandledSupplierBatch = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + HandledArriveDate = table.Column(type: "datetime2", nullable: false), + HandledProduceDate = table.Column(type: "datetime2", nullable: false), + HandledExpireDate = table.Column(type: "datetime2", nullable: false), + HandledLot = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + HandledFromLocationCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + HandledFromLocationArea = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + HandledFromLocationGroup = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + HandledFromLocationErpCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + HandledFromWarehouseCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + HandledQty = table.Column(type: "decimal(18,6)", nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_Store_CoatingIssueNoteDetail", x => x.Id); + table.ForeignKey( + name: "FK_Store_CoatingIssueNoteDetail_Store_CoatingIssueNote_MasterID", + column: x => x.MasterID, + principalTable: "Store_CoatingIssueNote", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }); + + migrationBuilder.CreateTable( + name: "Store_CoatingMaterialRequestDetail", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + ToLocationCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + ToLocationArea = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + ToLocationGroup = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + ToLocationErpCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + ToWarehouseCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + FromLocationArea = table.Column(type: "nvarchar(max)", nullable: true), + ProdLine = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + WorkStation = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + ExpiredTime = table.Column(type: "datetime2", nullable: false), + IssuedQty = table.Column(type: "decimal(18,6)", precision: 18, scale: 6, nullable: false), + ReceivedQty = table.Column(type: "decimal(18,6)", precision: 18, scale: 6, nullable: false), + Status = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + PositionCode = table.Column(type: "nvarchar(max)", nullable: true), + RecommendType = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + CreationTime = table.Column(type: "datetime2", nullable: false), + CreatorId = table.Column(type: "uniqueidentifier", nullable: true), + LastModificationTime = table.Column(type: "datetime2", nullable: true), + LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), + MasterID = table.Column(type: "uniqueidentifier", nullable: false), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + Number = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + Remark = table.Column(type: "nvarchar(3072)", maxLength: 3072, nullable: true), + ItemName = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + ItemDesc1 = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + ItemDesc2 = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + ItemCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + Uom = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + Qty = table.Column(type: "decimal(18,6)", precision: 18, scale: 6, nullable: false), + StdPackQty = table.Column(type: "decimal(18,6)", nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_Store_CoatingMaterialRequestDetail", x => x.Id); + table.ForeignKey( + name: "FK_Store_CoatingMaterialRequestDetail_Store_CoatingMaterialRequest_MasterID", + column: x => x.MasterID, + principalTable: "Store_CoatingMaterialRequest", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }); + + migrationBuilder.CreateTable( + name: "Store_InjectionNoteDetail", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + IssueTime = table.Column(type: "datetime2", nullable: false), + ExpiredTime = table.Column(type: "datetime2", nullable: false), + ProdLine = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + WorkStation = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + OnTheWayLocationCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + PositionCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + RecommendType = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + CreationTime = table.Column(type: "datetime2", nullable: false), + CreatorId = table.Column(type: "uniqueidentifier", nullable: true), + LastModificationTime = table.Column(type: "datetime2", nullable: true), + LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), + MasterID = table.Column(type: "uniqueidentifier", nullable: false), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + Number = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + Remark = table.Column(type: "nvarchar(3072)", maxLength: 3072, nullable: true), + ItemName = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + ItemDesc1 = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + ItemDesc2 = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + ItemCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + Uom = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + Qty = table.Column(type: "decimal(18,6)", precision: 18, scale: 6, nullable: false), + StdPackQty = table.Column(type: "decimal(18,6)", nullable: false), + FromPackingCode = table.Column(type: "nvarchar(450)", nullable: true), + ToPackingCode = table.Column(type: "nvarchar(max)", nullable: true), + FromContainerCode = table.Column(type: "nvarchar(max)", nullable: true), + ToContainerCode = table.Column(type: "nvarchar(max)", nullable: true), + FromLot = table.Column(type: "nvarchar(max)", nullable: true), + ToLot = table.Column(type: "nvarchar(max)", nullable: true), + SupplierBatch = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + ArriveDate = table.Column(type: "datetime2", nullable: false), + ProduceDate = table.Column(type: "datetime2", nullable: false), + ExpireDate = table.Column(type: "datetime2", nullable: false), + FromLocationCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + FromLocationArea = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + FromLocationGroup = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + FromLocationErpCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + FromWarehouseCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + FromStatus = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + ToLocationCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + ToLocationArea = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + ToLocationGroup = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + ToLocationErpCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + ToWarehouseCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + ToStatus = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + RecommendContainerCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + RecommendPackingCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + RecommendSupplierBatch = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + RecommendArriveDate = table.Column(type: "datetime2", nullable: false), + RecommendProduceDate = table.Column(type: "datetime2", nullable: false), + RecommendExpireDate = table.Column(type: "datetime2", nullable: false), + RecommendLot = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + RecommendFromLocationCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + RecommendFromLocationArea = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + RecommendFromLocationGroup = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + RecommendFromLocationErpCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + RecommendFromWarehouseCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + RecommendQty = table.Column(type: "decimal(18,6)", nullable: false), + HandledContainerCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + HandledPackingCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + HandledSupplierBatch = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + HandledArriveDate = table.Column(type: "datetime2", nullable: false), + HandledProduceDate = table.Column(type: "datetime2", nullable: false), + HandledExpireDate = table.Column(type: "datetime2", nullable: false), + HandledLot = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + HandledFromLocationCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + HandledFromLocationArea = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + HandledFromLocationGroup = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + HandledFromLocationErpCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + HandledFromWarehouseCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + HandledQty = table.Column(type: "decimal(18,6)", nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_Store_InjectionNoteDetail", x => x.Id); + table.ForeignKey( + name: "FK_Store_InjectionNoteDetail_Store_InjectionNote_MasterID", + column: x => x.MasterID, + principalTable: "Store_InjectionNote", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }); + + migrationBuilder.CreateTable( + name: "Store_InjectionRequestDetail", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + ToLocationCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + ToLocationArea = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + ToLocationGroup = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + ToLocationErpCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + ToWarehouseCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + FromLocationArea = table.Column(type: "nvarchar(max)", nullable: true), + ProdLine = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + WorkStation = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + ExpiredTime = table.Column(type: "datetime2", nullable: false), + IssuedQty = table.Column(type: "decimal(18,6)", precision: 18, scale: 6, nullable: false), + ReceivedQty = table.Column(type: "decimal(18,6)", precision: 18, scale: 6, nullable: false), + Status = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + PositionCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + RecommendType = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + CreationTime = table.Column(type: "datetime2", nullable: false), + CreatorId = table.Column(type: "uniqueidentifier", nullable: true), + LastModificationTime = table.Column(type: "datetime2", nullable: true), + LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), + MasterID = table.Column(type: "uniqueidentifier", nullable: false), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + Number = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + Remark = table.Column(type: "nvarchar(3072)", maxLength: 3072, nullable: true), + ItemName = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + ItemDesc1 = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + ItemDesc2 = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + ItemCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + Uom = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + Qty = table.Column(type: "decimal(18,6)", precision: 18, scale: 6, nullable: false), + StdPackQty = table.Column(type: "decimal(18,6)", nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_Store_InjectionRequestDetail", x => x.Id); + table.ForeignKey( + name: "FK_Store_InjectionRequestDetail_Store_InjectionRequest_MasterID", + column: x => x.MasterID, + principalTable: "Store_InjectionRequest", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }); + + migrationBuilder.CreateIndex( + name: "IX_Job_CoatingIssueJob_Number", + table: "Job_CoatingIssueJob", + column: "Number", + unique: true); + + migrationBuilder.CreateIndex( + name: "IX_Job_CoatingIssueJobDetail_MasterID", + table: "Job_CoatingIssueJobDetail", + column: "MasterID"); + + migrationBuilder.CreateIndex( + name: "IX_Job_InjectionJob_Number", + table: "Job_InjectionJob", + column: "Number", + unique: true); + + migrationBuilder.CreateIndex( + name: "IX_Job_InjectionJobDetail_MasterID", + table: "Job_InjectionJobDetail", + column: "MasterID"); + + migrationBuilder.CreateIndex( + name: "IX_Store_CoatingIssueNote_Number", + table: "Store_CoatingIssueNote", + column: "Number", + unique: true); + + migrationBuilder.CreateIndex( + name: "IX_Store_CoatingIssueNoteDetail_FromPackingCode", + table: "Store_CoatingIssueNoteDetail", + column: "FromPackingCode"); + + migrationBuilder.CreateIndex( + name: "IX_Store_CoatingIssueNoteDetail_MasterID", + table: "Store_CoatingIssueNoteDetail", + column: "MasterID"); + + migrationBuilder.CreateIndex( + name: "IX_Store_CoatingIssueNoteDetail_Number_FromPackingCode_FromLocationCode_ToLocationCode", + table: "Store_CoatingIssueNoteDetail", + columns: new[] { "Number", "FromPackingCode", "FromLocationCode", "ToLocationCode" }, + unique: true, + filter: "[FromPackingCode] IS NOT NULL"); + + migrationBuilder.CreateIndex( + name: "IX_Store_CoatingMaterialRequest_Number", + table: "Store_CoatingMaterialRequest", + column: "Number", + unique: true); + + migrationBuilder.CreateIndex( + name: "IX_Store_CoatingMaterialRequestDetail_ItemCode", + table: "Store_CoatingMaterialRequestDetail", + column: "ItemCode"); + + migrationBuilder.CreateIndex( + name: "IX_Store_CoatingMaterialRequestDetail_MasterID", + table: "Store_CoatingMaterialRequestDetail", + column: "MasterID"); + + migrationBuilder.CreateIndex( + name: "IX_Store_CoatingMaterialRequestDetail_Number_ItemCode_ToLocationCode", + table: "Store_CoatingMaterialRequestDetail", + columns: new[] { "Number", "ItemCode", "ToLocationCode" }, + unique: true); + + migrationBuilder.CreateIndex( + name: "IX_Store_InjectionNote_Number", + table: "Store_InjectionNote", + column: "Number", + unique: true); + + migrationBuilder.CreateIndex( + name: "IX_Store_InjectionNoteDetail_FromPackingCode", + table: "Store_InjectionNoteDetail", + column: "FromPackingCode"); + + migrationBuilder.CreateIndex( + name: "IX_Store_InjectionNoteDetail_MasterID", + table: "Store_InjectionNoteDetail", + column: "MasterID"); + + migrationBuilder.CreateIndex( + name: "IX_Store_InjectionNoteDetail_Number_FromPackingCode_FromLocationCode_ToLocationCode", + table: "Store_InjectionNoteDetail", + columns: new[] { "Number", "FromPackingCode", "FromLocationCode", "ToLocationCode" }, + unique: true, + filter: "[FromPackingCode] IS NOT NULL"); + + migrationBuilder.CreateIndex( + name: "IX_Store_InjectionRequest_Number", + table: "Store_InjectionRequest", + column: "Number", + unique: true); + + migrationBuilder.CreateIndex( + name: "IX_Store_InjectionRequestDetail_ItemCode", + table: "Store_InjectionRequestDetail", + column: "ItemCode"); + + migrationBuilder.CreateIndex( + name: "IX_Store_InjectionRequestDetail_MasterID", + table: "Store_InjectionRequestDetail", + column: "MasterID"); + + migrationBuilder.CreateIndex( + name: "IX_Store_InjectionRequestDetail_Number_ItemCode_ToLocationCode", + table: "Store_InjectionRequestDetail", + columns: new[] { "Number", "ItemCode", "ToLocationCode" }, + unique: true); + } + + protected override void Down(MigrationBuilder migrationBuilder) + { + migrationBuilder.DropTable( + name: "Job_CoatingIssueJobDetail"); + + migrationBuilder.DropTable( + name: "Job_InjectionJobDetail"); + + migrationBuilder.DropTable( + name: "Store_CoatingIssueNoteDetail"); + + migrationBuilder.DropTable( + name: "Store_CoatingMaterialRequestDetail"); + + migrationBuilder.DropTable( + name: "Store_InjectionNoteDetail"); + + migrationBuilder.DropTable( + name: "Store_InjectionRequestDetail"); + + migrationBuilder.DropTable( + name: "Job_CoatingIssueJob"); + + migrationBuilder.DropTable( + name: "Job_InjectionJob"); + + migrationBuilder.DropTable( + name: "Store_CoatingIssueNote"); + + migrationBuilder.DropTable( + name: "Store_CoatingMaterialRequest"); + + migrationBuilder.DropTable( + name: "Store_InjectionNote"); + + migrationBuilder.DropTable( + name: "Store_InjectionRequest"); + + migrationBuilder.DropColumn( + name: "Confirmed", + table: "Job_TransferLibJob"); + } + } +} diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/Migrations/StoreDbContextModelSnapshot.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/Migrations/StoreDbContextModelSnapshot.cs index 2060cdebc..30df48541 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/Migrations/StoreDbContextModelSnapshot.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/Migrations/StoreDbContextModelSnapshot.cs @@ -4834,14 +4834,31 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.ToTable("Store_ExchangeData", (string)null); }); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.InspectAbnormalNote", b => + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.InjectionJob", b => { b.Property("Id") .HasColumnType("uniqueidentifier"); - b.Property("ActiveDate") + b.Property("AcceptTime") + .HasColumnType("datetime2"); + + b.Property("AcceptUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("AcceptUserName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("CompleteTime") .HasColumnType("datetime2"); + b.Property("CompleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CompleteUserName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + b.Property("ConcurrencyStamp") .IsConcurrencyToken() .HasMaxLength(40) @@ -4860,7 +4877,26 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("nvarchar(max)") .HasColumnName("ExtraProperties"); - b.Property("InspectNumber") + b.Property("InjectionRequestNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("IsAutoComplete") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false); + + b.Property("JobDescription") + .HasMaxLength(1024) + .HasColumnType("nvarchar(1024)"); + + b.Property("JobStatus") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("JobType") + .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)"); @@ -4875,10 +4911,19 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.Property("Number") .IsRequired() .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("Number"); + .HasColumnType("nvarchar(64)"); - b.Property("ReceiptNumber") + b.Property("Priority") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasDefaultValue(0); + + b.Property("PriorityIncrement") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasDefaultValue(0); + + b.Property("ProdLine") .HasMaxLength(64) .HasColumnType("nvarchar(64)"); @@ -4887,8 +4932,7 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("nvarchar(3072)") .HasColumnName("Remark"); - b.Property("SupplierCode") - .IsRequired() + b.Property("RequestType") .HasMaxLength(64) .HasColumnType("nvarchar(64)"); @@ -4896,46 +4940,116 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("TenantId"); + b.Property("UpStreamJobNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("UseOnTheWayLocation") + .HasColumnType("bit"); + + b.Property("WarehouseCode") + .HasColumnType("nvarchar(max)"); + + b.Property("WorkGroupCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + b.Property("Worker") .HasColumnType("nvarchar(max)"); + b.Property("Workshop") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + b.HasKey("Id"); b.HasIndex("Number") .IsUnique(); - b.ToTable("Store_InspectAbnormalNote", (string)null); + b.ToTable("Job_InjectionJob", (string)null); }); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.InspectAbnormalNoteDetail", b => + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.InjectionJobDetail", b => { b.Property("Id") .HasColumnType("uniqueidentifier"); - b.Property("AbnormalType") + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DeliveryQty") + .HasColumnType("decimal(18,6)"); + + b.Property("DistributionType") .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)"); - b.Property("ArriveDate") + b.Property("ExpiredTime") .HasColumnType("datetime2"); - b.Property("ContainerCode") + b.Property("HandledArriveDate") + .HasColumnType("datetime2"); + + b.Property("HandledContainerCode") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("ContainerCode"); + .HasColumnName("HandledContainerCode"); - b.Property("CreationTime") - .HasColumnType("datetime2") - .HasColumnName("CreationTime"); + b.Property("HandledExpireDate") + .HasColumnType("datetime2"); - b.Property("CreatorId") - .HasColumnType("uniqueidentifier") - .HasColumnName("CreatorId"); + b.Property("HandledFromLocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledFromLocationArea"); - b.Property("ExpireDate") + b.Property("HandledFromLocationCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledFromLocationCode"); + + b.Property("HandledFromLocationErpCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledFromLocationErpCode"); + + b.Property("HandledFromLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledFromLocationGroup"); + + b.Property("HandledFromWarehouseCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledFromWarehouseCode"); + + b.Property("HandledLot") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledLot"); + + b.Property("HandledPackingCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledPackingCode"); + + b.Property("HandledProduceDate") .HasColumnType("datetime2"); + b.Property("HandledQty") + .HasColumnType("decimal(18,6)"); + + b.Property("HandledSupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledSupplierBatch"); + b.Property("ItemCode") .IsRequired() .HasMaxLength(64) @@ -4965,93 +5079,1039 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("LastModifierId"); - b.Property("Lot") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("Lot"); - b.Property("MasterID") .HasColumnType("uniqueidentifier"); b.Property("Number") .IsRequired() .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("Number"); + .HasColumnType("nvarchar(64)"); - b.Property("PackingCode") - .IsRequired() + b.Property("OnTheWayLocationCode") .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("PackingCode"); + .HasColumnType("nvarchar(64)"); - b.Property("Photos") - .HasColumnType("nvarchar(max)"); + b.Property("Operation") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); - b.Property("ProduceDate") + b.Property("PlanBeginTime") .HasColumnType("datetime2"); - b.Property("Qty") - .HasPrecision(18, 6) - .HasColumnType("decimal(18,6)") - .HasColumnName("Qty"); - - b.Property("Remark") - .HasMaxLength(3072) - .HasColumnType("nvarchar(3072)") - .HasColumnName("Remark"); + b.Property("PlannedSplitRule") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); - b.Property("StdPackQty") - .HasColumnType("decimal(18,6)"); + b.Property("PositionCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); - b.Property("SupplierBatch") + b.Property("ProdLine") .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("SupplierBatch"); + .HasColumnType("nvarchar(64)"); - b.Property("TenantId") - .HasColumnType("uniqueidentifier") - .HasColumnName("TenantId"); + b.Property("RecommendArriveDate") + .HasColumnType("datetime2"); - b.Property("Uom") - .IsRequired() + b.Property("RecommendContainerCode") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("Uom"); - - b.HasKey("Id"); + .HasColumnName("RecommendContainerCode"); - b.HasIndex("MasterID"); + b.Property("RecommendExpireDate") + .HasColumnType("datetime2"); - b.HasIndex("Number", "PackingCode") - .IsUnique(); + b.Property("RecommendFromLocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendFromLocationArea"); - b.ToTable("Store_InspectAbnormalNoteDetail", (string)null); - }); + b.Property("RecommendFromLocationCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendFromLocationCode"); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.InspectJob", b => - { - b.Property("Id") - .HasColumnType("uniqueidentifier"); + b.Property("RecommendFromLocationErpCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendFromLocationErpCode"); - b.Property("AcceptTime") - .HasColumnType("datetime2"); + b.Property("RecommendFromLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendFromLocationGroup"); - b.Property("AcceptUserId") - .HasColumnType("uniqueidentifier"); + b.Property("RecommendFromWarehouseCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendFromWarehouseCode"); - b.Property("AcceptUserName") + b.Property("RecommendLot") .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendLot"); - b.Property("AsnNumber") + b.Property("RecommendPackingCode") .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendPackingCode"); - b.Property("CompleteTime") + b.Property("RecommendProduceDate") .HasColumnType("datetime2"); - b.Property("CompleteUserId") + b.Property("RecommendQty") + .HasColumnType("decimal(18,6)"); + + b.Property("RecommendSupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendSupplierBatch"); + + b.Property("RecommendType") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("RequestLocationCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("RoundedQty") + .HasColumnType("decimal(18,6)"); + + b.Property("Status") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("StdPackQty") + .HasColumnType("decimal(18,6)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("ToLocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ToLocationCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ToLocationErpCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ToLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ToWarehouseCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("TruncType") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Uom") + .HasColumnType("nvarchar(max)"); + + b.Property("WorkStation") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.HasKey("Id"); + + b.HasIndex("MasterID"); + + b.ToTable("Job_InjectionJobDetail", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.InjectionNote", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ActiveDate") + .HasColumnType("datetime2"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("ConfirmTime") + .HasColumnType("datetime2"); + + b.Property("Confirmed") + .HasColumnType("bit"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("JobNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("JobNumber"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("RequestNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("RequestType") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("UseOnTheWayLocation") + .HasColumnType("bit"); + + b.Property("Worker") + .HasColumnType("nvarchar(max)"); + + b.Property("Workshop") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.HasKey("Id"); + + b.HasIndex("Number") + .IsUnique(); + + b.ToTable("Store_InjectionNote", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.InjectionNoteDetail", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ArriveDate") + .HasColumnType("datetime2"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("ExpireDate") + .HasColumnType("datetime2"); + + b.Property("ExpiredTime") + .HasColumnType("datetime2"); + + b.Property("FromContainerCode") + .HasColumnType("nvarchar(max)"); + + b.Property("FromLocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromLocationArea"); + + b.Property("FromLocationCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromLocationCode"); + + b.Property("FromLocationErpCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromLocationErpCode"); + + b.Property("FromLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromLocationGroup"); + + b.Property("FromLot") + .HasColumnType("nvarchar(max)"); + + b.Property("FromPackingCode") + .HasColumnType("nvarchar(450)"); + + b.Property("FromStatus") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("FromWarehouseCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromWarehouseCode"); + + b.Property("HandledArriveDate") + .HasColumnType("datetime2"); + + b.Property("HandledContainerCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledContainerCode"); + + b.Property("HandledExpireDate") + .HasColumnType("datetime2"); + + b.Property("HandledFromLocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledFromLocationArea"); + + b.Property("HandledFromLocationCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledFromLocationCode"); + + b.Property("HandledFromLocationErpCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledFromLocationErpCode"); + + b.Property("HandledFromLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledFromLocationGroup"); + + b.Property("HandledFromWarehouseCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledFromWarehouseCode"); + + b.Property("HandledLot") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledLot"); + + b.Property("HandledPackingCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledPackingCode"); + + b.Property("HandledProduceDate") + .HasColumnType("datetime2"); + + b.Property("HandledQty") + .HasColumnType("decimal(18,6)"); + + b.Property("HandledSupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledSupplierBatch"); + + b.Property("IssueTime") + .HasColumnType("datetime2"); + + b.Property("ItemCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemCode"); + + b.Property("ItemDesc1") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc1"); + + b.Property("ItemDesc2") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc2"); + + b.Property("ItemName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemName"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("MasterID") + .HasColumnType("uniqueidentifier"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("OnTheWayLocationCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("PositionCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ProdLine") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ProduceDate") + .HasColumnType("datetime2"); + + b.Property("Qty") + .HasPrecision(18, 6) + .HasColumnType("decimal(18,6)") + .HasColumnName("Qty"); + + b.Property("RecommendArriveDate") + .HasColumnType("datetime2"); + + b.Property("RecommendContainerCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendContainerCode"); + + b.Property("RecommendExpireDate") + .HasColumnType("datetime2"); + + b.Property("RecommendFromLocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendFromLocationArea"); + + b.Property("RecommendFromLocationCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendFromLocationCode"); + + b.Property("RecommendFromLocationErpCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendFromLocationErpCode"); + + b.Property("RecommendFromLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendFromLocationGroup"); + + b.Property("RecommendFromWarehouseCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendFromWarehouseCode"); + + b.Property("RecommendLot") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendLot"); + + b.Property("RecommendPackingCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendPackingCode"); + + b.Property("RecommendProduceDate") + .HasColumnType("datetime2"); + + b.Property("RecommendQty") + .HasColumnType("decimal(18,6)"); + + b.Property("RecommendSupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendSupplierBatch"); + + b.Property("RecommendType") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("StdPackQty") + .HasColumnType("decimal(18,6)"); + + b.Property("SupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("SupplierBatch"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("ToContainerCode") + .HasColumnType("nvarchar(max)"); + + b.Property("ToLocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToLocationArea"); + + b.Property("ToLocationCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToLocationCode"); + + b.Property("ToLocationErpCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToLocationErpCode"); + + b.Property("ToLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToLocationGroup"); + + b.Property("ToLot") + .HasColumnType("nvarchar(max)"); + + b.Property("ToPackingCode") + .HasColumnType("nvarchar(max)"); + + b.Property("ToStatus") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ToWarehouseCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToWarehouseCode"); + + b.Property("Uom") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Uom"); + + b.Property("WorkStation") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.HasKey("Id"); + + b.HasIndex("FromPackingCode"); + + b.HasIndex("MasterID"); + + b.HasIndex("Number", "FromPackingCode", "FromLocationCode", "ToLocationCode") + .IsUnique() + .HasFilter("[FromPackingCode] IS NOT NULL"); + + b.ToTable("Store_InjectionNoteDetail", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.InjectionRequest", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ActiveDate") + .HasColumnType("datetime2"); + + b.Property("AutoAgree") + .HasColumnType("bit"); + + b.Property("AutoCompleteJob") + .HasColumnType("bit"); + + b.Property("AutoHandle") + .HasColumnType("bit"); + + b.Property("AutoSubmit") + .HasColumnType("bit"); + + 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("DirectCreateNote") + .HasColumnType("bit"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("PreparationPlanNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ProdLine") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("RequestStatus") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Type") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("UseOnTheWayLocation") + .HasColumnType("bit"); + + b.Property("Worker") + .HasColumnType("nvarchar(max)"); + + b.Property("Workshop") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.HasKey("Id"); + + b.HasIndex("Number") + .IsUnique(); + + b.ToTable("Store_InjectionRequest", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.InjectionRequestDetail", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("ExpiredTime") + .HasColumnType("datetime2"); + + b.Property("FromLocationArea") + .HasColumnType("nvarchar(max)"); + + b.Property("IssuedQty") + .HasPrecision(18, 6) + .HasColumnType("decimal(18,6)"); + + b.Property("ItemCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemCode"); + + b.Property("ItemDesc1") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc1"); + + b.Property("ItemDesc2") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc2"); + + b.Property("ItemName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemName"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("MasterID") + .HasColumnType("uniqueidentifier"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("PositionCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ProdLine") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Qty") + .HasPrecision(18, 6) + .HasColumnType("decimal(18,6)") + .HasColumnName("Qty"); + + b.Property("ReceivedQty") + .HasPrecision(18, 6) + .HasColumnType("decimal(18,6)"); + + b.Property("RecommendType") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("Status") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("StdPackQty") + .HasColumnType("decimal(18,6)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("ToLocationArea") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ToLocationCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ToLocationErpCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ToLocationGroup") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ToWarehouseCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Uom") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Uom"); + + b.Property("WorkStation") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.HasKey("Id"); + + b.HasIndex("ItemCode"); + + b.HasIndex("MasterID"); + + b.HasIndex("Number", "ItemCode", "ToLocationCode") + .IsUnique(); + + b.ToTable("Store_InjectionRequestDetail", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.InspectAbnormalNote", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ActiveDate") + .HasColumnType("datetime2"); + + 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("InspectNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("ReceiptNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("SupplierCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Worker") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("Number") + .IsUnique(); + + b.ToTable("Store_InspectAbnormalNote", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.InspectAbnormalNoteDetail", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AbnormalType") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ArriveDate") + .HasColumnType("datetime2"); + + b.Property("ContainerCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ContainerCode"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("ExpireDate") + .HasColumnType("datetime2"); + + b.Property("ItemCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemCode"); + + b.Property("ItemDesc1") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc1"); + + b.Property("ItemDesc2") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc2"); + + b.Property("ItemName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemName"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Lot") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Lot"); + + b.Property("MasterID") + .HasColumnType("uniqueidentifier"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("PackingCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("PackingCode"); + + b.Property("Photos") + .HasColumnType("nvarchar(max)"); + + b.Property("ProduceDate") + .HasColumnType("datetime2"); + + b.Property("Qty") + .HasPrecision(18, 6) + .HasColumnType("decimal(18,6)") + .HasColumnName("Qty"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("StdPackQty") + .HasColumnType("decimal(18,6)"); + + b.Property("SupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("SupplierBatch"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Uom") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Uom"); + + b.HasKey("Id"); + + b.HasIndex("MasterID"); + + b.HasIndex("Number", "PackingCode") + .IsUnique(); + + b.ToTable("Store_InspectAbnormalNoteDetail", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.InspectJob", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AcceptTime") + .HasColumnType("datetime2"); + + b.Property("AcceptUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("AcceptUserName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("AsnNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("CompleteTime") + .HasColumnType("datetime2"); + + b.Property("CompleteUserId") .HasColumnType("uniqueidentifier"); b.Property("CompleteUserName") @@ -12087,11 +13147,267 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.Property("AutoCompleteJob") .HasColumnType("bit"); - b.Property("AutoHandle") - .HasColumnType("bit"); + b.Property("AutoHandle") + .HasColumnType("bit"); + + b.Property("AutoSubmit") + .HasColumnType("bit"); + + 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("DirectCreateNote") + .HasColumnType("bit"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("PlanDate") + .HasColumnType("datetime2"); + + b.Property("ProdLine") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ProductionPlanNumber") + .HasColumnType("nvarchar(max)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("RequestStatus") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Shift") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Team") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Type") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Worker") + .HasColumnType("nvarchar(max)"); + + b.Property("Workshop") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.HasKey("Id"); + + b.HasIndex("Number") + .IsUnique(); + + b.ToTable("Store_ProductReceiptRequest", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ProductReceiptRequestDetail", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ArriveDate") + .HasColumnType("datetime2"); + + b.Property("BomVersion") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("ExpireDate") + .HasColumnType("datetime2"); + + b.Property("ItemCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemCode"); + + b.Property("ItemDesc1") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc1"); + + b.Property("ItemDesc2") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc2"); + + b.Property("ItemName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemName"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("LocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationArea"); + + b.Property("LocationCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationCode"); + + b.Property("LocationErpCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationErpCode"); + + b.Property("LocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationGroup"); + + b.Property("Lot") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Lot"); + + b.Property("MasterID") + .HasColumnType("uniqueidentifier"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("ProduceDate") + .HasColumnType("datetime2"); + + b.Property("Qty") + .HasPrecision(18, 6) + .HasColumnType("decimal(18,6)") + .HasColumnName("Qty"); + + b.Property("RawArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("ReturnQty") + .ValueGeneratedOnAdd() + .HasColumnType("decimal(18,6)") + .HasDefaultValue(0m); + + b.Property("StdPackQty") + .HasColumnType("decimal(18,6)"); + + b.Property("SupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("SupplierBatch"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Uom") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Uom"); + + b.Property("WarehouseCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("WarehouseCode"); + + b.HasKey("Id"); + + b.HasIndex("MasterID"); + + b.HasIndex("Number", "ItemCode", "LocationCode") + .IsUnique(); + + b.ToTable("Store_ProductReceiptRequestDetail", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ProductReceiveJob", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AcceptTime") + .HasColumnType("datetime2"); + + b.Property("AcceptUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("AcceptUserName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("CompleteTime") + .HasColumnType("datetime2"); + + b.Property("CompleteUserId") + .HasColumnType("uniqueidentifier"); - b.Property("AutoSubmit") - .HasColumnType("bit"); + b.Property("CompleteUserName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); b.Property("ConcurrencyStamp") .IsConcurrencyToken() @@ -12107,13 +13423,29 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("CreatorId"); - b.Property("DirectCreateNote") - .HasColumnType("bit"); - b.Property("ExtraProperties") .HasColumnType("nvarchar(max)") .HasColumnName("ExtraProperties"); + b.Property("IsAutoComplete") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false); + + b.Property("JobDescription") + .HasMaxLength(1024) + .HasColumnType("nvarchar(1024)"); + + b.Property("JobStatus") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("JobType") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + b.Property("LastModificationTime") .HasColumnType("datetime2") .HasColumnName("LastModificationTime"); @@ -12125,43 +13457,43 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.Property("Number") .IsRequired() .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("Number"); + .HasColumnType("nvarchar(64)"); - b.Property("PlanDate") - .HasColumnType("datetime2"); + b.Property("Priority") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasDefaultValue(0); - b.Property("ProdLine") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + b.Property("PriorityIncrement") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasDefaultValue(0); b.Property("ProductionPlanNumber") - .HasColumnType("nvarchar(max)"); + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); b.Property("Remark") .HasMaxLength(3072) .HasColumnType("nvarchar(3072)") .HasColumnName("Remark"); - b.Property("RequestStatus") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - b.Property("Shift") .HasMaxLength(64) .HasColumnType("nvarchar(64)"); - b.Property("Team") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - b.Property("TenantId") .HasColumnType("uniqueidentifier") .HasColumnName("TenantId"); - b.Property("Type") - .IsRequired() + b.Property("UpStreamJobNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("WarehouseCode") + .HasColumnType("nvarchar(max)"); + + b.Property("WorkGroupCode") .HasMaxLength(64) .HasColumnType("nvarchar(64)"); @@ -12169,6 +13501,7 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("nvarchar(max)"); b.Property("Workshop") + .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)"); @@ -12177,21 +13510,14 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.HasIndex("Number") .IsUnique(); - b.ToTable("Store_ProductReceiptRequest", (string)null); + b.ToTable("Job_ProductReceiveJob", (string)null); }); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ProductReceiptRequestDetail", b => + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ProductReceiveJobDetail", b => { b.Property("Id") .HasColumnType("uniqueidentifier"); - b.Property("ArriveDate") - .HasColumnType("datetime2"); - - b.Property("BomVersion") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - b.Property("CreationTime") .HasColumnType("datetime2") .HasColumnName("CreationTime"); @@ -12200,9 +13526,63 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("CreatorId"); - b.Property("ExpireDate") + b.Property("HandledArriveDate") + .HasColumnType("datetime2"); + + b.Property("HandledContainerCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledContainerCode"); + + b.Property("HandledExpireDate") + .HasColumnType("datetime2"); + + b.Property("HandledLot") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledLot"); + + b.Property("HandledPackingCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledPackingCode"); + + b.Property("HandledProduceDate") .HasColumnType("datetime2"); + b.Property("HandledQty") + .HasColumnType("decimal(18,6)"); + + b.Property("HandledSupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledSupplierBatch"); + + b.Property("HandledToLocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledToLocationArea"); + + b.Property("HandledToLocationCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledToLocationCode"); + + b.Property("HandledToLocationErpCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledToLocationErpCode"); + + b.Property("HandledToLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledToLocationGroup"); + + b.Property("HandledToWarehouseCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledToWarehouseCode"); + b.Property("ItemCode") .IsRequired() .HasMaxLength(64) @@ -12232,99 +13612,107 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("LastModifierId"); - b.Property("LocationArea") + b.Property("MasterID") + .HasColumnType("uniqueidentifier"); + + b.Property("Number") + .IsRequired() .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("LocationArea"); + .HasColumnType("nvarchar(64)"); - b.Property("LocationCode") + b.Property("ProdLine") .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("RawLocationCode") + .HasColumnType("nvarchar(max)"); + + b.Property("RecommendArriveDate") + .HasColumnType("datetime2"); + + b.Property("RecommendContainerCode") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("LocationCode"); + .HasColumnName("RecommendContainerCode"); - b.Property("LocationErpCode") - .IsRequired() + b.Property("RecommendExpireDate") + .HasColumnType("datetime2"); + + b.Property("RecommendLot") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("LocationErpCode"); + .HasColumnName("RecommendLot"); - b.Property("LocationGroup") + b.Property("RecommendPackingCode") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("LocationGroup"); + .HasColumnName("RecommendPackingCode"); - b.Property("Lot") + b.Property("RecommendProduceDate") + .HasColumnType("datetime2"); + + b.Property("RecommendQty") + .HasColumnType("decimal(18,6)"); + + b.Property("RecommendSupplierBatch") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("Lot"); + .HasColumnName("RecommendSupplierBatch"); - b.Property("MasterID") - .HasColumnType("uniqueidentifier"); + b.Property("RecommendToLocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendToLocationArea"); - b.Property("Number") - .IsRequired() + b.Property("RecommendToLocationCode") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("Number"); + .HasColumnName("RecommendToLocationCode"); - b.Property("ProduceDate") - .HasColumnType("datetime2"); + b.Property("RecommendToLocationErpCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendToLocationErpCode"); - b.Property("Qty") - .HasPrecision(18, 6) - .HasColumnType("decimal(18,6)") - .HasColumnName("Qty"); + b.Property("RecommendToLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendToLocationGroup"); - b.Property("RawArea") + b.Property("RecommendToWarehouseCode") .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendToWarehouseCode"); b.Property("Remark") .HasMaxLength(3072) .HasColumnType("nvarchar(3072)") .HasColumnName("Remark"); - b.Property("ReturnQty") - .ValueGeneratedOnAdd() - .HasColumnType("decimal(18,6)") - .HasDefaultValue(0m); + b.Property("Status") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); b.Property("StdPackQty") .HasColumnType("decimal(18,6)"); - b.Property("SupplierBatch") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("SupplierBatch"); - b.Property("TenantId") .HasColumnType("uniqueidentifier") .HasColumnName("TenantId"); b.Property("Uom") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("Uom"); - - b.Property("WarehouseCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("WarehouseCode"); + .HasColumnType("nvarchar(max)"); b.HasKey("Id"); b.HasIndex("MasterID"); - b.HasIndex("Number", "ItemCode", "LocationCode") - .IsUnique(); - - b.ToTable("Store_ProductReceiptRequestDetail", (string)null); + b.ToTable("Job_ProductReceiveJobDetail", (string)null); }); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ProductReceiveJob", b => + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ProductRecycleJob", b => { b.Property("Id") .HasColumnType("uniqueidentifier"); @@ -12409,10 +13797,6 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("int") .HasDefaultValue(0); - b.Property("ProductionPlanNumber") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - b.Property("Remark") .HasMaxLength(3072) .HasColumnType("nvarchar(3072)") @@ -12450,14 +13834,17 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.HasIndex("Number") .IsUnique(); - b.ToTable("Job_ProductReceiveJob", (string)null); + b.ToTable("Job_ProductRecycleJob", (string)null); }); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ProductReceiveJobDetail", b => + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ProductRecycleJobDetail", b => { b.Property("Id") .HasColumnType("uniqueidentifier"); + b.Property("BomVersion") + .HasColumnType("nvarchar(max)"); + b.Property("CreationTime") .HasColumnType("datetime2") .HasColumnName("CreationTime"); @@ -12552,6 +13939,18 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("LastModifierId"); + b.Property("LocationArea") + .HasColumnType("nvarchar(max)"); + + b.Property("LocationCode") + .HasColumnType("nvarchar(max)"); + + b.Property("LocationErpCode") + .HasColumnType("nvarchar(max)"); + + b.Property("LocationGroup") + .HasColumnType("nvarchar(max)"); + b.Property("MasterID") .HasColumnType("uniqueidentifier"); @@ -12560,14 +13959,24 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasMaxLength(64) .HasColumnType("nvarchar(64)"); - b.Property("ProdLine") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + b.Property("Qty") + .HasColumnType("decimal(18,6)"); + + b.Property("RawLocationArea") + .HasColumnType("nvarchar(max)"); b.Property("RawLocationCode") .HasColumnType("nvarchar(max)"); + b.Property("RawLocationErpCode") + .HasColumnType("nvarchar(max)"); + + b.Property("RawLocationGroup") + .HasColumnType("nvarchar(max)"); + + b.Property("RawWarehouseCode") + .HasColumnType("nvarchar(max)"); + b.Property("RecommendArriveDate") .HasColumnType("datetime2"); @@ -12643,45 +14052,35 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnName("TenantId"); b.Property("Uom") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("WarehouseCode") .HasColumnType("nvarchar(max)"); b.HasKey("Id"); b.HasIndex("MasterID"); - b.ToTable("Job_ProductReceiveJobDetail", (string)null); + b.ToTable("Job_ProductRecycleJobDetail", (string)null); }); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ProductRecycleJob", b => + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ProductRecycleMaterialDetail", b => { b.Property("Id") .HasColumnType("uniqueidentifier"); - b.Property("AcceptTime") + b.Property("ArriveDate") .HasColumnType("datetime2"); - b.Property("AcceptUserId") - .HasColumnType("uniqueidentifier"); - - b.Property("AcceptUserName") + b.Property("BomVersion") .HasMaxLength(64) .HasColumnType("nvarchar(64)"); - b.Property("CompleteTime") - .HasColumnType("datetime2"); - - b.Property("CompleteUserId") - .HasColumnType("uniqueidentifier"); - - b.Property("CompleteUserName") + b.Property("ContainerCode") .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("nvarchar(40)") - .HasColumnName("ConcurrencyStamp"); + .HasColumnType("nvarchar(64)") + .HasColumnName("ContainerCode"); b.Property("CreationTime") .HasColumnType("datetime2") @@ -12691,28 +14090,29 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("CreatorId"); - b.Property("ExtraProperties") - .HasColumnType("nvarchar(max)") - .HasColumnName("ExtraProperties"); + b.Property("ExpireDate") + .HasColumnType("datetime2"); - b.Property("IsAutoComplete") - .ValueGeneratedOnAdd() - .HasColumnType("bit") - .HasDefaultValue(false); + b.Property("ItemCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemCode"); - b.Property("JobDescription") - .HasMaxLength(1024) - .HasColumnType("nvarchar(1024)"); + b.Property("ItemDesc1") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc1"); - b.Property("JobStatus") - .IsRequired() + b.Property("ItemDesc2") .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc2"); - b.Property("JobType") - .IsRequired() + b.Property("ItemName") .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemName"); b.Property("LastModificationTime") .HasColumnType("datetime2") @@ -12722,68 +14122,136 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("LastModifierId"); + b.Property("LocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationArea"); + + b.Property("LocationCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationCode"); + + b.Property("LocationErpCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationErpCode"); + + b.Property("LocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationGroup"); + + b.Property("Lot") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Lot"); + + b.Property("MasterID") + .HasColumnType("uniqueidentifier"); + b.Property("Number") .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("PackingCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("PackingCode"); + + b.Property("ProduceDate") + .HasColumnType("datetime2"); + + b.Property("ProductItemCode") .HasMaxLength(64) .HasColumnType("nvarchar(64)"); - b.Property("Priority") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasDefaultValue(0); + b.Property("ProductItemDesc1") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); - b.Property("PriorityIncrement") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasDefaultValue(0); + b.Property("ProductItemDesc2") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ProductItemName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ProductLot") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ProductPackingCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Qty") + .HasPrecision(18, 6) + .HasColumnType("decimal(18,6)") + .HasColumnName("Qty"); b.Property("Remark") .HasMaxLength(3072) .HasColumnType("nvarchar(3072)") .HasColumnName("Remark"); - b.Property("Shift") + b.Property("Status") + .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)"); + b.Property("StdPackQty") + .HasColumnType("decimal(18,6)"); + + b.Property("SupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("SupplierBatch"); + b.Property("TenantId") .HasColumnType("uniqueidentifier") .HasColumnName("TenantId"); - b.Property("UpStreamJobNumber") + b.Property("Uom") + .IsRequired() .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + .HasColumnType("nvarchar(64)") + .HasColumnName("Uom"); b.Property("WarehouseCode") - .HasColumnType("nvarchar(max)"); - - b.Property("WorkGroupCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("Worker") - .HasColumnType("nvarchar(max)"); - - b.Property("Workshop") .IsRequired() .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + .HasColumnType("nvarchar(64)") + .HasColumnName("WarehouseCode"); b.HasKey("Id"); - b.HasIndex("Number") - .IsUnique(); + b.HasIndex("MasterID"); - b.ToTable("Job_ProductRecycleJob", (string)null); + b.HasIndex("Number", "ProductItemCode", "ItemCode"); + + b.ToTable("Store_ProductRecycleMaterialDetail", (string)null); }); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ProductRecycleJobDetail", b => + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ProductRecycleNote", b => { b.Property("Id") .HasColumnType("uniqueidentifier"); - b.Property("BomVersion") - .HasColumnType("nvarchar(max)"); + b.Property("ActiveDate") + .HasColumnType("datetime2"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); b.Property("CreationTime") .HasColumnType("datetime2") @@ -12793,62 +14261,85 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("CreatorId"); - b.Property("HandledArriveDate") - .HasColumnType("datetime2"); + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); - b.Property("HandledContainerCode") + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Number") + .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("HandledContainerCode"); + .HasColumnName("Number"); - b.Property("HandledExpireDate") + b.Property("RecycleTime") .HasColumnType("datetime2"); - b.Property("HandledLot") + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("RequestNumber") + .HasColumnType("nvarchar(max)"); + + b.Property("Shift") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Worker") + .HasColumnType("nvarchar(max)"); + + b.Property("Workshop") .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("HandledLot"); + .HasColumnType("nvarchar(64)"); - b.Property("HandledPackingCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("HandledPackingCode"); + b.HasKey("Id"); - b.Property("HandledProduceDate") - .HasColumnType("datetime2"); + b.HasIndex("Number") + .IsUnique(); - b.Property("HandledQty") - .HasColumnType("decimal(18,6)"); + b.ToTable("Store_ProductRecycleNote", (string)null); + }); - b.Property("HandledSupplierBatch") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("HandledSupplierBatch"); + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ProductRecycleNoteDetail", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); - b.Property("HandledToLocationArea") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("HandledToLocationArea"); + b.Property("ArriveDate") + .HasColumnType("datetime2"); - b.Property("HandledToLocationCode") + b.Property("ContainerCode") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("HandledToLocationCode"); + .HasColumnName("ContainerCode"); - b.Property("HandledToLocationErpCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("HandledToLocationErpCode"); + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); - b.Property("HandledToLocationGroup") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("HandledToLocationGroup"); + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); - b.Property("HandledToWarehouseCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("HandledToWarehouseCode"); + b.Property("ExpireDate") + .HasColumnType("datetime2"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); b.Property("ItemCode") .IsRequired() @@ -12880,16 +14371,31 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnName("LastModifierId"); b.Property("LocationArea") - .HasColumnType("nvarchar(max)"); + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationArea"); b.Property("LocationCode") - .HasColumnType("nvarchar(max)"); + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationCode"); b.Property("LocationErpCode") - .HasColumnType("nvarchar(max)"); + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationErpCode"); b.Property("LocationGroup") - .HasColumnType("nvarchar(max)"); + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationGroup"); + + b.Property("Lot") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Lot"); b.Property("MasterID") .HasColumnType("uniqueidentifier"); @@ -12897,130 +14403,167 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.Property("Number") .IsRequired() .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); - b.Property("Qty") - .HasColumnType("decimal(18,6)"); + b.Property("PackingCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("PackingCode"); - b.Property("RawLocationArea") - .HasColumnType("nvarchar(max)"); + b.Property("ProduceDate") + .HasColumnType("datetime2"); - b.Property("RawLocationCode") - .HasColumnType("nvarchar(max)"); + b.Property("Qty") + .HasPrecision(18, 6) + .HasColumnType("decimal(18,6)") + .HasColumnName("Qty"); - b.Property("RawLocationErpCode") - .HasColumnType("nvarchar(max)"); + b.Property("ReasonCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); - b.Property("RawLocationGroup") - .HasColumnType("nvarchar(max)"); + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); - b.Property("RawWarehouseCode") - .HasColumnType("nvarchar(max)"); + b.Property("Status") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); - b.Property("RecommendArriveDate") - .HasColumnType("datetime2"); + b.Property("StdPackQty") + .HasColumnType("decimal(18,6)"); - b.Property("RecommendContainerCode") + b.Property("SupplierBatch") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendContainerCode"); + .HasColumnName("SupplierBatch"); - b.Property("RecommendExpireDate") - .HasColumnType("datetime2"); + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); - b.Property("RecommendLot") + b.Property("Uom") + .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendLot"); + .HasColumnName("Uom"); - b.Property("RecommendPackingCode") + b.Property("WarehouseCode") + .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendPackingCode"); + .HasColumnName("WarehouseCode"); - b.Property("RecommendProduceDate") + b.HasKey("Id"); + + b.HasIndex("MasterID"); + + b.HasIndex("Number", "ItemCode") + .IsUnique(); + + b.ToTable("Store_ProductRecycleNoteDetail", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ProductRecycleRequest", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ActiveDate") .HasColumnType("datetime2"); - b.Property("RecommendQty") - .HasColumnType("decimal(18,6)"); + b.Property("AutoAgree") + .HasColumnType("bit"); - b.Property("RecommendSupplierBatch") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendSupplierBatch"); + b.Property("AutoCompleteJob") + .HasColumnType("bit"); - b.Property("RecommendToLocationArea") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendToLocationArea"); + b.Property("AutoHandle") + .HasColumnType("bit"); - b.Property("RecommendToLocationCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendToLocationCode"); + b.Property("AutoSubmit") + .HasColumnType("bit"); - b.Property("RecommendToLocationErpCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendToLocationErpCode"); + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); - b.Property("RecommendToLocationGroup") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendToLocationGroup"); + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); - b.Property("RecommendToWarehouseCode") + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DirectCreateNote") + .HasColumnType("bit"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Number") + .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendToWarehouseCode"); + .HasColumnName("Number"); b.Property("Remark") .HasMaxLength(3072) .HasColumnType("nvarchar(3072)") .HasColumnName("Remark"); - b.Property("Status") + b.Property("RequestStatus") .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)"); - b.Property("StdPackQty") - .HasColumnType("decimal(18,6)"); + b.Property("Shift") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); b.Property("TenantId") .HasColumnType("uniqueidentifier") .HasColumnName("TenantId"); - b.Property("Uom") + b.Property("Worker") + .HasColumnType("nvarchar(max)"); + + b.Property("Workshop") .HasMaxLength(64) .HasColumnType("nvarchar(64)"); - b.Property("WarehouseCode") - .HasColumnType("nvarchar(max)"); - b.HasKey("Id"); - b.HasIndex("MasterID"); + b.HasIndex("Number") + .IsUnique(); - b.ToTable("Job_ProductRecycleJobDetail", (string)null); + b.ToTable("Store_ProductRecycleRequest", (string)null); }); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ProductRecycleMaterialDetail", b => + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ProductRecycleRequestDetail", b => { b.Property("Id") .HasColumnType("uniqueidentifier"); - b.Property("ArriveDate") - .HasColumnType("datetime2"); - b.Property("BomVersion") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("ContainerCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ContainerCode"); + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); b.Property("CreationTime") .HasColumnType("datetime2") @@ -13030,8 +14573,9 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("CreatorId"); - b.Property("ExpireDate") - .HasColumnType("datetime2"); + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); b.Property("ItemCode") .IsRequired() @@ -13084,11 +14628,6 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("nvarchar(64)") .HasColumnName("LocationGroup"); - b.Property("Lot") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("Lot"); - b.Property("MasterID") .HasColumnType("uniqueidentifier"); @@ -13098,44 +14637,31 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("nvarchar(64)") .HasColumnName("Number"); - b.Property("PackingCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("PackingCode"); - - b.Property("ProduceDate") - .HasColumnType("datetime2"); - - b.Property("ProductItemCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + b.Property("Qty") + .HasPrecision(18, 6) + .HasColumnType("decimal(18,6)") + .HasColumnName("Qty"); - b.Property("ProductItemDesc1") + b.Property("RawLocationArea") .HasMaxLength(64) .HasColumnType("nvarchar(64)"); - b.Property("ProductItemDesc2") + b.Property("RawLocationCode") .HasMaxLength(64) .HasColumnType("nvarchar(64)"); - b.Property("ProductItemName") + b.Property("RawLocationErpCode") .HasMaxLength(64) .HasColumnType("nvarchar(64)"); - b.Property("ProductLot") + b.Property("RawLocationGroup") .HasMaxLength(64) .HasColumnType("nvarchar(64)"); - b.Property("ProductPackingCode") + b.Property("RawWarehouseCode") .HasMaxLength(64) .HasColumnType("nvarchar(64)"); - b.Property("Qty") - .HasPrecision(18, 6) - .HasColumnType("decimal(18,6)") - .HasColumnName("Qty"); - b.Property("Remark") .HasMaxLength(3072) .HasColumnType("nvarchar(3072)") @@ -13146,14 +14672,6 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasMaxLength(64) .HasColumnType("nvarchar(64)"); - b.Property("StdPackQty") - .HasColumnType("decimal(18,6)"); - - b.Property("SupplierBatch") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("SupplierBatch"); - b.Property("TenantId") .HasColumnType("uniqueidentifier") .HasColumnName("TenantId"); @@ -13174,12 +14692,13 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.HasIndex("MasterID"); - b.HasIndex("Number", "ProductItemCode", "ItemCode"); + b.HasIndex("Number", "ItemCode") + .IsUnique(); - b.ToTable("Store_ProductRecycleMaterialDetail", (string)null); + b.ToTable("Store_ProductRecycleRequestDetail", (string)null); }); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ProductRecycleNote", b => + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.PurchaseOrder", b => { b.Property("Id") .HasColumnType("uniqueidentifier"); @@ -13193,6 +14712,18 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("nvarchar(40)") .HasColumnName("ConcurrencyStamp"); + b.Property("ContactEmail") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ContactName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ContactPhone") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + b.Property("CreationTime") .HasColumnType("datetime2") .HasColumnName("CreationTime"); @@ -13201,10 +14732,18 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("CreatorId"); + b.Property("DueDate") + .HasColumnType("datetime2"); + b.Property("ExtraProperties") .HasColumnType("nvarchar(max)") .HasColumnName("ExtraProperties"); + b.Property("IsConsignment") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false); + b.Property("LastModificationTime") .HasColumnType("datetime2") .HasColumnName("LastModificationTime"); @@ -13219,52 +14758,66 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("nvarchar(64)") .HasColumnName("Number"); - b.Property("RecycleTime") + b.Property("OrderDate") .HasColumnType("datetime2"); + b.Property("OrderStatus") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("PoType") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + b.Property("Remark") .HasMaxLength(3072) .HasColumnType("nvarchar(3072)") .HasColumnName("Remark"); - b.Property("RequestNumber") + b.Property("SupplierAddress") .HasColumnType("nvarchar(max)"); - b.Property("Shift") + b.Property("SupplierCode") .HasMaxLength(64) .HasColumnType("nvarchar(64)"); + b.Property("SupplierName") + .HasColumnType("nvarchar(max)"); + + b.Property("TaxRate") + .ValueGeneratedOnAdd() + .HasColumnType("decimal(18,6)") + .HasDefaultValue(0m); + b.Property("TenantId") .HasColumnType("uniqueidentifier") .HasColumnName("TenantId"); - b.Property("Worker") - .HasColumnType("nvarchar(max)"); - - b.Property("Workshop") + b.Property("Version") .HasMaxLength(64) .HasColumnType("nvarchar(64)"); + b.Property("Worker") + .HasColumnType("nvarchar(max)"); + b.HasKey("Id"); b.HasIndex("Number") .IsUnique(); - b.ToTable("Store_ProductRecycleNote", (string)null); + b.ToTable("Store_PurchaseOrder", (string)null); }); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ProductRecycleNoteDetail", b => + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.PurchaseOrderDetail", b => { b.Property("Id") .HasColumnType("uniqueidentifier"); - b.Property("ArriveDate") - .HasColumnType("datetime2"); - - b.Property("ContainerCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ContainerCode"); + b.Property("ConvertRate") + .ValueGeneratedOnAdd() + .HasColumnType("decimal(18,6)") + .HasDefaultValue(1m); b.Property("CreationTime") .HasColumnType("datetime2") @@ -13274,12 +14827,16 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("CreatorId"); + b.Property("Ctype") + .HasColumnType("nvarchar(max)"); + b.Property("ExpireDate") .HasColumnType("datetime2"); - b.Property("ExtraProperties") - .HasColumnType("nvarchar(max)") - .HasColumnName("ExtraProperties"); + b.Property("IsConsignment") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false); b.Property("ItemCode") .IsRequired() @@ -13310,32 +14867,17 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("LastModifierId"); - b.Property("LocationArea") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("LocationArea"); - - b.Property("LocationCode") + b.Property("LineStatus") .IsRequired() .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("LocationCode"); + .HasColumnType("nvarchar(64)"); b.Property("LocationErpCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("LocationErpCode"); - - b.Property("LocationGroup") .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("LocationGroup"); + .HasColumnType("nvarchar(64)"); b.Property("Lot") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("Lot"); + .HasColumnType("nvarchar(max)"); b.Property("MasterID") .HasColumnType("uniqueidentifier"); @@ -13346,41 +14888,56 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("nvarchar(64)") .HasColumnName("Number"); - b.Property("PackingCode") - .IsRequired() + b.Property("OrderRemark") + .HasColumnType("nvarchar(max)"); + + b.Property("PlanArriveDate") + .HasColumnType("datetime2"); + + b.Property("PlanUserCode") + .HasColumnType("nvarchar(max)"); + + b.Property("PoLine") .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("PackingCode"); + .HasColumnType("nvarchar(64)"); b.Property("ProduceDate") .HasColumnType("datetime2"); + b.Property("ProjectCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("PutAwayQty") + .HasColumnType("decimal(18,6)"); + b.Property("Qty") .HasPrecision(18, 6) .HasColumnType("decimal(18,6)") .HasColumnName("Qty"); - b.Property("ReasonCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + b.Property("ReceivedQty") + .HasColumnType("decimal(18,6)"); b.Property("Remark") .HasMaxLength(3072) .HasColumnType("nvarchar(3072)") .HasColumnName("Remark"); - b.Property("Status") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + b.Property("ReturnedQty") + .HasColumnType("decimal(18,6)"); + + b.Property("ShippedQty") + .HasColumnType("decimal(18,6)"); b.Property("StdPackQty") .HasColumnType("decimal(18,6)"); - b.Property("SupplierBatch") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("SupplierBatch"); + b.Property("SupplierPackQty") + .HasColumnType("decimal(18,6)"); + + b.Property("SupplierPackUom") + .HasColumnType("nvarchar(max)"); b.Property("TenantId") .HasColumnType("uniqueidentifier") @@ -13392,41 +14949,45 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("nvarchar(64)") .HasColumnName("Uom"); - b.Property("WarehouseCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("WarehouseCode"); - b.HasKey("Id"); b.HasIndex("MasterID"); - b.HasIndex("Number", "ItemCode") - .IsUnique(); + b.HasIndex("ItemCode", "Number", "PoLine") + .IsUnique() + .HasFilter("[PoLine] IS NOT NULL"); - b.ToTable("Store_ProductRecycleNoteDetail", (string)null); + b.ToTable("Store_PurchaseOrderDetail", (string)null); }); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ProductRecycleRequest", b => + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.PurchaseReceiptJob", b => { b.Property("Id") .HasColumnType("uniqueidentifier"); - b.Property("ActiveDate") + b.Property("AcceptTime") .HasColumnType("datetime2"); - b.Property("AutoAgree") - .HasColumnType("bit"); + b.Property("AcceptUserId") + .HasColumnType("uniqueidentifier"); - b.Property("AutoCompleteJob") - .HasColumnType("bit"); + b.Property("AcceptUserName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); - b.Property("AutoHandle") - .HasColumnType("bit"); + b.Property("AsnNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); - b.Property("AutoSubmit") - .HasColumnType("bit"); + b.Property("CompleteTime") + .HasColumnType("datetime2"); + + b.Property("CompleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CompleteUserName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); b.Property("ConcurrencyStamp") .IsConcurrencyToken() @@ -13442,12 +15003,28 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("CreatorId"); - b.Property("DirectCreateNote") - .HasColumnType("bit"); + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("IsAutoComplete") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false); + + b.Property("JobDescription") + .HasMaxLength(1024) + .HasColumnType("nvarchar(1024)"); + + b.Property("JobStatus") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); - b.Property("ExtraProperties") - .HasColumnType("nvarchar(max)") - .HasColumnName("ExtraProperties"); + b.Property("JobType") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); b.Property("LastModificationTime") .HasColumnType("datetime2") @@ -13460,20 +15037,47 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.Property("Number") .IsRequired() .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("Number"); + .HasColumnType("nvarchar(64)"); + + b.Property("PlanArriveDate") + .HasColumnType("datetime2"); + + b.Property("PoNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Priority") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasDefaultValue(0); + + b.Property("PriorityIncrement") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasDefaultValue(0); + + b.Property("PurchaseReceiptRequestNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); b.Property("Remark") .HasMaxLength(3072) .HasColumnType("nvarchar(3072)") .HasColumnName("Remark"); - b.Property("RequestStatus") + b.Property("RpNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("SupplierAddress") + .HasColumnType("nvarchar(max)"); + + b.Property("SupplierCode") .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)"); - b.Property("Shift") + b.Property("SupplierName") .HasMaxLength(64) .HasColumnType("nvarchar(64)"); @@ -13481,29 +15085,44 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("TenantId"); - b.Property("Worker") + b.Property("TimeWindow") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Type") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("UpStreamJobNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("WarehouseCode") .HasColumnType("nvarchar(max)"); - b.Property("Workshop") + b.Property("WorkGroupCode") .HasMaxLength(64) .HasColumnType("nvarchar(64)"); + b.Property("Worker") + .HasColumnType("nvarchar(max)"); + b.HasKey("Id"); b.HasIndex("Number") .IsUnique(); - b.ToTable("Store_ProductRecycleRequest", (string)null); + b.ToTable("Job_PurchaseReceiptJob", (string)null); }); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ProductRecycleRequestDetail", b => + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.PurchaseReceiptJobDetail", b => { b.Property("Id") .HasColumnType("uniqueidentifier"); - b.Property("BomVersion") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + b.Property("ArriveDate") + .HasColumnType("datetime2"); b.Property("CreationTime") .HasColumnType("datetime2") @@ -13513,9 +15132,68 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("CreatorId"); - b.Property("ExtraProperties") - .HasColumnType("nvarchar(max)") - .HasColumnName("ExtraProperties"); + b.Property("FailedReason") + .HasColumnType("nvarchar(max)"); + + b.Property("HandledArriveDate") + .HasColumnType("datetime2"); + + b.Property("HandledContainerCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledContainerCode"); + + b.Property("HandledExpireDate") + .HasColumnType("datetime2"); + + b.Property("HandledLot") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledLot"); + + b.Property("HandledPackingCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledPackingCode"); + + b.Property("HandledProduceDate") + .HasColumnType("datetime2"); + + b.Property("HandledQty") + .HasColumnType("decimal(18,6)"); + + b.Property("HandledSupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledSupplierBatch"); + + b.Property("HandledToLocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledToLocationArea"); + + b.Property("HandledToLocationCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledToLocationCode"); + + b.Property("HandledToLocationErpCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledToLocationErpCode"); + + b.Property("HandledToLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledToLocationGroup"); + + b.Property("HandledToWarehouseCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledToWarehouseCode"); + + b.Property("InspectPhotoJson") + .HasColumnType("nvarchar(max)"); b.Property("ItemCode") .IsRequired() @@ -13546,61 +15224,86 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("LastModifierId"); - b.Property("LocationArea") + b.Property("MassDefect") + .HasColumnType("nvarchar(max)"); + + b.Property("MasterID") + .HasColumnType("uniqueidentifier"); + + b.Property("Number") + .IsRequired() .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("LocationArea"); + .HasColumnType("nvarchar(64)"); - b.Property("LocationCode") + b.Property("PoLine") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("PoNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("PurchaseReceiptInspectStatus") .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("RecommendArriveDate") + .HasColumnType("datetime2"); + + b.Property("RecommendContainerCode") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("LocationCode"); + .HasColumnName("RecommendContainerCode"); - b.Property("LocationErpCode") - .IsRequired() + b.Property("RecommendExpireDate") + .HasColumnType("datetime2"); + + b.Property("RecommendLot") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("LocationErpCode"); + .HasColumnName("RecommendLot"); - b.Property("LocationGroup") + b.Property("RecommendPackingCode") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("LocationGroup"); + .HasColumnName("RecommendPackingCode"); - b.Property("MasterID") - .HasColumnType("uniqueidentifier"); + b.Property("RecommendProduceDate") + .HasColumnType("datetime2"); - b.Property("Number") - .IsRequired() + b.Property("RecommendQty") + .HasColumnType("decimal(18,6)"); + + b.Property("RecommendSupplierBatch") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("Number"); - - b.Property("Qty") - .HasPrecision(18, 6) - .HasColumnType("decimal(18,6)") - .HasColumnName("Qty"); + .HasColumnName("RecommendSupplierBatch"); - b.Property("RawLocationArea") + b.Property("RecommendToLocationArea") .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendToLocationArea"); - b.Property("RawLocationCode") + b.Property("RecommendToLocationCode") .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendToLocationCode"); - b.Property("RawLocationErpCode") + b.Property("RecommendToLocationErpCode") .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendToLocationErpCode"); - b.Property("RawLocationGroup") + b.Property("RecommendToLocationGroup") .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendToLocationGroup"); - b.Property("RawWarehouseCode") + b.Property("RecommendToWarehouseCode") .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendToWarehouseCode"); b.Property("Remark") .HasMaxLength(3072) @@ -13612,33 +15315,30 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasMaxLength(64) .HasColumnType("nvarchar(64)"); + b.Property("StdPackQty") + .HasColumnType("decimal(18,6)"); + + b.Property("SupplierPackQty") + .HasColumnType("decimal(18,6)"); + + b.Property("SupplierPackUom") + .HasColumnType("nvarchar(max)"); + b.Property("TenantId") .HasColumnType("uniqueidentifier") .HasColumnName("TenantId"); b.Property("Uom") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("Uom"); - - b.Property("WarehouseCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("WarehouseCode"); + .HasColumnType("nvarchar(max)"); b.HasKey("Id"); b.HasIndex("MasterID"); - b.HasIndex("Number", "ItemCode") - .IsUnique(); - - b.ToTable("Store_ProductRecycleRequestDetail", (string)null); + b.ToTable("Job_PurchaseReceiptJobDetail", (string)null); }); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.PurchaseOrder", b => + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.PurchaseReceiptNote", b => { b.Property("Id") .HasColumnType("uniqueidentifier"); @@ -13646,24 +15346,16 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.Property("ActiveDate") .HasColumnType("datetime2"); + b.Property("AsnNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + b.Property("ConcurrencyStamp") .IsConcurrencyToken() .HasMaxLength(40) .HasColumnType("nvarchar(40)") .HasColumnName("ConcurrencyStamp"); - b.Property("ContactEmail") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("ContactName") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("ContactPhone") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - b.Property("CreationTime") .HasColumnType("datetime2") .HasColumnName("CreationTime"); @@ -13672,17 +15364,14 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("CreatorId"); - b.Property("DueDate") - .HasColumnType("datetime2"); - b.Property("ExtraProperties") .HasColumnType("nvarchar(max)") .HasColumnName("ExtraProperties"); - b.Property("IsConsignment") - .ValueGeneratedOnAdd() - .HasColumnType("bit") - .HasDefaultValue(false); + b.Property("JobNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("JobNumber"); b.Property("LastModificationTime") .HasColumnType("datetime2") @@ -13698,46 +15387,54 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("nvarchar(64)") .HasColumnName("Number"); - b.Property("OrderDate") - .HasColumnType("datetime2"); - - b.Property("OrderStatus") - .IsRequired() + b.Property("PoNumber") .HasMaxLength(64) .HasColumnType("nvarchar(64)"); - b.Property("PoType") + b.Property("PurchaseReceiptRequestNumber") .HasMaxLength(64) .HasColumnType("nvarchar(64)"); + b.Property("ReceiveTime") + .HasColumnType("datetime2"); + b.Property("Remark") .HasMaxLength(3072) .HasColumnType("nvarchar(3072)") .HasColumnName("Remark"); + b.Property("RpNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Status") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + b.Property("SupplierAddress") .HasColumnType("nvarchar(max)"); b.Property("SupplierCode") + .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)"); b.Property("SupplierName") .HasColumnType("nvarchar(max)"); - b.Property("TaxRate") - .ValueGeneratedOnAdd() - .HasColumnType("decimal(18,6)") - .HasDefaultValue(0m); - b.Property("TenantId") .HasColumnType("uniqueidentifier") .HasColumnName("TenantId"); - b.Property("Version") + b.Property("Type") + .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)"); + b.Property("WarehouseCode") + .HasColumnType("nvarchar(max)"); + b.Property("Worker") .HasColumnType("nvarchar(max)"); @@ -13746,18 +15443,23 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.HasIndex("Number") .IsUnique(); - b.ToTable("Store_PurchaseOrder", (string)null); + b.HasIndex("SupplierCode"); + + b.ToTable("Store_PurchaseReceiptNote", (string)null); }); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.PurchaseOrderDetail", b => + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.PurchaseReceiptNoteDetail", b => { b.Property("Id") .HasColumnType("uniqueidentifier"); - b.Property("ConvertRate") - .ValueGeneratedOnAdd() - .HasColumnType("decimal(18,6)") - .HasDefaultValue(1m); + b.Property("ArriveDate") + .HasColumnType("datetime2"); + + b.Property("ContainerCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ContainerCode"); b.Property("CreationTime") .HasColumnType("datetime2") @@ -13767,16 +15469,71 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("CreatorId"); - b.Property("Ctype") + b.Property("ExpireDate") + .HasColumnType("datetime2"); + + b.Property("FailedReason") .HasColumnType("nvarchar(max)"); - b.Property("ExpireDate") + b.Property("HandledArriveDate") .HasColumnType("datetime2"); - b.Property("IsConsignment") - .ValueGeneratedOnAdd() - .HasColumnType("bit") - .HasDefaultValue(false); + b.Property("HandledContainerCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledContainerCode"); + + b.Property("HandledExpireDate") + .HasColumnType("datetime2"); + + b.Property("HandledLot") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledLot"); + + b.Property("HandledPackingCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledPackingCode"); + + b.Property("HandledProduceDate") + .HasColumnType("datetime2"); + + b.Property("HandledQty") + .HasColumnType("decimal(18,6)"); + + b.Property("HandledSupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledSupplierBatch"); + + b.Property("HandledToLocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledToLocationArea"); + + b.Property("HandledToLocationCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledToLocationCode"); + + b.Property("HandledToLocationErpCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledToLocationErpCode"); + + b.Property("HandledToLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledToLocationGroup"); + + b.Property("HandledToWarehouseCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledToWarehouseCode"); + + b.Property("InspectPhotoJson") + .HasColumnType("nvarchar(max)"); b.Property("ItemCode") .IsRequired() @@ -13807,16 +15564,34 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("LastModifierId"); - b.Property("LineStatus") + b.Property("LocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationArea"); + + b.Property("LocationCode") .IsRequired() .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationCode"); b.Property("LocationErpCode") + .IsRequired() .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationErpCode"); + + b.Property("LocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationGroup"); b.Property("Lot") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Lot"); + + b.Property("MassDefect") .HasColumnType("nvarchar(max)"); b.Property("MasterID") @@ -13828,51 +15603,110 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("nvarchar(64)") .HasColumnName("Number"); - b.Property("OrderRemark") - .HasColumnType("nvarchar(max)"); - - b.Property("PlanArriveDate") - .HasColumnType("datetime2"); - - b.Property("PlanUserCode") - .HasColumnType("nvarchar(max)"); + b.Property("PackingCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("PackingCode"); b.Property("PoLine") .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + .HasColumnType("nvarchar(64)") + .HasColumnName("PoLine"); + + b.Property("PoNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("PoNumber"); b.Property("ProduceDate") .HasColumnType("datetime2"); - b.Property("ProjectCode") + b.Property("PurchaseReceiptInspectStatus") + .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)"); - b.Property("PutAwayQty") - .HasColumnType("decimal(18,6)"); - b.Property("Qty") .HasPrecision(18, 6) .HasColumnType("decimal(18,6)") .HasColumnName("Qty"); - b.Property("ReceivedQty") + b.Property("RecommendArriveDate") + .HasColumnType("datetime2"); + + b.Property("RecommendContainerCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendContainerCode"); + + b.Property("RecommendExpireDate") + .HasColumnType("datetime2"); + + b.Property("RecommendLot") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendLot"); + + b.Property("RecommendPackingCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendPackingCode"); + + b.Property("RecommendProduceDate") + .HasColumnType("datetime2"); + + b.Property("RecommendQty") .HasColumnType("decimal(18,6)"); + b.Property("RecommendSupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendSupplierBatch"); + + b.Property("RecommendToLocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendToLocationArea"); + + b.Property("RecommendToLocationCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendToLocationCode"); + + b.Property("RecommendToLocationErpCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendToLocationErpCode"); + + b.Property("RecommendToLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendToLocationGroup"); + + b.Property("RecommendToWarehouseCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendToWarehouseCode"); + b.Property("Remark") .HasMaxLength(3072) .HasColumnType("nvarchar(3072)") .HasColumnName("Remark"); - b.Property("ReturnedQty") - .HasColumnType("decimal(18,6)"); - - b.Property("ShippedQty") - .HasColumnType("decimal(18,6)"); + b.Property("Status") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); b.Property("StdPackQty") .HasColumnType("decimal(18,6)"); + b.Property("SupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("SupplierBatch"); + b.Property("SupplierPackQty") .HasColumnType("decimal(18,6)"); @@ -13889,45 +15723,42 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("nvarchar(64)") .HasColumnName("Uom"); + b.Property("WarehouseCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("WarehouseCode"); + b.HasKey("Id"); b.HasIndex("MasterID"); - b.HasIndex("ItemCode", "Number", "PoLine") - .IsUnique() - .HasFilter("[PoLine] IS NOT NULL"); - - b.ToTable("Store_PurchaseOrderDetail", (string)null); + b.ToTable("Store_PurchaseReceiptNoteDetail", (string)null); }); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.PurchaseReceiptJob", b => + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.PurchaseReceiptRequest", b => { b.Property("Id") .HasColumnType("uniqueidentifier"); - b.Property("AcceptTime") + b.Property("ActiveDate") .HasColumnType("datetime2"); - b.Property("AcceptUserId") - .HasColumnType("uniqueidentifier"); - - b.Property("AcceptUserName") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - b.Property("AsnNumber") .HasMaxLength(64) .HasColumnType("nvarchar(64)"); - b.Property("CompleteTime") - .HasColumnType("datetime2"); + b.Property("AutoAgree") + .HasColumnType("bit"); - b.Property("CompleteUserId") - .HasColumnType("uniqueidentifier"); + b.Property("AutoCompleteJob") + .HasColumnType("bit"); - b.Property("CompleteUserName") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + b.Property("AutoHandle") + .HasColumnType("bit"); + + b.Property("AutoSubmit") + .HasColumnType("bit"); b.Property("ConcurrencyStamp") .IsConcurrencyToken() @@ -13943,28 +15774,17 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("CreatorId"); - b.Property("ExtraProperties") - .HasColumnType("nvarchar(max)") - .HasColumnName("ExtraProperties"); - - b.Property("IsAutoComplete") - .ValueGeneratedOnAdd() - .HasColumnType("bit") - .HasDefaultValue(false); - - b.Property("JobDescription") - .HasMaxLength(1024) - .HasColumnType("nvarchar(1024)"); + b.Property("DirectCreateNote") + .HasColumnType("bit"); - b.Property("JobStatus") + b.Property("DockCode") .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)"); - b.Property("JobType") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); b.Property("LastModificationTime") .HasColumnType("datetime2") @@ -13977,7 +15797,8 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.Property("Number") .IsRequired() .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); b.Property("PlanArriveDate") .HasColumnType("datetime2"); @@ -13986,25 +15807,16 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasMaxLength(64) .HasColumnType("nvarchar(64)"); - b.Property("Priority") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasDefaultValue(0); - - b.Property("PriorityIncrement") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasDefaultValue(0); - - b.Property("PurchaseReceiptRequestNumber") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - b.Property("Remark") .HasMaxLength(3072) .HasColumnType("nvarchar(3072)") .HasColumnName("Remark"); + b.Property("RequestStatus") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + b.Property("RpNumber") .HasMaxLength(64) .HasColumnType("nvarchar(64)"); @@ -14026,22 +15838,11 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnName("TenantId"); b.Property("TimeWindow") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("Type") .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)"); - b.Property("UpStreamJobNumber") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("WarehouseCode") - .HasColumnType("nvarchar(max)"); - - b.Property("WorkGroupCode") + b.Property("TruckNumber") .HasMaxLength(64) .HasColumnType("nvarchar(64)"); @@ -14053,10 +15854,12 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.HasIndex("Number") .IsUnique(); - b.ToTable("Job_PurchaseReceiptJob", (string)null); + b.HasIndex("SupplierCode"); + + b.ToTable("Store_PurchaseReceiptRequest", (string)null); }); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.PurchaseReceiptJobDetail", b => + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.PurchaseReceiptRequestDetail", b => { b.Property("Id") .HasColumnType("uniqueidentifier"); @@ -14064,6 +15867,14 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.Property("ArriveDate") .HasColumnType("datetime2"); + b.Property("ContainerCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ContainerCode"); + + b.Property("ConvertRate") + .HasColumnType("decimal(18,6)"); + b.Property("CreationTime") .HasColumnType("datetime2") .HasColumnName("CreationTime"); @@ -14072,69 +15883,9 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("CreatorId"); - b.Property("FailedReason") - .HasColumnType("nvarchar(max)"); - - b.Property("HandledArriveDate") - .HasColumnType("datetime2"); - - b.Property("HandledContainerCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("HandledContainerCode"); - - b.Property("HandledExpireDate") - .HasColumnType("datetime2"); - - b.Property("HandledLot") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("HandledLot"); - - b.Property("HandledPackingCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("HandledPackingCode"); - - b.Property("HandledProduceDate") + b.Property("ExpireDate") .HasColumnType("datetime2"); - b.Property("HandledQty") - .HasColumnType("decimal(18,6)"); - - b.Property("HandledSupplierBatch") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("HandledSupplierBatch"); - - b.Property("HandledToLocationArea") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("HandledToLocationArea"); - - b.Property("HandledToLocationCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("HandledToLocationCode"); - - b.Property("HandledToLocationErpCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("HandledToLocationErpCode"); - - b.Property("HandledToLocationGroup") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("HandledToLocationGroup"); - - b.Property("HandledToWarehouseCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("HandledToWarehouseCode"); - - b.Property("InspectPhotoJson") - .HasColumnType("nvarchar(max)"); - b.Property("ItemCode") .IsRequired() .HasMaxLength(64) @@ -14164,8 +15915,10 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("LastModifierId"); - b.Property("MassDefect") - .HasColumnType("nvarchar(max)"); + b.Property("Lot") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Lot"); b.Property("MasterID") .HasColumnType("uniqueidentifier"); @@ -14173,91 +15926,49 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.Property("Number") .IsRequired() .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("PoLine") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("PoNumber") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); - b.Property("PurchaseReceiptInspectStatus") + b.Property("PackingCode") .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("RecommendArriveDate") - .HasColumnType("datetime2"); - - b.Property("RecommendContainerCode") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendContainerCode"); - - b.Property("RecommendExpireDate") - .HasColumnType("datetime2"); + .HasColumnName("PackingCode"); - b.Property("RecommendLot") + b.Property("PoLine") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendLot"); + .HasColumnName("PoLine"); - b.Property("RecommendPackingCode") + b.Property("PoNumber") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendPackingCode"); + .HasColumnName("PoNumber"); - b.Property("RecommendProduceDate") + b.Property("ProduceDate") .HasColumnType("datetime2"); - b.Property("RecommendQty") - .HasColumnType("decimal(18,6)"); - - b.Property("RecommendSupplierBatch") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendSupplierBatch"); - - b.Property("RecommendToLocationArea") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendToLocationArea"); - - b.Property("RecommendToLocationCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendToLocationCode"); - - b.Property("RecommendToLocationErpCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendToLocationErpCode"); - - b.Property("RecommendToLocationGroup") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendToLocationGroup"); + b.Property("Qty") + .HasPrecision(18, 6) + .HasColumnType("decimal(18,6)") + .HasColumnName("Qty"); - b.Property("RecommendToWarehouseCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendToWarehouseCode"); + b.Property("RecommendErpCode") + .HasColumnType("nvarchar(max)"); b.Property("Remark") .HasMaxLength(3072) .HasColumnType("nvarchar(3072)") .HasColumnName("Remark"); - b.Property("Status") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - b.Property("StdPackQty") .HasColumnType("decimal(18,6)"); + b.Property("SupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("SupplierBatch"); + b.Property("SupplierPackQty") .HasColumnType("decimal(18,6)"); @@ -14269,27 +15980,50 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnName("TenantId"); b.Property("Uom") - .HasColumnType("nvarchar(max)"); + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Uom"); b.HasKey("Id"); b.HasIndex("MasterID"); - b.ToTable("Job_PurchaseReceiptJobDetail", (string)null); + b.HasIndex("Number", "PackingCode") + .IsUnique(); + + b.ToTable("Store_PurchaseReceiptRequestDetail", (string)null); }); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.PurchaseReceiptNote", b => + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.PurchaseReturnJob", b => { b.Property("Id") .HasColumnType("uniqueidentifier"); - b.Property("ActiveDate") + b.Property("AcceptTime") .HasColumnType("datetime2"); + b.Property("AcceptUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("AcceptUserName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + b.Property("AsnNumber") .HasMaxLength(64) .HasColumnType("nvarchar(64)"); + b.Property("CompleteTime") + .HasColumnType("datetime2"); + + b.Property("CompleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CompleteUserName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + b.Property("ConcurrencyStamp") .IsConcurrencyToken() .HasMaxLength(40) @@ -14308,10 +16042,24 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("nvarchar(max)") .HasColumnName("ExtraProperties"); - b.Property("JobNumber") + b.Property("IsAutoComplete") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false); + + b.Property("JobDescription") + .HasMaxLength(1024) + .HasColumnType("nvarchar(1024)"); + + b.Property("JobStatus") + .IsRequired() .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("JobNumber"); + .HasColumnType("nvarchar(64)"); + + b.Property("JobType") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); b.Property("LastModificationTime") .HasColumnType("datetime2") @@ -14324,57 +16072,65 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.Property("Number") .IsRequired() .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("Number"); + .HasColumnType("nvarchar(64)"); b.Property("PoNumber") .HasMaxLength(64) .HasColumnType("nvarchar(64)"); - b.Property("PurchaseReceiptRequestNumber") + b.Property("Priority") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasDefaultValue(0); + + b.Property("PriorityIncrement") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasDefaultValue(0); + + b.Property("PurchaseReturnRequestNumber") .HasMaxLength(64) .HasColumnType("nvarchar(64)"); - b.Property("ReceiveTime") - .HasColumnType("datetime2"); - b.Property("Remark") .HasMaxLength(3072) .HasColumnType("nvarchar(3072)") .HasColumnName("Remark"); - b.Property("RpNumber") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + b.Property("ReturnReason") + .HasColumnType("nvarchar(max)"); - b.Property("Status") + b.Property("ReturnTime") + .HasColumnType("datetime2"); + + b.Property("ReturnType") .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)"); - b.Property("SupplierAddress") - .HasColumnType("nvarchar(max)"); + b.Property("RpNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); b.Property("SupplierCode") - .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)"); - b.Property("SupplierName") - .HasColumnType("nvarchar(max)"); - b.Property("TenantId") .HasColumnType("uniqueidentifier") .HasColumnName("TenantId"); - b.Property("Type") - .IsRequired() + b.Property("UpStreamJobNumber") .HasMaxLength(64) .HasColumnType("nvarchar(64)"); b.Property("WarehouseCode") .HasColumnType("nvarchar(max)"); + b.Property("WorkGroupCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + b.Property("Worker") .HasColumnType("nvarchar(max)"); @@ -14383,24 +16139,14 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.HasIndex("Number") .IsUnique(); - b.HasIndex("SupplierCode"); - - b.ToTable("Store_PurchaseReceiptNote", (string)null); + b.ToTable("Job_PurchaseReturnJob", (string)null); }); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.PurchaseReceiptNoteDetail", b => + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.PurchaseReturnJobDetail", b => { b.Property("Id") .HasColumnType("uniqueidentifier"); - b.Property("ArriveDate") - .HasColumnType("datetime2"); - - b.Property("ContainerCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ContainerCode"); - b.Property("CreationTime") .HasColumnType("datetime2") .HasColumnName("CreationTime"); @@ -14409,12 +16155,6 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("CreatorId"); - b.Property("ExpireDate") - .HasColumnType("datetime2"); - - b.Property("FailedReason") - .HasColumnType("nvarchar(max)"); - b.Property("HandledArriveDate") .HasColumnType("datetime2"); @@ -14426,54 +16166,51 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.Property("HandledExpireDate") .HasColumnType("datetime2"); - b.Property("HandledLot") + b.Property("HandledFromLocationArea") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("HandledLot"); + .HasColumnName("HandledFromLocationArea"); - b.Property("HandledPackingCode") + b.Property("HandledFromLocationCode") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("HandledPackingCode"); - - b.Property("HandledProduceDate") - .HasColumnType("datetime2"); - - b.Property("HandledQty") - .HasColumnType("decimal(18,6)"); + .HasColumnName("HandledFromLocationCode"); - b.Property("HandledSupplierBatch") + b.Property("HandledFromLocationErpCode") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("HandledSupplierBatch"); + .HasColumnName("HandledFromLocationErpCode"); - b.Property("HandledToLocationArea") + b.Property("HandledFromLocationGroup") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("HandledToLocationArea"); + .HasColumnName("HandledFromLocationGroup"); - b.Property("HandledToLocationCode") + b.Property("HandledFromWarehouseCode") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("HandledToLocationCode"); + .HasColumnName("HandledFromWarehouseCode"); - b.Property("HandledToLocationErpCode") + b.Property("HandledLot") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("HandledToLocationErpCode"); + .HasColumnName("HandledLot"); - b.Property("HandledToLocationGroup") + b.Property("HandledPackingCode") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("HandledToLocationGroup"); + .HasColumnName("HandledPackingCode"); - b.Property("HandledToWarehouseCode") + b.Property("HandledProduceDate") + .HasColumnType("datetime2"); + + b.Property("HandledQty") + .HasColumnType("decimal(18,6)"); + + b.Property("HandledSupplierBatch") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("HandledToWarehouseCode"); - - b.Property("InspectPhotoJson") - .HasColumnType("nvarchar(max)"); + .HasColumnName("HandledSupplierBatch"); b.Property("ItemCode") .IsRequired() @@ -14504,73 +16241,24 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("LastModifierId"); - b.Property("LocationArea") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("LocationArea"); - - b.Property("LocationCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("LocationCode"); - - b.Property("LocationErpCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("LocationErpCode"); - - b.Property("LocationGroup") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("LocationGroup"); - - b.Property("Lot") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("Lot"); - - b.Property("MassDefect") - .HasColumnType("nvarchar(max)"); - b.Property("MasterID") .HasColumnType("uniqueidentifier"); b.Property("Number") .IsRequired() .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("Number"); - - b.Property("PackingCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("PackingCode"); + .HasColumnType("nvarchar(64)"); b.Property("PoLine") .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("PoLine"); + .HasColumnType("nvarchar(64)"); b.Property("PoNumber") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("PoNumber"); - - b.Property("ProduceDate") - .HasColumnType("datetime2"); - - b.Property("PurchaseReceiptInspectStatus") - .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)"); - b.Property("Qty") - .HasPrecision(18, 6) - .HasColumnType("decimal(18,6)") - .HasColumnName("Qty"); + b.Property("Reason") + .HasColumnType("nvarchar(max)"); b.Property("RecommendArriveDate") .HasColumnType("datetime2"); @@ -14583,51 +16271,51 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.Property("RecommendExpireDate") .HasColumnType("datetime2"); - b.Property("RecommendLot") + b.Property("RecommendFromLocationArea") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendLot"); + .HasColumnName("RecommendFromLocationArea"); - b.Property("RecommendPackingCode") + b.Property("RecommendFromLocationCode") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendPackingCode"); - - b.Property("RecommendProduceDate") - .HasColumnType("datetime2"); - - b.Property("RecommendQty") - .HasColumnType("decimal(18,6)"); + .HasColumnName("RecommendFromLocationCode"); - b.Property("RecommendSupplierBatch") + b.Property("RecommendFromLocationErpCode") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendSupplierBatch"); + .HasColumnName("RecommendFromLocationErpCode"); - b.Property("RecommendToLocationArea") + b.Property("RecommendFromLocationGroup") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendToLocationArea"); + .HasColumnName("RecommendFromLocationGroup"); - b.Property("RecommendToLocationCode") + b.Property("RecommendFromWarehouseCode") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendToLocationCode"); + .HasColumnName("RecommendFromWarehouseCode"); - b.Property("RecommendToLocationErpCode") + b.Property("RecommendLot") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendToLocationErpCode"); + .HasColumnName("RecommendLot"); - b.Property("RecommendToLocationGroup") + b.Property("RecommendPackingCode") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendToLocationGroup"); + .HasColumnName("RecommendPackingCode"); - b.Property("RecommendToWarehouseCode") + b.Property("RecommendProduceDate") + .HasColumnType("datetime2"); + + b.Property("RecommendQty") + .HasColumnType("decimal(18,6)"); + + b.Property("RecommendSupplierBatch") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendToWarehouseCode"); + .HasColumnName("RecommendSupplierBatch"); b.Property("Remark") .HasMaxLength(3072) @@ -14642,41 +16330,21 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.Property("StdPackQty") .HasColumnType("decimal(18,6)"); - b.Property("SupplierBatch") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("SupplierBatch"); - - b.Property("SupplierPackQty") - .HasColumnType("decimal(18,6)"); - - b.Property("SupplierPackUom") - .HasColumnType("nvarchar(max)"); - b.Property("TenantId") .HasColumnType("uniqueidentifier") .HasColumnName("TenantId"); b.Property("Uom") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("Uom"); - - b.Property("WarehouseCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("WarehouseCode"); + .HasColumnType("nvarchar(max)"); b.HasKey("Id"); b.HasIndex("MasterID"); - b.ToTable("Store_PurchaseReceiptNoteDetail", (string)null); + b.ToTable("Job_PurchaseReturnJobDetail", (string)null); }); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.PurchaseReceiptRequest", b => + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.PurchaseReturnNote", b => { b.Property("Id") .HasColumnType("uniqueidentifier"); @@ -14688,18 +16356,6 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasMaxLength(64) .HasColumnType("nvarchar(64)"); - b.Property("AutoAgree") - .HasColumnType("bit"); - - b.Property("AutoCompleteJob") - .HasColumnType("bit"); - - b.Property("AutoHandle") - .HasColumnType("bit"); - - b.Property("AutoSubmit") - .HasColumnType("bit"); - b.Property("ConcurrencyStamp") .IsConcurrencyToken() .HasMaxLength(40) @@ -14714,18 +16370,15 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("CreatorId"); - b.Property("DirectCreateNote") - .HasColumnType("bit"); - - b.Property("DockCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - b.Property("ExtraProperties") .HasColumnType("nvarchar(max)") .HasColumnName("ExtraProperties"); + b.Property("JobNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("JobNumber"); + b.Property("LastModificationTime") .HasColumnType("datetime2") .HasColumnName("LastModificationTime"); @@ -14740,19 +16393,26 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("nvarchar(64)") .HasColumnName("Number"); - b.Property("PlanArriveDate") - .HasColumnType("datetime2"); - b.Property("PoNumber") .HasMaxLength(64) .HasColumnType("nvarchar(64)"); + b.Property("PurchaseReturnRequestNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + b.Property("Remark") .HasMaxLength(3072) .HasColumnType("nvarchar(3072)") .HasColumnName("Remark"); - b.Property("RequestStatus") + b.Property("ReturnReason") + .HasColumnType("nvarchar(max)"); + + b.Property("ReturnTime") + .HasColumnType("datetime2"); + + b.Property("ReturnType") .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)"); @@ -14761,15 +16421,12 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasMaxLength(64) .HasColumnType("nvarchar(64)"); - b.Property("SupplierAddress") - .HasColumnType("nvarchar(max)"); - - b.Property("SupplierCode") + b.Property("Status") .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)"); - b.Property("SupplierName") + b.Property("SupplierCode") .HasMaxLength(64) .HasColumnType("nvarchar(64)"); @@ -14777,15 +16434,6 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("TenantId"); - b.Property("TimeWindow") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("TruckNumber") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - b.Property("Worker") .HasColumnType("nvarchar(max)"); @@ -14794,12 +16442,10 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.HasIndex("Number") .IsUnique(); - b.HasIndex("SupplierCode"); - - b.ToTable("Store_PurchaseReceiptRequest", (string)null); + b.ToTable("Store_PurchaseReturnNote", (string)null); }); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.PurchaseReceiptRequestDetail", b => + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.PurchaseReturnNoteDetail", b => { b.Property("Id") .HasColumnType("uniqueidentifier"); @@ -14812,9 +16458,6 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("nvarchar(64)") .HasColumnName("ContainerCode"); - b.Property("ConvertRate") - .HasColumnType("decimal(18,6)"); - b.Property("CreationTime") .HasColumnType("datetime2") .HasColumnName("CreationTime"); @@ -14826,6 +16469,63 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.Property("ExpireDate") .HasColumnType("datetime2"); + b.Property("HandledArriveDate") + .HasColumnType("datetime2"); + + b.Property("HandledContainerCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledContainerCode"); + + b.Property("HandledExpireDate") + .HasColumnType("datetime2"); + + b.Property("HandledFromLocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledFromLocationArea"); + + b.Property("HandledFromLocationCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledFromLocationCode"); + + b.Property("HandledFromLocationErpCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledFromLocationErpCode"); + + b.Property("HandledFromLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledFromLocationGroup"); + + b.Property("HandledFromWarehouseCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledFromWarehouseCode"); + + b.Property("HandledLot") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledLot"); + + b.Property("HandledPackingCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledPackingCode"); + + b.Property("HandledProduceDate") + .HasColumnType("datetime2"); + + b.Property("HandledQty") + .HasColumnType("decimal(18,6)"); + + b.Property("HandledSupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledSupplierBatch"); + b.Property("ItemCode") .IsRequired() .HasMaxLength(64) @@ -14835,72 +16535,157 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.Property("ItemDesc1") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("ItemDesc1"); + .HasColumnName("ItemDesc1"); + + b.Property("ItemDesc2") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc2"); + + b.Property("ItemName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemName"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("LocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationArea"); + + b.Property("LocationCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationCode"); + + b.Property("LocationErpCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationErpCode"); + + b.Property("LocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationGroup"); + + b.Property("Lot") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Lot"); + + b.Property("MasterID") + .HasColumnType("uniqueidentifier"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("PackingCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("PackingCode"); + + b.Property("PoLine") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("PoLine"); + + b.Property("PoNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("PoNumber"); + + b.Property("ProduceDate") + .HasColumnType("datetime2"); + + b.Property("Qty") + .HasPrecision(18, 6) + .HasColumnType("decimal(18,6)") + .HasColumnName("Qty"); + + b.Property("Reason") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("RecommendArriveDate") + .HasColumnType("datetime2"); + + b.Property("RecommendContainerCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendContainerCode"); - b.Property("ItemDesc2") + b.Property("RecommendExpireDate") + .HasColumnType("datetime2"); + + b.Property("RecommendFromLocationArea") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("ItemDesc2"); + .HasColumnName("RecommendFromLocationArea"); - b.Property("ItemName") + b.Property("RecommendFromLocationCode") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("ItemName"); - - b.Property("LastModificationTime") - .HasColumnType("datetime2") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("uniqueidentifier") - .HasColumnName("LastModifierId"); + .HasColumnName("RecommendFromLocationCode"); - b.Property("Lot") + b.Property("RecommendFromLocationErpCode") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("Lot"); - - b.Property("MasterID") - .HasColumnType("uniqueidentifier"); + .HasColumnName("RecommendFromLocationErpCode"); - b.Property("Number") - .IsRequired() + b.Property("RecommendFromLocationGroup") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("Number"); + .HasColumnName("RecommendFromLocationGroup"); - b.Property("PackingCode") - .IsRequired() + b.Property("RecommendFromWarehouseCode") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("PackingCode"); + .HasColumnName("RecommendFromWarehouseCode"); - b.Property("PoLine") + b.Property("RecommendLot") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("PoLine"); + .HasColumnName("RecommendLot"); - b.Property("PoNumber") + b.Property("RecommendPackingCode") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("PoNumber"); + .HasColumnName("RecommendPackingCode"); - b.Property("ProduceDate") + b.Property("RecommendProduceDate") .HasColumnType("datetime2"); - b.Property("Qty") - .HasPrecision(18, 6) - .HasColumnType("decimal(18,6)") - .HasColumnName("Qty"); + b.Property("RecommendQty") + .HasColumnType("decimal(18,6)"); - b.Property("RecommendErpCode") - .HasColumnType("nvarchar(max)"); + b.Property("RecommendSupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendSupplierBatch"); b.Property("Remark") .HasMaxLength(3072) .HasColumnType("nvarchar(3072)") .HasColumnName("Remark"); + b.Property("Status") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + b.Property("StdPackQty") .HasColumnType("decimal(18,6)"); @@ -14909,12 +16694,6 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("nvarchar(64)") .HasColumnName("SupplierBatch"); - b.Property("SupplierPackQty") - .HasColumnType("decimal(18,6)"); - - b.Property("SupplierPackUom") - .HasColumnType("nvarchar(max)"); - b.Property("TenantId") .HasColumnType("uniqueidentifier") .HasColumnName("TenantId"); @@ -14925,6 +16704,12 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("nvarchar(64)") .HasColumnName("Uom"); + b.Property("WarehouseCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("WarehouseCode"); + b.HasKey("Id"); b.HasIndex("MasterID"); @@ -14932,37 +16717,32 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.HasIndex("Number", "PackingCode") .IsUnique(); - b.ToTable("Store_PurchaseReceiptRequestDetail", (string)null); + b.ToTable("Store_PurchaseReturnNoteDetail", (string)null); }); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.PurchaseReturnJob", b => + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.PurchaseReturnRequest", b => { b.Property("Id") .HasColumnType("uniqueidentifier"); - b.Property("AcceptTime") + b.Property("ActiveDate") .HasColumnType("datetime2"); - b.Property("AcceptUserId") - .HasColumnType("uniqueidentifier"); - - b.Property("AcceptUserName") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - b.Property("AsnNumber") .HasMaxLength(64) .HasColumnType("nvarchar(64)"); - b.Property("CompleteTime") - .HasColumnType("datetime2"); + b.Property("AutoAgree") + .HasColumnType("bit"); - b.Property("CompleteUserId") - .HasColumnType("uniqueidentifier"); + b.Property("AutoCompleteJob") + .HasColumnType("bit"); - b.Property("CompleteUserName") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + b.Property("AutoHandle") + .HasColumnType("bit"); + + b.Property("AutoSubmit") + .HasColumnType("bit"); b.Property("ConcurrencyStamp") .IsConcurrencyToken() @@ -14978,29 +16758,13 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("CreatorId"); + b.Property("DirectCreateNote") + .HasColumnType("bit"); + b.Property("ExtraProperties") .HasColumnType("nvarchar(max)") .HasColumnName("ExtraProperties"); - b.Property("IsAutoComplete") - .ValueGeneratedOnAdd() - .HasColumnType("bit") - .HasDefaultValue(false); - - b.Property("JobDescription") - .HasMaxLength(1024) - .HasColumnType("nvarchar(1024)"); - - b.Property("JobStatus") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("JobType") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - b.Property("LastModificationTime") .HasColumnType("datetime2") .HasColumnName("LastModificationTime"); @@ -15012,33 +16776,22 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.Property("Number") .IsRequired() .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); b.Property("PoNumber") .HasMaxLength(64) .HasColumnType("nvarchar(64)"); - b.Property("Priority") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasDefaultValue(0); - - b.Property("PriorityIncrement") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasDefaultValue(0); - - b.Property("PurchaseReturnRequestNumber") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - b.Property("Remark") .HasMaxLength(3072) .HasColumnType("nvarchar(3072)") .HasColumnName("Remark"); - b.Property("ReturnReason") - .HasColumnType("nvarchar(max)"); + b.Property("RequestStatus") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); b.Property("ReturnTime") .HasColumnType("datetime2"); @@ -15060,17 +16813,6 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("TenantId"); - b.Property("UpStreamJobNumber") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("WarehouseCode") - .HasColumnType("nvarchar(max)"); - - b.Property("WorkGroupCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - b.Property("Worker") .HasColumnType("nvarchar(max)"); @@ -15079,14 +16821,22 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.HasIndex("Number") .IsUnique(); - b.ToTable("Job_PurchaseReturnJob", (string)null); + b.ToTable("Store_PurchaseReturnRequest", (string)null); }); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.PurchaseReturnJobDetail", b => + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.PurchaseReturnRequestDetail", b => { b.Property("Id") .HasColumnType("uniqueidentifier"); + b.Property("ArriveDate") + .HasColumnType("datetime2"); + + b.Property("ContainerCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ContainerCode"); + b.Property("CreationTime") .HasColumnType("datetime2") .HasColumnName("CreationTime"); @@ -15095,63 +16845,9 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("CreatorId"); - b.Property("HandledArriveDate") - .HasColumnType("datetime2"); - - b.Property("HandledContainerCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("HandledContainerCode"); - - b.Property("HandledExpireDate") - .HasColumnType("datetime2"); - - b.Property("HandledFromLocationArea") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("HandledFromLocationArea"); - - b.Property("HandledFromLocationCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("HandledFromLocationCode"); - - b.Property("HandledFromLocationErpCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("HandledFromLocationErpCode"); - - b.Property("HandledFromLocationGroup") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("HandledFromLocationGroup"); - - b.Property("HandledFromWarehouseCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("HandledFromWarehouseCode"); - - b.Property("HandledLot") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("HandledLot"); - - b.Property("HandledPackingCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("HandledPackingCode"); - - b.Property("HandledProduceDate") + b.Property("ExpireDate") .HasColumnType("datetime2"); - b.Property("HandledQty") - .HasColumnType("decimal(18,6)"); - - b.Property("HandledSupplierBatch") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("HandledSupplierBatch"); - b.Property("ItemCode") .IsRequired() .HasMaxLength(64) @@ -15170,92 +16866,76 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.Property("ItemName") .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ItemName"); - - b.Property("LastModificationTime") - .HasColumnType("datetime2") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("uniqueidentifier") - .HasColumnName("LastModifierId"); - - b.Property("MasterID") - .HasColumnType("uniqueidentifier"); - - b.Property("Number") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("PoLine") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("PoNumber") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemName"); - b.Property("Reason") - .HasColumnType("nvarchar(max)"); + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); - b.Property("RecommendArriveDate") - .HasColumnType("datetime2"); + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); - b.Property("RecommendContainerCode") + b.Property("LocationArea") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendContainerCode"); + .HasColumnName("LocationArea"); - b.Property("RecommendExpireDate") - .HasColumnType("datetime2"); + b.Property("LocationCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationCode"); - b.Property("RecommendFromLocationArea") + b.Property("LocationErpCode") + .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendFromLocationArea"); + .HasColumnName("LocationErpCode"); - b.Property("RecommendFromLocationCode") + b.Property("LocationGroup") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendFromLocationCode"); + .HasColumnName("LocationGroup"); - b.Property("RecommendFromLocationErpCode") + b.Property("Lot") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendFromLocationErpCode"); + .HasColumnName("Lot"); - b.Property("RecommendFromLocationGroup") + b.Property("MasterID") + .HasColumnType("uniqueidentifier"); + + b.Property("Number") + .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendFromLocationGroup"); + .HasColumnName("Number"); - b.Property("RecommendFromWarehouseCode") + b.Property("PackingCode") + .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendFromWarehouseCode"); + .HasColumnName("PackingCode"); - b.Property("RecommendLot") + b.Property("PoLine") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendLot"); + .HasColumnName("PoLine"); - b.Property("RecommendPackingCode") + b.Property("PoNumber") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendPackingCode"); + .HasColumnName("PoNumber"); - b.Property("RecommendProduceDate") + b.Property("ProduceDate") .HasColumnType("datetime2"); - b.Property("RecommendQty") - .HasColumnType("decimal(18,6)"); - - b.Property("RecommendSupplierBatch") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendSupplierBatch"); + b.Property("Qty") + .HasPrecision(18, 6) + .HasColumnType("decimal(18,6)") + .HasColumnName("Qty"); b.Property("Remark") .HasMaxLength(3072) @@ -15270,32 +16950,66 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.Property("StdPackQty") .HasColumnType("decimal(18,6)"); + b.Property("SupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("SupplierBatch"); + b.Property("TenantId") .HasColumnType("uniqueidentifier") .HasColumnName("TenantId"); b.Property("Uom") - .HasColumnType("nvarchar(max)"); + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Uom"); + + b.Property("WarehouseCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("WarehouseCode"); b.HasKey("Id"); b.HasIndex("MasterID"); - b.ToTable("Job_PurchaseReturnJobDetail", (string)null); + b.HasIndex("Number", "PackingCode") + .IsUnique(); + + b.ToTable("Store_PurchaseReturnRequestDetail", (string)null); }); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.PurchaseReturnNote", b => + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.PutawayJob", b => { b.Property("Id") .HasColumnType("uniqueidentifier"); - b.Property("ActiveDate") + b.Property("AcceptTime") .HasColumnType("datetime2"); + b.Property("AcceptUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("AcceptUserName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + b.Property("AsnNumber") .HasMaxLength(64) .HasColumnType("nvarchar(64)"); + b.Property("CompleteTime") + .HasColumnType("datetime2"); + + b.Property("CompleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CompleteUserName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + b.Property("ConcurrencyStamp") .IsConcurrencyToken() .HasMaxLength(40) @@ -15314,10 +17028,28 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("nvarchar(max)") .HasColumnName("ExtraProperties"); - b.Property("JobNumber") + b.Property("InspectNumber") .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("JobNumber"); + .HasColumnType("nvarchar(64)"); + + b.Property("IsAutoComplete") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false); + + b.Property("JobDescription") + .HasMaxLength(1024) + .HasColumnType("nvarchar(1024)"); + + b.Property("JobStatus") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("JobType") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); b.Property("LastModificationTime") .HasColumnType("datetime2") @@ -15330,39 +17062,45 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.Property("Number") .IsRequired() .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("Number"); + .HasColumnType("nvarchar(64)"); b.Property("PoNumber") .HasMaxLength(64) .HasColumnType("nvarchar(64)"); - b.Property("PurchaseReturnRequestNumber") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + b.Property("Priority") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasDefaultValue(0); - b.Property("Remark") - .HasMaxLength(3072) - .HasColumnType("nvarchar(3072)") - .HasColumnName("Remark"); + b.Property("PriorityIncrement") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasDefaultValue(0); - b.Property("ReturnReason") - .HasColumnType("nvarchar(max)"); + b.Property("ProductReceiptNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); - b.Property("ReturnTime") - .HasColumnType("datetime2"); + b.Property("PurchaseReceiptRequestNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); - b.Property("ReturnType") + b.Property("PutawayMode") .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)"); - b.Property("RpNumber") + b.Property("ReceiptNumber") .HasMaxLength(64) .HasColumnType("nvarchar(64)"); - b.Property("Status") - .IsRequired() + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("RpNumber") .HasMaxLength(64) .HasColumnType("nvarchar(64)"); @@ -15374,6 +17112,22 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("TenantId"); + b.Property("Type") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("UpStreamJobNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("WarehouseCode") + .HasColumnType("nvarchar(max)"); + + b.Property("WorkGroupCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + b.Property("Worker") .HasColumnType("nvarchar(max)"); @@ -15382,22 +17136,14 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.HasIndex("Number") .IsUnique(); - b.ToTable("Store_PurchaseReturnNote", (string)null); + b.ToTable("Job_PutawayJob", (string)null); }); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.PurchaseReturnNoteDetail", b => + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.PutawayJobDetail", b => { b.Property("Id") .HasColumnType("uniqueidentifier"); - b.Property("ArriveDate") - .HasColumnType("datetime2"); - - b.Property("ContainerCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ContainerCode"); - b.Property("CreationTime") .HasColumnType("datetime2") .HasColumnName("CreationTime"); @@ -15406,8 +17152,25 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("CreatorId"); - b.Property("ExpireDate") - .HasColumnType("datetime2"); + b.Property("FromLocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("FromLocationCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("FromLocationErpCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("FromLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("FromWarehouseCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); b.Property("HandledArriveDate") .HasColumnType("datetime2"); @@ -15420,51 +17183,51 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.Property("HandledExpireDate") .HasColumnType("datetime2"); - b.Property("HandledFromLocationArea") + b.Property("HandledLot") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("HandledFromLocationArea"); + .HasColumnName("HandledLot"); - b.Property("HandledFromLocationCode") + b.Property("HandledPackingCode") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("HandledFromLocationCode"); + .HasColumnName("HandledPackingCode"); - b.Property("HandledFromLocationErpCode") + b.Property("HandledProduceDate") + .HasColumnType("datetime2"); + + b.Property("HandledQty") + .HasColumnType("decimal(18,6)"); + + b.Property("HandledSupplierBatch") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("HandledFromLocationErpCode"); + .HasColumnName("HandledSupplierBatch"); - b.Property("HandledFromLocationGroup") + b.Property("HandledToLocationArea") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("HandledFromLocationGroup"); + .HasColumnName("HandledToLocationArea"); - b.Property("HandledFromWarehouseCode") + b.Property("HandledToLocationCode") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("HandledFromWarehouseCode"); + .HasColumnName("HandledToLocationCode"); - b.Property("HandledLot") + b.Property("HandledToLocationErpCode") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("HandledLot"); + .HasColumnName("HandledToLocationErpCode"); - b.Property("HandledPackingCode") + b.Property("HandledToLocationGroup") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("HandledPackingCode"); - - b.Property("HandledProduceDate") - .HasColumnType("datetime2"); - - b.Property("HandledQty") - .HasColumnType("decimal(18,6)"); + .HasColumnName("HandledToLocationGroup"); - b.Property("HandledSupplierBatch") + b.Property("HandledToWarehouseCode") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("HandledSupplierBatch"); + .HasColumnName("HandledToWarehouseCode"); b.Property("ItemCode") .IsRequired() @@ -15495,70 +17258,27 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("LastModifierId"); - b.Property("LocationArea") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("LocationArea"); - - b.Property("LocationCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("LocationCode"); - - b.Property("LocationErpCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("LocationErpCode"); - - b.Property("LocationGroup") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("LocationGroup"); - - b.Property("Lot") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("Lot"); - b.Property("MasterID") .HasColumnType("uniqueidentifier"); b.Property("Number") .IsRequired() .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("Number"); - - b.Property("PackingCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("PackingCode"); + .HasColumnType("nvarchar(64)"); b.Property("PoLine") .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("PoLine"); + .HasColumnType("nvarchar(64)"); b.Property("PoNumber") .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("PoNumber"); - - b.Property("ProduceDate") - .HasColumnType("datetime2"); + .HasColumnType("nvarchar(64)"); b.Property("Qty") .HasPrecision(18, 6) .HasColumnType("decimal(18,6)") .HasColumnName("Qty"); - b.Property("Reason") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - b.Property("RecommendArriveDate") .HasColumnType("datetime2"); @@ -15570,51 +17290,51 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.Property("RecommendExpireDate") .HasColumnType("datetime2"); - b.Property("RecommendFromLocationArea") + b.Property("RecommendLot") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendFromLocationArea"); + .HasColumnName("RecommendLot"); - b.Property("RecommendFromLocationCode") + b.Property("RecommendPackingCode") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendFromLocationCode"); + .HasColumnName("RecommendPackingCode"); - b.Property("RecommendFromLocationErpCode") + b.Property("RecommendProduceDate") + .HasColumnType("datetime2"); + + b.Property("RecommendQty") + .HasColumnType("decimal(18,6)"); + + b.Property("RecommendSupplierBatch") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendFromLocationErpCode"); + .HasColumnName("RecommendSupplierBatch"); - b.Property("RecommendFromLocationGroup") + b.Property("RecommendToLocationArea") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendFromLocationGroup"); + .HasColumnName("RecommendToLocationArea"); - b.Property("RecommendFromWarehouseCode") + b.Property("RecommendToLocationCode") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendFromWarehouseCode"); + .HasColumnName("RecommendToLocationCode"); - b.Property("RecommendLot") + b.Property("RecommendToLocationErpCode") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendLot"); + .HasColumnName("RecommendToLocationErpCode"); - b.Property("RecommendPackingCode") + b.Property("RecommendToLocationGroup") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendPackingCode"); - - b.Property("RecommendProduceDate") - .HasColumnType("datetime2"); - - b.Property("RecommendQty") - .HasColumnType("decimal(18,6)"); + .HasColumnName("RecommendToLocationGroup"); - b.Property("RecommendSupplierBatch") + b.Property("RecommendToWarehouseCode") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendSupplierBatch"); + .HasColumnName("RecommendToWarehouseCode"); b.Property("Remark") .HasMaxLength(3072) @@ -15629,11 +17349,6 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.Property("StdPackQty") .HasColumnType("decimal(18,6)"); - b.Property("SupplierBatch") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("SupplierBatch"); - b.Property("TenantId") .HasColumnType("uniqueidentifier") .HasColumnName("TenantId"); @@ -15644,23 +17359,14 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("nvarchar(64)") .HasColumnName("Uom"); - b.Property("WarehouseCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("WarehouseCode"); - b.HasKey("Id"); b.HasIndex("MasterID"); - b.HasIndex("Number", "PackingCode") - .IsUnique(); - - b.ToTable("Store_PurchaseReturnNoteDetail", (string)null); + b.ToTable("Job_PutawayJobDetail", (string)null); }); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.PurchaseReturnRequest", b => + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.PutawayNote", b => { b.Property("Id") .HasColumnType("uniqueidentifier"); @@ -15672,18 +17378,6 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasMaxLength(64) .HasColumnType("nvarchar(64)"); - b.Property("AutoAgree") - .HasColumnType("bit"); - - b.Property("AutoCompleteJob") - .HasColumnType("bit"); - - b.Property("AutoHandle") - .HasColumnType("bit"); - - b.Property("AutoSubmit") - .HasColumnType("bit"); - b.Property("ConcurrencyStamp") .IsConcurrencyToken() .HasMaxLength(40) @@ -15698,13 +17392,19 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("CreatorId"); - b.Property("DirectCreateNote") - .HasColumnType("bit"); - b.Property("ExtraProperties") .HasColumnType("nvarchar(max)") .HasColumnName("ExtraProperties"); + b.Property("InspectNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("JobNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("JobNumber"); + b.Property("LastModificationTime") .HasColumnType("datetime2") .HasColumnName("LastModificationTime"); @@ -15719,28 +17419,23 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("nvarchar(64)") .HasColumnName("Number"); - b.Property("PoNumber") + b.Property("ProductReceiptNumber") .HasMaxLength(64) .HasColumnType("nvarchar(64)"); - b.Property("Remark") - .HasMaxLength(3072) - .HasColumnType("nvarchar(3072)") - .HasColumnName("Remark"); - - b.Property("RequestStatus") - .IsRequired() + b.Property("PurchaseReceiptRequestNumber") .HasMaxLength(64) .HasColumnType("nvarchar(64)"); - b.Property("ReturnTime") - .HasColumnType("datetime2"); - - b.Property("ReturnType") - .IsRequired() + b.Property("ReceiptNumber") .HasMaxLength(64) .HasColumnType("nvarchar(64)"); + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + b.Property("RpNumber") .HasMaxLength(64) .HasColumnType("nvarchar(64)"); @@ -15753,40 +17448,139 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("TenantId"); + b.Property("Type") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + b.Property("Worker") .HasColumnType("nvarchar(max)"); - b.HasKey("Id"); + b.HasKey("Id"); + + b.HasIndex("Number") + .IsUnique(); + + b.ToTable("Store_PutawayNote", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.PutawayNoteDetail", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ArriveDate") + .HasColumnType("datetime2"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("ExpireDate") + .HasColumnType("datetime2"); + + b.Property("FromContainerCode") + .HasColumnType("nvarchar(max)"); + + b.Property("FromLocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromLocationArea"); + + b.Property("FromLocationCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromLocationCode"); + + b.Property("FromLocationErpCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromLocationErpCode"); + + b.Property("FromLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromLocationGroup"); + + b.Property("FromLot") + .HasColumnType("nvarchar(max)"); + + b.Property("FromPackingCode") + .HasColumnType("nvarchar(450)"); + + b.Property("FromStatus") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("FromWarehouseCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromWarehouseCode"); + + b.Property("HandledArriveDate") + .HasColumnType("datetime2"); + + b.Property("HandledContainerCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledContainerCode"); + + b.Property("HandledExpireDate") + .HasColumnType("datetime2"); + + b.Property("HandledLot") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledLot"); + + b.Property("HandledPackingCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledPackingCode"); - b.HasIndex("Number") - .IsUnique(); + b.Property("HandledProduceDate") + .HasColumnType("datetime2"); - b.ToTable("Store_PurchaseReturnRequest", (string)null); - }); + b.Property("HandledQty") + .HasColumnType("decimal(18,6)"); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.PurchaseReturnRequestDetail", b => - { - b.Property("Id") - .HasColumnType("uniqueidentifier"); + b.Property("HandledSupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledSupplierBatch"); - b.Property("ArriveDate") - .HasColumnType("datetime2"); + b.Property("HandledToLocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledToLocationArea"); - b.Property("ContainerCode") + b.Property("HandledToLocationCode") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("ContainerCode"); + .HasColumnName("HandledToLocationCode"); - b.Property("CreationTime") - .HasColumnType("datetime2") - .HasColumnName("CreationTime"); + b.Property("HandledToLocationErpCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledToLocationErpCode"); - b.Property("CreatorId") - .HasColumnType("uniqueidentifier") - .HasColumnName("CreatorId"); + b.Property("HandledToLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledToLocationGroup"); - b.Property("ExpireDate") - .HasColumnType("datetime2"); + b.Property("HandledToWarehouseCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledToWarehouseCode"); b.Property("ItemCode") .IsRequired() @@ -15809,6 +17603,11 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("nvarchar(64)") .HasColumnName("ItemName"); + b.Property("JobNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("JobNumber"); + b.Property("LastModificationTime") .HasColumnType("datetime2") .HasColumnName("LastModificationTime"); @@ -15817,76 +17616,95 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("LastModifierId"); - b.Property("LocationArea") + b.Property("MasterID") + .HasColumnType("uniqueidentifier"); + + b.Property("Number") + .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("LocationArea"); + .HasColumnName("Number"); - b.Property("LocationCode") - .IsRequired() + b.Property("PoLine") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("LocationCode"); + .HasColumnName("PoLine"); - b.Property("LocationErpCode") - .IsRequired() + b.Property("PoNumber") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("LocationErpCode"); + .HasColumnName("PoNumber"); - b.Property("LocationGroup") + b.Property("ProduceDate") + .HasColumnType("datetime2"); + + b.Property("Qty") + .HasPrecision(18, 6) + .HasColumnType("decimal(18,6)") + .HasColumnName("Qty"); + + b.Property("RecommendArriveDate") + .HasColumnType("datetime2"); + + b.Property("RecommendContainerCode") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("LocationGroup"); + .HasColumnName("RecommendContainerCode"); - b.Property("Lot") + b.Property("RecommendExpireDate") + .HasColumnType("datetime2"); + + b.Property("RecommendLot") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("Lot"); + .HasColumnName("RecommendLot"); - b.Property("MasterID") - .HasColumnType("uniqueidentifier"); + b.Property("RecommendPackingCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendPackingCode"); - b.Property("Number") - .IsRequired() + b.Property("RecommendProduceDate") + .HasColumnType("datetime2"); + + b.Property("RecommendQty") + .HasColumnType("decimal(18,6)"); + + b.Property("RecommendSupplierBatch") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("Number"); + .HasColumnName("RecommendSupplierBatch"); - b.Property("PackingCode") - .IsRequired() + b.Property("RecommendToLocationArea") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("PackingCode"); + .HasColumnName("RecommendToLocationArea"); - b.Property("PoLine") + b.Property("RecommendToLocationCode") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("PoLine"); + .HasColumnName("RecommendToLocationCode"); - b.Property("PoNumber") + b.Property("RecommendToLocationErpCode") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("PoNumber"); + .HasColumnName("RecommendToLocationErpCode"); - b.Property("ProduceDate") - .HasColumnType("datetime2"); + b.Property("RecommendToLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendToLocationGroup"); - b.Property("Qty") - .HasPrecision(18, 6) - .HasColumnType("decimal(18,6)") - .HasColumnName("Qty"); + b.Property("RecommendToWarehouseCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendToWarehouseCode"); b.Property("Remark") .HasMaxLength(3072) .HasColumnType("nvarchar(3072)") .HasColumnName("Remark"); - b.Property("Status") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - b.Property("StdPackQty") .HasColumnType("decimal(18,6)"); @@ -15899,56 +17717,87 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("TenantId"); - b.Property("Uom") + b.Property("ToContainerCode") + .HasColumnType("nvarchar(max)"); + + b.Property("ToLocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToLocationArea"); + + b.Property("ToLocationCode") .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("Uom"); + .HasColumnName("ToLocationCode"); - b.Property("WarehouseCode") + b.Property("ToLocationErpCode") .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("WarehouseCode"); + .HasColumnName("ToLocationErpCode"); + + b.Property("ToLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToLocationGroup"); + + b.Property("ToLot") + .HasColumnType("nvarchar(max)"); + + b.Property("ToPackingCode") + .HasColumnType("nvarchar(450)"); + + b.Property("ToStatus") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ToWarehouseCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToWarehouseCode"); + + b.Property("Uom") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Uom"); b.HasKey("Id"); b.HasIndex("MasterID"); - b.HasIndex("Number", "PackingCode") - .IsUnique(); + b.HasIndex("Number", "FromPackingCode", "FromLocationCode", "ToLocationCode", "ToPackingCode") + .IsUnique() + .HasFilter("[FromPackingCode] IS NOT NULL AND [ToPackingCode] IS NOT NULL"); - b.ToTable("Store_PurchaseReturnRequestDetail", (string)null); + b.ToTable("Store_PutawayNoteDetail", (string)null); }); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.PutawayJob", b => + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.PutawayRequest", b => { b.Property("Id") .HasColumnType("uniqueidentifier"); - b.Property("AcceptTime") + b.Property("ActiveDate") .HasColumnType("datetime2"); - b.Property("AcceptUserId") - .HasColumnType("uniqueidentifier"); - - b.Property("AcceptUserName") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - b.Property("AsnNumber") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + .HasColumnType("nvarchar(max)"); - b.Property("CompleteTime") - .HasColumnType("datetime2"); + b.Property("AutoAgree") + .HasColumnType("bit"); - b.Property("CompleteUserId") - .HasColumnType("uniqueidentifier"); + b.Property("AutoCompleteJob") + .HasColumnType("bit"); - b.Property("CompleteUserName") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + b.Property("AutoHandle") + .HasColumnType("bit"); + + b.Property("AutoSubmit") + .HasColumnType("bit"); b.Property("ConcurrencyStamp") .IsConcurrencyToken() @@ -15964,33 +17813,16 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("CreatorId"); + b.Property("DirectCreateNote") + .HasColumnType("bit"); + b.Property("ExtraProperties") .HasColumnType("nvarchar(max)") .HasColumnName("ExtraProperties"); - b.Property("InspectNumber") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("IsAutoComplete") - .ValueGeneratedOnAdd() - .HasColumnType("bit") - .HasDefaultValue(false); - - b.Property("JobDescription") - .HasMaxLength(1024) - .HasColumnType("nvarchar(1024)"); - - b.Property("JobStatus") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("JobType") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - + b.Property("InspectNumber") + .HasColumnType("nvarchar(max)"); + b.Property("LastModificationTime") .HasColumnType("datetime2") .HasColumnName("LastModificationTime"); @@ -16002,29 +17834,17 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.Property("Number") .IsRequired() .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); b.Property("PoNumber") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("Priority") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasDefaultValue(0); - - b.Property("PriorityIncrement") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasDefaultValue(0); + .HasColumnType("nvarchar(max)"); b.Property("ProductReceiptNumber") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + .HasColumnType("nvarchar(max)"); b.Property("PurchaseReceiptRequestNumber") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + .HasColumnType("nvarchar(max)"); b.Property("PutawayMode") .IsRequired() @@ -16032,21 +17852,26 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("nvarchar(64)"); b.Property("ReceiptNumber") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + .HasColumnType("nvarchar(max)"); b.Property("Remark") .HasMaxLength(3072) .HasColumnType("nvarchar(3072)") .HasColumnName("Remark"); - b.Property("RpNumber") + b.Property("RequestNumber") + .HasColumnType("nvarchar(max)"); + + b.Property("RequestStatus") + .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)"); + b.Property("RpNumber") + .HasColumnType("nvarchar(max)"); + b.Property("SupplierCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + .HasColumnType("nvarchar(max)"); b.Property("TenantId") .HasColumnType("uniqueidentifier") @@ -16057,17 +17882,6 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasMaxLength(64) .HasColumnType("nvarchar(64)"); - b.Property("UpStreamJobNumber") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("WarehouseCode") - .HasColumnType("nvarchar(max)"); - - b.Property("WorkGroupCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - b.Property("Worker") .HasColumnType("nvarchar(max)"); @@ -16076,14 +17890,17 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.HasIndex("Number") .IsUnique(); - b.ToTable("Job_PutawayJob", (string)null); + b.ToTable("Store_PutawayRequest", (string)null); }); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.PutawayJobDetail", b => + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.PutawayRequestDetail", b => { b.Property("Id") .HasColumnType("uniqueidentifier"); + b.Property("ArriveDate") + .HasColumnType("datetime2"); + b.Property("CreationTime") .HasColumnType("datetime2") .HasColumnName("CreationTime"); @@ -16092,82 +17909,53 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("CreatorId"); - b.Property("FromLocationArea") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("FromLocationCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("FromLocationErpCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("FromLocationGroup") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("FromWarehouseCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("HandledArriveDate") + b.Property("ExpireDate") .HasColumnType("datetime2"); - b.Property("HandledContainerCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("HandledContainerCode"); - - b.Property("HandledExpireDate") - .HasColumnType("datetime2"); + b.Property("FromContainerCode") + .HasColumnType("nvarchar(max)"); - b.Property("HandledLot") + b.Property("FromLocationArea") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("HandledLot"); + .HasColumnName("FromLocationArea"); - b.Property("HandledPackingCode") + b.Property("FromLocationCode") + .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("HandledPackingCode"); - - b.Property("HandledProduceDate") - .HasColumnType("datetime2"); - - b.Property("HandledQty") - .HasColumnType("decimal(18,6)"); + .HasColumnName("FromLocationCode"); - b.Property("HandledSupplierBatch") + b.Property("FromLocationErpCode") + .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("HandledSupplierBatch"); + .HasColumnName("FromLocationErpCode"); - b.Property("HandledToLocationArea") + b.Property("FromLocationGroup") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("HandledToLocationArea"); + .HasColumnName("FromLocationGroup"); - b.Property("HandledToLocationCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("HandledToLocationCode"); + b.Property("FromLot") + .HasColumnType("nvarchar(max)"); - b.Property("HandledToLocationErpCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("HandledToLocationErpCode"); + b.Property("FromPackingCode") + .HasColumnType("nvarchar(max)"); - b.Property("HandledToLocationGroup") + b.Property("FromStatus") + .IsRequired() .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("HandledToLocationGroup"); + .HasColumnType("nvarchar(64)"); - b.Property("HandledToWarehouseCode") + b.Property("FromWarehouseCode") + .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("HandledToWarehouseCode"); + .HasColumnName("FromWarehouseCode"); + + b.Property("InventoryQty") + .HasColumnType("decimal(18,6)"); b.Property("ItemCode") .IsRequired() @@ -16204,94 +17992,85 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.Property("Number") .IsRequired() .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); b.Property("PoLine") .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + .HasColumnType("nvarchar(64)") + .HasColumnName("PoLine"); b.Property("PoNumber") .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + .HasColumnType("nvarchar(64)") + .HasColumnName("PoNumber"); + + b.Property("ProduceDate") + .HasColumnType("datetime2"); b.Property("Qty") .HasPrecision(18, 6) .HasColumnType("decimal(18,6)") .HasColumnName("Qty"); - b.Property("RecommendArriveDate") - .HasColumnType("datetime2"); - - b.Property("RecommendContainerCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendContainerCode"); - - b.Property("RecommendExpireDate") - .HasColumnType("datetime2"); + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); - b.Property("RecommendLot") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendLot"); + b.Property("StdPackQty") + .HasColumnType("decimal(18,6)"); - b.Property("RecommendPackingCode") + b.Property("SupplierBatch") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendPackingCode"); - - b.Property("RecommendProduceDate") - .HasColumnType("datetime2"); + .HasColumnName("SupplierBatch"); - b.Property("RecommendQty") - .HasColumnType("decimal(18,6)"); + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); - b.Property("RecommendSupplierBatch") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendSupplierBatch"); + b.Property("ToContainerCode") + .HasColumnType("nvarchar(max)"); - b.Property("RecommendToLocationArea") + b.Property("ToLocationArea") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendToLocationArea"); + .HasColumnName("ToLocationArea"); - b.Property("RecommendToLocationCode") + b.Property("ToLocationCode") + .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendToLocationCode"); + .HasColumnName("ToLocationCode"); - b.Property("RecommendToLocationErpCode") + b.Property("ToLocationErpCode") + .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendToLocationErpCode"); + .HasColumnName("ToLocationErpCode"); - b.Property("RecommendToLocationGroup") + b.Property("ToLocationGroup") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendToLocationGroup"); + .HasColumnName("ToLocationGroup"); - b.Property("RecommendToWarehouseCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendToWarehouseCode"); + b.Property("ToLot") + .HasColumnType("nvarchar(max)"); - b.Property("Remark") - .HasMaxLength(3072) - .HasColumnType("nvarchar(3072)") - .HasColumnName("Remark"); + b.Property("ToPackingCode") + .HasColumnType("nvarchar(max)"); - b.Property("Status") + b.Property("ToStatus") .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)"); - b.Property("StdPackQty") - .HasColumnType("decimal(18,6)"); - - b.Property("TenantId") - .HasColumnType("uniqueidentifier") - .HasColumnName("TenantId"); + b.Property("ToWarehouseCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToWarehouseCode"); b.Property("Uom") .IsRequired() @@ -16303,10 +18082,10 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.HasIndex("MasterID"); - b.ToTable("Job_PutawayJobDetail", (string)null); + b.ToTable("Store_PutawayRequestDetail", (string)null); }); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.PutawayNote", b => + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ReceiptAbnormalNote", b => { b.Property("Id") .HasColumnType("uniqueidentifier"); @@ -16315,6 +18094,7 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("datetime2"); b.Property("AsnNumber") + .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)"); @@ -16336,15 +18116,6 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("nvarchar(max)") .HasColumnName("ExtraProperties"); - b.Property("InspectNumber") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("JobNumber") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("JobNumber"); - b.Property("LastModificationTime") .HasColumnType("datetime2") .HasColumnName("LastModificationTime"); @@ -16356,18 +18127,11 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.Property("Number") .IsRequired() .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("Number"); - - b.Property("ProductReceiptNumber") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("PurchaseReceiptRequestNumber") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); b.Property("ReceiptNumber") + .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)"); @@ -16376,11 +18140,8 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("nvarchar(3072)") .HasColumnName("Remark"); - b.Property("RpNumber") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - b.Property("SupplierCode") + .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)"); @@ -16388,30 +18149,37 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("TenantId"); - b.Property("Type") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - b.Property("Worker") .HasColumnType("nvarchar(max)"); b.HasKey("Id"); - b.HasIndex("Number") + b.HasIndex("SupplierCode"); + + b.HasIndex("AsnNumber", "Number", "SupplierCode", "ReceiptNumber") .IsUnique(); - b.ToTable("Store_PutawayNote", (string)null); + b.ToTable("Store_ReceiptAbnormalNote", (string)null); }); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.PutawayNoteDetail", b => + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ReceiptAbnormalNoteDetail", b => { b.Property("Id") .HasColumnType("uniqueidentifier"); + b.Property("AbnormalType") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + b.Property("ArriveDate") .HasColumnType("datetime2"); + b.Property("ContainerCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ContainerCode"); + b.Property("CreationTime") .HasColumnType("datetime2") .HasColumnName("CreationTime"); @@ -16423,130 +18191,162 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.Property("ExpireDate") .HasColumnType("datetime2"); - b.Property("FromContainerCode") - .HasColumnType("nvarchar(max)"); - - b.Property("FromLocationArea") + b.Property("ItemCode") + .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("FromLocationArea"); + .HasColumnName("ItemCode"); - b.Property("FromLocationCode") - .IsRequired() + b.Property("ItemDesc1") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("FromLocationCode"); + .HasColumnName("ItemDesc1"); - b.Property("FromLocationErpCode") - .IsRequired() + b.Property("ItemDesc2") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("FromLocationErpCode"); + .HasColumnName("ItemDesc2"); - b.Property("FromLocationGroup") + b.Property("ItemName") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("FromLocationGroup"); + .HasColumnName("ItemName"); - b.Property("FromLot") - .HasColumnType("nvarchar(max)"); + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); - b.Property("FromPackingCode") - .HasColumnType("nvarchar(450)"); + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); - b.Property("FromStatus") + b.Property("LocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationArea"); + + b.Property("LocationCode") .IsRequired() .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationCode"); - b.Property("FromWarehouseCode") + b.Property("LocationErpCode") .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("FromWarehouseCode"); + .HasColumnName("LocationErpCode"); - b.Property("HandledArriveDate") - .HasColumnType("datetime2"); + b.Property("LocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationGroup"); - b.Property("HandledContainerCode") + b.Property("Lot") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("HandledContainerCode"); + .HasColumnName("Lot"); - b.Property("HandledExpireDate") - .HasColumnType("datetime2"); + b.Property("MasterID") + .HasColumnType("uniqueidentifier"); - b.Property("HandledLot") + b.Property("Number") + .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("HandledLot"); + .HasColumnName("Number"); - b.Property("HandledPackingCode") + b.Property("PackingCode") + .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("HandledPackingCode"); + .HasColumnName("PackingCode"); - b.Property("HandledProduceDate") + b.Property("Photos") + .HasColumnType("nvarchar(max)"); + + b.Property("ProduceDate") .HasColumnType("datetime2"); - b.Property("HandledQty") - .HasColumnType("decimal(18,6)"); + b.Property("Qty") + .HasPrecision(18, 6) + .HasColumnType("decimal(18,6)") + .HasColumnName("Qty"); - b.Property("HandledSupplierBatch") + b.Property("ReceiptNumber") + .IsRequired() .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("HandledSupplierBatch"); + .HasColumnType("nvarchar(64)"); - b.Property("HandledToLocationArea") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("HandledToLocationArea"); + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); - b.Property("HandledToLocationCode") + b.Property("Status") + .IsRequired() .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("HandledToLocationCode"); + .HasColumnType("nvarchar(64)"); - b.Property("HandledToLocationErpCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("HandledToLocationErpCode"); + b.Property("StdPackQty") + .HasColumnType("decimal(18,6)"); - b.Property("HandledToLocationGroup") + b.Property("SupplierBatch") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("HandledToLocationGroup"); + .HasColumnName("SupplierBatch"); - b.Property("HandledToWarehouseCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("HandledToWarehouseCode"); + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); - b.Property("ItemCode") + b.Property("Uom") .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("ItemCode"); + .HasColumnName("Uom"); - b.Property("ItemDesc1") + b.Property("WarehouseCode") + .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("ItemDesc1"); + .HasColumnName("WarehouseCode"); - b.Property("ItemDesc2") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ItemDesc2"); + b.HasKey("Id"); - b.Property("ItemName") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ItemName"); + b.HasIndex("MasterID"); - b.Property("JobNumber") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("JobNumber"); + b.HasIndex("Number", "PackingCode", "ReceiptNumber") + .IsUnique(); + + b.ToTable("Store_ReceiptAbnormalNoteDetail", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.RecycledMaterialReceiptNote", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ActiveDate") + .HasColumnType("datetime2"); + + 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") @@ -16556,148 +18356,159 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("LastModifierId"); - b.Property("MasterID") - .HasColumnType("uniqueidentifier"); - b.Property("Number") .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)") .HasColumnName("Number"); - b.Property("PoLine") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("PoLine"); + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); - b.Property("PoNumber") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("PoNumber"); + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); - b.Property("ProduceDate") - .HasColumnType("datetime2"); + b.Property("Worker") + .HasColumnType("nvarchar(max)"); - b.Property("Qty") - .HasPrecision(18, 6) - .HasColumnType("decimal(18,6)") - .HasColumnName("Qty"); + b.HasKey("Id"); - b.Property("RecommendArriveDate") + b.HasIndex("Number") + .IsUnique(); + + b.ToTable("Store_RecycledMaterialReceiptNote", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.RecycledMaterialReceiptNoteDetail", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ArriveDate") .HasColumnType("datetime2"); - b.Property("RecommendContainerCode") + b.Property("ContainerCode") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendContainerCode"); + .HasColumnName("ContainerCode"); - b.Property("RecommendExpireDate") + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("ExpireDate") .HasColumnType("datetime2"); - b.Property("RecommendLot") + b.Property("ItemCode") + .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendLot"); + .HasColumnName("ItemCode"); - b.Property("RecommendPackingCode") + b.Property("ItemDesc1") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendPackingCode"); - - b.Property("RecommendProduceDate") - .HasColumnType("datetime2"); - - b.Property("RecommendQty") - .HasColumnType("decimal(18,6)"); + .HasColumnName("ItemDesc1"); - b.Property("RecommendSupplierBatch") + b.Property("ItemDesc2") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendSupplierBatch"); + .HasColumnName("ItemDesc2"); - b.Property("RecommendToLocationArea") + b.Property("ItemName") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendToLocationArea"); + .HasColumnName("ItemName"); - b.Property("RecommendToLocationCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendToLocationCode"); + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); - b.Property("RecommendToLocationErpCode") + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("LocationArea") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendToLocationErpCode"); + .HasColumnName("LocationArea"); - b.Property("RecommendToLocationGroup") + b.Property("LocationCode") + .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendToLocationGroup"); + .HasColumnName("LocationCode"); - b.Property("RecommendToWarehouseCode") + b.Property("LocationErpCode") + .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendToWarehouseCode"); - - b.Property("Remark") - .HasMaxLength(3072) - .HasColumnType("nvarchar(3072)") - .HasColumnName("Remark"); - - b.Property("StdPackQty") - .HasColumnType("decimal(18,6)"); + .HasColumnName("LocationErpCode"); - b.Property("SupplierBatch") + b.Property("LocationGroup") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("SupplierBatch"); - - b.Property("TenantId") - .HasColumnType("uniqueidentifier") - .HasColumnName("TenantId"); - - b.Property("ToContainerCode") - .HasColumnType("nvarchar(max)"); + .HasColumnName("LocationGroup"); - b.Property("ToLocationArea") + b.Property("Lot") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("ToLocationArea"); + .HasColumnName("Lot"); - b.Property("ToLocationCode") + b.Property("MasterID") + .HasColumnType("uniqueidentifier"); + + b.Property("Number") .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("ToLocationCode"); + .HasColumnName("Number"); - b.Property("ToLocationErpCode") + b.Property("PackingCode") .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("ToLocationErpCode"); + .HasColumnName("PackingCode"); - b.Property("ToLocationGroup") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ToLocationGroup"); + b.Property("ProduceDate") + .HasColumnType("datetime2"); - b.Property("ToLot") + b.Property("Qty") + .HasPrecision(18, 6) + .HasColumnType("decimal(18,6)") + .HasColumnName("Qty"); + + b.Property("ReasonCode") .HasColumnType("nvarchar(max)"); - b.Property("ToPackingCode") - .HasColumnType("nvarchar(450)"); + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); - b.Property("ToStatus") + b.Property("Status") .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)"); - b.Property("ToWarehouseCode") - .IsRequired() + b.Property("StdPackQty") + .HasColumnType("decimal(18,6)"); + + b.Property("SupplierBatch") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("ToWarehouseCode"); + .HasColumnName("SupplierBatch"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); b.Property("Uom") .IsRequired() @@ -16705,18 +18516,23 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("nvarchar(64)") .HasColumnName("Uom"); + b.Property("WarehouseCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("WarehouseCode"); + b.HasKey("Id"); b.HasIndex("MasterID"); - b.HasIndex("Number", "FromPackingCode", "FromLocationCode", "ToLocationCode", "ToPackingCode") - .IsUnique() - .HasFilter("[FromPackingCode] IS NOT NULL AND [ToPackingCode] IS NOT NULL"); + b.HasIndex("Number", "PackingCode") + .IsUnique(); - b.ToTable("Store_PutawayNoteDetail", (string)null); + b.ToTable("Store_RecycledMaterialReceiptNoteDetail", (string)null); }); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.PutawayRequest", b => + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.SaleOrder", b => { b.Property("Id") .HasColumnType("uniqueidentifier"); @@ -16724,27 +18540,24 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.Property("ActiveDate") .HasColumnType("datetime2"); - b.Property("AsnNumber") - .HasColumnType("nvarchar(max)"); - - b.Property("AutoAgree") - .HasColumnType("bit"); - - b.Property("AutoCompleteJob") - .HasColumnType("bit"); - - b.Property("AutoHandle") - .HasColumnType("bit"); - - b.Property("AutoSubmit") - .HasColumnType("bit"); - b.Property("ConcurrencyStamp") .IsConcurrencyToken() .HasMaxLength(40) .HasColumnType("nvarchar(40)") .HasColumnName("ConcurrencyStamp"); + b.Property("ContactEmail") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ContactName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ContactPhone") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + b.Property("CreationTime") .HasColumnType("datetime2") .HasColumnName("CreationTime"); @@ -16753,16 +18566,17 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("CreatorId"); - b.Property("DirectCreateNote") - .HasColumnType("bit"); + b.Property("CustomerCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("DueDate") + .HasColumnType("datetime2"); b.Property("ExtraProperties") .HasColumnType("nvarchar(max)") .HasColumnName("ExtraProperties"); - b.Property("InspectNumber") - .HasColumnType("nvarchar(max)"); - b.Property("LastModificationTime") .HasColumnType("datetime2") .HasColumnName("LastModificationTime"); @@ -16777,48 +18591,33 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("nvarchar(64)") .HasColumnName("Number"); - b.Property("PoNumber") - .HasColumnType("nvarchar(max)"); - - b.Property("ProductReceiptNumber") - .HasColumnType("nvarchar(max)"); - - b.Property("PurchaseReceiptRequestNumber") - .HasColumnType("nvarchar(max)"); - - b.Property("PutawayMode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("ReceiptNumber") - .HasColumnType("nvarchar(max)"); + b.Property("OrderDate") + .HasColumnType("datetime2"); b.Property("Remark") .HasMaxLength(3072) .HasColumnType("nvarchar(3072)") .HasColumnName("Remark"); - b.Property("RequestNumber") - .HasColumnType("nvarchar(max)"); - - b.Property("RequestStatus") + b.Property("SoStatus") .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)"); - b.Property("RpNumber") - .HasColumnType("nvarchar(max)"); + b.Property("SoType") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); - b.Property("SupplierCode") - .HasColumnType("nvarchar(max)"); + b.Property("TaxRate") + .ValueGeneratedOnAdd() + .HasColumnType("decimal(18,6)") + .HasDefaultValue(0m); b.Property("TenantId") .HasColumnType("uniqueidentifier") .HasColumnName("TenantId"); - b.Property("Type") - .IsRequired() + b.Property("Version") .HasMaxLength(64) .HasColumnType("nvarchar(64)"); @@ -16827,76 +18626,38 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.HasKey("Id"); + b.HasIndex("CustomerCode"); + b.HasIndex("Number") .IsUnique(); - b.ToTable("Store_PutawayRequest", (string)null); + b.ToTable("Store_SaleOrder", (string)null); }); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.PutawayRequestDetail", b => + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.SaleOrderDetail", b => { b.Property("Id") .HasColumnType("uniqueidentifier"); - b.Property("ArriveDate") - .HasColumnType("datetime2"); - - b.Property("CreationTime") - .HasColumnType("datetime2") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("uniqueidentifier") - .HasColumnName("CreatorId"); - - b.Property("ExpireDate") - .HasColumnType("datetime2"); - - b.Property("FromContainerCode") - .HasColumnType("nvarchar(max)"); - - b.Property("FromLocationArea") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("FromLocationArea"); - - b.Property("FromLocationCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("FromLocationCode"); - - b.Property("FromLocationErpCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("FromLocationErpCode"); - - b.Property("FromLocationGroup") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("FromLocationGroup"); - - b.Property("FromLot") - .HasColumnType("nvarchar(max)"); - - b.Property("FromPackingCode") - .HasColumnType("nvarchar(max)"); + b.Property("ConvertRate") + .ValueGeneratedOnAdd() + .HasColumnType("decimal(18,6)") + .HasDefaultValue(1m); - b.Property("FromStatus") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); - b.Property("FromWarehouseCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("FromWarehouseCode"); + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); - b.Property("InventoryQty") + b.Property("CustomerPackQty") .HasColumnType("decimal(18,6)"); + b.Property("CustomerPackUom") + .HasColumnType("nvarchar(max)"); + b.Property("ItemCode") .IsRequired() .HasMaxLength(64) @@ -16926,6 +18687,11 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("LastModifierId"); + b.Property("LineStatus") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + b.Property("MasterID") .HasColumnType("uniqueidentifier"); @@ -16935,19 +18701,6 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("nvarchar(64)") .HasColumnName("Number"); - b.Property("PoLine") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("PoLine"); - - b.Property("PoNumber") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("PoNumber"); - - b.Property("ProduceDate") - .HasColumnType("datetime2"); - b.Property("Qty") .HasPrecision(18, 6) .HasColumnType("decimal(18,6)") @@ -16958,60 +18711,18 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("nvarchar(3072)") .HasColumnName("Remark"); + b.Property("SoLine") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + b.Property("StdPackQty") .HasColumnType("decimal(18,6)"); - b.Property("SupplierBatch") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("SupplierBatch"); - b.Property("TenantId") .HasColumnType("uniqueidentifier") .HasColumnName("TenantId"); - b.Property("ToContainerCode") - .HasColumnType("nvarchar(max)"); - - b.Property("ToLocationArea") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ToLocationArea"); - - b.Property("ToLocationCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ToLocationCode"); - - b.Property("ToLocationErpCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ToLocationErpCode"); - - b.Property("ToLocationGroup") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ToLocationGroup"); - - b.Property("ToLot") - .HasColumnType("nvarchar(max)"); - - b.Property("ToPackingCode") - .HasColumnType("nvarchar(max)"); - - b.Property("ToStatus") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("ToWarehouseCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ToWarehouseCode"); - b.Property("Uom") .IsRequired() .HasMaxLength(64) @@ -17022,10 +18733,13 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.HasIndex("MasterID"); - b.ToTable("Store_PutawayRequestDetail", (string)null); + b.HasIndex("Number", "SoLine", "ItemCode") + .IsUnique(); + + b.ToTable("Store_SaleOrderDetail", (string)null); }); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ReceiptAbnormalNote", b => + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ScrapNote", b => { b.Property("Id") .HasColumnType("uniqueidentifier"); @@ -17033,11 +18747,6 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.Property("ActiveDate") .HasColumnType("datetime2"); - b.Property("AsnNumber") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - b.Property("ConcurrencyStamp") .IsConcurrencyToken() .HasMaxLength(40) @@ -17056,6 +18765,11 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("nvarchar(max)") .HasColumnName("ExtraProperties"); + b.Property("JobNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("JobNumber"); + b.Property("LastModificationTime") .HasColumnType("datetime2") .HasColumnName("LastModificationTime"); @@ -17070,18 +18784,12 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("nvarchar(64)") .HasColumnName("Number"); - b.Property("ReceiptNumber") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - b.Property("Remark") .HasMaxLength(3072) .HasColumnType("nvarchar(3072)") .HasColumnName("Remark"); - b.Property("SupplierCode") - .IsRequired() + b.Property("ScrapRequestNumber") .HasMaxLength(64) .HasColumnType("nvarchar(64)"); @@ -17089,37 +18797,29 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("TenantId"); + b.Property("Type") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + b.Property("Worker") .HasColumnType("nvarchar(max)"); b.HasKey("Id"); - b.HasIndex("SupplierCode"); - - b.HasIndex("AsnNumber", "Number", "SupplierCode", "ReceiptNumber") + b.HasIndex("Number") .IsUnique(); - b.ToTable("Store_ReceiptAbnormalNote", (string)null); + b.ToTable("Store_ScrapNote", (string)null); }); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ReceiptAbnormalNoteDetail", b => + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ScrapNoteDetail", b => { b.Property("Id") .HasColumnType("uniqueidentifier"); - b.Property("AbnormalType") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - b.Property("ArriveDate") .HasColumnType("datetime2"); - b.Property("ContainerCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ContainerCode"); - b.Property("CreationTime") .HasColumnType("datetime2") .HasColumnName("CreationTime"); @@ -17131,61 +18831,77 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.Property("ExpireDate") .HasColumnType("datetime2"); - b.Property("ItemCode") - .IsRequired() + b.Property("FromContainerCode") + .HasColumnType("nvarchar(max)"); + + b.Property("FromLocationArea") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("ItemCode"); + .HasColumnName("FromLocationArea"); - b.Property("ItemDesc1") + b.Property("FromLocationCode") + .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("ItemDesc1"); + .HasColumnName("FromLocationCode"); - b.Property("ItemDesc2") + b.Property("FromLocationErpCode") + .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("ItemDesc2"); + .HasColumnName("FromLocationErpCode"); - b.Property("ItemName") + b.Property("FromLocationGroup") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("ItemName"); + .HasColumnName("FromLocationGroup"); - b.Property("LastModificationTime") - .HasColumnType("datetime2") - .HasColumnName("LastModificationTime"); + b.Property("FromLot") + .HasColumnType("nvarchar(450)"); - b.Property("LastModifierId") - .HasColumnType("uniqueidentifier") - .HasColumnName("LastModifierId"); + b.Property("FromPackingCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); - b.Property("LocationArea") + b.Property("FromStatus") + .IsRequired() .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("LocationArea"); + .HasColumnType("nvarchar(64)"); - b.Property("LocationCode") + b.Property("FromWarehouseCode") .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("LocationCode"); + .HasColumnName("FromWarehouseCode"); - b.Property("LocationErpCode") + b.Property("ItemCode") .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("LocationErpCode"); + .HasColumnName("ItemCode"); - b.Property("LocationGroup") + b.Property("ItemDesc1") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("LocationGroup"); + .HasColumnName("ItemDesc1"); - b.Property("Lot") + b.Property("ItemDesc2") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("Lot"); + .HasColumnName("ItemDesc2"); + + b.Property("ItemName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemName"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); b.Property("MasterID") .HasColumnType("uniqueidentifier"); @@ -17196,15 +18912,6 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("nvarchar(64)") .HasColumnName("Number"); - b.Property("PackingCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("PackingCode"); - - b.Property("Photos") - .HasColumnType("nvarchar(max)"); - b.Property("ProduceDate") .HasColumnType("datetime2"); @@ -17213,8 +18920,7 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("decimal(18,6)") .HasColumnName("Qty"); - b.Property("ReceiptNumber") - .IsRequired() + b.Property("ReasonCode") .HasMaxLength(64) .HasColumnType("nvarchar(64)"); @@ -17223,11 +18929,6 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("nvarchar(3072)") .HasColumnName("Remark"); - b.Property("Status") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - b.Property("StdPackQty") .HasColumnType("decimal(18,6)"); @@ -17240,29 +18941,66 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("TenantId"); - b.Property("Uom") + b.Property("ToContainerCode") + .HasColumnType("nvarchar(max)"); + + b.Property("ToLocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToLocationArea"); + + b.Property("ToLocationCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToLocationCode"); + + b.Property("ToLocationErpCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToLocationErpCode"); + + b.Property("ToLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToLocationGroup"); + + b.Property("ToLot") + .HasColumnType("nvarchar(max)"); + + b.Property("ToPackingCode") + .HasColumnType("nvarchar(max)"); + + b.Property("ToStatus") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ToWarehouseCode") .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("Uom"); + .HasColumnName("ToWarehouseCode"); - b.Property("WarehouseCode") + b.Property("Uom") .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("WarehouseCode"); + .HasColumnName("Uom"); b.HasKey("Id"); b.HasIndex("MasterID"); - b.HasIndex("Number", "PackingCode", "ReceiptNumber") - .IsUnique(); + b.HasIndex("Number", "ItemCode", "FromPackingCode", "FromLocationCode", "ToLocationCode", "FromLot", "FromStatus") + .IsUnique() + .HasFilter("[FromPackingCode] IS NOT NULL AND [FromLot] IS NOT NULL"); - b.ToTable("Store_ReceiptAbnormalNoteDetail", (string)null); + b.ToTable("Store_ScrapNoteDetail", (string)null); }); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.RecycledMaterialReceiptNote", b => + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ScrapRequest", b => { b.Property("Id") .HasColumnType("uniqueidentifier"); @@ -17270,6 +19008,18 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.Property("ActiveDate") .HasColumnType("datetime2"); + b.Property("AutoAgree") + .HasColumnType("bit"); + + b.Property("AutoCompleteJob") + .HasColumnType("bit"); + + b.Property("AutoHandle") + .HasColumnType("bit"); + + b.Property("AutoSubmit") + .HasColumnType("bit"); + b.Property("ConcurrencyStamp") .IsConcurrencyToken() .HasMaxLength(40) @@ -17284,6 +19034,9 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("CreatorId"); + b.Property("DirectCreateNote") + .HasColumnType("bit"); + b.Property("ExtraProperties") .HasColumnType("nvarchar(max)") .HasColumnName("ExtraProperties"); @@ -17307,10 +19060,19 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("nvarchar(3072)") .HasColumnName("Remark"); + b.Property("RequestStatus") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + b.Property("TenantId") .HasColumnType("uniqueidentifier") .HasColumnName("TenantId"); + b.Property("Type") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + b.Property("Worker") .HasColumnType("nvarchar(max)"); @@ -17319,22 +19081,14 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.HasIndex("Number") .IsUnique(); - b.ToTable("Store_RecycledMaterialReceiptNote", (string)null); + b.ToTable("Store_ScrapRequest", (string)null); }); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.RecycledMaterialReceiptNoteDetail", b => + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ScrapRequestDetail", b => { b.Property("Id") .HasColumnType("uniqueidentifier"); - b.Property("ArriveDate") - .HasColumnType("datetime2"); - - b.Property("ContainerCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ContainerCode"); - b.Property("CreationTime") .HasColumnType("datetime2") .HasColumnName("CreationTime"); @@ -17343,9 +19097,6 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("CreatorId"); - b.Property("ExpireDate") - .HasColumnType("datetime2"); - b.Property("ItemCode") .IsRequired() .HasMaxLength(64) @@ -17397,11 +19148,6 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("nvarchar(64)") .HasColumnName("LocationGroup"); - b.Property("Lot") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("Lot"); - b.Property("MasterID") .HasColumnType("uniqueidentifier"); @@ -17411,41 +19157,23 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("nvarchar(64)") .HasColumnName("Number"); - b.Property("PackingCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("PackingCode"); - - b.Property("ProduceDate") - .HasColumnType("datetime2"); - b.Property("Qty") .HasPrecision(18, 6) .HasColumnType("decimal(18,6)") .HasColumnName("Qty"); b.Property("ReasonCode") - .HasColumnType("nvarchar(max)"); + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); b.Property("Remark") .HasMaxLength(3072) .HasColumnType("nvarchar(3072)") .HasColumnName("Remark"); - b.Property("Status") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - b.Property("StdPackQty") .HasColumnType("decimal(18,6)"); - b.Property("SupplierBatch") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("SupplierBatch"); - b.Property("TenantId") .HasColumnType("uniqueidentifier") .HasColumnName("TenantId"); @@ -17466,13 +19194,13 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.HasIndex("MasterID"); - b.HasIndex("Number", "PackingCode") + b.HasIndex("Number", "ItemCode", "LocationCode") .IsUnique(); - b.ToTable("Store_RecycledMaterialReceiptNoteDetail", (string)null); + b.ToTable("Store_ScrapRequestDetail", (string)null); }); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.SaleOrder", b => + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.SupplierAsn", b => { b.Property("Id") .HasColumnType("uniqueidentifier"); @@ -17498,6 +19226,11 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasMaxLength(64) .HasColumnType("nvarchar(64)"); + b.Property("CreateType") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + b.Property("CreationTime") .HasColumnType("datetime2") .HasColumnName("CreationTime"); @@ -17506,7 +19239,11 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("CreatorId"); - b.Property("CustomerCode") + b.Property("Ctype") + .HasColumnType("nvarchar(max)"); + + b.Property("DockCode") + .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)"); @@ -17531,33 +19268,54 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("nvarchar(64)") .HasColumnName("Number"); - b.Property("OrderDate") + b.Property("PlanArriveDate") .HasColumnType("datetime2"); + b.Property("PlanUserCode") + .HasColumnType("nvarchar(max)"); + + b.Property("PoNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + b.Property("Remark") .HasMaxLength(3072) .HasColumnType("nvarchar(3072)") .HasColumnName("Remark"); - b.Property("SoStatus") + b.Property("RpNumber") .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)"); - b.Property("SoType") + b.Property("ShipDate") + .HasColumnType("datetime2"); + + b.Property("Status") + .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)"); - b.Property("TaxRate") - .ValueGeneratedOnAdd() - .HasColumnType("decimal(18,6)") - .HasDefaultValue(0m); + b.Property("SupplierAddress") + .HasColumnType("nvarchar(max)"); + + b.Property("SupplierCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("SupplierName") + .HasColumnType("nvarchar(max)"); b.Property("TenantId") .HasColumnType("uniqueidentifier") .HasColumnName("TenantId"); - b.Property("Version") + b.Property("TimeWindow") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("TruckNumber") .HasMaxLength(64) .HasColumnType("nvarchar(64)"); @@ -17566,23 +19324,29 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.HasKey("Id"); - b.HasIndex("CustomerCode"); - b.HasIndex("Number") .IsUnique(); - b.ToTable("Store_SaleOrder", (string)null); + b.HasIndex("SupplierCode"); + + b.ToTable("Store_SupplierAsn", (string)null); }); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.SaleOrderDetail", b => + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.SupplierAsnDetail", b => { b.Property("Id") .HasColumnType("uniqueidentifier"); + b.Property("ArriveDate") + .HasColumnType("datetime2"); + + b.Property("ContainerCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ContainerCode"); + b.Property("ConvertRate") - .ValueGeneratedOnAdd() - .HasColumnType("decimal(18,6)") - .HasDefaultValue(1m); + .HasColumnType("decimal(18,6)"); b.Property("CreationTime") .HasColumnType("datetime2") @@ -17592,12 +19356,12 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("CreatorId"); - b.Property("CustomerPackQty") - .HasColumnType("decimal(18,6)"); - - b.Property("CustomerPackUom") + b.Property("Ctype") .HasColumnType("nvarchar(max)"); + b.Property("ExpireDate") + .HasColumnType("datetime2"); + b.Property("ItemCode") .IsRequired() .HasMaxLength(64) @@ -17627,10 +19391,10 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("LastModifierId"); - b.Property("LineStatus") - .IsRequired() + b.Property("Lot") .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + .HasColumnType("nvarchar(64)") + .HasColumnName("Lot"); b.Property("MasterID") .HasColumnType("uniqueidentifier"); @@ -17641,24 +19405,58 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("nvarchar(64)") .HasColumnName("Number"); + b.Property("PackingCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("PackingCode"); + + b.Property("PlanUserCode") + .HasColumnType("nvarchar(max)"); + + b.Property("PoLine") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("PoLine"); + + b.Property("PoNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("PoNumber"); + + b.Property("ProduceDate") + .HasColumnType("datetime2"); + + b.Property("ProjectCode") + .HasColumnType("nvarchar(max)"); + b.Property("Qty") .HasPrecision(18, 6) .HasColumnType("decimal(18,6)") .HasColumnName("Qty"); + b.Property("RecommendErpCode") + .HasColumnType("nvarchar(max)"); + b.Property("Remark") .HasMaxLength(3072) .HasColumnType("nvarchar(3072)") .HasColumnName("Remark"); - b.Property("SoLine") - .IsRequired() + b.Property("StdPackQty") + .HasColumnType("decimal(18,6)"); + + b.Property("SupplierBatch") .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + .HasColumnType("nvarchar(64)") + .HasColumnName("SupplierBatch"); - b.Property("StdPackQty") + b.Property("SupplierPackQty") .HasColumnType("decimal(18,6)"); + b.Property("SupplierPackUom") + .HasColumnType("nvarchar(max)"); + b.Property("TenantId") .HasColumnType("uniqueidentifier") .HasColumnName("TenantId"); @@ -17673,26 +19471,49 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.HasIndex("MasterID"); - b.HasIndex("Number", "SoLine", "ItemCode") + b.HasIndex("Number", "ItemCode", "PackingCode") .IsUnique(); - b.ToTable("Store_SaleOrderDetail", (string)null); + b.ToTable("Store_SupplierAsnDetail", (string)null); }); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ScrapNote", b => + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.TransferLibJob", b => { b.Property("Id") .HasColumnType("uniqueidentifier"); - b.Property("ActiveDate") + b.Property("AcceptTime") + .HasColumnType("datetime2"); + + b.Property("AcceptUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("AcceptUserName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("CompleteTime") .HasColumnType("datetime2"); + b.Property("CompleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CompleteUserName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + b.Property("ConcurrencyStamp") .IsConcurrencyToken() .HasMaxLength(40) .HasColumnType("nvarchar(40)") .HasColumnName("ConcurrencyStamp"); + b.Property("ConfirmTime") + .HasColumnType("datetime2"); + + b.Property("Confirmed") + .HasColumnType("bit"); + b.Property("CreationTime") .HasColumnType("datetime2") .HasColumnName("CreationTime"); @@ -17705,10 +19526,27 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("nvarchar(max)") .HasColumnName("ExtraProperties"); + b.Property("IsAutoComplete") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false); + + b.Property("JobDescription") + .HasMaxLength(1024) + .HasColumnType("nvarchar(1024)"); + b.Property("JobNumber") + .HasColumnType("nvarchar(max)"); + + b.Property("JobStatus") + .IsRequired() .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("JobNumber"); + .HasColumnType("nvarchar(64)"); + + b.Property("JobType") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); b.Property("LastModificationTime") .HasColumnType("datetime2") @@ -17721,23 +19559,45 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.Property("Number") .IsRequired() .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("Number"); + .HasColumnType("nvarchar(64)"); + + b.Property("Priority") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasDefaultValue(0); + + b.Property("PriorityIncrement") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasDefaultValue(0); b.Property("Remark") .HasMaxLength(3072) .HasColumnType("nvarchar(3072)") .HasColumnName("Remark"); - b.Property("ScrapRequestNumber") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + b.Property("RequestNumber") + .HasColumnType("nvarchar(max)"); b.Property("TenantId") .HasColumnType("uniqueidentifier") .HasColumnName("TenantId"); b.Property("Type") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("UpStreamJobNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("UseOnTheWayLocation") + .HasColumnType("bit"); + + b.Property("WarehouseCode") + .HasColumnType("nvarchar(max)"); + + b.Property("WorkGroupCode") .HasMaxLength(64) .HasColumnType("nvarchar(64)"); @@ -17749,10 +19609,10 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.HasIndex("Number") .IsUnique(); - b.ToTable("Store_ScrapNote", (string)null); + b.ToTable("Job_TransferLibJob", (string)null); }); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ScrapNoteDetail", b => + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.TransferLibJobDetail", b => { b.Property("Id") .HasColumnType("uniqueidentifier"); @@ -17797,16 +19657,13 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnName("FromLocationGroup"); b.Property("FromLot") - .HasColumnType("nvarchar(450)"); + .HasColumnType("nvarchar(max)"); b.Property("FromPackingCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + .HasColumnType("nvarchar(max)"); - b.Property("FromStatus") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + b.Property("FromStatus") + .HasColumnType("int"); b.Property("FromWarehouseCode") .IsRequired() @@ -17835,6 +19692,9 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("nvarchar(64)") .HasColumnName("ItemName"); + b.Property("JobStatus") + .HasColumnType("int"); + b.Property("LastModificationTime") .HasColumnType("datetime2") .HasColumnName("LastModificationTime"); @@ -17847,10 +19707,10 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier"); b.Property("Number") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("Number"); + .HasColumnType("nvarchar(max)"); + + b.Property("OnTheWayLocationCode") + .HasColumnType("nvarchar(max)"); b.Property("ProduceDate") .HasColumnType("datetime2"); @@ -17860,9 +19720,8 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("decimal(18,6)") .HasColumnName("Qty"); - b.Property("ReasonCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + b.Property("Reason") + .HasColumnType("nvarchar(max)"); b.Property("Remark") .HasMaxLength(3072) @@ -17912,10 +19771,8 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.Property("ToPackingCode") .HasColumnType("nvarchar(max)"); - b.Property("ToStatus") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + b.Property("ToStatus") + .HasColumnType("int"); b.Property("ToWarehouseCode") .IsRequired() @@ -17933,14 +19790,10 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.HasIndex("MasterID"); - b.HasIndex("Number", "ItemCode", "FromPackingCode", "FromLocationCode", "ToLocationCode", "FromLot", "FromStatus") - .IsUnique() - .HasFilter("[FromPackingCode] IS NOT NULL AND [FromLot] IS NOT NULL"); - - b.ToTable("Store_ScrapNoteDetail", (string)null); + b.ToTable("Job_TransferLibJobDetail", (string)null); }); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ScrapRequest", b => + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.TransferLibNote", b => { b.Property("Id") .HasColumnType("uniqueidentifier"); @@ -17948,24 +19801,18 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.Property("ActiveDate") .HasColumnType("datetime2"); - b.Property("AutoAgree") - .HasColumnType("bit"); - - b.Property("AutoCompleteJob") - .HasColumnType("bit"); - - b.Property("AutoHandle") - .HasColumnType("bit"); - - b.Property("AutoSubmit") - .HasColumnType("bit"); - b.Property("ConcurrencyStamp") .IsConcurrencyToken() .HasMaxLength(40) .HasColumnType("nvarchar(40)") .HasColumnName("ConcurrencyStamp"); + b.Property("ConfirmTime") + .HasColumnType("datetime2"); + + b.Property("Confirmed") + .HasColumnType("bit"); + b.Property("CreationTime") .HasColumnType("datetime2") .HasColumnName("CreationTime"); @@ -17974,13 +19821,15 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("CreatorId"); - b.Property("DirectCreateNote") - .HasColumnType("bit"); - b.Property("ExtraProperties") .HasColumnType("nvarchar(max)") .HasColumnName("ExtraProperties"); + b.Property("JobNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("JobNumber"); + b.Property("LastModificationTime") .HasColumnType("datetime2") .HasColumnName("LastModificationTime"); @@ -18000,19 +19849,21 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("nvarchar(3072)") .HasColumnName("Remark"); - b.Property("RequestStatus") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + b.Property("RequestNumber") + .HasColumnType("nvarchar(max)"); b.Property("TenantId") .HasColumnType("uniqueidentifier") .HasColumnName("TenantId"); b.Property("Type") + .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)"); + b.Property("UseOnTheWayLocation") + .HasColumnType("bit"); + b.Property("Worker") .HasColumnType("nvarchar(max)"); @@ -18021,14 +19872,17 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.HasIndex("Number") .IsUnique(); - b.ToTable("Store_ScrapRequest", (string)null); + b.ToTable("Store_TransferLibNote", (string)null); }); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ScrapRequestDetail", b => + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.TransferLibNoteDetail", b => { b.Property("Id") .HasColumnType("uniqueidentifier"); + b.Property("ArriveDate") + .HasColumnType("datetime2"); + b.Property("CreationTime") .HasColumnType("datetime2") .HasColumnName("CreationTime"); @@ -18037,6 +19891,51 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("CreatorId"); + b.Property("ExpireDate") + .HasColumnType("datetime2"); + + b.Property("FromContainerCode") + .HasColumnType("nvarchar(max)"); + + b.Property("FromLocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromLocationArea"); + + b.Property("FromLocationCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromLocationCode"); + + b.Property("FromLocationErpCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromLocationErpCode"); + + b.Property("FromLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromLocationGroup"); + + b.Property("FromLot") + .HasColumnType("nvarchar(max)"); + + b.Property("FromPackingCode") + .HasColumnType("nvarchar(450)"); + + b.Property("FromStatus") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("FromWarehouseCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromWarehouseCode"); + b.Property("ItemCode") .IsRequired() .HasMaxLength(64) @@ -18058,6 +19957,9 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("nvarchar(64)") .HasColumnName("ItemName"); + b.Property("JobStatus") + .HasColumnType("int"); + b.Property("LastModificationTime") .HasColumnType("datetime2") .HasColumnName("LastModificationTime"); @@ -18066,28 +19968,6 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("LastModifierId"); - b.Property("LocationArea") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("LocationArea"); - - b.Property("LocationCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("LocationCode"); - - b.Property("LocationErpCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("LocationErpCode"); - - b.Property("LocationGroup") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("LocationGroup"); - b.Property("MasterID") .HasColumnType("uniqueidentifier"); @@ -18097,12 +19977,18 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("nvarchar(64)") .HasColumnName("Number"); + b.Property("OnTheWayLocationCode") + .HasColumnType("nvarchar(max)"); + + b.Property("ProduceDate") + .HasColumnType("datetime2"); + b.Property("Qty") .HasPrecision(18, 6) .HasColumnType("decimal(18,6)") .HasColumnName("Qty"); - b.Property("ReasonCode") + b.Property("Reason") .HasMaxLength(64) .HasColumnType("nvarchar(64)"); @@ -18114,33 +20000,75 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.Property("StdPackQty") .HasColumnType("decimal(18,6)"); + b.Property("SupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("SupplierBatch"); + b.Property("TenantId") .HasColumnType("uniqueidentifier") .HasColumnName("TenantId"); - b.Property("Uom") + b.Property("ToContainerCode") + .HasColumnType("nvarchar(max)"); + + b.Property("ToLocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToLocationArea"); + + b.Property("ToLocationCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToLocationCode"); + + b.Property("ToLocationErpCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToLocationErpCode"); + + b.Property("ToLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToLocationGroup"); + + b.Property("ToLot") + .HasColumnType("nvarchar(max)"); + + b.Property("ToPackingCode") + .HasColumnType("nvarchar(max)"); + + b.Property("ToStatus") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ToWarehouseCode") .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("Uom"); + .HasColumnName("ToWarehouseCode"); - b.Property("WarehouseCode") + b.Property("Uom") .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("WarehouseCode"); + .HasColumnName("Uom"); b.HasKey("Id"); b.HasIndex("MasterID"); - b.HasIndex("Number", "ItemCode", "LocationCode") - .IsUnique(); + b.HasIndex("Number", "FromPackingCode", "FromLocationCode", "ToLocationCode", "FromStatus", "ToStatus") + .IsUnique() + .HasFilter("[FromPackingCode] IS NOT NULL"); - b.ToTable("Store_ScrapRequestDetail", (string)null); + b.ToTable("Store_TransferLibNoteDetail", (string)null); }); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.SupplierAsn", b => + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.TransferLibRequest", b => { b.Property("Id") .HasColumnType("uniqueidentifier"); @@ -18148,29 +20076,24 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.Property("ActiveDate") .HasColumnType("datetime2"); + b.Property("AutoAgree") + .HasColumnType("bit"); + + b.Property("AutoCompleteJob") + .HasColumnType("bit"); + + b.Property("AutoHandle") + .HasColumnType("bit"); + + b.Property("AutoSubmit") + .HasColumnType("bit"); + b.Property("ConcurrencyStamp") .IsConcurrencyToken() .HasMaxLength(40) .HasColumnType("nvarchar(40)") .HasColumnName("ConcurrencyStamp"); - b.Property("ContactEmail") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("ContactName") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("ContactPhone") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("CreateType") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - b.Property("CreationTime") .HasColumnType("datetime2") .HasColumnName("CreationTime"); @@ -18179,16 +20102,8 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("CreatorId"); - b.Property("Ctype") - .HasColumnType("nvarchar(max)"); - - b.Property("DockCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("DueDate") - .HasColumnType("datetime2"); + b.Property("DirectCreateNote") + .HasColumnType("bit"); b.Property("ExtraProperties") .HasColumnType("nvarchar(max)") @@ -18208,56 +20123,26 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("nvarchar(64)") .HasColumnName("Number"); - b.Property("PlanArriveDate") - .HasColumnType("datetime2"); - - b.Property("PlanUserCode") - .HasColumnType("nvarchar(max)"); - - b.Property("PoNumber") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - b.Property("Remark") .HasMaxLength(3072) .HasColumnType("nvarchar(3072)") .HasColumnName("Remark"); - b.Property("RpNumber") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("ShipDate") - .HasColumnType("datetime2"); - - b.Property("Status") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("SupplierAddress") - .HasColumnType("nvarchar(max)"); - - b.Property("SupplierCode") + b.Property("RequestStatus") .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)"); - b.Property("SupplierName") - .HasColumnType("nvarchar(max)"); - b.Property("TenantId") .HasColumnType("uniqueidentifier") .HasColumnName("TenantId"); - b.Property("TimeWindow") + b.Property("Type") .HasMaxLength(64) .HasColumnType("nvarchar(64)"); - b.Property("TruckNumber") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + b.Property("UseOnTheWayLocation") + .HasColumnType("bit"); b.Property("Worker") .HasColumnType("nvarchar(max)"); @@ -18267,12 +20152,10 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.HasIndex("Number") .IsUnique(); - b.HasIndex("SupplierCode"); - - b.ToTable("Store_SupplierAsn", (string)null); + b.ToTable("Store_TransferLibRequest", (string)null); }); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.SupplierAsnDetail", b => + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.TransferLibRequestDetail", b => { b.Property("Id") .HasColumnType("uniqueidentifier"); @@ -18280,14 +20163,6 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.Property("ArriveDate") .HasColumnType("datetime2"); - b.Property("ContainerCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ContainerCode"); - - b.Property("ConvertRate") - .HasColumnType("decimal(18,6)"); - b.Property("CreationTime") .HasColumnType("datetime2") .HasColumnName("CreationTime"); @@ -18296,12 +20171,51 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("CreatorId"); - b.Property("Ctype") - .HasColumnType("nvarchar(max)"); - b.Property("ExpireDate") .HasColumnType("datetime2"); + b.Property("FromContainerCode") + .HasColumnType("nvarchar(max)"); + + b.Property("FromLocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromLocationArea"); + + b.Property("FromLocationCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromLocationCode"); + + b.Property("FromLocationErpCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromLocationErpCode"); + + b.Property("FromLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromLocationGroup"); + + b.Property("FromLot") + .HasColumnType("nvarchar(max)"); + + b.Property("FromPackingCode") + .HasColumnType("nvarchar(max)"); + + b.Property("FromStatus") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("FromWarehouseCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromWarehouseCode"); + b.Property("ItemCode") .IsRequired() .HasMaxLength(64) @@ -18323,6 +20237,9 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("nvarchar(64)") .HasColumnName("ItemName"); + b.Property("JobStatus") + .HasColumnType("int"); + b.Property("LastModificationTime") .HasColumnType("datetime2") .HasColumnName("LastModificationTime"); @@ -18331,11 +20248,6 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("LastModifierId"); - b.Property("Lot") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("Lot"); - b.Property("MasterID") .HasColumnType("uniqueidentifier"); @@ -18345,37 +20257,15 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("nvarchar(64)") .HasColumnName("Number"); - b.Property("PackingCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("PackingCode"); - - b.Property("PlanUserCode") - .HasColumnType("nvarchar(max)"); - - b.Property("PoLine") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("PoLine"); - - b.Property("PoNumber") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("PoNumber"); - b.Property("ProduceDate") .HasColumnType("datetime2"); - b.Property("ProjectCode") - .HasColumnType("nvarchar(max)"); - b.Property("Qty") .HasPrecision(18, 6) .HasColumnType("decimal(18,6)") .HasColumnName("Qty"); - b.Property("RecommendErpCode") + b.Property("Reason") .HasColumnType("nvarchar(max)"); b.Property("Remark") @@ -18391,56 +20281,72 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("nvarchar(64)") .HasColumnName("SupplierBatch"); - b.Property("SupplierPackQty") - .HasColumnType("decimal(18,6)"); - - b.Property("SupplierPackUom") - .HasColumnType("nvarchar(max)"); - b.Property("TenantId") .HasColumnType("uniqueidentifier") .HasColumnName("TenantId"); - b.Property("Uom") - .IsRequired() + b.Property("ToContainerCode") + .HasColumnType("nvarchar(max)"); + + b.Property("ToLocationArea") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("Uom"); + .HasColumnName("ToLocationArea"); - b.HasKey("Id"); + b.Property("ToLocationCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToLocationCode"); - b.HasIndex("MasterID"); + b.Property("ToLocationErpCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToLocationErpCode"); - b.HasIndex("Number", "ItemCode", "PackingCode") - .IsUnique(); + b.Property("ToLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToLocationGroup"); - b.ToTable("Store_SupplierAsnDetail", (string)null); - }); + b.Property("ToLot") + .HasColumnType("nvarchar(max)"); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.TransferLibJob", b => - { - b.Property("Id") - .HasColumnType("uniqueidentifier"); + b.Property("ToPackingCode") + .HasColumnType("nvarchar(max)"); - b.Property("AcceptTime") - .HasColumnType("datetime2"); + b.Property("ToStatus") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); - b.Property("AcceptUserId") - .HasColumnType("uniqueidentifier"); + b.Property("ToWarehouseCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToWarehouseCode"); - b.Property("AcceptUserName") + b.Property("Uom") + .IsRequired() .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + .HasColumnType("nvarchar(64)") + .HasColumnName("Uom"); - b.Property("CompleteTime") - .HasColumnType("datetime2"); + b.HasKey("Id"); - b.Property("CompleteUserId") + b.HasIndex("MasterID"); + + b.ToTable("Store_TransferLibRequestDetail", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.TransferNote", b => + { + b.Property("Id") .HasColumnType("uniqueidentifier"); - b.Property("CompleteUserName") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + b.Property("ActiveDate") + .HasColumnType("datetime2"); b.Property("ConcurrencyStamp") .IsConcurrencyToken() @@ -18451,6 +20357,9 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.Property("ConfirmTime") .HasColumnType("datetime2"); + b.Property("Confirmed") + .HasColumnType("bit"); + b.Property("CreationTime") .HasColumnType("datetime2") .HasColumnName("CreationTime"); @@ -18463,27 +20372,10 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("nvarchar(max)") .HasColumnName("ExtraProperties"); - b.Property("IsAutoComplete") - .ValueGeneratedOnAdd() - .HasColumnType("bit") - .HasDefaultValue(false); - - b.Property("JobDescription") - .HasMaxLength(1024) - .HasColumnType("nvarchar(1024)"); - b.Property("JobNumber") - .HasColumnType("nvarchar(max)"); - - b.Property("JobStatus") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("JobType") - .IsRequired() .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + .HasColumnType("nvarchar(64)") + .HasColumnName("JobNumber"); b.Property("LastModificationTime") .HasColumnType("datetime2") @@ -18496,17 +20388,8 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.Property("Number") .IsRequired() .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("Priority") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasDefaultValue(0); - - b.Property("PriorityIncrement") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasDefaultValue(0); + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); b.Property("Remark") .HasMaxLength(3072) @@ -18522,22 +20405,12 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.Property("Type") .IsRequired() - .HasColumnType("nvarchar(max)"); - - b.Property("UpStreamJobNumber") .HasMaxLength(64) .HasColumnType("nvarchar(64)"); b.Property("UseOnTheWayLocation") .HasColumnType("bit"); - b.Property("WarehouseCode") - .HasColumnType("nvarchar(max)"); - - b.Property("WorkGroupCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - b.Property("Worker") .HasColumnType("nvarchar(max)"); @@ -18546,10 +20419,10 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.HasIndex("Number") .IsUnique(); - b.ToTable("Job_TransferLibJob", (string)null); + b.ToTable("Store_TransferNote", (string)null); }); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.TransferLibJobDetail", b => + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.TransferNoteDetail", b => { b.Property("Id") .HasColumnType("uniqueidentifier"); @@ -18597,10 +20470,12 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("nvarchar(max)"); b.Property("FromPackingCode") - .HasColumnType("nvarchar(max)"); + .HasColumnType("nvarchar(450)"); - b.Property("FromStatus") - .HasColumnType("int"); + b.Property("FromStatus") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); b.Property("FromWarehouseCode") .IsRequired() @@ -18629,9 +20504,6 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("nvarchar(64)") .HasColumnName("ItemName"); - b.Property("JobStatus") - .HasColumnType("int"); - b.Property("LastModificationTime") .HasColumnType("datetime2") .HasColumnName("LastModificationTime"); @@ -18644,7 +20516,10 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier"); b.Property("Number") - .HasColumnType("nvarchar(max)"); + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); b.Property("OnTheWayLocationCode") .HasColumnType("nvarchar(max)"); @@ -18658,7 +20533,8 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnName("Qty"); b.Property("Reason") - .HasColumnType("nvarchar(max)"); + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); b.Property("Remark") .HasMaxLength(3072) @@ -18708,8 +20584,10 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.Property("ToPackingCode") .HasColumnType("nvarchar(max)"); - b.Property("ToStatus") - .HasColumnType("int"); + b.Property("ToStatus") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); b.Property("ToWarehouseCode") .IsRequired() @@ -18727,10 +20605,14 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.HasIndex("MasterID"); - b.ToTable("Job_TransferLibJobDetail", (string)null); + b.HasIndex("Number", "FromPackingCode", "FromLocationCode", "ToLocationCode", "FromStatus", "ToStatus") + .IsUnique() + .HasFilter("[FromPackingCode] IS NOT NULL"); + + b.ToTable("Store_TransferNoteDetail", (string)null); }); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.TransferLibNote", b => + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.TransferRequest", b => { b.Property("Id") .HasColumnType("uniqueidentifier"); @@ -18738,18 +20620,24 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.Property("ActiveDate") .HasColumnType("datetime2"); + b.Property("AutoAgree") + .HasColumnType("bit"); + + b.Property("AutoCompleteJob") + .HasColumnType("bit"); + + b.Property("AutoHandle") + .HasColumnType("bit"); + + b.Property("AutoSubmit") + .HasColumnType("bit"); + b.Property("ConcurrencyStamp") .IsConcurrencyToken() .HasMaxLength(40) .HasColumnType("nvarchar(40)") .HasColumnName("ConcurrencyStamp"); - b.Property("ConfirmTime") - .HasColumnType("datetime2"); - - b.Property("Confirmed") - .HasColumnType("bit"); - b.Property("CreationTime") .HasColumnType("datetime2") .HasColumnName("CreationTime"); @@ -18758,15 +20646,13 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("CreatorId"); + b.Property("DirectCreateNote") + .HasColumnType("bit"); + b.Property("ExtraProperties") .HasColumnType("nvarchar(max)") .HasColumnName("ExtraProperties"); - b.Property("JobNumber") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("JobNumber"); - b.Property("LastModificationTime") .HasColumnType("datetime2") .HasColumnName("LastModificationTime"); @@ -18786,15 +20672,16 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("nvarchar(3072)") .HasColumnName("Remark"); - b.Property("RequestNumber") - .HasColumnType("nvarchar(max)"); + b.Property("RequestStatus") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); b.Property("TenantId") .HasColumnType("uniqueidentifier") .HasColumnName("TenantId"); b.Property("Type") - .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)"); @@ -18809,10 +20696,10 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.HasIndex("Number") .IsUnique(); - b.ToTable("Store_TransferLibNote", (string)null); + b.ToTable("Store_TransferRequest", (string)null); }); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.TransferLibNoteDetail", b => + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.TransferRequestDetail", b => { b.Property("Id") .HasColumnType("uniqueidentifier"); @@ -18860,7 +20747,7 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("nvarchar(max)"); b.Property("FromPackingCode") - .HasColumnType("nvarchar(450)"); + .HasColumnType("nvarchar(max)"); b.Property("FromStatus") .IsRequired() @@ -18894,9 +20781,6 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("nvarchar(64)") .HasColumnName("ItemName"); - b.Property("JobStatus") - .HasColumnType("int"); - b.Property("LastModificationTime") .HasColumnType("datetime2") .HasColumnName("LastModificationTime"); @@ -18914,9 +20798,6 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("nvarchar(64)") .HasColumnName("Number"); - b.Property("OnTheWayLocationCode") - .HasColumnType("nvarchar(max)"); - b.Property("ProduceDate") .HasColumnType("datetime2"); @@ -18926,8 +20807,7 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnName("Qty"); b.Property("Reason") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + .HasColumnType("nvarchar(max)"); b.Property("Remark") .HasMaxLength(3072) @@ -18998,32 +20878,36 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.HasIndex("MasterID"); - b.HasIndex("Number", "FromPackingCode", "FromLocationCode", "ToLocationCode", "FromStatus", "ToStatus") - .IsUnique() - .HasFilter("[FromPackingCode] IS NOT NULL"); - - b.ToTable("Store_TransferLibNoteDetail", (string)null); + b.ToTable("Store_TransferRequestDetail", (string)null); }); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.TransferLibRequest", b => + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.UnplannedIssueJob", b => { b.Property("Id") .HasColumnType("uniqueidentifier"); - b.Property("ActiveDate") + b.Property("AcceptTime") .HasColumnType("datetime2"); - b.Property("AutoAgree") - .HasColumnType("bit"); + b.Property("AcceptUserId") + .HasColumnType("uniqueidentifier"); - b.Property("AutoCompleteJob") - .HasColumnType("bit"); + b.Property("AcceptUserName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); - b.Property("AutoHandle") - .HasColumnType("bit"); + b.Property("BuildDate") + .HasColumnType("datetime2"); - b.Property("AutoSubmit") - .HasColumnType("bit"); + b.Property("CompleteTime") + .HasColumnType("datetime2"); + + b.Property("CompleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CompleteUserName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); b.Property("ConcurrencyStamp") .IsConcurrencyToken() @@ -19039,13 +20923,37 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("CreatorId"); - b.Property("DirectCreateNote") - .HasColumnType("bit"); + b.Property("DeptCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("DeptName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); b.Property("ExtraProperties") .HasColumnType("nvarchar(max)") .HasColumnName("ExtraProperties"); + b.Property("IsAutoComplete") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false); + + b.Property("JobDescription") + .HasMaxLength(1024) + .HasColumnType("nvarchar(1024)"); + + b.Property("JobStatus") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("JobType") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + b.Property("LastModificationTime") .HasColumnType("datetime2") .HasColumnName("LastModificationTime"); @@ -19057,29 +20965,47 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.Property("Number") .IsRequired() .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("Number"); + .HasColumnType("nvarchar(64)"); + + b.Property("OANumber") + .HasColumnType("nvarchar(max)"); + + b.Property("Priority") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasDefaultValue(0); + + b.Property("PriorityIncrement") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasDefaultValue(0); b.Property("Remark") .HasMaxLength(3072) .HasColumnType("nvarchar(3072)") .HasColumnName("Remark"); - b.Property("RequestStatus") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - b.Property("TenantId") .HasColumnType("uniqueidentifier") .HasColumnName("TenantId"); - b.Property("Type") + b.Property("UnplannedIssueRequestNumber") .HasMaxLength(64) .HasColumnType("nvarchar(64)"); - b.Property("UseOnTheWayLocation") - .HasColumnType("bit"); + b.Property("UnplannedIssueType") + .HasColumnType("int"); + + b.Property("UpStreamJobNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("WarehouseCode") + .HasColumnType("nvarchar(max)"); + + b.Property("WorkGroupCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); b.Property("Worker") .HasColumnType("nvarchar(max)"); @@ -19089,16 +21015,16 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.HasIndex("Number") .IsUnique(); - b.ToTable("Store_TransferLibRequest", (string)null); + b.ToTable("Job_UnplannedIssueJob", (string)null); }); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.TransferLibRequestDetail", b => + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.UnplannedIssueJobDetail", b => { b.Property("Id") .HasColumnType("uniqueidentifier"); - b.Property("ArriveDate") - .HasColumnType("datetime2"); + b.Property("CaseCode") + .HasColumnType("nvarchar(max)"); b.Property("CreationTime") .HasColumnType("datetime2") @@ -19108,50 +21034,69 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("CreatorId"); - b.Property("ExpireDate") + b.Property("Explain") + .HasColumnType("nvarchar(max)"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("HandledArriveDate") .HasColumnType("datetime2"); - b.Property("FromContainerCode") - .HasColumnType("nvarchar(max)"); + b.Property("HandledContainerCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledContainerCode"); - b.Property("FromLocationArea") + b.Property("HandledExpireDate") + .HasColumnType("datetime2"); + + b.Property("HandledFromLocationArea") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("FromLocationArea"); + .HasColumnName("HandledFromLocationArea"); - b.Property("FromLocationCode") - .IsRequired() + b.Property("HandledFromLocationCode") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("FromLocationCode"); + .HasColumnName("HandledFromLocationCode"); - b.Property("FromLocationErpCode") - .IsRequired() + b.Property("HandledFromLocationErpCode") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("FromLocationErpCode"); + .HasColumnName("HandledFromLocationErpCode"); - b.Property("FromLocationGroup") + b.Property("HandledFromLocationGroup") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("FromLocationGroup"); + .HasColumnName("HandledFromLocationGroup"); - b.Property("FromLot") - .HasColumnType("nvarchar(max)"); + b.Property("HandledFromWarehouseCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledFromWarehouseCode"); - b.Property("FromPackingCode") - .HasColumnType("nvarchar(max)"); + b.Property("HandledLot") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledLot"); - b.Property("FromStatus") - .IsRequired() + b.Property("HandledPackingCode") .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledPackingCode"); - b.Property("FromWarehouseCode") - .IsRequired() + b.Property("HandledProduceDate") + .HasColumnType("datetime2"); + + b.Property("HandledQty") + .HasColumnType("decimal(18,6)"); + + b.Property("HandledSupplierBatch") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("FromWarehouseCode"); + .HasColumnName("HandledSupplierBatch"); b.Property("ItemCode") .IsRequired() @@ -19174,9 +21119,6 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("nvarchar(64)") .HasColumnName("ItemName"); - b.Property("JobStatus") - .HasColumnType("int"); - b.Property("LastModificationTime") .HasColumnType("datetime2") .HasColumnName("LastModificationTime"); @@ -19191,93 +21133,102 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.Property("Number") .IsRequired() .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("Number"); + .HasColumnType("nvarchar(64)"); - b.Property("ProduceDate") - .HasColumnType("datetime2"); + b.Property("OnceBusiCode") + .HasColumnType("nvarchar(max)"); - b.Property("Qty") - .HasPrecision(18, 6) - .HasColumnType("decimal(18,6)") - .HasColumnName("Qty"); + b.Property("ProjCapacityCode") + .HasColumnType("nvarchar(max)"); - b.Property("Reason") + b.Property("ReasonCode") .HasColumnType("nvarchar(max)"); - b.Property("Remark") - .HasMaxLength(3072) - .HasColumnType("nvarchar(3072)") - .HasColumnName("Remark"); + b.Property("RecommendArriveDate") + .HasColumnType("datetime2"); - b.Property("StdPackQty") - .HasColumnType("decimal(18,6)"); + b.Property("RecommendContainerCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendContainerCode"); - b.Property("SupplierBatch") + b.Property("RecommendExpireDate") + .HasColumnType("datetime2"); + + b.Property("RecommendFromLocationArea") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("SupplierBatch"); + .HasColumnName("RecommendFromLocationArea"); - b.Property("TenantId") - .HasColumnType("uniqueidentifier") - .HasColumnName("TenantId"); + b.Property("RecommendFromLocationCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendFromLocationCode"); - b.Property("ToContainerCode") - .HasColumnType("nvarchar(max)"); + b.Property("RecommendFromLocationErpCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendFromLocationErpCode"); - b.Property("ToLocationArea") + b.Property("RecommendFromLocationGroup") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("ToLocationArea"); + .HasColumnName("RecommendFromLocationGroup"); - b.Property("ToLocationCode") - .IsRequired() + b.Property("RecommendFromWarehouseCode") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("ToLocationCode"); + .HasColumnName("RecommendFromWarehouseCode"); - b.Property("ToLocationErpCode") - .IsRequired() + b.Property("RecommendLot") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("ToLocationErpCode"); + .HasColumnName("RecommendLot"); - b.Property("ToLocationGroup") + b.Property("RecommendPackingCode") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("ToLocationGroup"); + .HasColumnName("RecommendPackingCode"); - b.Property("ToLot") - .HasColumnType("nvarchar(max)"); + b.Property("RecommendProduceDate") + .HasColumnType("datetime2"); - b.Property("ToPackingCode") - .HasColumnType("nvarchar(max)"); + b.Property("RecommendQty") + .HasColumnType("decimal(18,6)"); - b.Property("ToStatus") - .IsRequired() + b.Property("RecommendSupplierBatch") .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendSupplierBatch"); - b.Property("ToWarehouseCode") + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("Status") .IsRequired() .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ToWarehouseCode"); + .HasColumnType("nvarchar(64)"); + + b.Property("StdPackQty") + .HasColumnType("decimal(18,6)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); b.Property("Uom") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("Uom"); + .HasColumnType("nvarchar(max)"); b.HasKey("Id"); b.HasIndex("MasterID"); - b.ToTable("Store_TransferLibRequestDetail", (string)null); + b.ToTable("Job_UnplannedIssueJobDetail", (string)null); }); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.TransferNote", b => + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.UnplannedIssueNote", b => { b.Property("Id") .HasColumnType("uniqueidentifier"); @@ -19285,18 +21236,15 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.Property("ActiveDate") .HasColumnType("datetime2"); + b.Property("BuildDate") + .HasColumnType("datetime2"); + b.Property("ConcurrencyStamp") .IsConcurrencyToken() .HasMaxLength(40) .HasColumnType("nvarchar(40)") .HasColumnName("ConcurrencyStamp"); - b.Property("ConfirmTime") - .HasColumnType("datetime2"); - - b.Property("Confirmed") - .HasColumnType("bit"); - b.Property("CreationTime") .HasColumnType("datetime2") .HasColumnName("CreationTime"); @@ -19305,14 +21253,21 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("CreatorId"); + b.Property("DeptCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("DeptName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + b.Property("ExtraProperties") .HasColumnType("nvarchar(max)") .HasColumnName("ExtraProperties"); b.Property("JobNumber") .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("JobNumber"); + .HasColumnType("nvarchar(64)"); b.Property("LastModificationTime") .HasColumnType("datetime2") @@ -19328,25 +21283,24 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("nvarchar(64)") .HasColumnName("Number"); + b.Property("OANumber") + .HasColumnType("nvarchar(max)"); + b.Property("Remark") .HasMaxLength(3072) .HasColumnType("nvarchar(3072)") .HasColumnName("Remark"); - b.Property("RequestNumber") - .HasColumnType("nvarchar(max)"); - b.Property("TenantId") .HasColumnType("uniqueidentifier") .HasColumnName("TenantId"); - b.Property("Type") - .IsRequired() + b.Property("UnplannedIssueRequestNumber") .HasMaxLength(64) .HasColumnType("nvarchar(64)"); - b.Property("UseOnTheWayLocation") - .HasColumnType("bit"); + b.Property("UnplannedIssueType") + .HasColumnType("int"); b.Property("Worker") .HasColumnType("nvarchar(max)"); @@ -19356,10 +21310,10 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.HasIndex("Number") .IsUnique(); - b.ToTable("Store_TransferNote", (string)null); + b.ToTable("Store_UnplannedIssueNote", (string)null); }); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.TransferNoteDetail", b => + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.UnplannedIssueNoteDetail", b => { b.Property("Id") .HasColumnType("uniqueidentifier"); @@ -19367,6 +21321,14 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.Property("ArriveDate") .HasColumnType("datetime2"); + b.Property("CaseCode") + .HasColumnType("nvarchar(max)"); + + b.Property("ContainerCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ContainerCode"); + b.Property("CreationTime") .HasColumnType("datetime2") .HasColumnName("CreationTime"); @@ -19378,47 +21340,69 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.Property("ExpireDate") .HasColumnType("datetime2"); - b.Property("FromContainerCode") + b.Property("Explain") .HasColumnType("nvarchar(max)"); - b.Property("FromLocationArea") + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("HandledArriveDate") + .HasColumnType("datetime2"); + + b.Property("HandledContainerCode") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("FromLocationArea"); + .HasColumnName("HandledContainerCode"); - b.Property("FromLocationCode") - .IsRequired() + b.Property("HandledExpireDate") + .HasColumnType("datetime2"); + + b.Property("HandledFromLocationArea") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("FromLocationCode"); + .HasColumnName("HandledFromLocationArea"); - b.Property("FromLocationErpCode") - .IsRequired() + b.Property("HandledFromLocationCode") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("FromLocationErpCode"); + .HasColumnName("HandledFromLocationCode"); - b.Property("FromLocationGroup") + b.Property("HandledFromLocationErpCode") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("FromLocationGroup"); + .HasColumnName("HandledFromLocationErpCode"); - b.Property("FromLot") - .HasColumnType("nvarchar(max)"); + b.Property("HandledFromLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledFromLocationGroup"); - b.Property("FromPackingCode") - .HasColumnType("nvarchar(450)"); + b.Property("HandledFromWarehouseCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledFromWarehouseCode"); + + b.Property("HandledLot") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledLot"); - b.Property("FromStatus") - .IsRequired() + b.Property("HandledPackingCode") .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledPackingCode"); - b.Property("FromWarehouseCode") - .IsRequired() + b.Property("HandledProduceDate") + .HasColumnType("datetime2"); + + b.Property("HandledQty") + .HasColumnType("decimal(18,6)"); + + b.Property("HandledSupplierBatch") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("FromWarehouseCode"); + .HasColumnName("HandledSupplierBatch"); b.Property("ItemCode") .IsRequired() @@ -19449,6 +21433,33 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("LastModifierId"); + b.Property("LocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationArea"); + + b.Property("LocationCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationCode"); + + b.Property("LocationErpCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationErpCode"); + + b.Property("LocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationGroup"); + + b.Property("Lot") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Lot"); + b.Property("MasterID") .HasColumnType("uniqueidentifier"); @@ -19458,79 +21469,107 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("nvarchar(64)") .HasColumnName("Number"); - b.Property("OnTheWayLocationCode") + b.Property("OnceBusiCode") .HasColumnType("nvarchar(max)"); + b.Property("PackingCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("PackingCode"); + b.Property("ProduceDate") .HasColumnType("datetime2"); + b.Property("ProjCapacityCode") + .HasColumnType("nvarchar(max)"); + b.Property("Qty") .HasPrecision(18, 6) .HasColumnType("decimal(18,6)") .HasColumnName("Qty"); - b.Property("Reason") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + b.Property("ReasonCode") + .HasColumnType("nvarchar(max)"); - b.Property("Remark") - .HasMaxLength(3072) - .HasColumnType("nvarchar(3072)") - .HasColumnName("Remark"); + b.Property("RecommendArriveDate") + .HasColumnType("datetime2"); - b.Property("StdPackQty") - .HasColumnType("decimal(18,6)"); + b.Property("RecommendContainerCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendContainerCode"); - b.Property("SupplierBatch") + b.Property("RecommendExpireDate") + .HasColumnType("datetime2"); + + b.Property("RecommendFromLocationArea") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("SupplierBatch"); + .HasColumnName("RecommendFromLocationArea"); - b.Property("TenantId") - .HasColumnType("uniqueidentifier") - .HasColumnName("TenantId"); + b.Property("RecommendFromLocationCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendFromLocationCode"); - b.Property("ToContainerCode") - .HasColumnType("nvarchar(max)"); + b.Property("RecommendFromLocationErpCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendFromLocationErpCode"); - b.Property("ToLocationArea") + b.Property("RecommendFromLocationGroup") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("ToLocationArea"); + .HasColumnName("RecommendFromLocationGroup"); - b.Property("ToLocationCode") - .IsRequired() + b.Property("RecommendFromWarehouseCode") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("ToLocationCode"); + .HasColumnName("RecommendFromWarehouseCode"); - b.Property("ToLocationErpCode") - .IsRequired() + b.Property("RecommendLot") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("ToLocationErpCode"); + .HasColumnName("RecommendLot"); - b.Property("ToLocationGroup") + b.Property("RecommendPackingCode") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("ToLocationGroup"); + .HasColumnName("RecommendPackingCode"); - b.Property("ToLot") - .HasColumnType("nvarchar(max)"); + b.Property("RecommendProduceDate") + .HasColumnType("datetime2"); - b.Property("ToPackingCode") - .HasColumnType("nvarchar(max)"); + b.Property("RecommendQty") + .HasColumnType("decimal(18,6)"); - b.Property("ToStatus") + b.Property("RecommendSupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendSupplierBatch"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("Status") .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)"); - b.Property("ToWarehouseCode") - .IsRequired() + b.Property("StdPackQty") + .HasColumnType("decimal(18,6)"); + + b.Property("SupplierBatch") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("ToWarehouseCode"); + .HasColumnName("SupplierBatch"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); b.Property("Uom") .IsRequired() @@ -19538,18 +21577,24 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("nvarchar(64)") .HasColumnName("Uom"); + b.Property("WarehouseCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("WarehouseCode"); + b.HasKey("Id"); b.HasIndex("MasterID"); - b.HasIndex("Number", "FromPackingCode", "FromLocationCode", "ToLocationCode", "FromStatus", "ToStatus") + b.HasIndex("Number", "PackingCode", "ItemCode", "Lot", "Status") .IsUnique() - .HasFilter("[FromPackingCode] IS NOT NULL"); + .HasFilter("[Lot] IS NOT NULL"); - b.ToTable("Store_TransferNoteDetail", (string)null); + b.ToTable("Store_UnplannedIssueNoteDetail", (string)null); }); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.TransferRequest", b => + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.UnplannedIssueRequest", b => { b.Property("Id") .HasColumnType("uniqueidentifier"); @@ -19569,6 +21614,9 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.Property("AutoSubmit") .HasColumnType("bit"); + b.Property("BuildDate") + .HasColumnType("datetime2"); + b.Property("ConcurrencyStamp") .IsConcurrencyToken() .HasMaxLength(40) @@ -19583,6 +21631,14 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("CreatorId"); + b.Property("DeptCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("DeptName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + b.Property("DirectCreateNote") .HasColumnType("bit"); @@ -19604,6 +21660,9 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("nvarchar(64)") .HasColumnName("Number"); + b.Property("OANumber") + .HasColumnType("nvarchar(max)"); + b.Property("Remark") .HasMaxLength(3072) .HasColumnType("nvarchar(3072)") @@ -19618,12 +21677,8 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("TenantId"); - b.Property("Type") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("UseOnTheWayLocation") - .HasColumnType("bit"); + b.Property("UnplannedIssueType") + .HasColumnType("int"); b.Property("Worker") .HasColumnType("nvarchar(max)"); @@ -19633,10 +21688,10 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.HasIndex("Number") .IsUnique(); - b.ToTable("Store_TransferRequest", (string)null); + b.ToTable("Store_UnplannedIssueRequest", (string)null); }); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.TransferRequestDetail", b => + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.UnplannedIssueRequestDetail", b => { b.Property("Id") .HasColumnType("uniqueidentifier"); @@ -19644,6 +21699,14 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.Property("ArriveDate") .HasColumnType("datetime2"); + b.Property("CaseCode") + .HasColumnType("nvarchar(max)"); + + b.Property("ContainerCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ContainerCode"); + b.Property("CreationTime") .HasColumnType("datetime2") .HasColumnName("CreationTime"); @@ -19655,47 +21718,12 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.Property("ExpireDate") .HasColumnType("datetime2"); - b.Property("FromContainerCode") - .HasColumnType("nvarchar(max)"); - - b.Property("FromLocationArea") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("FromLocationArea"); - - b.Property("FromLocationCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("FromLocationCode"); - - b.Property("FromLocationErpCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("FromLocationErpCode"); - - b.Property("FromLocationGroup") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("FromLocationGroup"); - - b.Property("FromLot") - .HasColumnType("nvarchar(max)"); - - b.Property("FromPackingCode") + b.Property("Explain") .HasColumnType("nvarchar(max)"); - b.Property("FromStatus") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("FromWarehouseCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("FromWarehouseCode"); + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); b.Property("ItemCode") .IsRequired() @@ -19726,6 +21754,33 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("LastModifierId"); + b.Property("LocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationArea"); + + b.Property("LocationCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationCode"); + + b.Property("LocationErpCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationErpCode"); + + b.Property("LocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationGroup"); + + b.Property("Lot") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Lot"); + b.Property("MasterID") .HasColumnType("uniqueidentifier"); @@ -19735,22 +21790,36 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("nvarchar(64)") .HasColumnName("Number"); + b.Property("OnceBusiCode") + .HasColumnType("nvarchar(max)"); + + b.Property("PackingCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("PackingCode"); + b.Property("ProduceDate") .HasColumnType("datetime2"); + b.Property("ProjCapacityCode") + .HasColumnType("nvarchar(max)"); + b.Property("Qty") .HasPrecision(18, 6) .HasColumnType("decimal(18,6)") .HasColumnName("Qty"); - b.Property("Reason") - .HasColumnType("nvarchar(max)"); - b.Property("Remark") .HasMaxLength(3072) .HasColumnType("nvarchar(3072)") .HasColumnName("Remark"); + b.Property("Status") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + b.Property("StdPackQty") .HasColumnType("decimal(18,6)"); @@ -19763,62 +21832,30 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("TenantId"); - b.Property("ToContainerCode") - .HasColumnType("nvarchar(max)"); - - b.Property("ToLocationArea") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ToLocationArea"); - - b.Property("ToLocationCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ToLocationCode"); - - b.Property("ToLocationErpCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ToLocationErpCode"); - - b.Property("ToLocationGroup") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ToLocationGroup"); - - b.Property("ToLot") - .HasColumnType("nvarchar(max)"); - - b.Property("ToPackingCode") - .HasColumnType("nvarchar(max)"); - - b.Property("ToStatus") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("ToWarehouseCode") + b.Property("Uom") .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("ToWarehouseCode"); + .HasColumnName("Uom"); - b.Property("Uom") + b.Property("WarehouseCode") .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("Uom"); + .HasColumnName("WarehouseCode"); b.HasKey("Id"); b.HasIndex("MasterID"); - b.ToTable("Store_TransferRequestDetail", (string)null); + b.HasIndex("Number", "PackingCode", "ItemCode", "Lot", "Status") + .IsUnique() + .HasFilter("[Lot] IS NOT NULL"); + + b.ToTable("Store_UnplannedIssueRequestDetail", (string)null); }); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.UnplannedIssueJob", b => + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.UnplannedReceiptJob", b => { b.Property("Id") .HasColumnType("uniqueidentifier"); @@ -19926,11 +21963,11 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("TenantId"); - b.Property("UnplannedIssueRequestNumber") + b.Property("UnplannedReceiptRequestNumber") .HasMaxLength(64) .HasColumnType("nvarchar(64)"); - b.Property("UnplannedIssueType") + b.Property("UnplannedReceiptType") .HasColumnType("int"); b.Property("UpStreamJobNumber") @@ -19952,10 +21989,10 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.HasIndex("Number") .IsUnique(); - b.ToTable("Job_UnplannedIssueJob", (string)null); + b.ToTable("Job_UnplannedReceiptJob", (string)null); }); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.UnplannedIssueJobDetail", b => + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.UnplannedReceiptJobDetail", b => { b.Property("Id") .HasColumnType("uniqueidentifier"); @@ -19989,51 +22026,51 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.Property("HandledExpireDate") .HasColumnType("datetime2"); - b.Property("HandledFromLocationArea") + b.Property("HandledLot") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("HandledFromLocationArea"); + .HasColumnName("HandledLot"); - b.Property("HandledFromLocationCode") + b.Property("HandledPackingCode") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("HandledFromLocationCode"); + .HasColumnName("HandledPackingCode"); - b.Property("HandledFromLocationErpCode") + b.Property("HandledProduceDate") + .HasColumnType("datetime2"); + + b.Property("HandledQty") + .HasColumnType("decimal(18,6)"); + + b.Property("HandledSupplierBatch") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("HandledFromLocationErpCode"); + .HasColumnName("HandledSupplierBatch"); - b.Property("HandledFromLocationGroup") + b.Property("HandledToLocationArea") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("HandledFromLocationGroup"); + .HasColumnName("HandledToLocationArea"); - b.Property("HandledFromWarehouseCode") + b.Property("HandledToLocationCode") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("HandledFromWarehouseCode"); + .HasColumnName("HandledToLocationCode"); - b.Property("HandledLot") + b.Property("HandledToLocationErpCode") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("HandledLot"); + .HasColumnName("HandledToLocationErpCode"); - b.Property("HandledPackingCode") + b.Property("HandledToLocationGroup") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("HandledPackingCode"); - - b.Property("HandledProduceDate") - .HasColumnType("datetime2"); - - b.Property("HandledQty") - .HasColumnType("decimal(18,6)"); + .HasColumnName("HandledToLocationGroup"); - b.Property("HandledSupplierBatch") + b.Property("HandledToWarehouseCode") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("HandledSupplierBatch"); + .HasColumnName("HandledToWarehouseCode"); b.Property("ItemCode") .IsRequired() @@ -20092,51 +22129,51 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.Property("RecommendExpireDate") .HasColumnType("datetime2"); - b.Property("RecommendFromLocationArea") + b.Property("RecommendLot") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendFromLocationArea"); + .HasColumnName("RecommendLot"); - b.Property("RecommendFromLocationCode") + b.Property("RecommendPackingCode") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendFromLocationCode"); + .HasColumnName("RecommendPackingCode"); - b.Property("RecommendFromLocationErpCode") + b.Property("RecommendProduceDate") + .HasColumnType("datetime2"); + + b.Property("RecommendQty") + .HasColumnType("decimal(18,6)"); + + b.Property("RecommendSupplierBatch") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendFromLocationErpCode"); + .HasColumnName("RecommendSupplierBatch"); - b.Property("RecommendFromLocationGroup") + b.Property("RecommendToLocationArea") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendFromLocationGroup"); + .HasColumnName("RecommendToLocationArea"); - b.Property("RecommendFromWarehouseCode") + b.Property("RecommendToLocationCode") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendFromWarehouseCode"); + .HasColumnName("RecommendToLocationCode"); - b.Property("RecommendLot") + b.Property("RecommendToLocationErpCode") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendLot"); + .HasColumnName("RecommendToLocationErpCode"); - b.Property("RecommendPackingCode") + b.Property("RecommendToLocationGroup") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendPackingCode"); - - b.Property("RecommendProduceDate") - .HasColumnType("datetime2"); - - b.Property("RecommendQty") - .HasColumnType("decimal(18,6)"); + .HasColumnName("RecommendToLocationGroup"); - b.Property("RecommendSupplierBatch") + b.Property("RecommendToWarehouseCode") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendSupplierBatch"); + .HasColumnName("RecommendToWarehouseCode"); b.Property("Remark") .HasMaxLength(3072) @@ -20162,10 +22199,10 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.HasIndex("MasterID"); - b.ToTable("Job_UnplannedIssueJobDetail", (string)null); + b.ToTable("Job_UnplannedReceiptJobDetail", (string)null); }); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.UnplannedIssueNote", b => + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.UnplannedReceiptNote", b => { b.Property("Id") .HasColumnType("uniqueidentifier"); @@ -20232,11 +22269,11 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("TenantId"); - b.Property("UnplannedIssueRequestNumber") + b.Property("UnplannedReceiptRequestNumber") .HasMaxLength(64) .HasColumnType("nvarchar(64)"); - b.Property("UnplannedIssueType") + b.Property("UnplannedReceiptType") .HasColumnType("int"); b.Property("Worker") @@ -20247,10 +22284,10 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.HasIndex("Number") .IsUnique(); - b.ToTable("Store_UnplannedIssueNote", (string)null); + b.ToTable("Store_UnplannedReceiptNote", (string)null); }); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.UnplannedIssueNoteDetail", b => + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.UnplannedReceiptNoteDetail", b => { b.Property("Id") .HasColumnType("uniqueidentifier"); @@ -20295,51 +22332,51 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.Property("HandledExpireDate") .HasColumnType("datetime2"); - b.Property("HandledFromLocationArea") + b.Property("HandledLot") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("HandledFromLocationArea"); + .HasColumnName("HandledLot"); - b.Property("HandledFromLocationCode") + b.Property("HandledPackingCode") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("HandledFromLocationCode"); + .HasColumnName("HandledPackingCode"); - b.Property("HandledFromLocationErpCode") + b.Property("HandledProduceDate") + .HasColumnType("datetime2"); + + b.Property("HandledQty") + .HasColumnType("decimal(18,6)"); + + b.Property("HandledSupplierBatch") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("HandledFromLocationErpCode"); + .HasColumnName("HandledSupplierBatch"); - b.Property("HandledFromLocationGroup") + b.Property("HandledToLocationArea") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("HandledFromLocationGroup"); + .HasColumnName("HandledToLocationArea"); - b.Property("HandledFromWarehouseCode") + b.Property("HandledToLocationCode") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("HandledFromWarehouseCode"); + .HasColumnName("HandledToLocationCode"); - b.Property("HandledLot") + b.Property("HandledToLocationErpCode") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("HandledLot"); + .HasColumnName("HandledToLocationErpCode"); - b.Property("HandledPackingCode") + b.Property("HandledToLocationGroup") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("HandledPackingCode"); - - b.Property("HandledProduceDate") - .HasColumnType("datetime2"); - - b.Property("HandledQty") - .HasColumnType("decimal(18,6)"); + .HasColumnName("HandledToLocationGroup"); - b.Property("HandledSupplierBatch") + b.Property("HandledToWarehouseCode") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("HandledSupplierBatch"); + .HasColumnName("HandledToWarehouseCode"); b.Property("ItemCode") .IsRequired() @@ -20426,44 +22463,19 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("decimal(18,6)") .HasColumnName("Qty"); - b.Property("ReasonCode") - .HasColumnType("nvarchar(max)"); - - b.Property("RecommendArriveDate") - .HasColumnType("datetime2"); - - b.Property("RecommendContainerCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendContainerCode"); - - b.Property("RecommendExpireDate") - .HasColumnType("datetime2"); - - b.Property("RecommendFromLocationArea") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendFromLocationArea"); - - b.Property("RecommendFromLocationCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendFromLocationCode"); - - b.Property("RecommendFromLocationErpCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendFromLocationErpCode"); + b.Property("ReasonCode") + .HasColumnType("nvarchar(max)"); - b.Property("RecommendFromLocationGroup") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendFromLocationGroup"); + b.Property("RecommendArriveDate") + .HasColumnType("datetime2"); - b.Property("RecommendFromWarehouseCode") + b.Property("RecommendContainerCode") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendFromWarehouseCode"); + .HasColumnName("RecommendContainerCode"); + + b.Property("RecommendExpireDate") + .HasColumnType("datetime2"); b.Property("RecommendLot") .HasMaxLength(64) @@ -20486,6 +22498,31 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("nvarchar(64)") .HasColumnName("RecommendSupplierBatch"); + b.Property("RecommendToLocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendToLocationArea"); + + b.Property("RecommendToLocationCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendToLocationCode"); + + b.Property("RecommendToLocationErpCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendToLocationErpCode"); + + b.Property("RecommendToLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendToLocationGroup"); + + b.Property("RecommendToWarehouseCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendToWarehouseCode"); + b.Property("Remark") .HasMaxLength(3072) .HasColumnType("nvarchar(3072)") @@ -20528,10 +22565,10 @@ namespace Win_in.Sfs.Wms.Store.Migrations .IsUnique() .HasFilter("[Lot] IS NOT NULL"); - b.ToTable("Store_UnplannedIssueNoteDetail", (string)null); + b.ToTable("Store_UnplannedReceiptNoteDetail", (string)null); }); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.UnplannedIssueRequest", b => + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.UnplannedReceiptRequest", b => { b.Property("Id") .HasColumnType("uniqueidentifier"); @@ -20614,7 +22651,7 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("TenantId"); - b.Property("UnplannedIssueType") + b.Property("UnplannedReceiptType") .HasColumnType("int"); b.Property("Worker") @@ -20625,10 +22662,10 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.HasIndex("Number") .IsUnique(); - b.ToTable("Store_UnplannedIssueRequest", (string)null); + b.ToTable("Store_UnplannedReceiptRequest", (string)null); }); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.UnplannedIssueRequestDetail", b => + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.UnplannedReceiptRequestDetail", b => { b.Property("Id") .HasColumnType("uniqueidentifier"); @@ -20747,6 +22784,9 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("decimal(18,6)") .HasColumnName("Qty"); + b.Property("ReasonCode") + .HasColumnType("nvarchar(max)"); + b.Property("Remark") .HasMaxLength(3072) .HasColumnType("nvarchar(3072)") @@ -20789,37 +22829,17 @@ namespace Win_in.Sfs.Wms.Store.Migrations .IsUnique() .HasFilter("[Lot] IS NOT NULL"); - b.ToTable("Store_UnplannedIssueRequestDetail", (string)null); + b.ToTable("Store_UnplannedReceiptRequestDetail", (string)null); }); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.UnplannedReceiptJob", b => + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.WarehouseTransferNote", b => { b.Property("Id") .HasColumnType("uniqueidentifier"); - b.Property("AcceptTime") - .HasColumnType("datetime2"); - - b.Property("AcceptUserId") - .HasColumnType("uniqueidentifier"); - - b.Property("AcceptUserName") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("BuildDate") - .HasColumnType("datetime2"); - - b.Property("CompleteTime") + b.Property("ActiveDate") .HasColumnType("datetime2"); - b.Property("CompleteUserId") - .HasColumnType("uniqueidentifier"); - - b.Property("CompleteUserName") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - b.Property("ConcurrencyStamp") .IsConcurrencyToken() .HasMaxLength(40) @@ -20834,36 +22854,14 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("CreatorId"); - b.Property("DeptCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("DeptName") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - b.Property("ExtraProperties") .HasColumnType("nvarchar(max)") .HasColumnName("ExtraProperties"); - b.Property("IsAutoComplete") - .ValueGeneratedOnAdd() - .HasColumnType("bit") - .HasDefaultValue(false); - - b.Property("JobDescription") - .HasMaxLength(1024) - .HasColumnType("nvarchar(1024)"); - - b.Property("JobStatus") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("JobType") - .IsRequired() + b.Property("JobNumber") .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + .HasColumnType("nvarchar(64)") + .HasColumnName("JobNumber"); b.Property("LastModificationTime") .HasColumnType("datetime2") @@ -20876,47 +22874,21 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.Property("Number") .IsRequired() .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("OANumber") - .HasColumnType("nvarchar(max)"); - - b.Property("Priority") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasDefaultValue(0); - - b.Property("PriorityIncrement") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasDefaultValue(0); + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); b.Property("Remark") .HasMaxLength(3072) .HasColumnType("nvarchar(3072)") .HasColumnName("Remark"); - b.Property("TenantId") - .HasColumnType("uniqueidentifier") - .HasColumnName("TenantId"); - - b.Property("UnplannedReceiptRequestNumber") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("UnplannedReceiptType") - .HasColumnType("int"); - - b.Property("UpStreamJobNumber") + b.Property("SupplierCode") .HasMaxLength(64) .HasColumnType("nvarchar(64)"); - b.Property("WarehouseCode") - .HasColumnType("nvarchar(max)"); - - b.Property("WorkGroupCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); b.Property("Worker") .HasColumnType("nvarchar(max)"); @@ -20926,16 +22898,16 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.HasIndex("Number") .IsUnique(); - b.ToTable("Job_UnplannedReceiptJob", (string)null); + b.ToTable("Store_WarehouseTransferNote", (string)null); }); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.UnplannedReceiptJobDetail", b => + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.WarehouseTransferNoteDetail", b => { b.Property("Id") .HasColumnType("uniqueidentifier"); - b.Property("CaseCode") - .HasColumnType("nvarchar(max)"); + b.Property("ArriveDate") + .HasColumnType("datetime2"); b.Property("CreationTime") .HasColumnType("datetime2") @@ -20945,69 +22917,50 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("CreatorId"); - b.Property("Explain") - .HasColumnType("nvarchar(max)"); - - b.Property("ExtraProperties") - .HasColumnType("nvarchar(max)") - .HasColumnName("ExtraProperties"); - - b.Property("HandledArriveDate") + b.Property("ExpireDate") .HasColumnType("datetime2"); - b.Property("HandledContainerCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("HandledContainerCode"); - - b.Property("HandledExpireDate") - .HasColumnType("datetime2"); + b.Property("FromContainerCode") + .HasColumnType("nvarchar(max)"); - b.Property("HandledLot") + b.Property("FromLocationArea") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("HandledLot"); + .HasColumnName("FromLocationArea"); - b.Property("HandledPackingCode") + b.Property("FromLocationCode") + .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("HandledPackingCode"); - - b.Property("HandledProduceDate") - .HasColumnType("datetime2"); - - b.Property("HandledQty") - .HasColumnType("decimal(18,6)"); + .HasColumnName("FromLocationCode"); - b.Property("HandledSupplierBatch") + b.Property("FromLocationErpCode") + .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("HandledSupplierBatch"); + .HasColumnName("FromLocationErpCode"); - b.Property("HandledToLocationArea") + b.Property("FromLocationGroup") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("HandledToLocationArea"); + .HasColumnName("FromLocationGroup"); - b.Property("HandledToLocationCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("HandledToLocationCode"); + b.Property("FromLot") + .HasColumnType("nvarchar(max)"); - b.Property("HandledToLocationErpCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("HandledToLocationErpCode"); + b.Property("FromPackingCode") + .HasColumnType("nvarchar(450)"); - b.Property("HandledToLocationGroup") + b.Property("FromStatus") + .IsRequired() .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("HandledToLocationGroup"); + .HasColumnType("nvarchar(64)"); - b.Property("HandledToWarehouseCode") + b.Property("FromWarehouseCode") + .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("HandledToWarehouseCode"); + .HasColumnName("FromWarehouseCode"); b.Property("ItemCode") .IsRequired() @@ -21043,103 +22996,99 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.Property("Number") .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("OnceBusiCode") - .HasColumnType("nvarchar(max)"); - - b.Property("ProjCapacityCode") - .HasColumnType("nvarchar(max)"); - - b.Property("ReasonCode") - .HasColumnType("nvarchar(max)"); - - b.Property("RecommendArriveDate") - .HasColumnType("datetime2"); - - b.Property("RecommendContainerCode") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendContainerCode"); + .HasColumnName("Number"); - b.Property("RecommendExpireDate") + b.Property("ProduceDate") .HasColumnType("datetime2"); - b.Property("RecommendLot") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendLot"); + b.Property("Qty") + .HasPrecision(18, 6) + .HasColumnType("decimal(18,6)") + .HasColumnName("Qty"); - b.Property("RecommendPackingCode") + b.Property("Reason") .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendPackingCode"); + .HasColumnType("nvarchar(64)"); - b.Property("RecommendProduceDate") - .HasColumnType("datetime2"); + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); - b.Property("RecommendQty") + b.Property("StdPackQty") .HasColumnType("decimal(18,6)"); - b.Property("RecommendSupplierBatch") + b.Property("SupplierBatch") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendSupplierBatch"); + .HasColumnName("SupplierBatch"); - b.Property("RecommendToLocationArea") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendToLocationArea"); + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); - b.Property("RecommendToLocationCode") + b.Property("ToContainerCode") + .HasColumnType("nvarchar(max)"); + + b.Property("ToLocationArea") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendToLocationCode"); + .HasColumnName("ToLocationArea"); - b.Property("RecommendToLocationErpCode") + b.Property("ToLocationCode") + .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendToLocationErpCode"); + .HasColumnName("ToLocationCode"); - b.Property("RecommendToLocationGroup") + b.Property("ToLocationErpCode") + .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendToLocationGroup"); + .HasColumnName("ToLocationErpCode"); - b.Property("RecommendToWarehouseCode") + b.Property("ToLocationGroup") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendToWarehouseCode"); + .HasColumnName("ToLocationGroup"); - b.Property("Remark") - .HasMaxLength(3072) - .HasColumnType("nvarchar(3072)") - .HasColumnName("Remark"); + b.Property("ToLot") + .HasColumnType("nvarchar(max)"); - b.Property("Status") + b.Property("ToPackingCode") + .HasColumnType("nvarchar(max)"); + + b.Property("ToStatus") .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)"); - b.Property("StdPackQty") - .HasColumnType("decimal(18,6)"); - - b.Property("TenantId") - .HasColumnType("uniqueidentifier") - .HasColumnName("TenantId"); + b.Property("ToWarehouseCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToWarehouseCode"); b.Property("Uom") - .HasColumnType("nvarchar(max)"); + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Uom"); b.HasKey("Id"); b.HasIndex("MasterID"); - b.ToTable("Job_UnplannedReceiptJobDetail", (string)null); + b.HasIndex("Number", "FromPackingCode", "FromLocationCode", "ToLocationCode") + .IsUnique() + .HasFilter("[FromPackingCode] IS NOT NULL"); + + b.ToTable("Store_WarehouseTransferNoteDetail", (string)null); }); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.UnplannedReceiptNote", b => + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.WipWarehouseAdjustNote", b => { b.Property("Id") .HasColumnType("uniqueidentifier"); @@ -21147,15 +23096,18 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.Property("ActiveDate") .HasColumnType("datetime2"); - b.Property("BuildDate") - .HasColumnType("datetime2"); - b.Property("ConcurrencyStamp") .IsConcurrencyToken() .HasMaxLength(40) .HasColumnType("nvarchar(40)") .HasColumnName("ConcurrencyStamp"); + b.Property("ConfirmTime") + .HasColumnType("datetime2"); + + b.Property("Confirmed") + .HasColumnType("bit"); + b.Property("CreationTime") .HasColumnType("datetime2") .HasColumnName("CreationTime"); @@ -21164,21 +23116,14 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("CreatorId"); - b.Property("DeptCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("DeptName") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - b.Property("ExtraProperties") .HasColumnType("nvarchar(max)") .HasColumnName("ExtraProperties"); b.Property("JobNumber") .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + .HasColumnType("nvarchar(64)") + .HasColumnName("JobNumber"); b.Property("LastModificationTime") .HasColumnType("datetime2") @@ -21194,25 +23139,22 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("nvarchar(64)") .HasColumnName("Number"); - b.Property("OANumber") - .HasColumnType("nvarchar(max)"); - b.Property("Remark") .HasMaxLength(3072) .HasColumnType("nvarchar(3072)") .HasColumnName("Remark"); + b.Property("RequestNumber") + .HasColumnType("nvarchar(max)"); + b.Property("TenantId") .HasColumnType("uniqueidentifier") .HasColumnName("TenantId"); - b.Property("UnplannedReceiptRequestNumber") + b.Property("Type") .HasMaxLength(64) .HasColumnType("nvarchar(64)"); - b.Property("UnplannedReceiptType") - .HasColumnType("int"); - b.Property("Worker") .HasColumnType("nvarchar(max)"); @@ -21221,10 +23163,10 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.HasIndex("Number") .IsUnique(); - b.ToTable("Store_UnplannedReceiptNote", (string)null); + b.ToTable("Store_WipWarehouseAdjustNote", (string)null); }); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.UnplannedReceiptNoteDetail", b => + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.WipWarehouseAdjustNoteDetail", b => { b.Property("Id") .HasColumnType("uniqueidentifier"); @@ -21232,14 +23174,6 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.Property("ArriveDate") .HasColumnType("datetime2"); - b.Property("CaseCode") - .HasColumnType("nvarchar(max)"); - - b.Property("ContainerCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ContainerCode"); - b.Property("CreationTime") .HasColumnType("datetime2") .HasColumnName("CreationTime"); @@ -21251,69 +23185,47 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.Property("ExpireDate") .HasColumnType("datetime2"); - b.Property("Explain") + b.Property("FromContainerCode") .HasColumnType("nvarchar(max)"); - b.Property("ExtraProperties") - .HasColumnType("nvarchar(max)") - .HasColumnName("ExtraProperties"); - - b.Property("HandledArriveDate") - .HasColumnType("datetime2"); - - b.Property("HandledContainerCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("HandledContainerCode"); - - b.Property("HandledExpireDate") - .HasColumnType("datetime2"); - - b.Property("HandledLot") + b.Property("FromLocationArea") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("HandledLot"); + .HasColumnName("FromLocationArea"); - b.Property("HandledPackingCode") + b.Property("FromLocationCode") + .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("HandledPackingCode"); - - b.Property("HandledProduceDate") - .HasColumnType("datetime2"); - - b.Property("HandledQty") - .HasColumnType("decimal(18,6)"); + .HasColumnName("FromLocationCode"); - b.Property("HandledSupplierBatch") + b.Property("FromLocationErpCode") + .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("HandledSupplierBatch"); + .HasColumnName("FromLocationErpCode"); - b.Property("HandledToLocationArea") + b.Property("FromLocationGroup") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("HandledToLocationArea"); + .HasColumnName("FromLocationGroup"); - b.Property("HandledToLocationCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("HandledToLocationCode"); + b.Property("FromLot") + .HasColumnType("nvarchar(max)"); - b.Property("HandledToLocationErpCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("HandledToLocationErpCode"); + b.Property("FromPackingCode") + .HasColumnType("nvarchar(450)"); - b.Property("HandledToLocationGroup") + b.Property("FromStatus") + .IsRequired() .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("HandledToLocationGroup"); + .HasColumnType("nvarchar(64)"); - b.Property("HandledToWarehouseCode") + b.Property("FromWarehouseCode") + .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("HandledToWarehouseCode"); + .HasColumnName("FromWarehouseCode"); b.Property("ItemCode") .IsRequired() @@ -21344,33 +23256,6 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("LastModifierId"); - b.Property("LocationArea") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("LocationArea"); - - b.Property("LocationCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("LocationCode"); - - b.Property("LocationErpCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("LocationErpCode"); - - b.Property("LocationGroup") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("LocationGroup"); - - b.Property("Lot") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("Lot"); - b.Property("MasterID") .HasColumnType("uniqueidentifier"); @@ -21380,107 +23265,80 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("nvarchar(64)") .HasColumnName("Number"); - b.Property("OnceBusiCode") - .HasColumnType("nvarchar(max)"); - - b.Property("PackingCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("PackingCode"); - b.Property("ProduceDate") .HasColumnType("datetime2"); - b.Property("ProjCapacityCode") - .HasColumnType("nvarchar(max)"); - b.Property("Qty") .HasPrecision(18, 6) .HasColumnType("decimal(18,6)") .HasColumnName("Qty"); - b.Property("ReasonCode") - .HasColumnType("nvarchar(max)"); - - b.Property("RecommendArriveDate") - .HasColumnType("datetime2"); - - b.Property("RecommendContainerCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendContainerCode"); - - b.Property("RecommendExpireDate") - .HasColumnType("datetime2"); - - b.Property("RecommendLot") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendLot"); - - b.Property("RecommendPackingCode") + b.Property("Reason") .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendPackingCode"); + .HasColumnType("nvarchar(64)"); - b.Property("RecommendProduceDate") - .HasColumnType("datetime2"); + b.Property("ReasonCode") + .HasMaxLength(4096) + .HasColumnType("nvarchar(max)"); - b.Property("RecommendQty") - .HasColumnType("decimal(18,6)"); + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); - b.Property("RecommendSupplierBatch") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendSupplierBatch"); + b.Property("StdPackQty") + .HasColumnType("decimal(18,6)"); - b.Property("RecommendToLocationArea") + b.Property("SupplierBatch") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendToLocationArea"); + .HasColumnName("SupplierBatch"); - b.Property("RecommendToLocationCode") + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("ToContainerCode") + .HasColumnType("nvarchar(max)"); + + b.Property("ToLocationArea") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendToLocationCode"); + .HasColumnName("ToLocationArea"); - b.Property("RecommendToLocationErpCode") + b.Property("ToLocationCode") + .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendToLocationErpCode"); + .HasColumnName("ToLocationCode"); - b.Property("RecommendToLocationGroup") + b.Property("ToLocationErpCode") + .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendToLocationGroup"); + .HasColumnName("ToLocationErpCode"); - b.Property("RecommendToWarehouseCode") + b.Property("ToLocationGroup") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendToWarehouseCode"); + .HasColumnName("ToLocationGroup"); - b.Property("Remark") - .HasMaxLength(3072) - .HasColumnType("nvarchar(3072)") - .HasColumnName("Remark"); + b.Property("ToLot") + .HasColumnType("nvarchar(max)"); - b.Property("Status") + b.Property("ToPackingCode") + .HasColumnType("nvarchar(max)"); + + b.Property("ToStatus") .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)"); - b.Property("StdPackQty") - .HasColumnType("decimal(18,6)"); - - b.Property("SupplierBatch") + b.Property("ToWarehouseCode") + .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("SupplierBatch"); - - b.Property("TenantId") - .HasColumnType("uniqueidentifier") - .HasColumnName("TenantId"); + .HasColumnName("ToWarehouseCode"); b.Property("Uom") .IsRequired() @@ -21488,24 +23346,18 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("nvarchar(64)") .HasColumnName("Uom"); - b.Property("WarehouseCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("WarehouseCode"); - b.HasKey("Id"); b.HasIndex("MasterID"); - b.HasIndex("Number", "PackingCode", "ItemCode", "Lot", "Status") + b.HasIndex("Number", "FromPackingCode", "FromLocationCode", "ToLocationCode", "FromStatus", "ToStatus") .IsUnique() - .HasFilter("[Lot] IS NOT NULL"); + .HasFilter("[FromPackingCode] IS NOT NULL"); - b.ToTable("Store_UnplannedReceiptNoteDetail", (string)null); + b.ToTable("Store_WipWarehouseAdjustNoteDetail", (string)null); }); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.UnplannedReceiptRequest", b => + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.WipWarehouseAdjustRequest", b => { b.Property("Id") .HasColumnType("uniqueidentifier"); @@ -21525,9 +23377,6 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.Property("AutoSubmit") .HasColumnType("bit"); - b.Property("BuildDate") - .HasColumnType("datetime2"); - b.Property("ConcurrencyStamp") .IsConcurrencyToken() .HasMaxLength(40) @@ -21542,14 +23391,6 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("CreatorId"); - b.Property("DeptCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("DeptName") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - b.Property("DirectCreateNote") .HasColumnType("bit"); @@ -21571,9 +23412,6 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("nvarchar(64)") .HasColumnName("Number"); - b.Property("OANumber") - .HasColumnType("nvarchar(max)"); - b.Property("Remark") .HasMaxLength(3072) .HasColumnType("nvarchar(3072)") @@ -21588,8 +23426,9 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("TenantId"); - b.Property("UnplannedReceiptType") - .HasColumnType("int"); + b.Property("Type") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); b.Property("Worker") .HasColumnType("nvarchar(max)"); @@ -21599,10 +23438,10 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.HasIndex("Number") .IsUnique(); - b.ToTable("Store_UnplannedReceiptRequest", (string)null); + b.ToTable("Store_WipWarehouseAdjustRequest", (string)null); }); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.UnplannedReceiptRequestDetail", b => + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.WipWarehouseAdjustRequestDetail", b => { b.Property("Id") .HasColumnType("uniqueidentifier"); @@ -21610,14 +23449,6 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.Property("ArriveDate") .HasColumnType("datetime2"); - b.Property("CaseCode") - .HasColumnType("nvarchar(max)"); - - b.Property("ContainerCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ContainerCode"); - b.Property("CreationTime") .HasColumnType("datetime2") .HasColumnName("CreationTime"); @@ -21629,68 +23460,76 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.Property("ExpireDate") .HasColumnType("datetime2"); - b.Property("Explain") + b.Property("FromContainerCode") .HasColumnType("nvarchar(max)"); - b.Property("ExtraProperties") - .HasColumnType("nvarchar(max)") - .HasColumnName("ExtraProperties"); - - b.Property("ItemCode") - .IsRequired() + b.Property("FromLocationArea") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("ItemCode"); + .HasColumnName("FromLocationArea"); - b.Property("ItemDesc1") + b.Property("FromLocationCode") + .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("ItemDesc1"); + .HasColumnName("FromLocationCode"); - b.Property("ItemDesc2") + b.Property("FromLocationErpCode") + .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("ItemDesc2"); + .HasColumnName("FromLocationErpCode"); - b.Property("ItemName") + b.Property("FromLocationGroup") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("ItemName"); + .HasColumnName("FromLocationGroup"); - b.Property("LastModificationTime") - .HasColumnType("datetime2") - .HasColumnName("LastModificationTime"); + b.Property("FromLot") + .HasColumnType("nvarchar(max)"); - b.Property("LastModifierId") - .HasColumnType("uniqueidentifier") - .HasColumnName("LastModifierId"); + b.Property("FromPackingCode") + .HasColumnType("nvarchar(max)"); - b.Property("LocationArea") + b.Property("FromStatus") + .IsRequired() .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("LocationArea"); + .HasColumnType("nvarchar(64)"); - b.Property("LocationCode") + b.Property("FromWarehouseCode") .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("LocationCode"); + .HasColumnName("FromWarehouseCode"); - b.Property("LocationErpCode") + b.Property("ItemCode") .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("LocationErpCode"); + .HasColumnName("ItemCode"); - b.Property("LocationGroup") + b.Property("ItemDesc1") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("LocationGroup"); + .HasColumnName("ItemDesc1"); - b.Property("Lot") + b.Property("ItemDesc2") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("Lot"); + .HasColumnName("ItemDesc2"); + + b.Property("ItemName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemName"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); b.Property("MasterID") .HasColumnType("uniqueidentifier"); @@ -21701,27 +23540,20 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("nvarchar(64)") .HasColumnName("Number"); - b.Property("OnceBusiCode") - .HasColumnType("nvarchar(max)"); - - b.Property("PackingCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("PackingCode"); - b.Property("ProduceDate") .HasColumnType("datetime2"); - b.Property("ProjCapacityCode") - .HasColumnType("nvarchar(max)"); - b.Property("Qty") .HasPrecision(18, 6) .HasColumnType("decimal(18,6)") .HasColumnName("Qty"); + b.Property("Reason") + .HasMaxLength(4096) + .HasColumnType("nvarchar(max)"); + b.Property("ReasonCode") + .HasMaxLength(4096) .HasColumnType("nvarchar(max)"); b.Property("Remark") @@ -21729,11 +23561,6 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("nvarchar(3072)") .HasColumnName("Remark"); - b.Property("Status") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - b.Property("StdPackQty") .HasColumnType("decimal(18,6)"); @@ -21746,30 +23573,62 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("TenantId"); - b.Property("Uom") + b.Property("ToContainerCode") + .HasColumnType("nvarchar(max)"); + + b.Property("ToLocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToLocationArea"); + + b.Property("ToLocationCode") .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("Uom"); + .HasColumnName("ToLocationCode"); - b.Property("WarehouseCode") + b.Property("ToLocationErpCode") .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("WarehouseCode"); + .HasColumnName("ToLocationErpCode"); + + b.Property("ToLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToLocationGroup"); + + b.Property("ToLot") + .HasColumnType("nvarchar(max)"); + + b.Property("ToPackingCode") + .HasColumnType("nvarchar(max)"); + + b.Property("ToStatus") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ToWarehouseCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToWarehouseCode"); + + b.Property("Uom") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Uom"); b.HasKey("Id"); b.HasIndex("MasterID"); - b.HasIndex("Number", "PackingCode", "ItemCode", "Lot", "Status") - .IsUnique() - .HasFilter("[Lot] IS NOT NULL"); - - b.ToTable("Store_UnplannedReceiptRequestDetail", (string)null); + b.ToTable("Store_WipWarehouseAdjustRequestDetail", (string)null); }); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.WarehouseTransferNote", b => + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.WorkOrder", b => { b.Property("Id") .HasColumnType("uniqueidentifier"); @@ -21791,14 +23650,33 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("CreatorId"); - b.Property("ExtraProperties") - .HasColumnType("nvarchar(max)") - .HasColumnName("ExtraProperties"); + b.Property("EffectiveDate") + .HasColumnType("datetime2"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("ItemCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemCode"); + + b.Property("ItemDesc1") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc1"); + + b.Property("ItemDesc2") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc2"); - b.Property("JobNumber") + b.Property("ItemName") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("JobNumber"); + .HasColumnName("ItemName"); b.Property("LastModificationTime") .HasColumnType("datetime2") @@ -21808,25 +23686,58 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("LastModifierId"); + b.Property("LocationCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + b.Property("Number") .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)") .HasColumnName("Number"); + b.Property("Op") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Qty") + .HasPrecision(18, 6) + .HasColumnType("decimal(18,6)") + .HasColumnName("Qty"); + b.Property("Remark") .HasMaxLength(3072) .HasColumnType("nvarchar(3072)") .HasColumnName("Remark"); - b.Property("SupplierCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - b.Property("TenantId") .HasColumnType("uniqueidentifier") .HasColumnName("TenantId"); + b.Property("Type") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Uom") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Uom"); + + b.Property("WoStatus") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("WorkOrderId") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("WorkStation") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + b.Property("Worker") .HasColumnType("nvarchar(max)"); @@ -21835,17 +23746,14 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.HasIndex("Number") .IsUnique(); - b.ToTable("Store_WarehouseTransferNote", (string)null); + b.ToTable("Store_WorkOrder", (string)null); }); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.WarehouseTransferNoteDetail", b => + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.WorkOrderDetail", b => { b.Property("Id") .HasColumnType("uniqueidentifier"); - b.Property("ArriveDate") - .HasColumnType("datetime2"); - b.Property("CreationTime") .HasColumnType("datetime2") .HasColumnName("CreationTime"); @@ -21854,51 +23762,9 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("CreatorId"); - b.Property("ExpireDate") + b.Property("EffectiveDate") .HasColumnType("datetime2"); - b.Property("FromContainerCode") - .HasColumnType("nvarchar(max)"); - - b.Property("FromLocationArea") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("FromLocationArea"); - - b.Property("FromLocationCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("FromLocationCode"); - - b.Property("FromLocationErpCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("FromLocationErpCode"); - - b.Property("FromLocationGroup") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("FromLocationGroup"); - - b.Property("FromLot") - .HasColumnType("nvarchar(max)"); - - b.Property("FromPackingCode") - .HasColumnType("nvarchar(450)"); - - b.Property("FromStatus") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("FromWarehouseCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("FromWarehouseCode"); - b.Property("ItemCode") .IsRequired() .HasMaxLength(64) @@ -21937,15 +23803,18 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("nvarchar(64)") .HasColumnName("Number"); - b.Property("ProduceDate") - .HasColumnType("datetime2"); + b.Property("Op") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); - b.Property("Qty") - .HasPrecision(18, 6) - .HasColumnType("decimal(18,6)") - .HasColumnName("Qty"); + b.Property("RawLocationCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); - b.Property("Reason") + b.Property("RawQty") + .HasColumnType("decimal(18,6)"); + + b.Property("RawUom") .HasMaxLength(64) .HasColumnType("nvarchar(64)"); @@ -21954,97 +23823,133 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("nvarchar(3072)") .HasColumnName("Remark"); - b.Property("StdPackQty") - .HasColumnType("decimal(18,6)"); - - b.Property("SupplierBatch") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("SupplierBatch"); - b.Property("TenantId") .HasColumnType("uniqueidentifier") .HasColumnName("TenantId"); - b.Property("ToContainerCode") - .HasColumnType("nvarchar(max)"); + b.HasKey("Id"); - b.Property("ToLocationArea") + b.HasIndex("MasterID"); + + b.HasIndex("Number", "ItemCode") + .IsUnique(); + + b.ToTable("Store_WorkOrderDetail", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Equipments.EquipmentRecord", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("BarCode") .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ToLocationArea"); + .HasColumnType("nvarchar(64)"); - b.Property("ToLocationCode") - .IsRequired() + b.Property("Batch") .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ToLocationCode"); + .HasColumnType("nvarchar(64)"); - b.Property("ToLocationErpCode") - .IsRequired() + 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("EqptCode") .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ToLocationErpCode"); + .HasColumnType("nvarchar(64)"); - b.Property("ToLocationGroup") + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("FromLocCode") .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ToLocationGroup"); + .HasColumnType("nvarchar(64)"); - b.Property("ToLot") - .HasColumnType("nvarchar(max)"); + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); - b.Property("ToPackingCode") - .HasColumnType("nvarchar(max)"); + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); - b.Property("ToStatus") - .IsRequired() + b.Property("PartCode") .HasMaxLength(64) .HasColumnType("nvarchar(64)"); - b.Property("ToWarehouseCode") - .IsRequired() + b.Property("Qty") + .HasColumnType("decimal(18,6)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("State") + .HasColumnType("int"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("ToLocCode") .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ToWarehouseCode"); + .HasColumnType("nvarchar(64)"); - b.Property("Uom") - .IsRequired() + b.Property("Type") .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("Uom"); + .HasColumnType("int"); b.HasKey("Id"); - b.HasIndex("MasterID"); - - b.HasIndex("Number", "FromPackingCode", "FromLocationCode", "ToLocationCode") - .IsUnique() - .HasFilter("[FromPackingCode] IS NOT NULL"); + b.HasIndex("EqptCode"); - b.ToTable("Store_WarehouseTransferNoteDetail", (string)null); + b.ToTable("Store_EquipmentRecord", (string)null); }); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.WipWarehouseAdjustNote", b => + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Jobs.IssueJobs.CoatingIssueJob", b => { b.Property("Id") + .ValueGeneratedOnAdd() .HasColumnType("uniqueidentifier"); - b.Property("ActiveDate") + b.Property("AcceptTime") .HasColumnType("datetime2"); + b.Property("AcceptUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("AcceptUserName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("CompleteTime") + .HasColumnType("datetime2"); + + b.Property("CompleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CompleteUserName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + b.Property("ConcurrencyStamp") .IsConcurrencyToken() .HasMaxLength(40) .HasColumnType("nvarchar(40)") .HasColumnName("ConcurrencyStamp"); - b.Property("ConfirmTime") - .HasColumnType("datetime2"); - - b.Property("Confirmed") - .HasColumnType("bit"); - b.Property("CreationTime") .HasColumnType("datetime2") .HasColumnName("CreationTime"); @@ -22057,10 +23962,24 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("nvarchar(max)") .HasColumnName("ExtraProperties"); - b.Property("JobNumber") + b.Property("IsAutoComplete") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false); + + b.Property("JobDescription") + .HasMaxLength(1024) + .HasColumnType("nvarchar(1024)"); + + b.Property("JobStatus") + .IsRequired() .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("JobNumber"); + .HasColumnType("nvarchar(64)"); + + b.Property("JobType") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); b.Property("LastModificationTime") .HasColumnType("datetime2") @@ -22070,47 +23989,77 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("LastModifierId"); + b.Property("MaterialRequestNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + b.Property("Number") .IsRequired() .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("Number"); + .HasColumnType("nvarchar(64)"); + + b.Property("Priority") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasDefaultValue(0); + + b.Property("PriorityIncrement") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasDefaultValue(0); + + b.Property("ProdLine") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); b.Property("Remark") .HasMaxLength(3072) .HasColumnType("nvarchar(3072)") .HasColumnName("Remark"); - b.Property("RequestNumber") - .HasColumnType("nvarchar(max)"); + b.Property("RequestType") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); b.Property("TenantId") .HasColumnType("uniqueidentifier") .HasColumnName("TenantId"); - b.Property("Type") + b.Property("UpStreamJobNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("UseOnTheWayLocation") + .HasColumnType("bit"); + + b.Property("WarehouseCode") + .HasColumnType("nvarchar(max)"); + + b.Property("WorkGroupCode") .HasMaxLength(64) .HasColumnType("nvarchar(64)"); b.Property("Worker") .HasColumnType("nvarchar(max)"); + b.Property("Workshop") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + b.HasKey("Id"); b.HasIndex("Number") .IsUnique(); - b.ToTable("Store_WipWarehouseAdjustNote", (string)null); + b.ToTable("Job_CoatingIssueJob", (string)null); }); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.WipWarehouseAdjustNoteDetail", b => + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Jobs.IssueJobs.CoatingIssueJobDetail", b => { b.Property("Id") + .ValueGeneratedOnAdd() .HasColumnType("uniqueidentifier"); - b.Property("ArriveDate") - .HasColumnType("datetime2"); - b.Property("CreationTime") .HasColumnType("datetime2") .HasColumnName("CreationTime"); @@ -22119,50 +24068,73 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("CreatorId"); - b.Property("ExpireDate") + b.Property("DeliveryQty") + .HasColumnType("decimal(18,6)"); + + b.Property("DistributionType") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ExpiredTime") .HasColumnType("datetime2"); - b.Property("FromContainerCode") - .HasColumnType("nvarchar(max)"); + b.Property("HandledArriveDate") + .HasColumnType("datetime2"); - b.Property("FromLocationArea") + b.Property("HandledContainerCode") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("FromLocationArea"); + .HasColumnName("HandledContainerCode"); - b.Property("FromLocationCode") - .IsRequired() + b.Property("HandledExpireDate") + .HasColumnType("datetime2"); + + b.Property("HandledFromLocationArea") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("FromLocationCode"); + .HasColumnName("HandledFromLocationArea"); - b.Property("FromLocationErpCode") - .IsRequired() + b.Property("HandledFromLocationCode") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("FromLocationErpCode"); + .HasColumnName("HandledFromLocationCode"); - b.Property("FromLocationGroup") + b.Property("HandledFromLocationErpCode") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("FromLocationGroup"); + .HasColumnName("HandledFromLocationErpCode"); - b.Property("FromLot") - .HasColumnType("nvarchar(max)"); + b.Property("HandledFromLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledFromLocationGroup"); - b.Property("FromPackingCode") - .HasColumnType("nvarchar(450)"); + b.Property("HandledFromWarehouseCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledFromWarehouseCode"); - b.Property("FromStatus") - .IsRequired() + b.Property("HandledLot") .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledLot"); - b.Property("FromWarehouseCode") - .IsRequired() + b.Property("HandledPackingCode") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("FromWarehouseCode"); + .HasColumnName("HandledPackingCode"); + + b.Property("HandledProduceDate") + .HasColumnType("datetime2"); + + b.Property("HandledQty") + .HasColumnType("decimal(18,6)"); + + b.Property("HandledSupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledSupplierBatch"); b.Property("ItemCode") .IsRequired() @@ -22199,127 +24171,178 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.Property("Number") .IsRequired() .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("Number"); + .HasColumnType("nvarchar(64)"); - b.Property("ProduceDate") + b.Property("OnTheWayLocationCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Operation") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("PlanBeginTime") .HasColumnType("datetime2"); - b.Property("Qty") - .HasPrecision(18, 6) - .HasColumnType("decimal(18,6)") - .HasColumnName("Qty"); + b.Property("PlannedSplitRule") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); - b.Property("Reason") + b.Property("PositionCode") .HasMaxLength(64) .HasColumnType("nvarchar(64)"); - b.Property("ReasonCode") - .HasMaxLength(4096) - .HasColumnType("nvarchar(max)"); + b.Property("ProdLine") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("RecommendArriveDate") + .HasColumnType("datetime2"); + + b.Property("RecommendContainerCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendContainerCode"); + + b.Property("RecommendExpireDate") + .HasColumnType("datetime2"); + + b.Property("RecommendFromLocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendFromLocationArea"); + + b.Property("RecommendFromLocationCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendFromLocationCode"); + + b.Property("RecommendFromLocationErpCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendFromLocationErpCode"); + + b.Property("RecommendFromLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendFromLocationGroup"); + + b.Property("RecommendFromWarehouseCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendFromWarehouseCode"); + + b.Property("RecommendLot") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendLot"); + + b.Property("RecommendPackingCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendPackingCode"); + + b.Property("RecommendProduceDate") + .HasColumnType("datetime2"); + + b.Property("RecommendQty") + .HasColumnType("decimal(18,6)"); + + b.Property("RecommendSupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendSupplierBatch"); + + b.Property("RecommendType") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); b.Property("Remark") .HasMaxLength(3072) .HasColumnType("nvarchar(3072)") .HasColumnName("Remark"); - b.Property("StdPackQty") + b.Property("RequestLocationCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("RoundedQty") .HasColumnType("decimal(18,6)"); - b.Property("SupplierBatch") + b.Property("Status") + .IsRequired() .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("SupplierBatch"); + .HasColumnType("nvarchar(64)"); + + b.Property("StdPackQty") + .HasColumnType("decimal(18,6)"); b.Property("TenantId") .HasColumnType("uniqueidentifier") .HasColumnName("TenantId"); - b.Property("ToContainerCode") - .HasColumnType("nvarchar(max)"); - b.Property("ToLocationArea") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ToLocationArea"); + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); b.Property("ToLocationCode") - .IsRequired() .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ToLocationCode"); + .HasColumnType("nvarchar(64)"); b.Property("ToLocationErpCode") - .IsRequired() .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ToLocationErpCode"); + .HasColumnType("nvarchar(64)"); b.Property("ToLocationGroup") .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ToLocationGroup"); - - b.Property("ToLot") - .HasColumnType("nvarchar(max)"); - - b.Property("ToPackingCode") - .HasColumnType("nvarchar(max)"); + .HasColumnType("nvarchar(64)"); - b.Property("ToStatus") - .IsRequired() + b.Property("ToWarehouseCode") .HasMaxLength(64) .HasColumnType("nvarchar(64)"); - b.Property("ToWarehouseCode") + b.Property("TruncType") .IsRequired() .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ToWarehouseCode"); + .HasColumnType("nvarchar(64)"); b.Property("Uom") - .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("WorkStation") .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("Uom"); + .HasColumnType("nvarchar(64)"); b.HasKey("Id"); b.HasIndex("MasterID"); - b.HasIndex("Number", "FromPackingCode", "FromLocationCode", "ToLocationCode", "FromStatus", "ToStatus") - .IsUnique() - .HasFilter("[FromPackingCode] IS NOT NULL"); - - b.ToTable("Store_WipWarehouseAdjustNoteDetail", (string)null); + b.ToTable("Job_CoatingIssueJobDetail", (string)null); }); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.WipWarehouseAdjustRequest", b => + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Notes.IssueNotes.CoatingIssueNote", b => { b.Property("Id") + .ValueGeneratedOnAdd() .HasColumnType("uniqueidentifier"); b.Property("ActiveDate") .HasColumnType("datetime2"); - b.Property("AutoAgree") - .HasColumnType("bit"); - - b.Property("AutoCompleteJob") - .HasColumnType("bit"); - - b.Property("AutoHandle") - .HasColumnType("bit"); - - b.Property("AutoSubmit") - .HasColumnType("bit"); - b.Property("ConcurrencyStamp") .IsConcurrencyToken() .HasMaxLength(40) .HasColumnType("nvarchar(40)") .HasColumnName("ConcurrencyStamp"); + b.Property("ConfirmTime") + .HasColumnType("datetime2"); + + b.Property("Confirmed") + .HasColumnType("bit"); + b.Property("CreationTime") .HasColumnType("datetime2") .HasColumnName("CreationTime"); @@ -22328,13 +24351,15 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("CreatorId"); - b.Property("DirectCreateNote") - .HasColumnType("bit"); - b.Property("ExtraProperties") .HasColumnType("nvarchar(max)") .HasColumnName("ExtraProperties"); + b.Property("JobNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("JobNumber"); + b.Property("LastModificationTime") .HasColumnType("datetime2") .HasColumnName("LastModificationTime"); @@ -22354,8 +24379,11 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("nvarchar(3072)") .HasColumnName("Remark"); - b.Property("RequestStatus") - .IsRequired() + b.Property("RequestNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("RequestType") .HasMaxLength(64) .HasColumnType("nvarchar(64)"); @@ -22363,24 +24391,28 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("TenantId"); - b.Property("Type") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + b.Property("UseOnTheWayLocation") + .HasColumnType("bit"); b.Property("Worker") .HasColumnType("nvarchar(max)"); + b.Property("Workshop") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + b.HasKey("Id"); b.HasIndex("Number") .IsUnique(); - b.ToTable("Store_WipWarehouseAdjustRequest", (string)null); + b.ToTable("Store_CoatingIssueNote", (string)null); }); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.WipWarehouseAdjustRequestDetail", b => + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Notes.IssueNotes.CoatingIssueNoteDetail", b => { b.Property("Id") + .ValueGeneratedOnAdd() .HasColumnType("uniqueidentifier"); b.Property("ArriveDate") @@ -22397,6 +24429,9 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.Property("ExpireDate") .HasColumnType("datetime2"); + b.Property("ExpiredTime") + .HasColumnType("datetime2"); + b.Property("FromContainerCode") .HasColumnType("nvarchar(max)"); @@ -22426,7 +24461,7 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("nvarchar(max)"); b.Property("FromPackingCode") - .HasColumnType("nvarchar(max)"); + .HasColumnType("nvarchar(450)"); b.Property("FromStatus") .IsRequired() @@ -22439,6 +24474,66 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("nvarchar(64)") .HasColumnName("FromWarehouseCode"); + b.Property("HandledArriveDate") + .HasColumnType("datetime2"); + + b.Property("HandledContainerCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledContainerCode"); + + b.Property("HandledExpireDate") + .HasColumnType("datetime2"); + + b.Property("HandledFromLocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledFromLocationArea"); + + b.Property("HandledFromLocationCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledFromLocationCode"); + + b.Property("HandledFromLocationErpCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledFromLocationErpCode"); + + b.Property("HandledFromLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledFromLocationGroup"); + + b.Property("HandledFromWarehouseCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledFromWarehouseCode"); + + b.Property("HandledLot") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledLot"); + + b.Property("HandledPackingCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledPackingCode"); + + b.Property("HandledProduceDate") + .HasColumnType("datetime2"); + + b.Property("HandledQty") + .HasColumnType("decimal(18,6)"); + + b.Property("HandledSupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledSupplierBatch"); + + b.Property("IssueTime") + .HasColumnType("datetime2"); + b.Property("ItemCode") .IsRequired() .HasMaxLength(64) @@ -22477,6 +24572,17 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("nvarchar(64)") .HasColumnName("Number"); + b.Property("OnTheWayLocationCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("PositionCode") + .HasColumnType("nvarchar(max)"); + + b.Property("ProdLine") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + b.Property("ProduceDate") .HasColumnType("datetime2"); @@ -22485,13 +24591,67 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("decimal(18,6)") .HasColumnName("Qty"); - b.Property("Reason") - .HasMaxLength(4096) - .HasColumnType("nvarchar(max)"); + b.Property("RecommendArriveDate") + .HasColumnType("datetime2"); - b.Property("ReasonCode") - .HasMaxLength(4096) - .HasColumnType("nvarchar(max)"); + b.Property("RecommendContainerCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendContainerCode"); + + b.Property("RecommendExpireDate") + .HasColumnType("datetime2"); + + b.Property("RecommendFromLocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendFromLocationArea"); + + b.Property("RecommendFromLocationCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendFromLocationCode"); + + b.Property("RecommendFromLocationErpCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendFromLocationErpCode"); + + b.Property("RecommendFromLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendFromLocationGroup"); + + b.Property("RecommendFromWarehouseCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendFromWarehouseCode"); + + b.Property("RecommendLot") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendLot"); + + b.Property("RecommendPackingCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendPackingCode"); + + b.Property("RecommendProduceDate") + .HasColumnType("datetime2"); + + b.Property("RecommendQty") + .HasColumnType("decimal(18,6)"); + + b.Property("RecommendSupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendSupplierBatch"); + + b.Property("RecommendType") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); b.Property("Remark") .HasMaxLength(3072) @@ -22558,21 +24718,44 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("nvarchar(64)") .HasColumnName("Uom"); + b.Property("WorkStation") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + b.HasKey("Id"); + b.HasIndex("FromPackingCode"); + b.HasIndex("MasterID"); - b.ToTable("Store_WipWarehouseAdjustRequestDetail", (string)null); + b.HasIndex("Number", "FromPackingCode", "FromLocationCode", "ToLocationCode") + .IsUnique() + .HasFilter("[FromPackingCode] IS NOT NULL"); + + b.ToTable("Store_CoatingIssueNoteDetail", (string)null); }); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.WorkOrder", b => + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Requests.MaterialRequests.CoatingMaterialRequest", b => { b.Property("Id") + .ValueGeneratedOnAdd() .HasColumnType("uniqueidentifier"); b.Property("ActiveDate") .HasColumnType("datetime2"); + b.Property("AutoAgree") + .HasColumnType("bit"); + + b.Property("AutoCompleteJob") + .HasColumnType("bit"); + + b.Property("AutoHandle") + .HasColumnType("bit"); + + b.Property("AutoSubmit") + .HasColumnType("bit"); + b.Property("ConcurrencyStamp") .IsConcurrencyToken() .HasMaxLength(40) @@ -22587,34 +24770,13 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("CreatorId"); - b.Property("EffectiveDate") - .HasColumnType("datetime2"); + b.Property("DirectCreateNote") + .HasColumnType("bit"); b.Property("ExtraProperties") .HasColumnType("nvarchar(max)") .HasColumnName("ExtraProperties"); - b.Property("ItemCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ItemCode"); - - b.Property("ItemDesc1") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ItemDesc1"); - - b.Property("ItemDesc2") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ItemDesc2"); - - b.Property("ItemName") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ItemName"); - b.Property("LastModificationTime") .HasColumnType("datetime2") .HasColumnName("LastModificationTime"); @@ -22623,72 +24785,60 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("LastModifierId"); - b.Property("LocationCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - b.Property("Number") .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)") .HasColumnName("Number"); - b.Property("Op") + b.Property("PreparationPlanNumber") .HasMaxLength(64) .HasColumnType("nvarchar(64)"); - b.Property("Qty") - .HasPrecision(18, 6) - .HasColumnType("decimal(18,6)") - .HasColumnName("Qty"); + b.Property("ProdLine") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); b.Property("Remark") .HasMaxLength(3072) .HasColumnType("nvarchar(3072)") .HasColumnName("Remark"); + b.Property("RequestStatus") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + b.Property("TenantId") .HasColumnType("uniqueidentifier") .HasColumnName("TenantId"); b.Property("Type") - .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)"); - b.Property("Uom") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("Uom"); - - b.Property("WoStatus") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + b.Property("UseOnTheWayLocation") + .HasColumnType("bit"); - b.Property("WorkOrderId") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + b.Property("Worker") + .HasColumnType("nvarchar(max)"); - b.Property("WorkStation") + b.Property("Workshop") .HasMaxLength(64) .HasColumnType("nvarchar(64)"); - b.Property("Worker") - .HasColumnType("nvarchar(max)"); - b.HasKey("Id"); b.HasIndex("Number") .IsUnique(); - b.ToTable("Store_WorkOrder", (string)null); + b.ToTable("Store_CoatingMaterialRequest", (string)null); }); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.WorkOrderDetail", b => + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Requests.MaterialRequests.CoatingMaterialRequestDetail", b => { b.Property("Id") + .ValueGeneratedOnAdd() .HasColumnType("uniqueidentifier"); b.Property("CreationTime") @@ -22699,9 +24849,16 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("CreatorId"); - b.Property("EffectiveDate") + b.Property("ExpiredTime") .HasColumnType("datetime2"); + b.Property("FromLocationArea") + .HasColumnType("nvarchar(max)"); + + b.Property("IssuedQty") + .HasPrecision(18, 6) + .HasColumnType("decimal(18,6)"); + b.Property("ItemCode") .IsRequired() .HasMaxLength(64) @@ -22740,18 +24897,24 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("nvarchar(64)") .HasColumnName("Number"); - b.Property("Op") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + b.Property("PositionCode") + .HasColumnType("nvarchar(max)"); - b.Property("RawLocationCode") + b.Property("ProdLine") .HasMaxLength(64) .HasColumnType("nvarchar(64)"); - b.Property("RawQty") + b.Property("Qty") + .HasPrecision(18, 6) + .HasColumnType("decimal(18,6)") + .HasColumnName("Qty"); + + b.Property("ReceivedQty") + .HasPrecision(18, 6) .HasColumnType("decimal(18,6)"); - b.Property("RawUom") + b.Property("RecommendType") + .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)"); @@ -22760,99 +24923,63 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("nvarchar(3072)") .HasColumnName("Remark"); + b.Property("Status") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("StdPackQty") + .HasColumnType("decimal(18,6)"); + b.Property("TenantId") .HasColumnType("uniqueidentifier") .HasColumnName("TenantId"); - b.HasKey("Id"); - - b.HasIndex("MasterID"); - - b.HasIndex("Number", "ItemCode") - .IsUnique(); - - b.ToTable("Store_WorkOrderDetail", (string)null); - }); - - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Equipments.EquipmentRecord", b => - { - b.Property("Id") - .HasColumnType("uniqueidentifier"); - - b.Property("BarCode") + b.Property("ToLocationArea") + .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)"); - b.Property("Batch") + b.Property("ToLocationCode") + .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)"); - 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("EqptCode") + b.Property("ToLocationErpCode") + .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)"); - b.Property("ExtraProperties") - .HasColumnType("nvarchar(max)") - .HasColumnName("ExtraProperties"); - - b.Property("FromLocCode") + b.Property("ToLocationGroup") + .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)"); - b.Property("LastModificationTime") - .HasColumnType("datetime2") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("uniqueidentifier") - .HasColumnName("LastModifierId"); - - b.Property("PartCode") + b.Property("ToWarehouseCode") + .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)"); - b.Property("Qty") - .HasColumnType("decimal(18,6)"); - - b.Property("Remark") - .HasMaxLength(3072) - .HasColumnType("nvarchar(3072)") - .HasColumnName("Remark"); - - b.Property("State") - .HasColumnType("int"); - - b.Property("TenantId") - .HasColumnType("uniqueidentifier") - .HasColumnName("TenantId"); - - b.Property("ToLocCode") + b.Property("Uom") + .IsRequired() .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + .HasColumnType("nvarchar(64)") + .HasColumnName("Uom"); - b.Property("Type") + b.Property("WorkStation") .HasMaxLength(64) - .HasColumnType("int"); + .HasColumnType("nvarchar(64)"); b.HasKey("Id"); - b.HasIndex("EqptCode"); + b.HasIndex("ItemCode"); - b.ToTable("Store_EquipmentRecord", (string)null); + b.HasIndex("MasterID"); + + b.HasIndex("Number", "ItemCode", "ToLocationCode") + .IsUnique(); + + b.ToTable("Store_CoatingMaterialRequestDetail", (string)null); }); modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.BackFlushNoteDetail", b => @@ -23008,6 +25135,33 @@ namespace Win_in.Sfs.Wms.Store.Migrations .IsRequired(); }); + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.InjectionJobDetail", b => + { + b.HasOne("Win_in.Sfs.Wms.Store.Domain.InjectionJob", null) + .WithMany("Details") + .HasForeignKey("MasterID") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.InjectionNoteDetail", b => + { + b.HasOne("Win_in.Sfs.Wms.Store.Domain.InjectionNote", null) + .WithMany("Details") + .HasForeignKey("MasterID") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.InjectionRequestDetail", b => + { + b.HasOne("Win_in.Sfs.Wms.Store.Domain.InjectionRequest", null) + .WithMany("Details") + .HasForeignKey("MasterID") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.InspectAbnormalNoteDetail", b => { b.HasOne("Win_in.Sfs.Wms.Store.Domain.InspectAbnormalNote", null) @@ -23584,6 +25738,33 @@ namespace Win_in.Sfs.Wms.Store.Migrations .IsRequired(); }); + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Jobs.IssueJobs.CoatingIssueJobDetail", b => + { + b.HasOne("Win_in.Sfs.Wms.Store.Jobs.IssueJobs.CoatingIssueJob", null) + .WithMany("Details") + .HasForeignKey("MasterID") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Notes.IssueNotes.CoatingIssueNoteDetail", b => + { + b.HasOne("Win_in.Sfs.Wms.Store.Notes.IssueNotes.CoatingIssueNote", null) + .WithMany("Details") + .HasForeignKey("MasterID") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Requests.MaterialRequests.CoatingMaterialRequestDetail", b => + { + b.HasOne("Win_in.Sfs.Wms.Store.Requests.MaterialRequests.CoatingMaterialRequest", null) + .WithMany("Details") + .HasForeignKey("MasterID") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.BackFlushNote", b => { b.Navigation("Details"); @@ -23669,6 +25850,21 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.Navigation("Details"); }); + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.InjectionJob", b => + { + b.Navigation("Details"); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.InjectionNote", b => + { + b.Navigation("Details"); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.InjectionRequest", b => + { + b.Navigation("Details"); + }); + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.InspectAbnormalNote", b => { b.Navigation("Details"); @@ -23976,6 +26172,21 @@ namespace Win_in.Sfs.Wms.Store.Migrations { b.Navigation("Details"); }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Jobs.IssueJobs.CoatingIssueJob", b => + { + b.Navigation("Details"); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Notes.IssueNotes.CoatingIssueNote", b => + { + b.Navigation("Details"); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Requests.MaterialRequests.CoatingMaterialRequest", b => + { + b.Navigation("Details"); + }); #pragma warning restore 612, 618 } } diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/StoreDbContextModelCreatingExtensions.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/StoreDbContextModelCreatingExtensions.cs index a69e04391..b9229727a 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/StoreDbContextModelCreatingExtensions.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/StoreDbContextModelCreatingExtensions.cs @@ -24,13 +24,11 @@ public static class StoreDbContextModelCreatingExtensions optionsAction?.Invoke(options); #region Orders - builder.ConfigurePurchaseOrder(options); builder.ConfigureSaleOrder(options); builder.ConfigureWorkOrder(options); builder.ConfigureEquipmentRecord(options); //builder.ConfigureEquipmentLocCap(options); - #endregion #region Plans diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/Win_in.Sfs.Wms.Store.EntityFrameworkCore.csproj b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/Win_in.Sfs.Wms.Store.EntityFrameworkCore.csproj index b0aebac8d..7f8204f22 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/Win_in.Sfs.Wms.Store.EntityFrameworkCore.csproj +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/Win_in.Sfs.Wms.Store.EntityFrameworkCore.csproj @@ -1,4 +1,4 @@ - + diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Jobs/CoatingIssueJobEventHandler.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Jobs/CoatingIssueJobEventHandler.cs new file mode 100644 index 000000000..8a82f504c --- /dev/null +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Jobs/CoatingIssueJobEventHandler.cs @@ -0,0 +1,132 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; +using Volo.Abp.EventBus; +using Volo.Abp.Uow; +using Win_in.Sfs.Basedata.Application.Contracts; +using Win_in.Sfs.Shared.Domain.Shared; +using Win_in.Sfs.Shared.Event; +using Win_in.Sfs.Wms.Store.Application.Contracts; +using Win_in.Sfs.Wms.Store.Domain; +using Win_in.Sfs.Wms.Store.Domain.Shared; +using Win_in.Sfs.Wms.Store.Jobs.IssueJobs; +using Win_in.Sfs.Wms.Store.Notes.IssueNotes; + +namespace Win_in.Sfs.Wms.Store.Event.BusinessJob; + +public class CoatingIssueJobEventHandler : + StoreEventHandlerBase + , ILocalEventHandler> +{ + private const EnumTransType TransType = EnumTransType.Issue; + + private readonly ICoatingIssueNoteAppService _issueNoteAppService; + private readonly ILocationAppService _locationAppService; + + public CoatingIssueJobEventHandler(ICoatingIssueNoteAppService issueNoteAppService, ILocationAppService locationAppService) + { + _issueNoteAppService = issueNoteAppService; + _locationAppService = locationAppService; + } + + /// + /// 执行后 + /// + /// + /// + [UnitOfWork] + public virtual async Task HandleEventAsync(SfsCompletedEntityEventData eventData) + { + var entity = eventData.Entity; + var issueNote = await BuildIssueNoteAsync(entity).ConfigureAwait(false); + await _issueNoteAppService.CreateAsync(issueNote).ConfigureAwait(false); + } + + #region 私有 + + /// + /// 创建补料记录实体 + /// + /// + /// + private async Task BuildIssueNoteAsync(CoatingIssueJob entity) + { + var issueNoteCreateInput = ObjectMapper.Map(entity); + issueNoteCreateInput.JobNumber = entity.Number; + var locationCodes = issueNoteCreateInput.Details.Select(p => p.ToLocationCode).Distinct().ToList(); + var locations = await _locationAppService.GetByCodesAsync(locationCodes).ConfigureAwait(false); + + issueNoteCreateInput.Details.RemoveAll(p => p.Qty == 0); + + foreach (var detail in issueNoteCreateInput.Details) + { + var location = locations.First(p => p.Code == detail.ToLocationCode); + await RemovePackingCodeAndContainerCodeAndLotAsync(detail, location.Type).ConfigureAwait(false); //去箱 去托 去批 + + detail.ToLocationArea = location.AreaCode; + detail.ToLocationGroup = location.LocationGroupCode; + detail.ToLocationErpCode = location.ErpLocationCode; + detail.ToWarehouseCode = location.WarehouseCode; + } + + return issueNoteCreateInput; + } + + /// + /// 去除箱码 托码 批次 + /// + private async Task RemovePackingCodeAndContainerCodeAndLotAsync(CoatingIssueNoteDetailInput issueNoteDetail, + EnumLocationType locationType) + { + switch (locationType) + { + case EnumLocationType.WIP: + { + //用开关控制 发料到线边后去除箱码和托码 ??? + if (await SettingManager.IsTrueAsync(StoreSettings.Issue.ToWip.IsRemovePackingCode) + .ConfigureAwait(false)) + { + issueNoteDetail.ToPackingCode = ""; + } + + if (await SettingManager.IsTrueAsync(StoreSettings.Issue.ToWip.IsRemoveContainerCode) + .ConfigureAwait(false)) + { + issueNoteDetail.ToContainerCode = ""; + } + + if (await SettingManager.IsTrueAsync(StoreSettings.Issue.ToWip.IsRemoveLot).ConfigureAwait(false)) + { + issueNoteDetail.ToLot = ""; + } + + break; + } + case EnumLocationType.SEMI: + { + //用开关控制 发料到后去除箱码和托码 ??? + if (await SettingManager.IsTrueAsync(StoreSettings.Issue.ToSemi.IsRemovePackingCode) + .ConfigureAwait(false)) + { + issueNoteDetail.ToPackingCode = ""; + } + + if (await SettingManager.IsTrueAsync(StoreSettings.Issue.ToSemi.IsRemoveContainerCode) + .ConfigureAwait(false)) + { + issueNoteDetail.ToContainerCode = ""; + } + + if (await SettingManager.IsTrueAsync(StoreSettings.Issue.ToSemi.IsRemoveLot).ConfigureAwait(false)) + { + issueNoteDetail.ToLot = ""; + } + + break; + } + } + } + + #endregion +} diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Requests/CoatingIssueJobEventHandler.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Requests/CoatingIssueJobEventHandler.cs new file mode 100644 index 000000000..e69de29bb diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Requests/CoatingMaterialRequestEventHandler.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Requests/CoatingMaterialRequestEventHandler.cs new file mode 100644 index 000000000..287ebabf2 --- /dev/null +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Requests/CoatingMaterialRequestEventHandler.cs @@ -0,0 +1,307 @@ +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using FluentValidation.Validators; +using Volo.Abp; +using Volo.Abp.EventBus; +using Volo.Abp.SettingManagement; +using Win_in.Sfs.Basedata.Application.Contracts; +using Win_in.Sfs.Shared.Domain.Shared; +using Win_in.Sfs.Shared.Event; +using Win_in.Sfs.Wms.Inventory.Application.Contracts; +using Win_in.Sfs.Wms.Store.Application.Contracts; +using Win_in.Sfs.Wms.Store.Domain; +using Win_in.Sfs.Wms.Store.Domain.Shared; +using Win_in.Sfs.Wms.Store.Jobs.IssueJobs; +using Win_in.Sfs.Wms.Store.Requests.MaterialRequests; + +namespace Win_in.Sfs.Wms.Store.Event.BusinessRequest; + +public class CoatingMaterialRequestEventHandler + : StoreEventHandlerBase + , ILocalEventHandler> + , ILocalEventHandler> + , ILocalEventHandler> + , ILocalEventHandler> + , ILocalEventHandler>> +{ + private readonly ICoatingIssueJobAppService _issueJobAppService; + private readonly IProductionLineAppService _productionLineAppService; + private readonly ICoatingMaterialRequestManager _CoatingMaterialRequestManager; + private readonly ILocationAppService _locationAppService; + private readonly IBalanceAppService _balanceAppService; + + public CoatingMaterialRequestEventHandler( + ICoatingIssueJobAppService issueJobAppService + , IProductionLineAppService productionLineAppService + , ICoatingMaterialRequestManager CoatingMaterialRequestManager + , ILocationAppService locationAppService + , IBalanceAppService balanceAppService) + { + _issueJobAppService = issueJobAppService; + _productionLineAppService = productionLineAppService; + _CoatingMaterialRequestManager = CoatingMaterialRequestManager; + _locationAppService = locationAppService; + _balanceAppService = balanceAppService; + } + + /// + /// 创建后 + /// + /// Event data + public virtual async Task HandleEventAsync(SfsCreatedEntityEventData eventData) + { + var entity = eventData.Entity; + + //if (entity.AutoSubmit) + //{ + // await _CoatingMaterialRequestManager.SubmitAsync(entity).ConfigureAwait(false); + //} + } + + /// + /// 批量创建后 + /// + /// Event data + public virtual async Task HandleEventAsync(SfsCreatedEntityEventData> eventData) + { + var entitys = eventData.Entity; + foreach (var entity in entitys) + { + if (entity.AutoSubmit) + { + await _CoatingMaterialRequestManager.SubmitAsync(entity).ConfigureAwait(false); + } + if (entity.Type == EnumMaterialRequestType.Issue_WIP.ToString()) + { + await _CoatingMaterialRequestManager.SubmitAsync(entity).ConfigureAwait(false); + } + } + } + + /// + /// 执行后 + /// + /// + /// + public virtual async Task HandleEventAsync(SfsHandledEntityEventData eventData) + { + var entity = eventData.Entity; + var issueJobs = await BuildIssueJobAsync(entity).ConfigureAwait(false); + if (issueJobs.Any()) + { + await _issueJobAppService.CreateManyAsync(issueJobs).ConfigureAwait(false); + } + } + + /// + /// 驳回后 + /// + /// + /// + public virtual async Task HandleEventAsync(SfsAbortedEntityEventData eventData) + { + var entity = eventData.Entity; + await _issueJobAppService.CancelByMaterialRequestAsync(entity.Number).ConfigureAwait(false); + } + + /// + /// 完成后 + /// + /// + /// + public virtual async Task HandleEventAsync(SfsCompletedEntityEventData eventData) + { + _ = eventData.Entity; + // await _issueJobAppService.CompleteByCoatingMaterialRequestAsync(entity.Number); + + await Task.CompletedTask.ConfigureAwait(false); + } + + #region 私有 + + private async Task> BuildIssueJobAsync + (CoatingMaterialRequest CoatingMaterialRequest) + { + var jobs = new List(); + + var transactionType = await TransactionTypeAclService.GetByTransTypeAsync(EnumTransType.Issue, EnumTransSubType.None).ConfigureAwait(false);//库存事务 + + var toLocationCodes = CoatingMaterialRequest.Details.Select(p => p.ToLocationCode).Distinct().ToList();//所有发送库位的集合 + var toLocations = await _locationAppService.GetByCodesAsync(toLocationCodes).ConfigureAwait(false);//所有库位的集合 + + var CoatingMaterialRequestDetails = CoatingMaterialRequest.Details.Where(p => p.ToBeIssuedQty > 0);//所有还没发送物品的集合 + foreach (var CoatingMaterialRequestDetail in CoatingMaterialRequestDetails)//如果有还有剩余未叫料的数量 则创建新的任务 + { + var toLocation = toLocations.FirstOrDefault(p => p.Code == CoatingMaterialRequestDetail.ToLocationCode);//判断目标库位是否存在 + Check.NotNull(toLocation, "库位代码", $"库位 {CoatingMaterialRequestDetail.ToLocationCode} 不存在"); + + //创建详情 + var jobDetails = await BuildIssueJobDetailInputsAsync(CoatingMaterialRequest, CoatingMaterialRequestDetail, transactionType, toLocation.LocationGroupCode).ConfigureAwait(false); + if (!jobDetails.Any()) + { + continue; + } + + var fromLocationCode = jobDetails[0].RecommendFromLocationCode; + var fromLocation = await _locationAppService.GetByCodeAsync(fromLocationCode).ConfigureAwait(false); + var job = jobs.FirstOrDefault(p => p.WorkGroupCode == fromLocation?.WorkGroupCode); + if (job == null || job.Details.Any(p => p.ToLocationCode != CoatingMaterialRequestDetail.ToLocationCode)) + { + job = BuildIssueJobCreateInput(CoatingMaterialRequest, fromLocation); + jobs.Add(job); + } + job.Details.AddRange(jobDetails); + if (CoatingMaterialRequestDetail.ToBeIssuedQty < 0) + { + CoatingMaterialRequestDetail.Status = EnumStatus.Close; + } + } + + jobs = jobs.Where(p => p.Details.Any()).ToList(); + + var openRequestDetails = + CoatingMaterialRequest.Details.Where(p => p.Status != EnumStatus.Close).ToList(); + + if (!openRequestDetails.Any()) + { + return jobs; + } + + var enableMultipleCreateIssueJob = await SettingManager.IsTrueAsync(StoreSettings.MaterialRequest.EnableMultipleCreateIssueJob).ConfigureAwait(false); + if (enableMultipleCreateIssueJob) + { + CoatingMaterialRequest.Partial(); + } + else + { + var sb = new StringBuilder(); + foreach (var openRequestDetail in openRequestDetails) + { + sb.AppendLine($"{openRequestDetail.ItemCode}请求数量 {openRequestDetail.Qty},可用库存数量 {openRequestDetail.IssuedQty}"); + } + throw new UserFriendlyException($"{sb} 可用库存数量不足, 无法生成发料任务"); + } + return jobs; + } + + private CoatingIssueJobEditInput BuildIssueJobCreateInput(CoatingMaterialRequest CoatingMaterialRequest, LocationDTO fromLocation) + { + CoatingIssueJobEditInput job; + job = ObjectMapper.Map(CoatingMaterialRequest); + job.JobType = EnumJobType.IssueJob; + job.JobStatus = EnumJobStatus.Open; + job.WorkGroupCode = fromLocation.WorkGroupCode; + job.WarehouseCode = fromLocation.WarehouseCode; + job.ProdLine = fromLocation.LocationGroupCode; + job.Worker = CoatingMaterialRequest.Worker; + job.MaterialRequestNumber = CoatingMaterialRequest.Number; + return job; + } + + private async Task> BuildIssueJobDetailInputsAsync(CoatingMaterialRequest CoatingMaterialRequest, + CoatingMaterialRequestDetail CoatingMaterialRequestDetail, TransactionTypeDTO transactionType, string toLocationGroupCode) + { + var jobDetails = new List(); + var input = new RecommendBalanceRequestInput() + { + ItemCode = CoatingMaterialRequestDetail.ItemCode, + Qty = CoatingMaterialRequestDetail.ToBeIssuedQty, + LocationTypes = transactionType.OutLocationTypes, + LocationAreas = new List { CoatingMaterialRequestDetail.FromLocationArea }, + Statuses = transactionType.OutInventoryStatuses, + }; + //获取推荐库存 + var recommendList = await _balanceAppService.GetRecommendBalancesAsync(input).ConfigureAwait(false); + //没有推荐库存时 跳过此明细 不生成任务 + if (recommendList.Count != 0) + { + foreach (var recommend in recommendList) + { + //拿走需求量 + var detail = await BuildIssueJobDetailAsync(CoatingMaterialRequestDetail, recommend, toLocationGroupCode).ConfigureAwait(false); + if (CoatingMaterialRequest.UseOnTheWayLocation) + { + //获取在途库 + var locationDto = await _locationAppService.GetFirstByTypeAsync(EnumLocationType.TRANSPORT).ConfigureAwait(false); + + detail.OnTheWayLocationCode = locationDto.Code; + } + + jobDetails.Add(detail); + CoatingMaterialRequestDetail.IssuedQty += recommend.Qty; + await _CoatingMaterialRequestManager.UpdateDetailsAsync(CoatingMaterialRequest).ConfigureAwait(false); + + } + } + return jobDetails; + } + + private async Task BuildIssueJobDetailAsync(CoatingMaterialRequestDetail CoatingMaterialRequestDetail, BalanceDTO balance, string toLocationGroupCode) + { + //ProductionLineDTO prodLine = await _productionLineAppService.GetByLocationGroupCodeAsync(toLocationGroupCode).ConfigureAwait(false); + + var detail = ObjectMapper.Map(balance); + detail.RequestLocationCode = CoatingMaterialRequestDetail.ToLocationCode; + detail.WorkStation = CoatingMaterialRequestDetail.WorkStation; + detail.ExpiredTime = CoatingMaterialRequestDetail.ExpiredTime; + detail.PositionCode = CoatingMaterialRequestDetail.PositionCode; + detail.RecommendType = CoatingMaterialRequestDetail.RecommendType; + + detail.RecommendPackingCode = balance.PackingCode; + detail.RecommendContainerCode = balance.ContainerCode; + detail.RecommendSupplierBatch = balance.SupplierBatch; + detail.RecommendProduceDate = balance.ProduceDate; + detail.RecommendExpireDate = balance.ExpireDate; + detail.RecommendLot = balance.Lot; + detail.RecommendProduceDate = balance.ProduceDate; + detail.RecommendArriveDate = balance.ArriveDate; + detail.RecommendFromLocationArea = balance.LocationArea; + detail.RecommendFromLocationCode = balance.LocationCode; + detail.RecommendFromLocationErpCode = balance.LocationErpCode; + detail.RecommendFromLocationGroup = balance.LocationGroup; + detail.RecommendFromWarehouseCode = balance.WarehouseCode; + detail.RecommendQty = balance.Qty; + detail.Uom = balance.Uom; + + detail.ToLocationCode = CoatingMaterialRequestDetail.ToLocationCode; + detail.ToLocationErpCode = CoatingMaterialRequestDetail.ToLocationErpCode; + detail.ToLocationArea = CoatingMaterialRequestDetail.ToLocationArea; + detail.ToWarehouseCode = CoatingMaterialRequestDetail.ToWarehouseCode; + detail.ToLocationGroup = CoatingMaterialRequestDetail.ToLocationGroup; + //detail.Operation = //TODO + //detail.DistributionType =//TODO + //detail.TruncType = //TODO + //detail.RoundedQty =//TODO + //detail.PlannedSplitRule = //TODO + //detail.PlanBeginTime = //TODO + //detaiol.DeliveryQty = //TODO + + // var detail = ObjectMapper.Map(CoatingMaterialRequestDetail); + // + // detail.RecommendPackingCode = balance.PackingCode; + // detail.RecommendContainerCode = balance.ContainerCode; + // detail.RecommendLot = balance.Lot; + // detail.RecommendLocationCode = balance.LocationCode; + // detail.RecommendLocationArea = balance.LocationArea; + // detail.RecommendLocationGroup = balance.LocationGroup; + // detail.RecommendLocationErpCode = balance.LocationErpCode; + // detail.WarehouseCode = balance.WarehouseCode; + // detail.Status = balance.Status; + // detail.RecommendSupplierBatch = balance.SupplierBatch; + // detail.RecommendArriveDate = balance.ArriveDate; + // detail.RecommendProduceDate = balance.ProduceDate; + // detail.RecommendExpireDate = balance.ExpireDate; + // detail.RecommendQty = balance.Qty; + // detail.RecommendUom = balance.Uom; + + // detail.ProdLine = prodLine == null ? toLocationGroupCode : prodLine.Code; + detail.ProdLine = toLocationGroupCode; + await Task.CompletedTask.ConfigureAwait(false); + return detail; + + } + + #endregion +} diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Requests/InjectionRequestEventHandler.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Requests/InjectionRequestEventHandler.cs index 355c83d65..8d31e595b 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Requests/InjectionRequestEventHandler.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Requests/InjectionRequestEventHandler.cs @@ -163,9 +163,11 @@ public class InjectionRequestEventHandler return jobs; } + var enableMultipleCreateInjectionJob = await SettingManager.IsTrueAsync(StoreSettings.MaterialRequest.EnableMultipleCreateIssueJob).ConfigureAwait(false); if (enableMultipleCreateInjectionJob) { + //injectionRequest.Partial(); } else @@ -229,6 +231,7 @@ public class InjectionRequestEventHandler jobDetails.Add(detail); injectionRequestDetail.IssuedQty += recommend.Qty; + //await _injectionRequestManager.UpdateDetailsAsync(injectionRequest).ConfigureAwait(false); } @@ -238,6 +241,7 @@ public class InjectionRequestEventHandler private async Task BuildInjectionJobDetailAsync(InjectionRequestDetail injectionRequestDetail, BalanceDTO balance, string toLocationGroupCode) { + //ProductionLineDTO prodLine = await _productionLineAppService.GetByLocationGroupCodeAsync(toLocationGroupCode).ConfigureAwait(false); var detail = ObjectMapper.Map(balance); @@ -267,8 +271,7 @@ public class InjectionRequestEventHandler detail.ToLocationErpCode = injectionRequestDetail.ToLocationErpCode; detail.ToLocationArea = injectionRequestDetail.ToLocationArea; detail.ToWarehouseCode = injectionRequestDetail.ToWarehouseCode; - detail.ToLocationGroup = injectionRequestDetail.ToLocationGroup; - + //detail.ProdLine = prodLine == null ? toLocationGroupCode : prodLine.Code; detail.ProdLine = toLocationGroupCode ; await Task.CompletedTask.ConfigureAwait(false); diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Requests/MaterialRequestEventHandler.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Requests/MaterialRequestEventHandler.cs index 4f9c8d67f..1e56002a4 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Requests/MaterialRequestEventHandler.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Requests/MaterialRequestEventHandler.cs @@ -238,7 +238,7 @@ public class MaterialRequestEventHandler private async Task BuildIssueJobDetailAsync(MaterialRequestDetail materialRequestDetail, BalanceDTO balance, string toLocationGroupCode) { - ProductionLineDTO prodLine = await _productionLineAppService.GetByLocationGroupCodeAsync(toLocationGroupCode).ConfigureAwait(false); + //ProductionLineDTO prodLine = await _productionLineAppService.GetByLocationGroupCodeAsync(toLocationGroupCode).ConfigureAwait(false); var detail = ObjectMapper.Map(balance); detail.RequestLocationCode = materialRequestDetail.ToLocationCode; @@ -294,7 +294,7 @@ public class MaterialRequestEventHandler // detail.RecommendQty = balance.Qty; // detail.RecommendUom = balance.Uom; - detail.ProdLine = prodLine == null ? toLocationGroupCode : prodLine.Code; + //detail.ProdLine = prodLine == null ? toLocationGroupCode : prodLine.Code; await Task.CompletedTask.ConfigureAwait(false); return detail; diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Requests/Note/CoatingIssueNoteEventHandler.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Requests/Note/CoatingIssueNoteEventHandler.cs new file mode 100644 index 000000000..f41206079 --- /dev/null +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Requests/Note/CoatingIssueNoteEventHandler.cs @@ -0,0 +1,100 @@ +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; +using Volo.Abp.EventBus; +using Volo.Abp.Uow; +using Win_in.Sfs.Shared.Domain.Shared; +using Win_in.Sfs.Shared.Event; +using Win_in.Sfs.Wms.Store.Domain; +using Win_in.Sfs.Wms.Store.Notes.IssueNotes; +using Win_in.Sfs.Wms.Store.Requests.MaterialRequests; +using static Win_in.Sfs.Wms.Store.Domain.Shared.StoreSettings; +using MaterialRequest = Win_in.Sfs.Wms.Store.Domain.MaterialRequest; + +namespace Win_in.Sfs.Wms.Store.Event.BusinessRequest; + +public class CoatingIssueNoteEventHandler + : StoreEventHandlerBase + , ILocalEventHandler> + , ILocalEventHandler>> + , ILocalEventHandler> +{ + private readonly ICoatingMaterialRequestManager _materialRequestManager; + + public CoatingIssueNoteEventHandler( + ICoatingMaterialRequestManager materialRequestManager + ) + { + _materialRequestManager = materialRequestManager; + } + + /// + /// 当叫料记录创建后 修改请求的值 + /// + /// + /// + [UnitOfWork] + public virtual async Task HandleEventAsync(SfsConfirmedEntityEventData eventData) + { + var entity = eventData.Entity; + + await UpdateReceivedQtyMaterialRequestAsync(entity).ConfigureAwait(false); + } + + /// + /// 当叫料记录创建后 修改请求的值 + /// + /// + /// + [UnitOfWork] + public virtual async Task HandleEventAsync(SfsCreatedEntityEventData eventData) + { + var entity = eventData.Entity; + if (!entity.UseOnTheWayLocation) + { + await UpdateReceivedQtyMaterialRequestAsync(entity).ConfigureAwait(false); + } + } + + /// + /// 当叫料记录创建后 修改请求的值 + /// + /// + /// + [UnitOfWork] + public virtual async Task HandleEventAsync(SfsCreatedEntityEventData> eventData) + { + var entities = eventData.Entity; + foreach (var entity in entities.Where(entity => !entity.UseOnTheWayLocation)) + { + await UpdateReceivedQtyMaterialRequestAsync(entity).ConfigureAwait(false); + } + } + + private async Task UpdateReceivedQtyMaterialRequestAsync(CoatingIssueNote entity) + { + var receiveQtyGroup = entity.Details + .GroupBy(p => new { p.ItemCode, p.ToLocationCode }) + .Select(p => new { p.Key.ItemCode, p.Key.ToLocationCode, Qty = p.Sum(d => d.Qty) }) + .ToList(); + + var materialRequest = await _materialRequestManager.GetByNumberAsync(entity.RequestNumber).ConfigureAwait(false); + + if (entity.RequestType != EnumMaterialRequestType.Issue_Direct.ToString()) + { + //更新叫料请求的已收数量 + foreach (var materialRequestDetail in materialRequest.Details) + { + var receiveQty = receiveQtyGroup.FirstOrDefault(p => + p.ItemCode == materialRequestDetail.ItemCode && + p.ToLocationCode == materialRequestDetail.ToLocationCode)?.Qty; + if (receiveQty != null) + { + materialRequestDetail.ReceivedQty += receiveQty.Value; + } + } + + await _materialRequestManager.UpdateDetailsAsync(materialRequest).ConfigureAwait(false); + } + } +} diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Requests/ProductReceiptRequestEventHandler.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Requests/ProductReceiptRequestEventHandler.cs index e59b18222..cbbbeeabe 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Requests/ProductReceiptRequestEventHandler.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Requests/ProductReceiptRequestEventHandler.cs @@ -128,13 +128,13 @@ public class ProductReceiptRequestEventHandler { var detail = ObjectMapper.Map(productionPlanDetail); detail.ProdLine = productionPlan.ProdLine; - detail.RawLocationCode = productionLine.RawLocationCode; //原料回冲库位 + //detail.RawLocationCode = productionLine.RawLocationCode; //原料回冲库位 detail.RecommendSupplierBatch = productionPlanDetail.SupplierBatch; detail.RecommendArriveDate = productionPlanDetail.ArriveDate; detail.RecommendProduceDate = productionPlanDetail.ProduceDate; detail.RecommendExpireDate = productionPlanDetail.ExpireDate; detail.RecommendLot = productionPlanDetail.Lot; - detail.RecommendToLocationCode = productionLine.ProductLocationCode; + //detail.RecommendToLocationCode = productionLine.ProductLocationCode; detail.RecommendQty = productionPlanDetail.Qty; detail.Uom = productionPlanDetail.Uom; detail.StdPackQty = productionPlanDetail.StdPackQty; @@ -153,8 +153,8 @@ public class ProductReceiptRequestEventHandler var productionLine = await _productionLineAppService.GetByCodeAsync(productionPlan.ProdLine).ConfigureAwait(false); Check.NotNull(productionLine, "生产线代码", $"生产线 {productionPlan.ProdLine} 不存在"); - var location = await LocationAclService.GetByCodeAsync(productionLine.ProductLocationCode).ConfigureAwait(false); - Check.NotNull(location, "库位代码", $"库位 {productionLine.ProductLocationCode} 不存在"); + //var location = await LocationAclService.GetByCodeAsync(productionLine.ProductLocationCode).ConfigureAwait(false); + //Check.NotNull(location, "库位代码", $"库位 {productionLine.ProductLocationCode} 不存在"); var num = itemPack == 0 ? 1 : (int)Math.Ceiling(productionPlanDetail.Qty / itemPack); for (var n = 0; n < num; n++) @@ -169,8 +169,8 @@ public class ProductReceiptRequestEventHandler //设置工作组和任务优先级 entity.Priority = PriorityHelper.GetPriority(Clock); entity.PriorityIncrement = 1; - entity.WarehouseCode = location.WarehouseCode; - entity.WorkGroupCode = location.WorkGroupCode; + //entity.WarehouseCode = location.WarehouseCode; + //entity.WorkGroupCode = location.WorkGroupCode; return entity; diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Requests/ProductionPlanEventHandler.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Requests/ProductionPlanEventHandler.cs index 2212785fd..b52a02a04 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Requests/ProductionPlanEventHandler.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Requests/ProductionPlanEventHandler.cs @@ -66,13 +66,13 @@ public class ProductionPlanEventHandler { var detail = ObjectMapper.Map(productionPlanDetail); detail.ProdLine = productionPlan.ProdLine; - detail.RawLocationCode = productionLine.RawLocationCode; //原料回冲库位 + //detail.RawLocationCode = productionLine.RawLocationCode; //原料回冲库位 detail.RecommendSupplierBatch = productionPlanDetail.SupplierBatch; detail.RecommendArriveDate = productionPlanDetail.ArriveDate; detail.RecommendProduceDate = productionPlanDetail.ProduceDate; detail.RecommendExpireDate = productionPlanDetail.ExpireDate; detail.RecommendLot = productionPlanDetail.Lot; - detail.RecommendToLocationCode = productionLine.ProductLocationCode; + //detail.RecommendToLocationCode = productionLine.ProductLocationCode; detail.RecommendQty = productionPlanDetail.PlanQty; detail.Uom = productionPlanDetail.Uom; detail.StdPackQty = stdPackQty; @@ -91,8 +91,8 @@ public class ProductionPlanEventHandler var productionLine = await _productionLineAppService.GetByCodeAsync(productionPlan.ProdLine).ConfigureAwait(false); Check.NotNull(productionLine, "生产线代码", $"生产线 {productionPlan.ProdLine} 不存在"); - var location = await LocationAclService.GetByCodeAsync(productionLine.ProductLocationCode).ConfigureAwait(false); - Check.NotNull(location, "库位代码", $"库位 {productionLine.ProductLocationCode} 不存在"); + //var location = await LocationAclService.GetByCodeAsync(productionLine.ProductLocationCode).ConfigureAwait(false); + //Check.NotNull(location, "库位代码", $"库位 {productionLine.ProductLocationCode} 不存在"); var num = (int)Math.Ceiling(productionPlanDetail.PlanQty / item.StdPackQty); for (var n = 0; n < num; n++) @@ -107,8 +107,8 @@ public class ProductionPlanEventHandler //设置工作组和任务优先级 entity.Priority = PriorityHelper.GetPriority(Clock); entity.PriorityIncrement = 1; - entity.WarehouseCode = location.WarehouseCode; - entity.WorkGroupCode = location.WorkGroupCode; + //entity.WarehouseCode = location.WarehouseCode; + //entity.WorkGroupCode = location.WorkGroupCode; return entity;