From 0833eacd58ccaa46ac3ac38ceae274565144f07a Mon Sep 17 00:00:00 2001 From: "boxu.zheng" Date: Tue, 11 Apr 2023 15:02:54 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=BA=93=E5=AD=98?= =?UTF-8?q?=E6=98=A0=E5=B0=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../StoreHttpApiHostModule.cs | 7 +++ .../Inventories/BalanceController.cs | 10 ++--- .../ItemPacks/ItemPackAutoMapperProfile.cs | 1 + .../Filters/FilterExtensions.cs | 43 ++++++++++--------- 4 files changed, 35 insertions(+), 26 deletions(-) diff --git a/be/Hosts/Wms.Host/Win_in.Sfs.Wms.Store.HttpApi.Host/StoreHttpApiHostModule.cs b/be/Hosts/Wms.Host/Win_in.Sfs.Wms.Store.HttpApi.Host/StoreHttpApiHostModule.cs index cb6ae48c9..84e46d947 100644 --- a/be/Hosts/Wms.Host/Win_in.Sfs.Wms.Store.HttpApi.Host/StoreHttpApiHostModule.cs +++ b/be/Hosts/Wms.Host/Win_in.Sfs.Wms.Store.HttpApi.Host/StoreHttpApiHostModule.cs @@ -1,4 +1,5 @@ using System.IO; +using System.Text.Json.Serialization; using Microsoft.AspNetCore.Hosting; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Hosting; @@ -83,6 +84,12 @@ public class StoreHttpApiHostModule : ModuleBase { base.ConfigureServices(context); ConfigureVirtualFileSystem(); + + //将枚举返回时都变为字符串 + //context.Services.AddControllers().AddJsonOptions(options => + //{ + // options.JsonSerializerOptions.Converters.Add(new JsonStringEnumConverter()); + //}); //ConfigureSwaggerServices(context, context.Services.GetConfiguration()); } diff --git a/be/Hosts/WmsPda.Host/Win_in.Sfs.Wms.Pda.Host/Controllers/Inventories/BalanceController.cs b/be/Hosts/WmsPda.Host/Win_in.Sfs.Wms.Pda.Host/Controllers/Inventories/BalanceController.cs index b4a4ed2a3..9adb5c110 100644 --- a/be/Hosts/WmsPda.Host/Win_in.Sfs.Wms.Pda.Host/Controllers/Inventories/BalanceController.cs +++ b/be/Hosts/WmsPda.Host/Win_in.Sfs.Wms.Pda.Host/Controllers/Inventories/BalanceController.cs @@ -280,11 +280,11 @@ public class BalanceController : AbpController } } - if (listInput.inventoryStatuses != null && listInput.inventoryStatuses.Any()) - { - input.Condition.Filters.Add( - new Filter("Status", JsonSerializer.Serialize(listInput.inventoryStatuses), "In")); - } + //if (listInput.inventoryStatuses != null && listInput.inventoryStatuses.Any()) + //{ + // input.Condition.Filters.Add( + // new Filter("Status", JsonSerializer.Serialize(listInput.inventoryStatuses), "In")); + //} var balanceDTOs = await _balanceAppService.GetPagedListByFilterAsync(input, false).ConfigureAwait(false); diff --git a/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/ItemPacks/ItemPackAutoMapperProfile.cs b/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/ItemPacks/ItemPackAutoMapperProfile.cs index 3b5b405af..8de7a1e0d 100644 --- a/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/ItemPacks/ItemPackAutoMapperProfile.cs +++ b/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/ItemPacks/ItemPackAutoMapperProfile.cs @@ -22,6 +22,7 @@ public partial class BasedataApplicationAutoMapperProfile : Profile CreateMap() .IgnoreAuditedObjectProperties() .Ignore(x => x.TenantId) + .Ignore(x=>x.Id) .Ignore(x => x.ExtraProperties) .Ignore(x => x.ConcurrencyStamp) ; diff --git a/be/Modules/Shared/src/Win_in.Sfs.Shared.Domain/Filters/FilterExtensions.cs b/be/Modules/Shared/src/Win_in.Sfs.Shared.Domain/Filters/FilterExtensions.cs index 3fc0120be..5fadcdde4 100644 --- a/be/Modules/Shared/src/Win_in.Sfs.Shared.Domain/Filters/FilterExtensions.cs +++ b/be/Modules/Shared/src/Win_in.Sfs.Shared.Domain/Filters/FilterExtensions.cs @@ -206,27 +206,28 @@ public static class FilterExtensions var parameterExpression = Expression.Parameter(typeof(T), "p"); Type lstType = typeof(List<>).MakeGenericType(propertyType); - if (propertyType.IsEnum) - { - var valueArrayStrings = JsonSerializer.Deserialize>(filter.Value); - List newValues = new List(); - - var enumValues = propertyType.GetEnumValues(); - - foreach (var valueArray in valueArrayStrings) - { - foreach (var enumValue in enumValues) - { - if (enumValue.ToString() == valueArray) - { - newValues.Add(enumValue); - break; - } - } - } - var newValue = JsonSerializer.Serialize(newValues); - filter.Value = newValue; - } + //转换枚举 + //if (propertyType.IsEnum) + //{ + // var valueArrayStrings = JsonSerializer.Deserialize>(filter.Value); + // List newValues = new List(); + + // var enumValues = propertyType.GetEnumValues(); + + // foreach (var valueArray in valueArrayStrings) + // { + // foreach (var enumValue in enumValues) + // { + // if (enumValue.ToString() == valueArray) + // { + // newValues.Add(enumValue); + // break; + // } + // } + // } + // var newValue = JsonSerializer.Serialize(newValues); + // filter.Value = newValue; + //} object propertyValue = JsonSerializer.Deserialize(filter.Value, lstType); if (propertyValue != null) From d74fdf70e1fbd28381e052819794cb4ccd04837a Mon Sep 17 00:00:00 2001 From: "mingliang.tang" Date: Tue, 11 Apr 2023 16:37:43 +0800 Subject: [PATCH 2/3] =?UTF-8?q?mapp=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Calendars/InterfaceCalendarAutoMapperProfile.cs | 3 +++ .../CustomerItems/CustomerItemAutoMapperProfile.cs | 5 ++++- .../ErpLocations/ErpLocationAutoMapperProfile.cs | 4 +++- .../ItemPacks/ItemPackAutoMapperProfile.cs | 4 +++- .../SupplierItems/SupplierItemAutoMapperProfile.cs | 5 +++++ .../Balances/BalanceAutoMapperProfile.cs | 1 + .../InventoryLabels/InventoryLabelAutoMapperProfile.cs | 9 +++++++++ .../BackFlushNotes/BackFlushNoteAutoMapperProfile.cs | 4 ++++ .../ProductReceiptNoteAutoMapperProfile.cs | 5 +++++ .../Notes/ScrapNotes/ScrapNoteAutoMapperProfile.cs | 3 +++ .../PurchaseOrders/PurchaseOrderAutoMapperProfile.cs | 2 ++ .../Orders/SaleOrders/SaleOrderAutoMapperProfile.cs | 4 ++++ 12 files changed, 46 insertions(+), 3 deletions(-) diff --git a/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/Calendars/InterfaceCalendarAutoMapperProfile.cs b/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/Calendars/InterfaceCalendarAutoMapperProfile.cs index 97d14dffc..2c8c5aade 100644 --- a/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/Calendars/InterfaceCalendarAutoMapperProfile.cs +++ b/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/Calendars/InterfaceCalendarAutoMapperProfile.cs @@ -12,5 +12,8 @@ public partial class BasedataApplicationAutoMapperProfile : Profile CreateMap() .IgnoreAuditedObjectProperties() .ReverseMap(); + CreateMap() + .IgnoreAuditedObjectProperties() + .Ignore(x => x.ConcurrencyStamp).Ignore(x => x.Id); } } diff --git a/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/CustomerItems/CustomerItemAutoMapperProfile.cs b/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/CustomerItems/CustomerItemAutoMapperProfile.cs index 218505a3d..9e10e579c 100644 --- a/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/CustomerItems/CustomerItemAutoMapperProfile.cs +++ b/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/CustomerItems/CustomerItemAutoMapperProfile.cs @@ -23,7 +23,10 @@ public partial class BasedataApplicationAutoMapperProfile : Profile .Ignore(x => x.ReportStatus) .Ignore(x => x.ReportReason) ; - + CreateMap() + .IgnoreAuditedObjectProperties() + .Ignore(x => x.ConcurrencyStamp) + .Ignore(x => x.Id); } } diff --git a/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/ErpLocations/ErpLocationAutoMapperProfile.cs b/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/ErpLocations/ErpLocationAutoMapperProfile.cs index 3b9cb52fb..fdeb61c43 100644 --- a/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/ErpLocations/ErpLocationAutoMapperProfile.cs +++ b/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/ErpLocations/ErpLocationAutoMapperProfile.cs @@ -18,6 +18,8 @@ public partial class BasedataApplicationAutoMapperProfile : Profile .Ignore(x => x.Remark) .Ignore(x => x.ExtraProperties) .Ignore(x => x.ConcurrencyStamp); - + CreateMap() + .IgnoreAuditedObjectProperties() + .Ignore(x => x.ConcurrencyStamp).Ignore(x => x.Id); } } diff --git a/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/ItemPacks/ItemPackAutoMapperProfile.cs b/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/ItemPacks/ItemPackAutoMapperProfile.cs index 3b5b405af..f79c194fe 100644 --- a/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/ItemPacks/ItemPackAutoMapperProfile.cs +++ b/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/ItemPacks/ItemPackAutoMapperProfile.cs @@ -25,6 +25,8 @@ public partial class BasedataApplicationAutoMapperProfile : Profile .Ignore(x => x.ExtraProperties) .Ignore(x => x.ConcurrencyStamp) ; - + CreateMap() + .IgnoreAuditedObjectProperties() + .Ignore(x => x.ConcurrencyStamp).Ignore(x => x.Id); } } diff --git a/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/SupplierItems/SupplierItemAutoMapperProfile.cs b/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/SupplierItems/SupplierItemAutoMapperProfile.cs index 3031daabc..d56ab00e7 100644 --- a/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/SupplierItems/SupplierItemAutoMapperProfile.cs +++ b/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/SupplierItems/SupplierItemAutoMapperProfile.cs @@ -24,5 +24,10 @@ public partial class BasedataApplicationAutoMapperProfile : Profile CreateMap() .Ignore(x => x.ReportStatus) .Ignore(x => x.ReportReason); + CreateMap() + .IgnoreAuditedObjectProperties() + //.ForMember(x => x.SupplierPackQty, y => y.MapFrom(d => new UomQty(d.SupplierPackUom, d.SupplierPackQty))) + .Ignore(x => x.ConcurrencyStamp) + .Ignore(x => x.Id); } } diff --git a/be/Modules/Inventory/src/Win_in.Sfs.Wms.Inventory.Application/Balances/BalanceAutoMapperProfile.cs b/be/Modules/Inventory/src/Win_in.Sfs.Wms.Inventory.Application/Balances/BalanceAutoMapperProfile.cs index 789d613d5..d48e72113 100644 --- a/be/Modules/Inventory/src/Win_in.Sfs.Wms.Inventory.Application/Balances/BalanceAutoMapperProfile.cs +++ b/be/Modules/Inventory/src/Win_in.Sfs.Wms.Inventory.Application/Balances/BalanceAutoMapperProfile.cs @@ -31,5 +31,6 @@ public partial class InventoryApplicationAutoMapperProfile : Profile CreateMap() .Ignore(x => x.JobNumber) .Ignore(x => x.Worker); + } } diff --git a/be/Modules/Label/src/Win_in.Sfs.Label.Application/InventoryLabels/InventoryLabelAutoMapperProfile.cs b/be/Modules/Label/src/Win_in.Sfs.Label.Application/InventoryLabels/InventoryLabelAutoMapperProfile.cs index a9050e8f8..2cccbc882 100644 --- a/be/Modules/Label/src/Win_in.Sfs.Label.Application/InventoryLabels/InventoryLabelAutoMapperProfile.cs +++ b/be/Modules/Label/src/Win_in.Sfs.Label.Application/InventoryLabels/InventoryLabelAutoMapperProfile.cs @@ -51,5 +51,14 @@ public class InventoryLabelAutoMapperProfile : Profile .Ignore(x => x.Id) .Ignore(x => x.StdPackQty) .Ignore(x => x.Uom); + + CreateMap() + .IgnoreAuditedObjectProperties() + //.MapItemBatchQtyStdPackDto() + .MapPurchaseInfoDto() + .MapProductionInfoDto() + .MapQualityInfoDto() + .Ignore(x => x.ConcurrencyStamp) + .Ignore(x => x.Id); } } diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/BackFlushNotes/BackFlushNoteAutoMapperProfile.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/BackFlushNotes/BackFlushNoteAutoMapperProfile.cs index b6084ec5f..0512e574e 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/BackFlushNotes/BackFlushNoteAutoMapperProfile.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/BackFlushNotes/BackFlushNoteAutoMapperProfile.cs @@ -22,5 +22,9 @@ public partial class StoreApplicationAutoMapperProfile : Profile .Ignore(x => x.TenantId) .Ignore(x => x.Number) .Ignore(x => x.Id); + CreateMap() + .IgnoreAuditedObjectProperties(); + + } } diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/ProductReceiptNotes/ProductReceiptNoteAutoMapperProfile.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/ProductReceiptNotes/ProductReceiptNoteAutoMapperProfile.cs index 22ccaef66..9cd37feef 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/ProductReceiptNotes/ProductReceiptNoteAutoMapperProfile.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/ProductReceiptNotes/ProductReceiptNoteAutoMapperProfile.cs @@ -23,5 +23,10 @@ public partial class StoreApplicationAutoMapperProfile : Profile .Ignore(x => x.TenantId) .Ignore(x => x.Number) .Ignore(x => x.Id); + CreateMap() + .IgnoreAuditedObjectProperties() + .Ignore(x => x.Shift) + .Ignore(x => x.ConcurrencyStamp) + .Ignore(x => x.Id); } } diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/ScrapNotes/ScrapNoteAutoMapperProfile.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/ScrapNotes/ScrapNoteAutoMapperProfile.cs index 7545e93a1..15eddc2f4 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/ScrapNotes/ScrapNoteAutoMapperProfile.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/ScrapNotes/ScrapNoteAutoMapperProfile.cs @@ -20,5 +20,8 @@ public partial class StoreApplicationAutoMapperProfile : Profile .Ignore(x => x.TenantId) .Ignore(x => x.Number) .Ignore(x => x.Id); + CreateMap() + .IgnoreAuditedObjectProperties() + .Ignore(x => x.ConcurrencyStamp).Ignore(x => x.Id); } } diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Orders/PurchaseOrders/PurchaseOrderAutoMapperProfile.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Orders/PurchaseOrders/PurchaseOrderAutoMapperProfile.cs index 8caa93937..2ef9b67b1 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Orders/PurchaseOrders/PurchaseOrderAutoMapperProfile.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Orders/PurchaseOrders/PurchaseOrderAutoMapperProfile.cs @@ -55,5 +55,7 @@ public partial class StoreApplicationAutoMapperProfile : Profile .Ignore(x => x.TenantId) .Ignore(x => x.MasterID) .Ignore(x => x.Id); + CreateMap() + .IgnoreAuditedObjectProperties(); } } diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Orders/SaleOrders/SaleOrderAutoMapperProfile.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Orders/SaleOrders/SaleOrderAutoMapperProfile.cs index 8b10bf925..7006bf3f2 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Orders/SaleOrders/SaleOrderAutoMapperProfile.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Orders/SaleOrders/SaleOrderAutoMapperProfile.cs @@ -45,5 +45,9 @@ public partial class StoreApplicationAutoMapperProfile : Profile .Ignore(x => x.Number) .IgnoreAuditedObjectProperties() .Ignore(x => x.Id); + CreateMap() + .IgnoreAuditedObjectProperties(); + //.MapContactsDto() + //.Ignore(x => x.ConcurrencyStamp).Ignore(x => x.Id); } } From fc9410f484ffb064f1c730db2cefc6523445389e Mon Sep 17 00:00:00 2001 From: "boxu.zheng" Date: Wed, 12 Apr 2023 15:35:29 +0800 Subject: [PATCH 3/3] =?UTF-8?q?=E4=BF=AE=E6=94=B9=20=E4=B8=9A=E5=8A=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Inventories/BalanceController.cs | 57 +- .../Controllers/Jobs/CountJobController.cs | 6 +- .../Controllers/Jobs/DeliverJobController.cs | 4 +- .../Controllers/Jobs/InspectJobController.cs | 4 +- .../Controllers/Jobs/IssueJobController.cs | 6 +- .../Jobs/JisDeliverJobController.cs | 4 +- .../Controllers/Jobs/JobController.cs | 2 +- .../Jobs/ProductReceiveJobController.cs | 4 +- .../Jobs/ProductionReturnJobController.cs | 4 +- .../Jobs/PurchaseReceiptJobController.cs | 72 +- .../Jobs/PurchaseReturnJobController.cs | 4 +- .../Controllers/Jobs/PutawayJobController.cs | 4 +- .../Controllers/Stores/IssueNoteController.cs | 13 +- .../PurchaseReceiptRequestController.cs | 13 + .../Stores/PurchaseReturnNoteController.cs | 23 +- .../ExpectOuts/IExpectOutAppService.cs | 1 + .../ExpectOuts/ExpectOutAppService.cs | 8 + .../InventoryLabels/InventoryLabelDto.cs | 7 + .../InventoryLabelEditInput.cs | 7 + .../InventoryLabelImportInput.cs | 7 + .../InventoryLabelWithoutCodeCreateInput.cs | 7 + .../InventoryLabels/InventoryLabel.cs | 7 + .../ISfsCrudWithDetailsAppService.cs | 1 + .../SfsCrudWithDetailsAppServiceBase.cs | 9 +- .../Enums/Store/EnumMaterialRequestType.cs | 3 + .../IPurchaseReceiptJobAppService.cs | 8 + .../Notes/DeliverNotes/DTOs/DeliverNoteDTO.cs | 7 + .../Inputs/DeliverNoteEditInput.cs | 8 + .../IPurchaseReceiptRequestAppService.cs | 9 + .../Jobs/InspectJobs/InspectJobAppService.cs | 1 + .../PurchaseReceiptJobAppService.cs | 14 + .../DeliverNotes/DeliverNoteAppService.cs | 21 +- .../DeliverNoteAutoMapperProfile.cs | 13 + .../IssueNotes/IssueNoteAutoMapperProfile.cs | 7 + .../PurchaseReturnNoteAutoMapperProfile.cs | 14 + .../Notes/ScrapNotes/ScrapNoteAppService.cs | 27 +- .../ScrapNotes/ScrapNoteAutoMapperProfile.cs | 14 + .../SupplierAsns/SupplierAsnAppService.cs | 1 + .../PurchaseReceiptRequestAppService.cs | 20 + .../ScrapRequests/ScrapRequestAppService.cs | 121 +- .../TransferRequestAppService.cs | 15 +- .../Jobs/InspectJobs/InspectJobManager.cs | 7 +- .../Notes/DeliverNotes/DeliverNote.cs | 9 + .../Notes/ScrapNotes/ScrapNoteManager.cs | 4 +- ...20230412072454_Store_AddColumn.Designer.cs | 20983 ++++++++++++++++ .../20230412072454_Store_AddColumn.cs | 68 + .../Migrations/StoreDbContextModelSnapshot.cs | 12 +- .../Jobs/IssueJobAutoMapperProfile.cs | 30 +- .../StoreDataExchangeEventHandlerBase.cs | 4 +- .../Jobs/IssueJobEventHandler.cs | 2 +- .../Orders/PurchaseOrderEventHandler.cs | 21 +- .../Requests/IssueNoteEventHandler.cs | 132 +- .../Requests/Note/ScrapNoteEventHandler.cs | 57 + .../Requests/ScrapRequestEventHandler.cs | 39 +- .../Transactions/DeliverNoteEventHandler.cs | 15 +- .../Transactions/IssueNoteEventHandler.cs | 255 +- .../Transactions/ScrapNoteEventHandler.cs | 18 +- .../settings/appsettings.Development.json | 6 +- 58 files changed, 21916 insertions(+), 323 deletions(-) create mode 100644 be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/Migrations/20230412072454_Store_AddColumn.Designer.cs create mode 100644 be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/Migrations/20230412072454_Store_AddColumn.cs create mode 100644 be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Requests/Note/ScrapNoteEventHandler.cs diff --git a/be/Hosts/WmsPda.Host/Win_in.Sfs.Wms.Pda.Host/Controllers/Inventories/BalanceController.cs b/be/Hosts/WmsPda.Host/Win_in.Sfs.Wms.Pda.Host/Controllers/Inventories/BalanceController.cs index 9adb5c110..4c5488710 100644 --- a/be/Hosts/WmsPda.Host/Win_in.Sfs.Wms.Pda.Host/Controllers/Inventories/BalanceController.cs +++ b/be/Hosts/WmsPda.Host/Win_in.Sfs.Wms.Pda.Host/Controllers/Inventories/BalanceController.cs @@ -5,6 +5,8 @@ using System.Collections.Generic; using System.Linq; using System.Threading.Tasks; using Microsoft.AspNetCore.Mvc; +using Newtonsoft.Json; +using Volo.Abp; using Volo.Abp.Application.Dtos; using Volo.Abp.AspNetCore.Mvc; using Win_in.Sfs.Basedata.Application.Contracts; @@ -29,6 +31,8 @@ public class BalanceController : AbpController private readonly ILocationAppService _locationAppService; + private readonly IExpectOutAppService _expectOutAppService; + /// /// /// @@ -38,10 +42,11 @@ public class BalanceController : AbpController public BalanceController( IBalanceAppService balanceAppService, IItemBasicAppService itemBasicAppService, - ILocationAppService locationAppService) + ILocationAppService locationAppService, IExpectOutAppService expectOutAppService) { this._balanceAppService = balanceAppService; this._locationAppService = locationAppService; + _expectOutAppService = expectOutAppService; this._itemBasicAppService = itemBasicAppService; } @@ -426,6 +431,56 @@ public class BalanceController : AbpController return balanceDTOs; } + /// + /// 查询库存余额 根据 物品 库位 库位类型 库存状态 批次 并且没有被预计出 占用 + /// + /// + /// + [HttpPost("by-balances-request-many-parameter-not-in-expect-out")] + public async Task> GetListByLocationTypeAndInventoryStatusAndNotExpectOutAsync( + BalanceListByIssueInputByInventoryStatusAndLocationType listInput) + { + var expectOut = await _expectOutAppService.GetListByPackingCodeAsync(listInput.packingCode); + + if (expectOut != null && expectOut.Any()) + { + throw new UserFriendlyException($"箱码为 {listInput.packingCode} 已被任务{expectOut[0].JobNumber}使用"); + } + + var input = new SfsInventoryRequestInputBase() + { + MaxResultCount = listInput.pageSize, + SkipCount = (listInput.pageIndex - 1) * listInput.pageSize, + Sorting = listInput.sortBy, + Condition = new Condition { Filters = new List() } + }; + if (!string.IsNullOrWhiteSpace(listInput.itemCode)) + input.Condition.Filters.Add(new Filter("ItemCode", listInput.itemCode)); + if (!string.IsNullOrWhiteSpace(listInput.locationCode)) + input.Condition.Filters.Add(new Filter("LocationCode", listInput.locationCode)); + if (!string.IsNullOrWhiteSpace(listInput.lot)) input.Condition.Filters.Add(new Filter("Lot", listInput.lot)); + if (!string.IsNullOrWhiteSpace(listInput.packingCode)) + input.Condition.Filters.Add(new Filter("PackingCode", listInput.packingCode)); + if (!string.IsNullOrWhiteSpace(listInput.containerCode)) + input.Condition.Filters.Add(new Filter("ContainerCode", listInput.containerCode)); + + if (listInput.locationTypes != null && listInput.locationTypes.Any()) + { + var locationCodes = (await this._locationAppService.GetListByTypesAsync(listInput.locationTypes).ConfigureAwait(false)) + .Select(t => t.Code).ToList(); + + if (locationCodes.Any()) + input.Condition.Filters.Add( + new Filter("LocationCode", JsonConvert.SerializeObject(locationCodes), "In")); + } + + if (listInput.inventoryStatuses != null && listInput.inventoryStatuses.Any()) + input.Condition.Filters.Add( + new Filter("Status", JsonConvert.SerializeObject(listInput.inventoryStatuses), "In")); + + return await this._balanceAppService.GetPagedListByFilterAsync(input, false).ConfigureAwait(false); + } + /* /// /// 查询库余额 diff --git a/be/Hosts/WmsPda.Host/Win_in.Sfs.Wms.Pda.Host/Controllers/Jobs/CountJobController.cs b/be/Hosts/WmsPda.Host/Win_in.Sfs.Wms.Pda.Host/Controllers/Jobs/CountJobController.cs index 7ed1b4d54..6c6a13d7b 100644 --- a/be/Hosts/WmsPda.Host/Win_in.Sfs.Wms.Pda.Host/Controllers/Jobs/CountJobController.cs +++ b/be/Hosts/WmsPda.Host/Win_in.Sfs.Wms.Pda.Host/Controllers/Jobs/CountJobController.cs @@ -75,7 +75,7 @@ public class CountJobController : AbpController var wlgCodes = await _userWorkGroupAppService.GetCodsOfCurrentUserAsync().ConfigureAwait(false); var jsonCodes = JsonSerializer.Serialize(wlgCodes); - List status = new List() { EnumJobStatus.Open.ToString(), EnumJobStatus.Doing.ToString() }; + var status = new List() { (int)EnumJobStatus.Open, (int)EnumJobStatus.Doing }; var jsonStatus = JsonSerializer.Serialize(status); var request = new SfsJobRequestInputBase @@ -133,7 +133,7 @@ public class CountJobController : AbpController var wlgCodes = await _userWorkGroupAppService.GetCodsOfCurrentUserAsync().ConfigureAwait(false); var jsonWlgCodes = JsonSerializer.Serialize(wlgCodes); - var status = new List() {EnumJobStatus.Open.ToString(),EnumJobStatus.Doing.ToString() }; + var status = new List() { (int)EnumJobStatus.Open, (int)EnumJobStatus.Doing }; var jsonStatus = JsonSerializer.Serialize(status); var requestInput = new SfsJobRequestInputBase @@ -165,7 +165,7 @@ public class CountJobController : AbpController var wlgCodes = await _userWorkGroupAppService.GetCodsOfCurrentUserAsync().ConfigureAwait(false); var jsonCodes = JsonSerializer.Serialize(wlgCodes); - List status = new List() { EnumJobStatus.Open.ToString(), EnumJobStatus.Doing.ToString() }; + var status = new List() { (int)EnumJobStatus.Open, (int)EnumJobStatus.Doing }; var jsonStatus = JsonSerializer.Serialize(status); var request = new SfsJobRequestInputBase diff --git a/be/Hosts/WmsPda.Host/Win_in.Sfs.Wms.Pda.Host/Controllers/Jobs/DeliverJobController.cs b/be/Hosts/WmsPda.Host/Win_in.Sfs.Wms.Pda.Host/Controllers/Jobs/DeliverJobController.cs index 0b93cc8db..de127336d 100644 --- a/be/Hosts/WmsPda.Host/Win_in.Sfs.Wms.Pda.Host/Controllers/Jobs/DeliverJobController.cs +++ b/be/Hosts/WmsPda.Host/Win_in.Sfs.Wms.Pda.Host/Controllers/Jobs/DeliverJobController.cs @@ -75,7 +75,7 @@ public class DeliverJobController : AbpController var wlgCodes = await _userWorkGroupAppService.GetCodsOfCurrentUserAsync().ConfigureAwait(false); _ = JsonSerializer.Serialize(wlgCodes); - List status = new List() { EnumJobStatus.Open.ToString(), EnumJobStatus.Doing.ToString() }; + var status = new List() { (int)EnumJobStatus.Open, (int)EnumJobStatus.Doing }; var jsonStatus = JsonSerializer.Serialize(status); var request = new SfsJobRequestInputBase @@ -132,7 +132,7 @@ public class DeliverJobController : AbpController var wlgCodes = await _userWorkGroupAppService.GetCodsOfCurrentUserAsync().ConfigureAwait(false); var jsonCodes = JsonSerializer.Serialize(wlgCodes); - List status = new List() { EnumJobStatus.Open.ToString(), EnumJobStatus.Doing.ToString() }; + var status = new List() { (int)EnumJobStatus.Open, (int)EnumJobStatus.Doing }; var jsonStatus = JsonSerializer.Serialize(status); var request = new SfsJobRequestInputBase diff --git a/be/Hosts/WmsPda.Host/Win_in.Sfs.Wms.Pda.Host/Controllers/Jobs/InspectJobController.cs b/be/Hosts/WmsPda.Host/Win_in.Sfs.Wms.Pda.Host/Controllers/Jobs/InspectJobController.cs index aabb49b1c..c74c9ae7c 100644 --- a/be/Hosts/WmsPda.Host/Win_in.Sfs.Wms.Pda.Host/Controllers/Jobs/InspectJobController.cs +++ b/be/Hosts/WmsPda.Host/Win_in.Sfs.Wms.Pda.Host/Controllers/Jobs/InspectJobController.cs @@ -64,7 +64,7 @@ public class InspectJobController : AbpController var wlgCodes = await _userWorkGroupAppService.GetCodsOfCurrentUserAsync().ConfigureAwait(false); var jsonCodes = JsonSerializer.Serialize(wlgCodes); - List status = new List() { EnumJobStatus.Open.ToString(), EnumJobStatus.Doing.ToString() }; + var status = new List() { (int)EnumJobStatus.Open, (int)EnumJobStatus.Doing }; var jsonStatus = JsonSerializer.Serialize(status); var request = new SfsJobRequestInputBase @@ -108,7 +108,7 @@ public class InspectJobController : AbpController var wlgCodes = await _userWorkGroupAppService.GetCodsOfCurrentUserAsync().ConfigureAwait(false); var jsonCodes = JsonSerializer.Serialize(wlgCodes); - List status = new List() { EnumJobStatus.Open.ToString(), EnumJobStatus.Doing.ToString() }; + var status = new List() { (int)EnumJobStatus.Open, (int)EnumJobStatus.Doing }; var jsonStatus = JsonSerializer.Serialize(status); var request = new SfsJobRequestInputBase diff --git a/be/Hosts/WmsPda.Host/Win_in.Sfs.Wms.Pda.Host/Controllers/Jobs/IssueJobController.cs b/be/Hosts/WmsPda.Host/Win_in.Sfs.Wms.Pda.Host/Controllers/Jobs/IssueJobController.cs index c6763da04..2efe34c7d 100644 --- a/be/Hosts/WmsPda.Host/Win_in.Sfs.Wms.Pda.Host/Controllers/Jobs/IssueJobController.cs +++ b/be/Hosts/WmsPda.Host/Win_in.Sfs.Wms.Pda.Host/Controllers/Jobs/IssueJobController.cs @@ -65,7 +65,7 @@ public class IssueJobController : AbpController var wlgCodes = await _userWorkGroupAppService.GetCodsOfCurrentUserAsync().ConfigureAwait(false); var jsonWlgCodes = JsonSerializer.Serialize(wlgCodes); - var status = new List() { EnumJobStatus.Open.ToString(), EnumJobStatus.Doing.ToString() }; + var status = new List() { (int)EnumJobStatus.Open, (int)EnumJobStatus.Doing }; var jsonStatus = JsonSerializer.Serialize(status); var request = new SfsJobRequestInputBase @@ -143,7 +143,7 @@ public class IssueJobController : AbpController var wlgCodes = await _userWorkGroupAppService.GetCodsOfCurrentUserAsync().ConfigureAwait(false); var jsonWlgCodes = JsonSerializer.Serialize(wlgCodes); - var status = new List() { EnumJobStatus.Open.ToString(), EnumJobStatus.Doing.ToString() }; + var status = new List() { (int)EnumJobStatus.Open, (int)EnumJobStatus.Doing }; var jsonStatus = JsonSerializer.Serialize(status); var requestInput = new SfsJobRequestInputBase @@ -175,7 +175,7 @@ public class IssueJobController : AbpController var wlgCodes = await _userWorkGroupAppService.GetCodsOfCurrentUserAsync().ConfigureAwait(false); var jsonCodes = JsonSerializer.Serialize(wlgCodes); - List status = new List() { EnumJobStatus.Open.ToString(), EnumJobStatus.Doing.ToString() }; + var status = new List() { (int)EnumJobStatus.Open, (int)EnumJobStatus.Doing }; var jsonStatus = JsonSerializer.Serialize(status); var request = new SfsJobRequestInputBase diff --git a/be/Hosts/WmsPda.Host/Win_in.Sfs.Wms.Pda.Host/Controllers/Jobs/JisDeliverJobController.cs b/be/Hosts/WmsPda.Host/Win_in.Sfs.Wms.Pda.Host/Controllers/Jobs/JisDeliverJobController.cs index 420840bed..0b95984ee 100644 --- a/be/Hosts/WmsPda.Host/Win_in.Sfs.Wms.Pda.Host/Controllers/Jobs/JisDeliverJobController.cs +++ b/be/Hosts/WmsPda.Host/Win_in.Sfs.Wms.Pda.Host/Controllers/Jobs/JisDeliverJobController.cs @@ -74,7 +74,7 @@ public class JisDeliverJobController : AbpController var wlgCodes = await _userWorkGroupAppService.GetCodsOfCurrentUserAsync().ConfigureAwait(false); var jsonCodes = JsonSerializer.Serialize(wlgCodes); - List status = new List() { EnumJobStatus.Open.ToString(), EnumJobStatus.Doing.ToString() }; + var status = new List() { (int)EnumJobStatus.Open, (int)EnumJobStatus.Doing }; var jsonStatus = JsonSerializer.Serialize(status); var request = new SfsJobRequestInputBase @@ -106,7 +106,7 @@ public class JisDeliverJobController : AbpController var wlgCodes = await _userWorkGroupAppService.GetCodsOfCurrentUserAsync().ConfigureAwait(false); var jsonCodes = JsonSerializer.Serialize(wlgCodes); - List status = new List() { EnumJobStatus.Open.ToString(), EnumJobStatus.Doing.ToString() }; + var status = new List() { (int)EnumJobStatus.Open, (int)EnumJobStatus.Doing }; var jsonStatus = JsonSerializer.Serialize(status); var request = new SfsJobRequestInputBase diff --git a/be/Hosts/WmsPda.Host/Win_in.Sfs.Wms.Pda.Host/Controllers/Jobs/JobController.cs b/be/Hosts/WmsPda.Host/Win_in.Sfs.Wms.Pda.Host/Controllers/Jobs/JobController.cs index 4c88f25d3..ead6be2c7 100644 --- a/be/Hosts/WmsPda.Host/Win_in.Sfs.Wms.Pda.Host/Controllers/Jobs/JobController.cs +++ b/be/Hosts/WmsPda.Host/Win_in.Sfs.Wms.Pda.Host/Controllers/Jobs/JobController.cs @@ -76,7 +76,7 @@ public class JobController : AbpController var wlgCodes = await _userWorkGroupAppService.GetCodsOfCurrentUserAsync().ConfigureAwait(false); var jsonCodes = JsonSerializer.Serialize(wlgCodes); - List status = new List() { EnumJobStatus.Open.ToString(), EnumJobStatus.Doing.ToString() }; + var status = new List() { (int)EnumJobStatus.Open, (int)EnumJobStatus.Doing }; var jsonStatus = JsonSerializer.Serialize(status); var list = new List(); diff --git a/be/Hosts/WmsPda.Host/Win_in.Sfs.Wms.Pda.Host/Controllers/Jobs/ProductReceiveJobController.cs b/be/Hosts/WmsPda.Host/Win_in.Sfs.Wms.Pda.Host/Controllers/Jobs/ProductReceiveJobController.cs index cbbab2341..33ce064ff 100644 --- a/be/Hosts/WmsPda.Host/Win_in.Sfs.Wms.Pda.Host/Controllers/Jobs/ProductReceiveJobController.cs +++ b/be/Hosts/WmsPda.Host/Win_in.Sfs.Wms.Pda.Host/Controllers/Jobs/ProductReceiveJobController.cs @@ -62,7 +62,7 @@ public class ProductReceiveJobController : AbpController var wlgCodes = await _userWorkGroupAppService.GetCodsOfCurrentUserAsync().ConfigureAwait(false); var jsonCodes = JsonSerializer.Serialize(wlgCodes); - List status = new List() { EnumJobStatus.Open.ToString(), EnumJobStatus.Doing.ToString() }; + var status = new List() { (int)EnumJobStatus.Open, (int)EnumJobStatus.Doing }; var jsonStatus = JsonSerializer.Serialize(status); var request = new SfsJobRequestInputBase @@ -106,7 +106,7 @@ public class ProductReceiveJobController : AbpController var wlgCodes = await _userWorkGroupAppService.GetCodsOfCurrentUserAsync().ConfigureAwait(false); var jsonCodes = JsonSerializer.Serialize(wlgCodes); - List status = new List() { EnumJobStatus.Open.ToString(), EnumJobStatus.Doing.ToString() }; + var status = new List() { (int)EnumJobStatus.Open, (int)EnumJobStatus.Doing }; var jsonStatus = JsonSerializer.Serialize(status); var request = new SfsJobRequestInputBase diff --git a/be/Hosts/WmsPda.Host/Win_in.Sfs.Wms.Pda.Host/Controllers/Jobs/ProductionReturnJobController.cs b/be/Hosts/WmsPda.Host/Win_in.Sfs.Wms.Pda.Host/Controllers/Jobs/ProductionReturnJobController.cs index ca0f1946e..d448d69b2 100644 --- a/be/Hosts/WmsPda.Host/Win_in.Sfs.Wms.Pda.Host/Controllers/Jobs/ProductionReturnJobController.cs +++ b/be/Hosts/WmsPda.Host/Win_in.Sfs.Wms.Pda.Host/Controllers/Jobs/ProductionReturnJobController.cs @@ -69,7 +69,7 @@ public class ProductionReturnJobController : AbpController var wlgCodes = await _userWorkGroupAppService.GetCodsOfCurrentUserAsync().ConfigureAwait(false); var jsonCodes = JsonSerializer.Serialize(wlgCodes); - List status = new List() { EnumJobStatus.Open.ToString(), EnumJobStatus.Doing.ToString() }; + var status = new List() { (int)EnumJobStatus.Open, (int)EnumJobStatus.Doing }; var jsonStatus = JsonSerializer.Serialize(status); var request = new SfsJobRequestInputBase @@ -113,7 +113,7 @@ public class ProductionReturnJobController : AbpController var wlgCodes = await _userWorkGroupAppService.GetCodsOfCurrentUserAsync().ConfigureAwait(false); var jsonCodes = JsonSerializer.Serialize(wlgCodes); - List status = new List() { EnumJobStatus.Open.ToString(), EnumJobStatus.Doing.ToString() }; + var status = new List() { (int)EnumJobStatus.Open, (int)EnumJobStatus.Doing }; var jsonStatus = JsonSerializer.Serialize(status); var request = new SfsJobRequestInputBase diff --git a/be/Hosts/WmsPda.Host/Win_in.Sfs.Wms.Pda.Host/Controllers/Jobs/PurchaseReceiptJobController.cs b/be/Hosts/WmsPda.Host/Win_in.Sfs.Wms.Pda.Host/Controllers/Jobs/PurchaseReceiptJobController.cs index e24f784c4..dc0477c94 100644 --- a/be/Hosts/WmsPda.Host/Win_in.Sfs.Wms.Pda.Host/Controllers/Jobs/PurchaseReceiptJobController.cs +++ b/be/Hosts/WmsPda.Host/Win_in.Sfs.Wms.Pda.Host/Controllers/Jobs/PurchaseReceiptJobController.cs @@ -21,14 +21,10 @@ namespace Win_in.Sfs.Wms.Pda.Controllers.Jobs; /// [ApiController] [Route($"{PdaHostConst.ROOT_ROUTE}job/purchase-receipt")] - public class PurchaseReceiptJobController : AbpController { private readonly ISupplierAppService _supplierAppService; - private readonly IPurchaseReceiptRequestAppService _purchaseReceiptRequestAppService; private readonly IPurchaseReceiptJobAppService _purchaseReceiptJobAppService; - private readonly IFileAppService _fileAppService; - private readonly IUserWorkGroupAppService _userWorkGroupAppService; /// @@ -42,15 +38,11 @@ public class PurchaseReceiptJobController : AbpController public PurchaseReceiptJobController( IPurchaseReceiptJobAppService purchaseReceiptJobAppService , IUserWorkGroupAppService userWorkGroupAppService - , IPurchaseReceiptRequestAppService purchaseReceiptRequestAppService - , ISupplierAppService supplierAppService - , IFileAppService fileAppService) + , ISupplierAppService supplierAppService) { _userWorkGroupAppService = userWorkGroupAppService; _purchaseReceiptJobAppService = purchaseReceiptJobAppService; - _purchaseReceiptRequestAppService = purchaseReceiptRequestAppService; _supplierAppService = supplierAppService; - _fileAppService = fileAppService; } /// @@ -59,10 +51,9 @@ public class PurchaseReceiptJobController : AbpController /// /// [HttpGet("{id}")] - public virtual async Task> GetAsync(Guid id) { - var result = await _purchaseReceiptJobAppService.GetAsync(id).ConfigureAwait(false); + var result = await _purchaseReceiptJobAppService.GetNoCacheAsync(id).ConfigureAwait(false); var supplier = await _supplierAppService.GetByCodeAsync(result.SupplierCode).ConfigureAwait(false); result.SupplierName = supplier.Name; @@ -79,12 +70,13 @@ public class PurchaseReceiptJobController : AbpController /// 是否今天 /// [HttpGet("list")] - public virtual async Task> GetListAsync(int pageSize, int pageIndex, bool isTimeWindowSorting, bool isToday) + public virtual async Task> GetListAsync(int pageSize, int pageIndex, + bool isTimeWindowSorting, bool isToday) { var wlgCodes = await _userWorkGroupAppService.GetCodsOfCurrentUserAsync().ConfigureAwait(false); var jsonCodes = JsonSerializer.Serialize(wlgCodes); - List status = new List() { EnumJobStatus.Open.ToString(), EnumJobStatus.Doing.ToString() }; + var status = new List() { (int)EnumJobStatus.Open, (int)EnumJobStatus.Doing }; var jsonStatus = JsonSerializer.Serialize(status); var request = new SfsJobRequestInputBase @@ -96,17 +88,19 @@ public class PurchaseReceiptJobController : AbpController { Filters = new List { - new(nameof(PurchaseReceiptJobDTO.WorkGroupCode),jsonCodes,"In"), - new(nameof(PurchaseReceiptJobDTO.JobStatus),jsonStatus,"In") + new(nameof(PurchaseReceiptJobDTO.WorkGroupCode), jsonCodes, "In"), + new(nameof(PurchaseReceiptJobDTO.JobStatus), jsonStatus, "In") } } }; - if (isToday)//只看当日 + if (isToday) //只看当日 { - request.Condition.Filters.Add(new Filter(nameof(PurchaseReceiptJobDTO.PlanArriveDate), Clock.Now.ToString("yyyy-MM-dd"), ">=", "And")); + request.Condition.Filters.Add(new Filter(nameof(PurchaseReceiptJobDTO.PlanArriveDate), + Clock.Now.ToString("yyyy-MM-dd"), ">=", "And")); } - if (isTimeWindowSorting)//窗口时间排序 + + if (isTimeWindowSorting) //窗口时间排序 { request.Sorting = $"{nameof(PurchaseReceiptJobDTO.TimeWindow)} ASC"; } @@ -131,7 +125,8 @@ public class PurchaseReceiptJobController : AbpController [HttpPost("list")] public virtual async Task> GetListAsync(SfsJobRequestInputBase sfsRequestDTO) { - var list = await _purchaseReceiptJobAppService.GetPagedListByFilterAsync(sfsRequestDTO, true).ConfigureAwait(false); + var list = await _purchaseReceiptJobAppService.GetPagedListByFilterAsync(sfsRequestDTO, true) + .ConfigureAwait(false); return list; } @@ -155,22 +150,27 @@ public class PurchaseReceiptJobController : AbpController { return new NotFoundObjectResult($"任务属于工作组 {jobDto.WorkGroupCode}"); } + if (!wlgCodes.Any(r => r == jobDto.WorkGroupCode)) { return new NotFoundObjectResult($"任务属于工作组 {jobDto.WorkGroupCode}"); } + if (jobDto.JobStatus == EnumJobStatus.Doing && jobDto.AcceptUserId != CurrentUser.Id) { return new NotFoundObjectResult($"任务正在被 {jobDto.AcceptUserName} 处理"); } - if (isToday)//只看当日 + + if (isToday) //只看当日 { if (jobDto.PlanArriveDate.ToString("yyyy-MM-dd") == Clock.Now.ToString("yyyy-MM-dd")) { return jobDto; } + return new NotFoundObjectResult($"不是当天的收货任务"); } + return jobDto; } @@ -181,12 +181,13 @@ public class PurchaseReceiptJobController : AbpController /// /// [HttpGet("list/by-asn")] - public virtual async Task> GetListByAsnNumberAsync(string asnNumber, bool isToday) + public virtual async Task> GetListByAsnNumberAsync(string asnNumber, + bool isToday) { var wlgCodes = await _userWorkGroupAppService.GetCodsOfCurrentUserAsync().ConfigureAwait(false); var jsonWlgCodes = JsonSerializer.Serialize(wlgCodes); - List status = new List() { EnumJobStatus.Open.ToString(), EnumJobStatus.Doing.ToString() }; + var status = new List() { (int)EnumJobStatus.Open, (int)EnumJobStatus.Doing }; var jsonStatus = JsonSerializer.Serialize(status); var requestInput = new SfsJobRequestInputBase @@ -198,17 +199,20 @@ public class PurchaseReceiptJobController : AbpController { Filters = new List { - new(nameof(PurchaseReceiptJobDTO.AsnNumber),asnNumber), - new(nameof(IssueJobDTO.WorkGroupCode),jsonWlgCodes,"In"), - new(nameof(IssueJobDTO.JobStatus),jsonStatus,"In"), + new(nameof(PurchaseReceiptJobDTO.AsnNumber), asnNumber), + new(nameof(IssueJobDTO.WorkGroupCode), jsonWlgCodes, "In"), + new(nameof(IssueJobDTO.JobStatus), jsonStatus, "In"), } } }; - if (isToday)//只看当日 + if (isToday) //只看当日 { - requestInput.Condition.Filters.Add(new Filter(nameof(PurchaseReceiptJobDTO.PlanArriveDate), Clock.Now.ToString("yyyy-MM-dd"), ">=", "And")); + requestInput.Condition.Filters.Add(new Filter(nameof(PurchaseReceiptJobDTO.PlanArriveDate), + Clock.Now.ToString("yyyy-MM-dd"), ">=", "And")); } - var list = await _purchaseReceiptJobAppService.GetPagedListByFilterAsync(requestInput, true).ConfigureAwait(false); + + var list = await _purchaseReceiptJobAppService.GetPagedListByFilterAsync(requestInput, true) + .ConfigureAwait(false); return list; } @@ -222,7 +226,7 @@ public class PurchaseReceiptJobController : AbpController var wlgCodes = await _userWorkGroupAppService.GetCodsOfCurrentUserAsync().ConfigureAwait(false); var jsonCodes = JsonSerializer.Serialize(wlgCodes); - List status = new List() { EnumJobStatus.Open.ToString(), EnumJobStatus.Doing.ToString() }; + var status = new List() { (int)EnumJobStatus.Open, (int)EnumJobStatus.Doing }; var jsonStatus = JsonSerializer.Serialize(status); var request = new SfsJobRequestInputBase @@ -232,8 +236,8 @@ public class PurchaseReceiptJobController : AbpController { Filters = new List { - new(nameof(PurchaseReceiptJobDTO.WorkGroupCode),jsonCodes,"In"), - new(nameof(PurchaseReceiptJobDTO.JobStatus),jsonStatus,"In") + new(nameof(PurchaseReceiptJobDTO.WorkGroupCode), jsonCodes, "In"), + new(nameof(PurchaseReceiptJobDTO.JobStatus), jsonStatus, "In") } } }; @@ -292,9 +296,11 @@ public class PurchaseReceiptJobController : AbpController /// /// [HttpPost("save-detail-inspect/{id}")] - public virtual async Task SaveDetailAsync(Guid id, PurchaseReceiptJobDetailSaveInput purchaseReceiptJobDetailSaveInput) + public virtual async Task SaveDetailAsync(Guid id, + PurchaseReceiptJobDetailSaveInput purchaseReceiptJobDetailSaveInput) { - return await _purchaseReceiptJobAppService.SaveDetailInspectAsync(id, purchaseReceiptJobDetailSaveInput).ConfigureAwait(false); + return await _purchaseReceiptJobAppService.SaveDetailInspectAsync(id, purchaseReceiptJobDetailSaveInput) + .ConfigureAwait(false); } /// diff --git a/be/Hosts/WmsPda.Host/Win_in.Sfs.Wms.Pda.Host/Controllers/Jobs/PurchaseReturnJobController.cs b/be/Hosts/WmsPda.Host/Win_in.Sfs.Wms.Pda.Host/Controllers/Jobs/PurchaseReturnJobController.cs index c6a071cce..490fd4a44 100644 --- a/be/Hosts/WmsPda.Host/Win_in.Sfs.Wms.Pda.Host/Controllers/Jobs/PurchaseReturnJobController.cs +++ b/be/Hosts/WmsPda.Host/Win_in.Sfs.Wms.Pda.Host/Controllers/Jobs/PurchaseReturnJobController.cs @@ -63,7 +63,7 @@ public class PurchaseReturnJobController : AbpController var wlgCodes = await _userWorkGroupAppService.GetCodsOfCurrentUserAsync().ConfigureAwait(false); var jsonCodes = JsonSerializer.Serialize(wlgCodes); - List status = new List() { EnumJobStatus.Open.ToString(), EnumJobStatus.Doing.ToString() }; + var status = new List() { (int)EnumJobStatus.Open, (int)EnumJobStatus.Doing }; var jsonStatus = JsonSerializer.Serialize(status); var request = new SfsJobRequestInputBase @@ -132,7 +132,7 @@ public class PurchaseReturnJobController : AbpController var wlgCodes = await _userWorkGroupAppService.GetCodsOfCurrentUserAsync().ConfigureAwait(false); var jsonCodes = JsonSerializer.Serialize(wlgCodes); - List status = new List() { EnumJobStatus.Open.ToString(), EnumJobStatus.Doing.ToString() }; + var status = new List() { (int)EnumJobStatus.Open, (int)EnumJobStatus.Doing }; var jsonStatus = JsonSerializer.Serialize(status); var request = new SfsJobRequestInputBase diff --git a/be/Hosts/WmsPda.Host/Win_in.Sfs.Wms.Pda.Host/Controllers/Jobs/PutawayJobController.cs b/be/Hosts/WmsPda.Host/Win_in.Sfs.Wms.Pda.Host/Controllers/Jobs/PutawayJobController.cs index 88cb5d770..3c7227ccd 100644 --- a/be/Hosts/WmsPda.Host/Win_in.Sfs.Wms.Pda.Host/Controllers/Jobs/PutawayJobController.cs +++ b/be/Hosts/WmsPda.Host/Win_in.Sfs.Wms.Pda.Host/Controllers/Jobs/PutawayJobController.cs @@ -62,7 +62,7 @@ public class PutawayJobController : AbpController var wlgCodes = await _userWorkGroupAppService.GetCodsOfCurrentUserAsync().ConfigureAwait(false); var jsonCodes = JsonSerializer.Serialize(wlgCodes); - List status = new List() { EnumJobStatus.Open.ToString(), EnumJobStatus.Doing.ToString() }; + var status = new List() { (int)EnumJobStatus.Open, (int)EnumJobStatus.Doing }; var jsonStatus = JsonSerializer.Serialize(status); var request = new SfsJobRequestInputBase @@ -106,7 +106,7 @@ public class PutawayJobController : AbpController var wlgCodes = await _userWorkGroupAppService.GetCodsOfCurrentUserAsync().ConfigureAwait(false); var jsonCodes = JsonSerializer.Serialize(wlgCodes); - List status = new List() { EnumJobStatus.Open.ToString(), EnumJobStatus.Doing.ToString() }; + var status = new List() { (int)EnumJobStatus.Open, (int)EnumJobStatus.Doing }; var jsonStatus = JsonSerializer.Serialize(status); var request = new SfsJobRequestInputBase diff --git a/be/Hosts/WmsPda.Host/Win_in.Sfs.Wms.Pda.Host/Controllers/Stores/IssueNoteController.cs b/be/Hosts/WmsPda.Host/Win_in.Sfs.Wms.Pda.Host/Controllers/Stores/IssueNoteController.cs index 57ae6fad1..450e9326c 100644 --- a/be/Hosts/WmsPda.Host/Win_in.Sfs.Wms.Pda.Host/Controllers/Stores/IssueNoteController.cs +++ b/be/Hosts/WmsPda.Host/Win_in.Sfs.Wms.Pda.Host/Controllers/Stores/IssueNoteController.cs @@ -2,6 +2,7 @@ using System; using System.Threading.Tasks; using Microsoft.AspNetCore.Mvc; using Volo.Abp.AspNetCore.Mvc; +using Win_in.Sfs.Shared.Domain.Shared; using Win_in.Sfs.Wms.Store.Application.Contracts; namespace Win_in.Sfs.Wms.Pda.Controllers.Stores; @@ -29,9 +30,17 @@ public class IssueNoteController : AbpController /// 创建发料记录 /// /// - [HttpPost("{input}")] - public virtual async Task CreateAsync(IssueNoteEditInput input) + [HttpPost("")] + public virtual async Task CreateAsync([FromBody] IssueNoteEditInput input) { + input.RequestType = EnumMaterialRequestType.Direct_Issue.ToString(); + + input.Details.ForEach(p => + { + p.ToLot = string.Empty; + p.ToPackingCode = string.Empty; + }); + await _issueNoteAppService.CreateAsync(input).ConfigureAwait(false); } diff --git a/be/Hosts/WmsPda.Host/Win_in.Sfs.Wms.Pda.Host/Controllers/Stores/PurchaseReceiptRequestController.cs b/be/Hosts/WmsPda.Host/Win_in.Sfs.Wms.Pda.Host/Controllers/Stores/PurchaseReceiptRequestController.cs index dfcbbf219..b7cdd062a 100644 --- a/be/Hosts/WmsPda.Host/Win_in.Sfs.Wms.Pda.Host/Controllers/Stores/PurchaseReceiptRequestController.cs +++ b/be/Hosts/WmsPda.Host/Win_in.Sfs.Wms.Pda.Host/Controllers/Stores/PurchaseReceiptRequestController.cs @@ -35,4 +35,17 @@ public class PurchaseReceiptRequestController : AbpController var result = await _purchaseReceiptRequestAppService.GetByNumberAsync(number).ConfigureAwait(false); return Ok(result); } + + /// + /// 根据 物品 箱 获取收货记录 + /// + /// + /// + /// + [HttpGet("detail-by-item-and-packing")] + public virtual async Task GetDetailByItemAndPackingAsync(string itemCode, + string packingCode) + { + return await _purchaseReceiptRequestAppService.GetDetailByItemAndPackingAsync(itemCode, packingCode).ConfigureAwait(false); + } } diff --git a/be/Hosts/WmsPda.Host/Win_in.Sfs.Wms.Pda.Host/Controllers/Stores/PurchaseReturnNoteController.cs b/be/Hosts/WmsPda.Host/Win_in.Sfs.Wms.Pda.Host/Controllers/Stores/PurchaseReturnNoteController.cs index 459ea3fe8..0dde430e2 100644 --- a/be/Hosts/WmsPda.Host/Win_in.Sfs.Wms.Pda.Host/Controllers/Stores/PurchaseReturnNoteController.cs +++ b/be/Hosts/WmsPda.Host/Win_in.Sfs.Wms.Pda.Host/Controllers/Stores/PurchaseReturnNoteController.cs @@ -6,6 +6,7 @@ using System.Threading.Tasks; using Microsoft.AspNetCore.Mvc; using Volo.Abp; using Volo.Abp.AspNetCore.Mvc; +using Volo.Abp.Domain.Entities.Auditing; using Win_in.Sfs.Label.Application.Contracts; using Win_in.Sfs.Label.Domain; using Win_in.Sfs.Shared.Domain.Shared; @@ -109,33 +110,34 @@ public class PurchaseReturnNoteController : AbpController { var poNumber = poNumberItem.Key; - var createInput = new PurchaseReturnNoteEditInput() { Details = new List() }; + var returnNoteEditInput = new PurchaseReturnNoteEditInput() { Details = new List() }; - createInput.PoNumber = poNumber; + returnNoteEditInput.PoNumber = poNumber; foreach (var poNumberDetail in poNumberItem) { var packingCode = poNumberDetail.PackingCode; - await SetFromInventoryLabelAsync(packingCode, createInput).ConfigureAwait(false); + await SetFromInventoryLabelAsync(packingCode, returnNoteEditInput).ConfigureAwait(false); - await SetFormPurchaseOrderAsync(poNumber, createInput).ConfigureAwait(false); + await SetFormPurchaseOrderAsync(poNumber, returnNoteEditInput).ConfigureAwait(false); - createInput.ReturnType = returnType; - createInput.ReturnTime = returnTime; - createInput.ReturnReason = returnReason; + returnNoteEditInput.ReturnType = returnType; + returnNoteEditInput.ReturnTime = returnTime; + returnNoteEditInput.ReturnReason = returnReason; var createInputDetail = new PurchaseReturnNoteDetailInput(); createInputDetail.PoNumber = poNumber; createInputDetail.Reason = returnReason; + //createInputDetail.WarehouseCode= poNumberItem. await SetDetailByBalanceAsync(packingCode, createInputDetail).ConfigureAwait(false); - createInput.Details.Add(createInputDetail); + returnNoteEditInput.Details.Add(createInputDetail); } - createInputs.Add(createInput); + createInputs.Add(returnNoteEditInput); } return createInputs; @@ -149,6 +151,9 @@ public class PurchaseReturnNoteController : AbpController createInputDetail.LocationCode = balance.LocationCode; createInputDetail.LocationErpCode = balance.LocationErpCode; + createInputDetail.LocationArea = balance.LocationArea; + createInputDetail.LocationGroup= balance.LocationGroup; + createInputDetail.WarehouseCode= balance.WarehouseCode; createInputDetail.PackingCode = balance.PackingCode; createInputDetail.ContainerCode = balance.ContainerCode; createInputDetail.Uom = balance.Uom; diff --git a/be/Modules/Inventory/src/Win_in.Sfs.Wms.Inventory.Application.Contracts/ExpectOuts/IExpectOutAppService.cs b/be/Modules/Inventory/src/Win_in.Sfs.Wms.Inventory.Application.Contracts/ExpectOuts/IExpectOutAppService.cs index a936326b9..509c60744 100644 --- a/be/Modules/Inventory/src/Win_in.Sfs.Wms.Inventory.Application.Contracts/ExpectOuts/IExpectOutAppService.cs +++ b/be/Modules/Inventory/src/Win_in.Sfs.Wms.Inventory.Application.Contracts/ExpectOuts/IExpectOutAppService.cs @@ -13,4 +13,5 @@ public interface IExpectOutAppService Task> GetListByJobAsync(string jobNumber); Task> GetListByItemAsync(string itemCode); Task> GetListByLocationAsync(string locationCode); + Task> GetListByPackingCodeAsync(string packingCode); } diff --git a/be/Modules/Inventory/src/Win_in.Sfs.Wms.Inventory.Application/ExpectOuts/ExpectOutAppService.cs b/be/Modules/Inventory/src/Win_in.Sfs.Wms.Inventory.Application/ExpectOuts/ExpectOutAppService.cs index fddb1bbff..cc04a325d 100644 --- a/be/Modules/Inventory/src/Win_in.Sfs.Wms.Inventory.Application/ExpectOuts/ExpectOutAppService.cs +++ b/be/Modules/Inventory/src/Win_in.Sfs.Wms.Inventory.Application/ExpectOuts/ExpectOutAppService.cs @@ -146,4 +146,12 @@ public class ExpectOutAppService //TODO throw new UserFriendlyException(""); } + + [HttpGet("list/by-packing/{packingCode}")] + public virtual async Task> GetListByPackingCodeAsync(string packingCode) + { + var entitys = await _repository.GetListAsync(p => p.PackingCode == packingCode).ConfigureAwait(false); + + return ObjectMapper.Map, List>(entitys); + } } diff --git a/be/Modules/Label/src/Win_in.Sfs.Label.Application.Contracts/InventoryLabels/InventoryLabelDto.cs b/be/Modules/Label/src/Win_in.Sfs.Label.Application.Contracts/InventoryLabels/InventoryLabelDto.cs index 8e3ccfbe0..ffda20f6b 100644 --- a/be/Modules/Label/src/Win_in.Sfs.Label.Application.Contracts/InventoryLabels/InventoryLabelDto.cs +++ b/be/Modules/Label/src/Win_in.Sfs.Label.Application.Contracts/InventoryLabels/InventoryLabelDto.cs @@ -214,4 +214,11 @@ public class InventoryLabelDto : SfsBasicDTOBase /// [Display(Name = "供应商零件名")] public string SupplierItemName { get; set; } + + /// + /// 计划到货时间 + /// + [Display(Name = "要求到货时间")] + [Required(ErrorMessage = "{0}是必填项")] + public DateTime PlanArriveDate { get; set; } } diff --git a/be/Modules/Label/src/Win_in.Sfs.Label.Application.Contracts/InventoryLabels/InventoryLabelEditInput.cs b/be/Modules/Label/src/Win_in.Sfs.Label.Application.Contracts/InventoryLabels/InventoryLabelEditInput.cs index a6330a941..facf0ad7a 100644 --- a/be/Modules/Label/src/Win_in.Sfs.Label.Application.Contracts/InventoryLabels/InventoryLabelEditInput.cs +++ b/be/Modules/Label/src/Win_in.Sfs.Label.Application.Contracts/InventoryLabels/InventoryLabelEditInput.cs @@ -221,5 +221,12 @@ public class InventoryLabelEditInput : SfsLabelCreateOrUpdateInputBase [Required(ErrorMessage = "{0}是必填项")] public EnumLabelType LabelType { get; set; } + /// + /// 要求到货时间 + /// + [Display(Name = "要求到货时间")] + [Required(ErrorMessage = "{0}是必填项")] + public DateTime PlanArriveDate { get; set; } + #endregion } diff --git a/be/Modules/Label/src/Win_in.Sfs.Label.Application.Contracts/InventoryLabels/InventoryLabelImportInput.cs b/be/Modules/Label/src/Win_in.Sfs.Label.Application.Contracts/InventoryLabels/InventoryLabelImportInput.cs index 11c00f68f..78e0282ae 100644 --- a/be/Modules/Label/src/Win_in.Sfs.Label.Application.Contracts/InventoryLabels/InventoryLabelImportInput.cs +++ b/be/Modules/Label/src/Win_in.Sfs.Label.Application.Contracts/InventoryLabels/InventoryLabelImportInput.cs @@ -74,6 +74,13 @@ public class InventoryLabelImportInput : SfsImportInputBase [Display(Name = "规格")] public string Specifications { get; set; } + /// + /// 要求到货时间 + /// + [Display(Name = "要求到货时间")] + [Required(ErrorMessage = "{0}是必填项")] + public DateTime PlanArriveDate { get; set; } + #region PurchaseInfo /// diff --git a/be/Modules/Label/src/Win_in.Sfs.Label.Application.Contracts/InventoryLabels/InventoryLabelWithoutCodeCreateInput.cs b/be/Modules/Label/src/Win_in.Sfs.Label.Application.Contracts/InventoryLabels/InventoryLabelWithoutCodeCreateInput.cs index 2b07f178d..d2dc012b1 100644 --- a/be/Modules/Label/src/Win_in.Sfs.Label.Application.Contracts/InventoryLabels/InventoryLabelWithoutCodeCreateInput.cs +++ b/be/Modules/Label/src/Win_in.Sfs.Label.Application.Contracts/InventoryLabels/InventoryLabelWithoutCodeCreateInput.cs @@ -200,4 +200,11 @@ public class InventoryLabelWithoutCodeCreateInput [Display(Name = "标签类型")] [Required(ErrorMessage = "{0}是必填项")] public EnumLabelType LabelType { get; set; } + + /// + /// 要求到货时间 + /// + [Display(Name = "要求到货时间")] + [Required(ErrorMessage = "{0}是必填项")] + public DateTime PlanArriveDate { get; set; } } diff --git a/be/Modules/Label/src/Win_in.Sfs.Label.Domain/InventoryLabels/InventoryLabel.cs b/be/Modules/Label/src/Win_in.Sfs.Label.Domain/InventoryLabels/InventoryLabel.cs index a14dd8a51..3fc352575 100644 --- a/be/Modules/Label/src/Win_in.Sfs.Label.Domain/InventoryLabels/InventoryLabel.cs +++ b/be/Modules/Label/src/Win_in.Sfs.Label.Domain/InventoryLabels/InventoryLabel.cs @@ -166,4 +166,11 @@ public class InventoryLabel : SfsAggregateRootBase /// [Display(Name = "供应商零件名")] public string SupplierItemName { get; set; } + + /// + /// 要求到货时间 + /// + [Display(Name = "要求到货时间")] + [Required(ErrorMessage = "{0}是必填项")] + public DateTime PlanArriveDate { get; set; } } diff --git a/be/Modules/Shared/src/Win_in.Sfs.Shared.Application.Contracts/ISfsCrudWithDetailsAppService.cs b/be/Modules/Shared/src/Win_in.Sfs.Shared.Application.Contracts/ISfsCrudWithDetailsAppService.cs index b40d08de4..6be45cee7 100644 --- a/be/Modules/Shared/src/Win_in.Sfs.Shared.Application.Contracts/ISfsCrudWithDetailsAppService.cs +++ b/be/Modules/Shared/src/Win_in.Sfs.Shared.Application.Contracts/ISfsCrudWithDetailsAppService.cs @@ -1,6 +1,7 @@ using System; using System.Collections.Generic; using System.Threading.Tasks; +using Microsoft.AspNetCore.Mvc; using Volo.Abp.Application.Services; namespace Win_in.Sfs.Shared.Application.Contracts; diff --git a/be/Modules/Shared/src/Win_in.Sfs.Shared.Application/SfsCrudWithDetailsAppServiceBase.cs b/be/Modules/Shared/src/Win_in.Sfs.Shared.Application/SfsCrudWithDetailsAppServiceBase.cs index e7643873e..2c022d8d3 100644 --- a/be/Modules/Shared/src/Win_in.Sfs.Shared.Application/SfsCrudWithDetailsAppServiceBase.cs +++ b/be/Modules/Shared/src/Win_in.Sfs.Shared.Application/SfsCrudWithDetailsAppServiceBase.cs @@ -188,10 +188,11 @@ public abstract class SfsCrudWithDetailsAppServiceBase GetAsync(Guid id) { - var dto = await Cache.GetOrAddItemAsync( - id.ToString(), - async () => await base.GetAsync(id).ConfigureAwait(false), - SfsCacheConst.SeveralMinutes).ConfigureAwait(false); + //var dto = await Cache.GetOrAddItemAsync( + // id.ToString(), + // async () => await base.GetAsync(id).ConfigureAwait(false), + // SfsCacheConst.SeveralMinutes).ConfigureAwait(false); + var dto=await base.GetAsync(id).ConfigureAwait(false); return dto; } diff --git a/be/Modules/Shared/src/Win_in.Sfs.Shared.Domain.Shared/Enums/Store/EnumMaterialRequestType.cs b/be/Modules/Shared/src/Win_in.Sfs.Shared.Domain.Shared/Enums/Store/EnumMaterialRequestType.cs index b653ddd6b..245c1f9e8 100644 --- a/be/Modules/Shared/src/Win_in.Sfs.Shared.Domain.Shared/Enums/Store/EnumMaterialRequestType.cs +++ b/be/Modules/Shared/src/Win_in.Sfs.Shared.Domain.Shared/Enums/Store/EnumMaterialRequestType.cs @@ -26,4 +26,7 @@ public enum EnumMaterialRequestType ///// //[Display(Name = "安全库存拉动")] //Issue_SfaetyStock = 1504, + + [Display(Name = "直接发料")] + Direct_Issue = 1505 } diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/PurchaseReceiptJobs/IPurchaseReceiptJobAppService.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/PurchaseReceiptJobs/IPurchaseReceiptJobAppService.cs index dc4e8ffe1..1b26733b8 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/PurchaseReceiptJobs/IPurchaseReceiptJobAppService.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/PurchaseReceiptJobs/IPurchaseReceiptJobAppService.cs @@ -40,4 +40,12 @@ public interface IPurchaseReceiptJobAppService /// /// Task> SetInspectWithNotInspectAsync(Guid id); + + /// + /// 按Id获取实体 不走缓存 + /// + /// 实体Id + /// + /// + Task GetNoCacheAsync(Guid id); } diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/DeliverNotes/DTOs/DeliverNoteDTO.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/DeliverNotes/DTOs/DeliverNoteDTO.cs index d44b88d24..0bc9f5a03 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/DeliverNotes/DTOs/DeliverNoteDTO.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/DeliverNotes/DTOs/DeliverNoteDTO.cs @@ -48,6 +48,13 @@ public class DeliverNoteDTO : SfsStoreDTOBase [Display(Name = "发货申请单号")] public string DeliverRequestNumber { get; set; } + /// + /// 打印次数 + /// + /// + [Display(Name = "打印次数")] + public int CountPrint { get; set; } + /// /// 发货类型 /// diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/DeliverNotes/Inputs/DeliverNoteEditInput.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/DeliverNotes/Inputs/DeliverNoteEditInput.cs index 1985d4213..38c0e9206 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/DeliverNotes/Inputs/DeliverNoteEditInput.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/DeliverNotes/Inputs/DeliverNoteEditInput.cs @@ -63,5 +63,13 @@ public class DeliverNoteEditInput : SfsStoreCreateOrUpdateInputBase /// [Display(Name = "明细列表")] public List Details { get; set; } + + /// + /// 打印次数 + /// + /// + [Display(Name = "打印次数")] + public int CountPrint { get; set; } + #endregion } diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/PurchaseReceiptRequests/IPurchaseReceiptRequestAppService.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/PurchaseReceiptRequests/IPurchaseReceiptRequestAppService.cs index d08927f6e..07a28912f 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/PurchaseReceiptRequests/IPurchaseReceiptRequestAppService.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/PurchaseReceiptRequests/IPurchaseReceiptRequestAppService.cs @@ -20,4 +20,13 @@ public interface IPurchaseReceiptRequestAppService /// /// Task> CreateManyAsync(List inputs); + + /// + /// 【获取】【收货记录详情】根据 物品 箱码 + /// + /// + /// + /// + Task GetDetailByItemAndPackingAsync(string itemCode, + string packingCode); } diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Jobs/InspectJobs/InspectJobAppService.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Jobs/InspectJobs/InspectJobAppService.cs index 81b97e990..c7090612f 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Jobs/InspectJobs/InspectJobAppService.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Jobs/InspectJobs/InspectJobAppService.cs @@ -4,6 +4,7 @@ using System.Text.Json; using System.Threading.Tasks; using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Mvc; +using Volo.Abp.ObjectMapping; using Win_in.Sfs.FileStorage.Application.Contracts; using Win_in.Sfs.Wms.Store.Application.Contracts; using Win_in.Sfs.Wms.Store.Domain; diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Jobs/PurchaseReceiptJobs/PurchaseReceiptJobAppService.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Jobs/PurchaseReceiptJobs/PurchaseReceiptJobAppService.cs index 0b43b47f6..22b45c3bf 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Jobs/PurchaseReceiptJobs/PurchaseReceiptJobAppService.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Jobs/PurchaseReceiptJobs/PurchaseReceiptJobAppService.cs @@ -5,6 +5,7 @@ using System.Text.Json; using System.Threading.Tasks; using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Mvc; +using Volo.Abp.ObjectMapping; using Win_in.Sfs.FileStorage.Application.Contracts; using Win_in.Sfs.Shared.Domain.Shared; using Win_in.Sfs.Wms.Store.Application.Contracts; @@ -177,6 +178,19 @@ public class PurchaseReceiptJobAppService : entity.Details.Find(p => p.Id == input.DetailId)); } + /// + /// 按Id获取实体 不走缓存 + /// + /// 实体Id + /// + /// + [HttpGet("no-cache/{id}")] + public virtual async Task GetNoCacheAsync(Guid id) + { + var entity= await _repository.GetAsync(id).ConfigureAwait(false); + return ObjectMapper.Map(entity); + } + #endregion /// diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/DeliverNotes/DeliverNoteAppService.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/DeliverNotes/DeliverNoteAppService.cs index b1922fd4b..c50a174bb 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/DeliverNotes/DeliverNoteAppService.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/DeliverNotes/DeliverNoteAppService.cs @@ -6,6 +6,7 @@ using System.Threading.Tasks; using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Mvc; using Volo.Abp.Application.Dtos; +using Win_in.Sfs.Shared.Domain.Shared; using Win_in.Sfs.Wms.Store.Application.Contracts; using Win_in.Sfs.Wms.Store.Domain; using Win_in.Sfs.Wms.Store.Domain.Shared; @@ -72,7 +73,7 @@ public class DeliverNoteAppService : CancellationToken cancellationToken = default) { sfsRequestDTO.Condition.Filters.Add( - new Filter(nameof(DeliverRequest.DeliverRequestType), "2")); + new Filter(nameof(DeliverRequest.DeliverRequestType), EnumDeliverRequestType.FIS.ToString())); return await base.GetPagedListByFilterAsync(sfsRequestDTO, includeDetails, cancellationToken) .ConfigureAwait(false); @@ -85,7 +86,7 @@ public class DeliverNoteAppService : CancellationToken cancellationToken = default) { sfsRequestDTO.Condition.Filters.Add( - new Filter(nameof(DeliverRequest.DeliverRequestType), "1")); + new Filter(nameof(DeliverRequest.DeliverRequestType), EnumDeliverRequestType.Normal.ToString())); return await base.GetPagedListByFilterAsync(sfsRequestDTO, includeDetails, cancellationToken) .ConfigureAwait(false); @@ -98,7 +99,7 @@ public class DeliverNoteAppService : CancellationToken cancellationToken = default) { sfsRequestDTO.Condition.Filters.Add( - new Filter(nameof(DeliverRequest.DeliverRequestType), "3")); + new Filter(nameof(DeliverRequest.DeliverRequestType), EnumDeliverRequestType.RAW.ToString())); return await base.GetPagedListByFilterAsync(sfsRequestDTO, includeDetails, cancellationToken) .ConfigureAwait(false); @@ -132,4 +133,18 @@ public class DeliverNoteAppService : var list = ObjectMapper.Map, List>(entities); return ExportImportService.Export(list, true, "Details"); } + + /// + /// 调取打印 + /// + /// + [HttpPost("sum-print/{number}")] + public virtual async Task SumPrintAsync(string number) + { + var entity = await _repository.GetAsync(p => p.Number == number).ConfigureAwait(false); + + entity.CountPrint++; + + await _repository.UpdateAsync(entity).ConfigureAwait(false); + } } diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/DeliverNotes/DeliverNoteAutoMapperProfile.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/DeliverNotes/DeliverNoteAutoMapperProfile.cs index 81f3769ea..90aaa4d91 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/DeliverNotes/DeliverNoteAutoMapperProfile.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/DeliverNotes/DeliverNoteAutoMapperProfile.cs @@ -19,5 +19,18 @@ public partial class StoreApplicationAutoMapperProfile : Profile .Ignore(x => x.TenantId) .Ignore(x => x.Number) .Ignore(x => x.Id); + + CreateMap() + .Ignore(x => x.TenantId) + .Ignore(x => x.Number) + .Ignore(x => x.Id) + .Ignore(x=>x.CountPrint) + ; + CreateMap() + .Ignore(x => x.MasterID) + .Ignore(x => x.TenantId) + .Ignore(x => x.Number) + .Ignore(x => x.Id); + ; } } diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/IssueNotes/IssueNoteAutoMapperProfile.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/IssueNotes/IssueNoteAutoMapperProfile.cs index d59cc23ff..7ddb54704 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/IssueNotes/IssueNoteAutoMapperProfile.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/IssueNotes/IssueNoteAutoMapperProfile.cs @@ -20,5 +20,12 @@ public partial class StoreApplicationAutoMapperProfile : Profile .Ignore(x => x.TenantId) .Ignore(x => x.Number) .Ignore(x => x.Id); + + CreateMap() + .IgnoreAuditedObjectProperties() + .Ignore(x => x.TenantId) + .Ignore(x => x.Number) + .Ignore(x => x.Id); + ; } } diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/PurchaseReturnNotes/PurchaseReturnNoteAutoMapperProfile.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/PurchaseReturnNotes/PurchaseReturnNoteAutoMapperProfile.cs index ca75b6d5d..bc12055ab 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/PurchaseReturnNotes/PurchaseReturnNoteAutoMapperProfile.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/PurchaseReturnNotes/PurchaseReturnNoteAutoMapperProfile.cs @@ -22,5 +22,19 @@ public partial class StoreApplicationAutoMapperProfile : Profile .Ignore(x => x.TenantId) .Ignore(x => x.Number) .Ignore(x => x.Id); + + CreateMap() + .IgnoreAuditedObjectProperties() + .Ignore(x => x.TenantId) + .Ignore(x => x.Number) + .Ignore(x => x.Id) + ; + + CreateMap() + .IgnoreAuditedObjectProperties() + .Ignore(x => x.TenantId) + .Ignore(x => x.Number) + .Ignore(x => x.Id) + ; } } diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/ScrapNotes/ScrapNoteAppService.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/ScrapNotes/ScrapNoteAppService.cs index f0f21e83b..9407d0b7e 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/ScrapNotes/ScrapNoteAppService.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/ScrapNotes/ScrapNoteAppService.cs @@ -2,9 +2,11 @@ using System; using System.Linq.Expressions; using System.Threading; using System.Threading.Tasks; +using DocumentFormat.OpenXml.Bibliography; using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Mvc; using Volo.Abp.Application.Dtos; +using Volo.Abp.EventBus; using Win_in.Sfs.Wms.Store.Application.Contracts; using Win_in.Sfs.Wms.Store.Domain; using Win_in.Sfs.Wms.Store.Domain.Shared; @@ -12,7 +14,11 @@ using Win_in.Sfs.Wms.Store.Domain.Shared; namespace Win_in.Sfs.Wms.Store.Application; using System.Linq; +using IdentityModel; +using Volo.Abp.Domain.Entities; +using Volo.Abp.ObjectMapping; using Win_in.Sfs.Shared.Domain; +using Win_in.Sfs.Shared.Event; [Authorize] [Route($"{StoreConsts.RootPath}scrap-note")] @@ -21,28 +27,31 @@ public class ScrapNoteAppService : ScrapNoteDetail, ScrapNoteDetailDTO, SfsStoreRequestInputBase, ScrapNoteImportInput>, IScrapNoteAppService { - private readonly IScrapNoteManager _scrapNoteManager; - public ScrapNoteAppService( - IScrapNoteRepository repository - , IScrapNoteManager scrapNoteManager - ) : base(repository) + IScrapNoteRepository repository) : base(repository) { - _scrapNoteManager = scrapNoteManager; } [HttpPost("")] - //[Authorize(ScrapNotePermissions.Create)] public override async Task CreateAsync(ScrapNoteEditInput input) { var entity = ObjectMapper.Map(input); - await _scrapNoteManager.CreateAsync(entity).ConfigureAwait(false); + var number = string.IsNullOrEmpty(entity.Number) ? await GenerateNumberAsync(nameof(ScrapNote), entity.ActiveDate).ConfigureAwait(false) : entity.Number; + entity.SetIdAndNumberWithDetails(GuidGenerator, number); + + foreach (var detail in entity.Details) + { + detail.SetIdAndNumber(GuidGenerator, entity.Id, entity.Number); + } + + entity = await _repository.InsertAsync(entity).ConfigureAwait(false); + await LocalEventBus.PublishAsync(new SfsCreatedEntityEventData(entity), false).ConfigureAwait(false); var dto = ObjectMapper.Map(entity); return dto; } - + [HttpPost("by-type/{type}")] public virtual async Task> GetListByTypeAsync( SfsStoreRequestInputBase requestInput, diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/ScrapNotes/ScrapNoteAutoMapperProfile.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/ScrapNotes/ScrapNoteAutoMapperProfile.cs index 7545e93a1..6488a5f26 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/ScrapNotes/ScrapNoteAutoMapperProfile.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/ScrapNotes/ScrapNoteAutoMapperProfile.cs @@ -20,5 +20,19 @@ public partial class StoreApplicationAutoMapperProfile : Profile .Ignore(x => x.TenantId) .Ignore(x => x.Number) .Ignore(x => x.Id); + + CreateMap() + .IgnoreAuditedObjectProperties() + .Ignore(x => x.TenantId) + .Ignore(x => x.Number) + .Ignore(x => x.Id); + ; + CreateMap() + .IgnoreAuditedObjectProperties() + .Ignore(x => x.MasterID) + .Ignore(x => x.TenantId) + .Ignore(x => x.Number) + .Ignore(x => x.Id); + ; } } diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Plans/SupplierAsns/SupplierAsnAppService.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Plans/SupplierAsns/SupplierAsnAppService.cs index f232b2a60..b57a4890e 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Plans/SupplierAsns/SupplierAsnAppService.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Plans/SupplierAsns/SupplierAsnAppService.cs @@ -64,6 +64,7 @@ public class SupplierAsnAppService : { var inputEntity = ObjectMapper.Map(input); + inputEntity.Number = input.Number; var resultEntity = await _supplierAsnManager.CreateAsync(inputEntity).ConfigureAwait(false); return ObjectMapper.Map(resultEntity); diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/PurchaseReceiptRequests/PurchaseReceiptRequestAppService.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/PurchaseReceiptRequests/PurchaseReceiptRequestAppService.cs index e1b1a4477..ded767df5 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/PurchaseReceiptRequests/PurchaseReceiptRequestAppService.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/PurchaseReceiptRequests/PurchaseReceiptRequestAppService.cs @@ -1,5 +1,6 @@ using System; using System.Collections.Generic; +using System.Linq; using System.Threading.Tasks; using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Mvc; @@ -54,6 +55,25 @@ public class PurchaseReceiptRequestAppService : return ObjectMapper.Map(resultEntity); } + /// + /// 【获取】【收货记录详情】根据 物品 箱码 + /// + /// + /// + /// + [HttpGet("detail-by-item-and-packing")] + public virtual async Task GetDetailByItemAndPackingAsync(string itemCode, + string packingCode) + { + var entity = (await _repository.GetListAsync(p => p.Details.Any(y => y.ItemCode == itemCode && y.PackingCode == packingCode), true).ConfigureAwait(false)).FirstOrDefault(); + + var detail = entity.Details.FirstOrDefault(y => y.ItemCode == itemCode && y.PackingCode == packingCode); + + var dto = ObjectMapper.Map(detail); + + return dto; + } + #endregion diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/ScrapRequests/ScrapRequestAppService.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/ScrapRequests/ScrapRequestAppService.cs index b8a8ebb34..2c81b848c 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/ScrapRequests/ScrapRequestAppService.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/ScrapRequests/ScrapRequestAppService.cs @@ -10,6 +10,7 @@ using Microsoft.AspNetCore.Mvc; using Microsoft.EntityFrameworkCore; using Volo.Abp; using Volo.Abp.Application.Dtos; +using Volo.Abp.Users; using Win_in.Sfs.Basedata.Application.Contracts; using Win_in.Sfs.Shared.Application.Contracts; using Win_in.Sfs.Shared.Domain; @@ -17,26 +18,85 @@ using Win_in.Sfs.Shared.Domain.Shared; 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.Acl.Dict; using Win_in.Sfs.Wms.Store.Domain.Shared; namespace Win_in.Sfs.Wms.Store.Application; [Authorize] [Route($"{StoreConsts.RootPath}scrap-request")] -public class ScrapRequestAppService : - SfsStoreRequestAppServiceBase - +public class ScrapRequestAppService : SfsStoreRequestAppServiceBase + { - private readonly IScrapRequestManager _scrapRequestManager; - private const string ReasonItemCode = "Reason"; + private readonly IScrapRequestManager _scrapRequestManager; + private readonly IDictAclService _dictAclService; + private readonly ITransactionTypeAppService _transactionTypeAppService; + private readonly IItemBasicAppService _itemBasicAppService; public ScrapRequestAppService( - IScrapRequestRepository repository, - IScrapRequestManager scrapRequestManager) + IScrapRequestRepository repository, + IScrapRequestManager scrapRequestManager, + IDictAclService dictAclService, + ITransactionTypeAppService transactionTypeAppService, + IItemBasicAppService itemBasicAppService) : base(repository, scrapRequestManager) { _scrapRequestManager = scrapRequestManager; + _dictAclService = dictAclService; + _transactionTypeAppService = transactionTypeAppService; + _itemBasicAppService = itemBasicAppService; + } + + #region 东阳使用 + + protected override async Task> ImportProcessingEntityAsync( + Dictionary dictionary) + { + var addList = dictionary.Where(p => p.Value == EntityState.Added).Select(p => p.Key); + + foreach (var scrapRequest in addList) + { + scrapRequest.CreatorId = CurrentUser.Id; + scrapRequest.Worker = CurrentUser.Name; + + scrapRequest.Type = EnumTransSubType.Scrap_WIP.ToString(); + scrapRequest.ActiveDate = DateTime.Now; + + await SetEntityPropertiesAsync(scrapRequest, EnumTransSubType.Scrap_WIP).ConfigureAwait(false); + + foreach (var detail in scrapRequest.Details) + { + var itemBasicDto = await _itemBasicAppService.GetByCodeAsync(detail.ItemCode).ConfigureAwait(false); + detail.ItemName = itemBasicDto.Name; + detail.ItemDesc1 = itemBasicDto.Desc1; + detail.ItemDesc2 = itemBasicDto.Desc2; + + detail.Uom = itemBasicDto.BasicUom; + } + } + + return dictionary; + } + + private async Task SetEntityPropertiesAsync(ScrapRequest entity, EnumTransSubType subType) + { + var tranType = await _transactionTypeAppService.GetByTransTypeAsync(EnumTransType.Scrap, subType) + .ConfigureAwait(false); + entity.Worker = CurrentUser.GetUserName(); + + entity.AutoCompleteJob = tranType.AutoCompleteJob; + entity.AutoSubmit = tranType.AutoSubmitRequest; + entity.AutoAgree = tranType.AutoAgreeRequest; + entity.AutoHandle = tranType.AutoHandleRequest; + entity.DirectCreateNote = tranType.DirectCreateNote; } [HttpPost("by-type/{type}")] @@ -53,9 +113,11 @@ public class ScrapRequestAppService : } return await GetPagedListAsync(expression, requestInput.SkipCount, requestInput.MaxResultCount, - requestInput.Sorting, includeDetails, cancellationToken).ConfigureAwait(false); + requestInput.Sorting, includeDetails, cancellationToken).ConfigureAwait(false); } + #endregion + [HttpPost("export-by-type")] public virtual async Task ExportByTypeAsync(SfsExportRequestInput requestInput, string type) { @@ -65,16 +127,19 @@ public class ScrapRequestAppService : expression = expression.And(requestInput.Condition.Filters.ToLambda()); } - var entities = await _repository.GetPagedListAsync(expression, requestInput.SkipCount, requestInput.MaxResultCount, requestInput.Sorting, true).ConfigureAwait(false); + var entities = await _repository + .GetPagedListAsync(expression, requestInput.SkipCount, requestInput.MaxResultCount, requestInput.Sorting, + true).ConfigureAwait(false); var list = ObjectMapper.Map, List>(entities); return ExportImportService.Export(list, true, "Details"); } - #region import + #region 校验 - protected override async Task ValidateImportModelAsync(ScrapRequestImportInput model, List validationRresult) + protected override async Task ValidateImportModelAsync(ScrapRequestImportInput model, + List validationRresult) { _ = await CheckItemBasicAsync(model, validationRresult).ConfigureAwait(false); _ = await CheckLocationAsync(model, validationRresult).ConfigureAwait(false); @@ -82,33 +147,38 @@ public class ScrapRequestAppService : await CheckDicAsync(model, validationRresult).ConfigureAwait(false); } - protected async Task CheckItemBasicAsync(ScrapRequestImportInput importInput, List validationRresul) + protected async Task CheckItemBasicAsync(ScrapRequestImportInput importInput, + List validationRresul) { var item = await ItemBasicAclService.GetByCodeAsync(importInput.ItemCode).ConfigureAwait(false); if (item == null) { validationRresul.Add(new ValidationResult($"物品代码{importInput.ItemCode}不存在", new string[] { "物品代码" })); } + if (importInput.Qty <= 0) { validationRresul.Add(new ValidationResult($"数量{importInput.Qty}需要大于0", new string[] { "数量" })); } + return item; } - protected async Task CheckLocationAsync(ScrapRequestImportInput importInput, List validationRresul) + protected async Task CheckLocationAsync(ScrapRequestImportInput importInput, + List validationRresul) { var location = await LocationAclService.GetByCodeAsync(importInput.LocationCode).ConfigureAwait(false); if (location == null) { validationRresul.Add(new ValidationResult($"库位代码{importInput.LocationCode}不存在", new string[] { "库位代码" })); } + return location; } protected async Task CheckDicAsync(ScrapRequestImportInput importInput, List validationRresul) { - var dicItem = await DictAclService.GetByCodeAsync(ReasonItemCode).ConfigureAwait(false); + var dicItem = await _dictAclService.GetByCodeAsync(ReasonItemCode).ConfigureAwait(false); if (dicItem == null) { validationRresul.Add(new ValidationResult($"字典编号{ReasonItemCode}不存在", new string[] { "字典编号" })); @@ -116,26 +186,28 @@ public class ScrapRequestAppService : if (!dicItem.Items.Any(r => r.Code == importInput.ReasonCode)) { - validationRresul.Add(new ValidationResult($"报废原因代码{importInput.ReasonCode}在线边仓报废原因中不存在", new string[] { "报废原因代码" })); + validationRresul.Add(new ValidationResult($"报废原因代码{importInput.ReasonCode}在线边仓报废原因中不存在", + new string[] { "报废原因代码" })); } } protected async Task CheckTransactionTypeAsync(List validationRresul) { - - var transactionType = await TransactionTypeAclService.GetByTransTypeAsync(EnumTransType.Scrap, EnumTransSubType.None).ConfigureAwait(false); + var transactionType = await TransactionTypeAclService + .GetByTransTypeAsync(EnumTransType.Scrap, EnumTransSubType.Scrap_WIP).ConfigureAwait(false); Check.NotNull(transactionType, "事务类型", "事务类型报废不存在"); return transactionType; } - protected async Task CheckBalanceAsync(ScrapRequestImportInput importInput, List validationRresul) + protected async Task CheckBalanceAsync(ScrapRequestImportInput importInput, + List validationRresul) { var balance = await BalanceAclService.GetByItemLocationAndPackingAsync( - string.Empty, - importInput.ItemCode, - importInput.LocationCode).ConfigureAwait(false); + string.Empty, + importInput.ItemCode, + importInput.LocationCode).ConfigureAwait(false); //var balance = await this._balanceApp.GetByItemLocationAndPackingAsync( // string.Empty, // itemBasic.Code, @@ -145,6 +217,7 @@ public class ScrapRequestAppService : { throw new ArgumentException($"物品代码 {importInput.ItemCode}的库存余额数量{balance.Qty}小于导入数量{importInput.Qty}。"); } + return balance; } @@ -157,7 +230,9 @@ public class ScrapRequestAppService : { foreach (var entity in dict.Keys) { - var tranType = await TransactionTypeAclService.GetByTransTypeAsync(EnumTransType.Scrap, Enum.Parse(entity.Type)).ConfigureAwait(false); + var tranType = await TransactionTypeAclService + .GetByTransTypeAsync(EnumTransType.Scrap, EnumTransSubType.Scrap_WIP) + .ConfigureAwait(false); Check.NotNull(tranType, "事务类型", "事务类型不存在"); entity.AutoCompleteJob = tranType.AutoCompleteJob; entity.AutoSubmit = tranType.AutoSubmitRequest; @@ -165,6 +240,7 @@ public class ScrapRequestAppService : entity.AutoHandle = tranType.AutoHandleRequest; entity.DirectCreateNote = tranType.DirectCreateNote; } + return await base.ValidateImportEntities(dict).ConfigureAwait(false); } @@ -193,6 +269,7 @@ public class ScrapRequestAppService : } } } + await base.SaveImportAsync(dict).ConfigureAwait(false); } diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/TransferRequests/TransferRequestAppService.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/TransferRequests/TransferRequestAppService.cs index c842b5b93..409de9b89 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/TransferRequests/TransferRequestAppService.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/TransferRequests/TransferRequestAppService.cs @@ -25,8 +25,14 @@ namespace Win_in.Sfs.Wms.Store.Application; [Authorize] [Route($"{StoreConsts.RootPath}transfer-request")] public class TransferRequestAppService : SfsStoreRequestAppServiceBase - , + , ITransferRequestAppService { private readonly ITransferRequestManager _transferRequestManager; @@ -69,7 +75,7 @@ public class TransferRequestAppService : SfsStoreRequestAppServiceBase detail.ItemCode, detail.FromLocationCode).ConfigureAwait(false); var toLocationDto = await _locationAppService.GetByCodeAsync(detail.ToLocationCode) .ConfigureAwait(false); - + detail.ItemCode = balanceDto.ItemCode; detail.ArriveDate = balanceDto.ArriveDate; detail.ItemDesc1 = balanceDto.ItemDesc1; @@ -103,7 +109,8 @@ public class TransferRequestAppService : SfsStoreRequestAppServiceBase detail.ToLot = balanceDto.Lot; } - await SetEntityPropertiesAsync(transferRequest, EnumTransSubType.Transfer_Customer).ConfigureAwait(false); + await SetEntityPropertiesAsync(transferRequest, EnumTransSubType.Transfer_Customer) + .ConfigureAwait(false); } } diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Jobs/InspectJobs/InspectJobManager.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Jobs/InspectJobs/InspectJobManager.cs index 9930d91b2..68e6f5e97 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Jobs/InspectJobs/InspectJobManager.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Jobs/InspectJobs/InspectJobManager.cs @@ -138,8 +138,11 @@ public class InspectJobManager : SfsJobManagerBase { var jobEntity = await Repository.FindAsync(id); - jobEntity.Details.Where(p => p.DetailInspectStatus == EnumDetailInspectStatus.DefaultOK || - p.DetailInspectStatus == EnumDetailInspectStatus.OK).ToList().ForEach(p => + jobEntity.Details.Where(p => (p.DetailInspectStatus == EnumDetailInspectStatus.DefaultOK || + p.DetailInspectStatus == EnumDetailInspectStatus.OK)&& + p.ItemCode== input.ItemCode&& + p.Lot==input.Lot + ).ToList().ForEach(p => { p.GoodQty = p.ReceiveQty; }); diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Notes/DeliverNotes/DeliverNote.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Notes/DeliverNotes/DeliverNote.cs index 15b096b4a..6a60d8f74 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Notes/DeliverNotes/DeliverNote.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Notes/DeliverNotes/DeliverNote.cs @@ -1,5 +1,7 @@ using System; using System.Collections.Generic; +using DocumentFormat.OpenXml.Wordprocessing; +using System.ComponentModel.DataAnnotations; using Win_in.Sfs.Shared.Domain.Entities; using Win_in.Sfs.Shared.Domain.Shared; @@ -52,6 +54,13 @@ public class DeliverNote : SfsStoreAggregateRootBase, IHasJob [IgnoreUpdate] public EnumDeliverRequestType DeliverRequestType { get; set; } + /// + /// 打印次数 + /// + /// + [Display(Name = "打印次数")] + public int CountPrint { get; set; } + /// /// 明细列表 /// diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Notes/ScrapNotes/ScrapNoteManager.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Notes/ScrapNotes/ScrapNoteManager.cs index 467ad4e9d..56c0ffb49 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Notes/ScrapNotes/ScrapNoteManager.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Notes/ScrapNotes/ScrapNoteManager.cs @@ -1,3 +1,5 @@ +using System.Threading.Tasks; + namespace Win_in.Sfs.Wms.Store.Domain; public class ScrapNoteManager : SfsStoreManagerBase, IScrapNoteManager @@ -7,6 +9,6 @@ public class ScrapNoteManager : SfsStoreManagerBase, IScrapNoteRepository repository ) : base(repository) { + } - } diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/Migrations/20230412072454_Store_AddColumn.Designer.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/Migrations/20230412072454_Store_AddColumn.Designer.cs new file mode 100644 index 000000000..72ce9d5e6 --- /dev/null +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/Migrations/20230412072454_Store_AddColumn.Designer.cs @@ -0,0 +1,20983 @@ +// +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("20230412072454_Store_AddColumn")] + partial class Store_AddColumn + { + 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.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("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.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("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("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("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("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("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("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("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") + .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.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.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("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("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("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + 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("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("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("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("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("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("ProduceDate") + .HasColumnType("datetime2"); + + 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("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_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("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("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("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("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("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + 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("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("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("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("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("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("ProduceDate") + .HasColumnType("datetime2"); + + 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("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_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("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("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.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.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.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.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.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.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.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.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.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.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.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.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.WorkOrder", b => + { + b.Navigation("Details"); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/Migrations/20230412072454_Store_AddColumn.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/Migrations/20230412072454_Store_AddColumn.cs new file mode 100644 index 000000000..93eaf0024 --- /dev/null +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/Migrations/20230412072454_Store_AddColumn.cs @@ -0,0 +1,68 @@ +using Microsoft.EntityFrameworkCore.Migrations; + +#nullable disable + +namespace Win_in.Sfs.Wms.Store.Migrations +{ + public partial class Store_AddColumn : Migration + { + protected override void Up(MigrationBuilder migrationBuilder) + { + migrationBuilder.AlterColumn( + name: "Type", + table: "Store_TransferNote", + type: "nvarchar(64)", + maxLength: 64, + nullable: false, + defaultValue: "", + oldClrType: typeof(string), + oldType: "nvarchar(64)", + oldMaxLength: 64, + oldNullable: true); + + migrationBuilder.AddColumn( + name: "WarehouseCode", + table: "Store_PurchaseReceiptNote", + type: "nvarchar(max)", + nullable: true); + + migrationBuilder.AddColumn( + name: "WarehouseCode", + table: "Store_InspectRequest", + type: "nvarchar(max)", + nullable: true); + + migrationBuilder.AddColumn( + name: "CountPrint", + table: "Store_DeliverNote", + type: "int", + nullable: false, + defaultValue: 0); + } + + protected override void Down(MigrationBuilder migrationBuilder) + { + migrationBuilder.DropColumn( + name: "WarehouseCode", + table: "Store_PurchaseReceiptNote"); + + migrationBuilder.DropColumn( + name: "WarehouseCode", + table: "Store_InspectRequest"); + + migrationBuilder.DropColumn( + name: "CountPrint", + table: "Store_DeliverNote"); + + migrationBuilder.AlterColumn( + name: "Type", + table: "Store_TransferNote", + type: "nvarchar(64)", + maxLength: 64, + nullable: true, + oldClrType: typeof(string), + oldType: "nvarchar(64)", + oldMaxLength: 64); + } + } +} 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 c92a6a644..6a513c945 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 @@ -1,4 +1,4 @@ -// +// using System; using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Infrastructure; @@ -3051,6 +3051,9 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("nvarchar(40)") .HasColumnName("ConcurrencyStamp"); + b.Property("CountPrint") + .HasColumnType("int"); + b.Property("CreationTime") .HasColumnType("datetime2") .HasColumnName("CreationTime"); @@ -5202,6 +5205,9 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("TenantId"); + b.Property("WarehouseCode") + .HasColumnType("nvarchar(max)"); + b.Property("Worker") .HasColumnType("nvarchar(max)"); @@ -13083,6 +13089,9 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasMaxLength(64) .HasColumnType("nvarchar(64)"); + b.Property("WarehouseCode") + .HasColumnType("nvarchar(max)"); + b.Property("Worker") .HasColumnType("nvarchar(max)"); @@ -17189,6 +17198,7 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnName("TenantId"); b.Property("Type") + .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)"); diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/AutoMapperProfiles/Jobs/IssueJobAutoMapperProfile.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/AutoMapperProfiles/Jobs/IssueJobAutoMapperProfile.cs index 22713c44a..d78170183 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/AutoMapperProfiles/Jobs/IssueJobAutoMapperProfile.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/AutoMapperProfiles/Jobs/IssueJobAutoMapperProfile.cs @@ -48,8 +48,7 @@ public partial class StoreEventAutoMapperProfile : Profile .Ignore(x => x.ToLocationErpCode) ; - CreateMap< - IssueJobDetail, ExpectInEditInput>() + CreateMap() .MapExpectInOutFrom() .Ignore(x => x.Worker) .Ignore(x => x.SerialNumber) @@ -62,5 +61,32 @@ public partial class StoreEventAutoMapperProfile : Profile .Ignore(x => x.SerialNumber) .Ignore(x => x.ExtraProperties); + CreateMap() + .Ignore(x => x.Confirmed) + .Ignore(x => x.JobNumber) + .Ignore(x => x.RequestNumber) + .Ignore(x => x.ActiveDate) + ; + CreateMap() + .Ignore(x => x.IssueTime) + .Ignore(x => x.FromPackingCode) + .Ignore(x => x.ToPackingCode) + .Ignore(x => x.FromContainerCode) + .Ignore(x => x.ToContainerCode) + .Ignore(x => x.FromLot) + .Ignore(x => x.ToLot) + .Ignore(x => x.SupplierBatch) + .Ignore(x => x.ArriveDate) + .Ignore(x => x.ProduceDate) + .Ignore(x => x.ExpireDate) + .Ignore(x => x.FromLocationCode) + .Ignore(x => x.FromLocationArea) + .Ignore(x => x.FromLocationGroup) + .Ignore(x => x.FromLocationErpCode) + .Ignore(x => x.FromWarehouseCode) + .Ignore(x => x.FromStatus) + .Ignore(x => x.ToStatus) + .Ignore(x => x.Qty) + ; } } diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Bases/StoreDataExchangeEventHandlerBase.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Bases/StoreDataExchangeEventHandlerBase.cs index 92fc4956d..c0675f55b 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Bases/StoreDataExchangeEventHandlerBase.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Bases/StoreDataExchangeEventHandlerBase.cs @@ -13,8 +13,8 @@ namespace Win_in.Sfs.Wms.Store.Event.DataExchanges; public abstract class StoreDataExchangeEventHandlerBase : StoreEventHandlerBase { - // protected IDataExchangeHelperManager DataExchangeHelperManager => - // LazyServiceProvider.LazyGetRequiredService(); + protected IDataExchangeHelperManager DataExchangeHelperManager => + LazyServiceProvider.LazyGetRequiredService(); protected IExchangeDataManager ExchangeDataManager => LazyServiceProvider.LazyGetRequiredService(); diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Jobs/IssueJobEventHandler.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Jobs/IssueJobEventHandler.cs index d2b597995..d5e645fb5 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Jobs/IssueJobEventHandler.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Jobs/IssueJobEventHandler.cs @@ -51,6 +51,7 @@ public class IssueJobEventHandler : private async Task BuildIssueNoteAsync(IssueJob 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); @@ -61,7 +62,6 @@ public class IssueJobEventHandler : var location = locations.First(p => p.Code == detail.ToLocationCode); await RemovePackingCodeAndContainerCodeAndLotAsync(detail, location.Type); //去箱 去托 去批 - detail.ToLocationArea = location.AreaCode; detail.ToLocationGroup = location.LocationGroupCode; detail.ToLocationErpCode = location.ErpLocationCode; diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Orders/PurchaseOrderEventHandler.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Orders/PurchaseOrderEventHandler.cs index ab126994f..5b8074599 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Orders/PurchaseOrderEventHandler.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Orders/PurchaseOrderEventHandler.cs @@ -176,10 +176,17 @@ public class PurchaseOrderEventHandler var itemPackDto=ItemPacks.First(p => p.ItemCode == purchaseOrderDetaildetail.ItemCode); //总箱数 - var itemPackQty = (int)(itemQty / itemPackDto.Qty); - if (itemQty % itemPackQty!= 0) + var itemPackingCount = (int)(itemQty / itemPackDto.Qty); + if (itemQty > itemPackDto.Qty) { - itemPackQty++; + if (itemQty % itemPackDto.Qty != 0) + { + itemPackingCount++; + } + } + else + { + itemPackingCount = 1; } //添加物品信息 @@ -192,9 +199,9 @@ public class PurchaseOrderEventHandler //一次性返回所有箱码 var generateManyAsync = await _labelDefinitionAppService .GenerateManyAsync(EnumLabelType.PurchaseLabel.ToString(), Clock.Now.ToString(SharedConst.TimeFormat), - itemPackQty).ConfigureAwait(false); + itemPackingCount).ConfigureAwait(false); - for (var i = 0; i < itemPackQty; i++) + for (var i = 0; i < itemPackingCount; i++) { var supplierAsnDetailInput = ObjectMapper.Map(purchaseOrderDetaildetail); //添加箱码 @@ -257,9 +264,6 @@ public class PurchaseOrderEventHandler ItemPackDTO itemPackDto) { if (itemBasicDto == null) - { - throw new UserFriendlyException($"{supplierAsnDetail.ItemCode}零件信息为空"); - } if (supplierDto == null) { @@ -288,6 +292,7 @@ public class PurchaseOrderEventHandler inputLabel.RecommendLocationCode = supplierAsnDetail.RecommendErpCode; inputLabel.Remark = supplierAsnDetail.Remark; inputLabel.Code = supplierAsnDetail.PackingCode; + inputLabel.PlanArriveDate=supplierAsn.PlanArriveDate; inputLabel.Qty = supplierAsnDetail.Qty; inputLabel.Uom = supplierAsnDetail.Uom; diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Requests/IssueNoteEventHandler.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Requests/IssueNoteEventHandler.cs index 6bec71c5f..5305923a6 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Requests/IssueNoteEventHandler.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Requests/IssueNoteEventHandler.cs @@ -1,78 +1,78 @@ -using System.Collections.Generic; -using System.Linq; -using System.Threading.Tasks; -using Volo.Abp.EventBus; -using Volo.Abp.Uow; -using Win_in.Sfs.Shared.Event; -using Win_in.Sfs.Wms.Store.Domain; +//using System.Collections.Generic; +//using System.Linq; +//using System.Threading.Tasks; +//using Volo.Abp.EventBus; +//using Volo.Abp.Uow; +//using Win_in.Sfs.Shared.Event; +//using Win_in.Sfs.Wms.Store.Domain; -namespace Win_in.Sfs.Wms.Store.Event.BusinessRequest; +//namespace Win_in.Sfs.Wms.Store.Event.BusinessRequest; -public class IssueNoteEventHandler - : StoreEventHandlerBase - , ILocalEventHandler> - , ILocalEventHandler>> - , ILocalEventHandler> -{ - private readonly IMaterialRequestManager _materialRequestManager; +//public class IssueNoteEventHandler +// : StoreEventHandlerBase +// , ILocalEventHandler> +// , ILocalEventHandler>> +// , ILocalEventHandler> +//{ +// private readonly IMaterialRequestManager _materialRequestManager; - public IssueNoteEventHandler( - IMaterialRequestManager materialRequestManager - ) - { - _materialRequestManager = materialRequestManager; - } +// public IssueNoteEventHandler( +// IMaterialRequestManager materialRequestManager +// ) +// { +// _materialRequestManager = materialRequestManager; +// } - [UnitOfWork] - public virtual async Task HandleEventAsync(SfsConfirmedEntityEventData eventData) - { - var entity = eventData.Entity; +// [UnitOfWork] +// public virtual async Task HandleEventAsync(SfsConfirmedEntityEventData eventData) +// { +// var entity = eventData.Entity; - await UpdateReceivedQtyMaterialRequestAsync(entity).ConfigureAwait(false); - } +// await UpdateReceivedQtyMaterialRequestAsync(entity).ConfigureAwait(false); +// } - private async Task UpdateReceivedQtyMaterialRequestAsync(IssueNote 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(); +// private async Task UpdateReceivedQtyMaterialRequestAsync(IssueNote 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); +// var materialRequest = await _materialRequestManager.GetByNumberAsync(entity.RequestNumber).ConfigureAwait(false); - //更新叫料请求的已收数量 - 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; - } - } +// //更新叫料请求的已收数量 +// 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); - } +// await _materialRequestManager.UpdateDetailsAsync(materialRequest).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 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); - } - } -} +// [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); +// } +// } +//} diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Requests/Note/ScrapNoteEventHandler.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Requests/Note/ScrapNoteEventHandler.cs new file mode 100644 index 000000000..f9270b9be --- /dev/null +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Requests/Note/ScrapNoteEventHandler.cs @@ -0,0 +1,57 @@ +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.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.Event.Transaction; + +namespace Win_in.Sfs.Wms.Store.Event.BusinessRequest; + +public class ScrapNoteEventHandler + : StoreInventoryEventHandlerBase + , ILocalEventHandler> + , ILocalEventHandler>> +{ + private readonly IScrapRequestManager _scrapRequestManager; + + public ScrapNoteEventHandler(IScrapRequestManager scrapRequestManager) + { + _scrapRequestManager = scrapRequestManager; + } + + [UnitOfWork] + public virtual async Task HandleEventAsync(SfsCreatedEntityEventData eventData) + { + var entity = eventData.Entity; + if (!string.IsNullOrEmpty(entity.ScrapRequestNumber)) + { + var scrapRequest = await _scrapRequestManager.GetByNumberAsync(entity.ScrapRequestNumber) + .ConfigureAwait(false); + + await _scrapRequestManager.CompleteAsync(scrapRequest).ConfigureAwait(false); + } + } + + [UnitOfWork] + public virtual async Task HandleEventAsync(SfsCreatedEntityEventData> eventData) + { + var entitys = eventData.Entity; + foreach (var entity in entitys) + { + if (string.IsNullOrEmpty(entity.ScrapRequestNumber)) + { + var scrapRequest = await _scrapRequestManager.GetByNumberAsync(entity.ScrapRequestNumber) + .ConfigureAwait(false); + + await _scrapRequestManager.CompleteAsync(scrapRequest).ConfigureAwait(false); + } + } + } +} diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Requests/ScrapRequestEventHandler.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Requests/ScrapRequestEventHandler.cs index dcd3511ae..4f75f7e83 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Requests/ScrapRequestEventHandler.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Requests/ScrapRequestEventHandler.cs @@ -14,16 +14,51 @@ using Win_in.Sfs.Wms.Store.Application.Contracts; public class ScrapRequestEventHandler : StoreEventHandlerBase + , ILocalEventHandler> + , ILocalEventHandler>> , ILocalEventHandler> { private readonly IScrapNoteAppService _scrapNoteApp; + private readonly IScrapRequestManager _scrapRequestManager; public ScrapRequestEventHandler( - IScrapNoteAppService scrapNoteApp - ) + IScrapNoteAppService scrapNoteApp, + IScrapRequestManager scrapRequestManager) { _scrapNoteApp = scrapNoteApp; + _scrapRequestManager = scrapRequestManager; + } + + /// + /// 库移创建后 + /// + /// Event data + [UnitOfWork] + public virtual async Task HandleEventAsync(SfsCreatedEntityEventData eventData) + { + var entity = eventData.Entity; + if (entity.AutoSubmit) + { + await _scrapRequestManager.SubmitAsync(entity).ConfigureAwait(false); + } + } + + /// + /// 库移批量创建后 + /// + /// Event data + [UnitOfWork] + public virtual async Task HandleEventAsync(SfsCreatedEntityEventData> eventData) + { + var entitys = eventData.Entity; + foreach (var entity in entitys) + { + if (entity.AutoSubmit) + { + await _scrapRequestManager.SubmitAsync(entity).ConfigureAwait(false); + } + } } [UnitOfWork] diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Transactions/DeliverNoteEventHandler.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Transactions/DeliverNoteEventHandler.cs index 10cf80868..d08b6cd95 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Transactions/DeliverNoteEventHandler.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Transactions/DeliverNoteEventHandler.cs @@ -12,13 +12,14 @@ 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.Event.Transaction; + // using Win_in.Sfs.Wms.Job.Domain.Shared; namespace Win_in.Sfs.Wms.Store.Event.Transactions; public class DeliverNoteEventHandler : StoreInventoryEventHandlerBase - , ILocalEventHandler> + , ILocalEventHandler> { private const EnumTransType TransType = EnumTransType.Deliver; private readonly IDeliverRequestAppService _deliverRequestApp; @@ -34,6 +35,11 @@ public class DeliverNoteEventHandler RedisDB = redisConnection.GetDatabase(); } + /// + /// 创建后 + /// + /// + /// [UnitOfWork] public virtual async Task HandleEventAsync(SfsCreatedEntityEventData eventData) { @@ -44,19 +50,18 @@ public class DeliverNoteEventHandler await SetRequestStatusAsync(entity).ConfigureAwait(false); } + #region 私有 + private async Task AddTransactionsAsync(DeliverNote deliverNote) { //如果WMS管理客户寄售库,生成库存转移 if (await SettingManager.IsTrueAsync(StoreSettings.Common.EnableCustomerLocation).ConfigureAwait(false)) { - var transferLogs = BuildTransferLogs(deliverNote); await TransferLogAppService.AddManyAsync(transferLogs).ConfigureAwait(false); - } else //如果WMS不管理客户寄售库,生成出库 { - var transactions = BuildTransactions(deliverNote); await TransactionAppService.AddManyAsync(transactions).ConfigureAwait(false); } @@ -151,4 +156,6 @@ public class DeliverNoteEventHandler return EnumTransSubType.None; } } + + #endregion } diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Transactions/IssueNoteEventHandler.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Transactions/IssueNoteEventHandler.cs index b27cf8c57..f43b6e406 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Transactions/IssueNoteEventHandler.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Transactions/IssueNoteEventHandler.cs @@ -4,119 +4,156 @@ 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; 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.Domain; -using Win_in.Sfs.Wms.Store.Event.Transaction; +using Win_in.Sfs.Wms.Store.Event.Transactions; -namespace Win_in.Sfs.Wms.Store.Event.Transactions; - -public class IssueNoteEventHandler - : StoreInventoryEventHandlerBase - , ILocalEventHandler> - , ILocalEventHandler>> - , ILocalEventHandler> +namespace Win_in.Sfs.Wms.Store.Event.BusinessNote { - private const EnumTransType TransType = EnumTransType.Issue; - - [UnitOfWork] - public virtual async Task HandleEventAsync(SfsCreatedEntityEventData eventData) - { - var entity = eventData.Entity; - var transferLogs = new List(); - var route = entity.UseOnTheWayLocation - ? EnumTransferRoute.SourceToOnTheWay - : EnumTransferRoute.SourceToDestination; - transferLogs.AddRange(await BuildTransferLogsAsync(entity, route).ConfigureAwait(false)); - - await TransferLogAppService.AddManyAsync(transferLogs).ConfigureAwait(false); - } - - [UnitOfWork] - public virtual async Task HandleEventAsync(SfsCreatedEntityEventData> eventData) - { - var entities = eventData.Entity; - var transferLogs = new List(); - //如果要做库存事务汇总,可以修改此处 - foreach (var issueNote in entities) - { - var route = issueNote.UseOnTheWayLocation - ? EnumTransferRoute.SourceToOnTheWay - : EnumTransferRoute.SourceToDestination; - transferLogs.AddRange(await BuildTransferLogsAsync(issueNote, route).ConfigureAwait(false)); - } - - await TransferLogAppService.AddManyAsync(transferLogs).ConfigureAwait(false); - } - - [UnitOfWork] - - public virtual async Task HandleEventAsync(SfsConfirmedEntityEventData eventData) - { - var entity = eventData.Entity; - - var inputList = await BuildTransferLogsAsync(entity, EnumTransferRoute.OnTheWayToDestination).ConfigureAwait(false); - await AddTransferLogsAsync(inputList).ConfigureAwait(false); - } - - private async Task AddTransferLogsAsync(List inputList) - { - var transferLogs = new List(); - - transferLogs.AddRange(inputList); - - await TransferLogAppService.AddManyAsync(transferLogs).ConfigureAwait(false); - - } - - private async Task> BuildTransferLogsAsync(IssueNote issueNote, EnumTransferRoute route) - { - var transferLogs = new List(); - foreach (var detail in issueNote.Details.Where(detail => detail.Qty != 0)) - { - var transferLog = ObjectMapper.Map(detail); - - if (issueNote.UseOnTheWayLocation) - { - var location = await LocationAclService.GetByCodeAsync(detail.OnTheWayLocationCode).ConfigureAwait(false); - switch (route) - { - case EnumTransferRoute.SourceToOnTheWay: - detail.ToLocationCode = detail.OnTheWayLocationCode; - detail.ToLocationErpCode = location.ErpLocationCode; - detail.ToWarehouseCode = location.WarehouseCode; - break; - case EnumTransferRoute.OnTheWayToDestination: - detail.FromLocationCode = detail.OnTheWayLocationCode; - detail.FromLocationErpCode = location.ErpLocationCode; - detail.FromWarehouseCode = location.WarehouseCode; - break; - case EnumTransferRoute.SourceToDestination: - default: - throw new ArgumentOutOfRangeException(nameof(route), route, null); - } - } - - if (issueNote.UseOnTheWayLocation) - { - transferLog.FromLocationCode = detail.OnTheWayLocationCode; - var location = await LocationAclService.GetByCodeAsync(detail.OnTheWayLocationCode).ConfigureAwait(false); - transferLog.FromLocationGroup = location.LocationGroupCode; - transferLog.FromLocationArea = location.AreaCode; - transferLog.FromLocationErpCode = location.ErpLocationCode; - } - - transferLog.TransType = TransType; - transferLog.TransSubType = Enum.Parse(issueNote.RequestType); - transferLog.Worker = issueNote.Worker; - transferLog.DocNumber = issueNote.Number; - transferLog.JobNumber = issueNote.JobNumber; - - transferLogs.Add(transferLog); - } - - return transferLogs; - } - + //public class IssueNoteEventHandler + // : StoreEventHandlerBase + // , ILocalEventHandler> + // , ILocalEventHandler>> + // , ILocalEventHandler> + //{ + // private const EnumTransType TransType = EnumTransType.Issue; + // private readonly Itranlog + + + // [UnitOfWork] + // public virtual async Task HandleEventAsync(SfsCreatedEntityEventData eventData) + // { + // var entity = eventData.Entity; + // var transferLogs = new List(); + // var route = entity.UseOnTheWayLocation + // ? EnumTransferRoute.SourceToOnTheWay + // : EnumTransferRoute.SourceToDestination; + + // //如果是mes拉动 先发到在途 + // if (entity.RequestType == EnumMaterialRequestType.Issue_WIP.ToString()) + // { + // route = EnumTransferRoute.SourceToOnTheWay; + // } + + // transferLogs.AddRange(await BuildTransferLogsAsync(entity, route)); + + // await TransferLogAppService.AddManyAsync(transferLogs); + // } + + + // [UnitOfWork] + // public virtual async Task HandleEventAsync(SfsCreatedEntityEventData> eventData) + // { + // var entities = eventData.Entity; + // var transferLogs = new List(); + // //如果要做库存事务汇总,可以修改此处 + // foreach (var issueNote in entities) + // { + // var route = issueNote.UseOnTheWayLocation + // ? EnumTransferRoute.SourceToOnTheWay + // : EnumTransferRoute.SourceToDestination; + // transferLogs.AddRange(await BuildTransferLogsAsync(issueNote, route)); + // } + + // await TransferLogAppService.AddManyAsync(transferLogs); + // } + + + // [UnitOfWork] + + // public virtual async Task HandleEventAsync(SfsConfirmedEntityEventData eventData) + // { + // var entity = eventData.Entity; + + // var inputList = await BuildTransferLogsAsync(entity, EnumTransferRoute.OnTheWayToDestination); + // await AddTransferLogsAsync(inputList); + // } + + // private async Task AddTransferLogsAsync(List inputList) + // { + // var transferLogs = new List(); + + // transferLogs.AddRange(inputList); + + // await TransferLogAppService.AddManyAsync(transferLogs); + + // } + + // private async Task> BuildTransferLogsAsync(IssueNote issueNote, EnumTransferRoute route) + // { + // var transferLogs = new List(); + // foreach (var detail in issueNote.Details.Where(detail => detail.Qty.Qty != 0)) + // { + // var transferLog = ObjectMapper.Map(detail); + + // LocationDTO fromLocationDTO = null; + // LocationDTO toLocationDTO = null; + + // if (issueNote.UseOnTheWayLocation) + // { + // var location = await LocationAppService.GetByCodeAsync(detail.OnTheWayLocationCode); + // switch (route) + // { + // case EnumTransferRoute.SourceToOnTheWay: + // fromLocationDTO = await LocationAppService.GetByCodeAsync(detail.FromLocationCode); + + // toLocationDTO = await LocationAppService.GetByCodeAsync(detail.OnTheWayLocationCode); + // break; + // case EnumTransferRoute.OnTheWayToDestination: + // fromLocationDTO = await LocationAppService.GetByCodeAsync(detail.OnTheWayLocationCode); + + // toLocationDTO = await LocationAppService.GetByCodeAsync(detail.ToLocationCode); + + // await RemovePackingCodeAndContainerCodeAndLotAsync(transferLog); + // break; + // case EnumTransferRoute.SourceToDestination: + // default: + // throw new ArgumentOutOfRangeException(nameof(route), route, null); + // } + // } + // else + // { + // fromLocationDTO = await LocationAppService.GetByCodeAsync(detail.FromLocationCode); + // toLocationDTO = await LocationAppService.GetByCodeAsync(detail.ToLocationCode); + // } + + // transferLog.FromLocationCode = fromLocationDTO.Code; + // transferLog.FromLocationArea = fromLocationDTO.AreaCode; + // transferLog.FromLocationErpCode = fromLocationDTO.ErpLocationCode; + // transferLog.FromLocationGroup = fromLocationDTO.LocationGroupCode; + + // transferLog.ToLocationCode = toLocationDTO.Code; + // transferLog.ToLocationArea = toLocationDTO.AreaCode; + // transferLog.ToLocationErpCode = toLocationDTO.ErpLocationCode; + // transferLog.ToLocationGroup = toLocationDTO.LocationGroupCode; + + // transferLog.TransType = TransType; + // transferLog.TransSubType = Enum.Parse(issueNote.RequestType); + // transferLog.Company = issueNote.Company; + // transferLog.Worker = issueNote.Worker; + // transferLog.DocNumber = issueNote.Number; + // transferLog.JobNumber = issueNote.JobNumber; + + // transferLogs.Add(transferLog); + // } + + // return transferLogs; + // } + // private async Task RemovePackingCodeAndContainerCodeAndLotAsync(TransferLogCreateInput transferLogCreateInput) + // { + // transferLogCreateInput.ToPackingCode = ""; + // transferLogCreateInput.ToLot = ""; + // transferLogCreateInput.ToContainerCode = ""; + + // transferLogCreateInput.FromPackingCode = ""; + // transferLogCreateInput.FromLot = ""; + // transferLogCreateInput.FromContainerCode = ""; + + + // } + //} } diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Transactions/ScrapNoteEventHandler.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Transactions/ScrapNoteEventHandler.cs index 2e4289476..da4d933d9 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Transactions/ScrapNoteEventHandler.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Transactions/ScrapNoteEventHandler.cs @@ -17,37 +17,26 @@ namespace Win_in.Sfs.Wms.Store.Event.Transactions; public class ScrapNoteEventHandler : StoreInventoryEventHandlerBase , ILocalEventHandler> - , ILocalEventHandler>> + , ILocalEventHandler>> { private const EnumTransType TransType = EnumTransType.Scrap; - private readonly IScrapRequestAppService _scrapRequestApp; - - public ScrapNoteEventHandler(IScrapRequestAppService scrapRequestApp) - { - _scrapRequestApp = scrapRequestApp; - } - [UnitOfWork] public virtual async Task HandleEventAsync(SfsCreatedEntityEventData eventData) { var entity = eventData.Entity; await AddTransactionsAsync(new List() { entity }).ConfigureAwait(false); - - if (!string.IsNullOrEmpty(entity.ScrapRequestNumber)) - { - await _scrapRequestApp.CompleteByNumberAsync(entity.ScrapRequestNumber).ConfigureAwait(false); - } } [UnitOfWork] public virtual async Task HandleEventAsync(SfsCreatedEntityEventData> eventData) { - var entities = eventData.Entity; await AddTransactionsAsync(entities).ConfigureAwait(false); } + #region 私有 + private async Task AddTransactionsAsync(List scrapNotes) { @@ -112,4 +101,5 @@ public class ScrapNoteEventHandler return transactions; } + #endregion } diff --git a/build/src/docker/publish/conf/settings/appsettings.Development.json b/build/src/docker/publish/conf/settings/appsettings.Development.json index d7703852e..38d969c76 100644 --- a/build/src/docker/publish/conf/settings/appsettings.Development.json +++ b/build/src/docker/publish/conf/settings/appsettings.Development.json @@ -122,10 +122,10 @@ "BaseUrl": "http://dev.ccwin-in.com:21292/" }, "Inventory": { - "BaseUrl": "http://dev.ccwin-in.com:21295/" + "BaseUrl": "http://localhost:59095/" }, "Job": { - "BaseUrl": "http://dev.ccwin-in.com:21295/" + "BaseUrl": "http://localhost:59095/" }, "Label": { "BaseUrl": "http://dev.ccwin-in.com:21292/" @@ -134,7 +134,7 @@ "BaseUrl": "http://dev.ccwin-in.com:21292/" }, "Store": { - "BaseUrl": "http://dev.ccwin-in.com:21295/" + "BaseUrl": "http://localhost:59095/" } }, "Serilog": {