diff --git a/.vs/WZC2/v17/.wsuo b/.vs/WZC2/v17/.wsuo new file mode 100644 index 000000000..1bda40505 Binary files /dev/null and b/.vs/WZC2/v17/.wsuo differ diff --git a/be/DataExchange/Iac/Win_in.Sfs.Wms.DataExchange.Application.Iac.Qad/ProductLineAppService.cs b/be/DataExchange/Iac/Win_in.Sfs.Wms.DataExchange.Application.Iac.Qad/ProductLineAppService.cs index 04bc7de8f..10ba6b799 100644 --- a/be/DataExchange/Iac/Win_in.Sfs.Wms.DataExchange.Application.Iac.Qad/ProductLineAppService.cs +++ b/be/DataExchange/Iac/Win_in.Sfs.Wms.DataExchange.Application.Iac.Qad/ProductLineAppService.cs @@ -55,10 +55,6 @@ public class ProductLineAppService : ApplicationService, IProductLineAppService Validator.CheckSite(_configuration, entityObj.Site); Validator.CheckCompany(_configuration, entityObj.Company); var targetObj = ObjectMapper.Map(entityObj); - //if (targetObj.Type == null) { targetObj.Type = 0; } - if (targetObj.WorkshopCode == null) { targetObj.WorkshopCode = "_"; } - if (targetObj.RawLocationCode == null) { targetObj.RawLocationCode = "_"; } - if (targetObj.ProductLocationCode == null) { targetObj.ProductLocationCode = "_"; } await _productionLineAppService.UpsertAsync(targetObj).ConfigureAwait(false); diff --git a/be/Hosts/WmsPda.Host/Win_in.Sfs.Wms.Pda.Host/Controllers/Jobs/ProductionReturnRequestController .cs b/be/Hosts/WmsPda.Host/Win_in.Sfs.Wms.Pda.Host/Controllers/Jobs/ProductionReturnRequestController .cs new file mode 100644 index 000000000..62dda4056 --- /dev/null +++ b/be/Hosts/WmsPda.Host/Win_in.Sfs.Wms.Pda.Host/Controllers/Jobs/ProductionReturnRequestController .cs @@ -0,0 +1,185 @@ +using System; +using System.Collections.Generic; +using System.Text.Json; +using System.Threading.Tasks; +using Microsoft.AspNetCore.Mvc; +using Volo.Abp.Application.Dtos; +using Volo.Abp.AspNetCore.Mvc; +using Win_in.Sfs.Auth.Application.Contracts; +using Win_in.Sfs.Basedata.Application.Contracts; +using Win_in.Sfs.Shared.Domain; +using Win_in.Sfs.Shared.Domain.Shared; +using Win_in.Sfs.Wms.Store.Application.Contracts; + +namespace Win_in.Sfs.Wms.Pda.Controllers.Jobs; + +/// +/// +/// +[ApiController] +[Route($"{PdaHostConst.ROOT_ROUTE}job/production-return")] + +public class ProductionReturnRequestController : AbpController +{ + private readonly IProductionReturnJobAppService _productionReturnJobAppService; + private readonly IProductionReturnRequestAppService _productionReturnRequestAppService; + + private readonly IUserWorkGroupAppService _userWorkGroupAppService; + + private readonly ILocationAppService _locationApp; + + /// + /// + /// + /// + /// + /// + public ProductionReturnRequestController( + IProductionReturnJobAppService productionReturnJobAppService + , IUserWorkGroupAppService userWorkGroupAppService + , ILocationAppService locationApp + , IProductionReturnRequestAppService productionReturnRequestAppService + ) + { + _productionReturnRequestAppService = productionReturnRequestAppService; + _userWorkGroupAppService = userWorkGroupAppService; + this._productionReturnJobAppService = productionReturnJobAppService; + this._locationApp = locationApp; + } + + /// + /// 获取退货任务详情 + /// + /// + /// + //[HttpGet("{id}")] + + //public virtual async Task> PublishAsync(Guid id) + //{ + // var result = await _productionReturnJobAppService.GetAsync(id).ConfigureAwait(false); + // return Ok(result); + //} + + [HttpPost("")] + + public virtual async Task CreateAsync(ProductionReturnRequestEditInput input) + { + return await _productionReturnRequestAppService.CreateAsync(input).ConfigureAwait(false); + } + + + + + + /// + /// 获取列表 + /// + /// + /// + /// + //[HttpGet("list")] + //public virtual async Task> GetListAsync(int pageSize, int pageIndex) + //{ + // var wlgCodes = await _userWorkGroupAppService.GetCodsOfCurrentUserAsync().ConfigureAwait(false); + // var jsonCodes = JsonSerializer.Serialize(wlgCodes); + + // var status = new List() { (int)EnumJobStatus.Open, (int)EnumJobStatus.Doing }; + // var jsonStatus = JsonSerializer.Serialize(status); + + // var request = new SfsJobRequestInputBase + // { + // MaxResultCount = pageSize, + // SkipCount = (pageIndex - 1) * pageSize, + // Sorting = $"{nameof(ProductionReturnJobDTO.Priority)} ASC", + // Condition = new Condition + // { + // Filters = new List + // { + // new(nameof(ProductionReturnJobDTO.WorkGroupCode),jsonCodes,"In"), + // new(nameof(ProductionReturnJobDTO.JobStatus),jsonStatus,"In") + // } + // } + // }; + + // var list = await _productionReturnJobAppService.GetPagedListByFilterAsync(request, true).ConfigureAwait(false); + // return list; + //} + + ///// + ///// 获取列表 筛选 + ///// + ///// + ///// + //[HttpPost("list")] + //public virtual async Task> GetListAsync(SfsJobRequestInputBase sfsRequestDTO) + //{ + // var list = await _productionReturnJobAppService.GetPagedListByFilterAsync(sfsRequestDTO, true).ConfigureAwait(false); + // return list; + //} + + ///// + ///// 获取任务数量 + ///// + ///// + //[HttpGet("count")] + //public virtual async Task> CountAsync() + //{ + // var wlgCodes = await _userWorkGroupAppService.GetCodsOfCurrentUserAsync().ConfigureAwait(false); + // var jsonCodes = JsonSerializer.Serialize(wlgCodes); + + // var status = new List() { (int)EnumJobStatus.Open, (int)EnumJobStatus.Doing }; + // var jsonStatus = JsonSerializer.Serialize(status); + + // var request = new SfsJobRequestInputBase + // { + // Sorting = $"{nameof(ProductionReturnJobDTO.Priority)} ASC", + // Condition = new Condition + // { + // Filters = new List + // { + // new(nameof(ProductionReturnJobDTO.WorkGroupCode),jsonCodes,"In"), + // new(nameof(ProductionReturnJobDTO.JobStatus),jsonStatus,"In") + // } + // } + // }; + + // var count = await _productionReturnJobAppService.GetCountByFilterAsync(request).ConfigureAwait(false); + + // return Ok(count); + //} + + ///// + ///// 承接任务 + ///// + ///// + ///// + //[HttpPost("take/{id}")] + //public virtual async Task TakeAsync(Guid id) + //{ + // await _productionReturnJobAppService.AcceptAsync(id).ConfigureAwait(false); + //} + + ///// + ///// 取消承接任务 + ///// + ///// + ///// + //[HttpPost("cancel-take/{id}")] + //public virtual async Task CancelTakeAsync(Guid id) + //{ + // await _productionReturnJobAppService.CancelAcceptAsync(id).ConfigureAwait(false); + //} + + ///// + ///// 执行任务 + ///// + ///// + ///// + ///// + //[HttpPost("finish/{id}")] + //public virtual async Task FinishAsync(Guid id, [FromBody] ProductionReturnJobDTO dto) + //{ + // await _productionReturnJobAppService.CompleteAsync(id, dto).ConfigureAwait(false); + //} + + } diff --git a/be/Hosts/WmsPda.Host/Win_in.Sfs.Wms.Pda.Host/Controllers/Stores/TransferLibNoteController.cs b/be/Hosts/WmsPda.Host/Win_in.Sfs.Wms.Pda.Host/Controllers/Stores/TransferLibNoteController.cs new file mode 100644 index 000000000..1dc534f75 --- /dev/null +++ b/be/Hosts/WmsPda.Host/Win_in.Sfs.Wms.Pda.Host/Controllers/Stores/TransferLibNoteController.cs @@ -0,0 +1,187 @@ +using System; +using System.Collections.Generic; +using System.Threading.Tasks; +using Microsoft.AspNetCore.Mvc; +using Volo.Abp.Application.Dtos; +using Volo.Abp.AspNetCore.Mvc; +using Win_in.Sfs.Shared.Domain; +using Win_in.Sfs.Shared.Domain.Shared; +using Win_in.Sfs.Wms.Store.Application.Contracts; + +namespace Win_in.Sfs.Wms.Pda.Controllers.Stores; + +/// +/// +/// +[ApiController] +[Route($"{PdaHostConst.ROOT_ROUTE}store/transferlib-note")] + +public class TransferLibNoteController : AbpController +{ + private readonly ITransferLibNoteAppService _transferLibNoteAppService; + + /// + /// + /// + /// + public TransferLibNoteController(ITransferLibNoteAppService transferLibNoteAppService) + { + _transferLibNoteAppService = transferLibNoteAppService; + } + + /// + /// 获取盘点任务详情 + /// + /// + /// + [HttpGet("{id}")] + + public virtual async Task> GetAsync(Guid id) + { + var result = await _transferLibNoteAppService.GetAsync(id).ConfigureAwait(false); + return Ok(result); + } + + /// + /// 获取列表 筛选 + /// + /// + /// + [HttpPost("list")] + public virtual async Task> GetListAsync(SfsStoreRequestInputBase sfsRequestDTO) + { + var list = await _transferLibNoteAppService.GetPagedListByFilterAsync(sfsRequestDTO, true).ConfigureAwait(false); + return list; + } + + /// + /// 获取列表 + /// + /// + /// + /// + [HttpGet("list")] + public virtual async Task> GetListAsync(int pageSize, int pageIndex) + { + + var request = new SfsStoreRequestInputBase + { + MaxResultCount = pageSize, + SkipCount = (pageIndex - 1) * pageSize, + Sorting = $"{nameof(TransferLibNoteDTO.Number)} ASC", + Condition = new Condition + { + Filters = new List + { + new(nameof(TransferLibNoteDTO.Type),EnumTransSubType.Transfer_Area.ToString(),"=="), + new(nameof(TransferLibNoteDTO.Confirmed),"false","==") + } + } + }; + + var list = await _transferLibNoteAppService.GetPagedListByFilterAsync(request, true).ConfigureAwait(false); + return list; + } + + /// + /// 获取任务数量 + /// + /// + [HttpGet("count")] + public virtual async Task> CountAsync() + { + var request = new SfsStoreRequestInputBase + { + Sorting = $"{nameof(TransferLibNoteDTO.Number)} ASC", + Condition = new Condition + { + Filters = new List + { + new(nameof(TransferLibNoteDTO.Type),EnumTransSubType.Transfer_Area.ToString(),"=="), + new(nameof(TransferLibNoteDTO.Confirmed),"false","==") + } + } + }; + + var count = await _transferLibNoteAppService.GetCountByFilterAsync(request).ConfigureAwait(false); + + return Ok(count); + } + + /// + /// 根据number获取要料详情 + /// + /// + /// + [HttpGet("{number}")] + + public virtual async Task> GetAsync(string number) + { + var result = await _transferLibNoteAppService.GetByNumberAsync(number).ConfigureAwait(false); + return Ok(result); + } + + /// + /// 完成对应的请求 + /// + /// + /// + [HttpPost("complete/{id}")] + + public virtual async Task CompleteAsync(Guid id) + { + var entity = await _transferLibNoteAppService.ConfirmAsync(id).ConfigureAwait(false); + return entity; + } + + /// + /// 库存转移 + /// + /// + /// + [HttpPost("")] + public virtual async Task Create(TransferLibNoteEditInput input) + { + return await _transferLibNoteAppService.CreateAsync(input).ConfigureAwait(false); + } + + /// + /// 拆箱 + /// + /// + /// + [HttpPost("split-packing")] + public async Task SplitPackingAsync(TransferLibNoteEditInput transferLibNoteEditInput) + { + return await _transferLibNoteAppService.SplitPackingAsync(transferLibNoteEditInput).ConfigureAwait(false); + } + + /// + /// 采购收货拆箱,同时更新、插入PurchaseReceipt任务表、申请表 + /// + /// + /// + /// + [HttpPost("split-packing-purchase-receipt")] + public async Task SplitPacking_PurchaseReceiptAsync(TransferLibNoteEditInput transferLibNoteEditInput, [FromQuery] SplitPacking_UpdateJobDetailInput updateJobDetailInput) + { + var ret = await _transferLibNoteAppService.SplitPacking_PurchaseReceiptAsync(transferLibNoteEditInput, updateJobDetailInput).ConfigureAwait(false); + return ret; + } + + /// + /// 发料拆箱,同时更新、插入Inspect任务表(没有找到申请表//??) + /// + /// + /// + /// + [HttpPost("split-packing-issue")] + public async Task SplitPacking_IssueAsync(TransferLibNoteEditInput transferLibNoteEditInput, [FromQuery] SplitPacking_UpdateJobDetailInput updateJobDetailInput) + { + var ret = await _transferLibNoteAppService.SplitPacking_IssueAsync(transferLibNoteEditInput, updateJobDetailInput).ConfigureAwait(false); + return ret; + } + + + +} diff --git a/be/Hosts/WmsPda.Host/Win_in.Sfs.Wms.Pda.Host/Controllers/Stores/TransferLibRequestController.cs b/be/Hosts/WmsPda.Host/Win_in.Sfs.Wms.Pda.Host/Controllers/Stores/TransferLibRequestController.cs new file mode 100644 index 000000000..9bb7561e1 --- /dev/null +++ b/be/Hosts/WmsPda.Host/Win_in.Sfs.Wms.Pda.Host/Controllers/Stores/TransferLibRequestController.cs @@ -0,0 +1,136 @@ +using System; +using System.Collections.Generic; +using System.Threading.Tasks; +using Microsoft.AspNetCore.Mvc; +using Volo.Abp.Application.Dtos; +using Volo.Abp.AspNetCore.Mvc; +using Win_in.Sfs.Shared.Domain; +using Win_in.Sfs.Shared.Domain.Shared; +using Win_in.Sfs.Wms.Store.Application.Contracts; + +namespace Win_in.Sfs.Wms.Pda.Controllers.Stores; + +/// +/// +/// +[ApiController] +[Route($"{PdaHostConst.ROOT_ROUTE}store/transferlib-request")] + +public class TransferLibRequestController : AbpController +{ + private readonly ITransferLibRequestAppService _transferLibRequestAppService; + + /// + /// + /// + /// + public TransferLibRequestController(ITransferLibRequestAppService transferLibRequestAppService) + { + _transferLibRequestAppService = transferLibRequestAppService; + } + + /// + /// 获取盘点任务详情 + /// + /// + /// + [HttpGet("{id}")] + + public virtual async Task> GetAsync(Guid id) + { + var result = await _transferLibRequestAppService.GetAsync(id).ConfigureAwait(false); + return Ok(result); + } + + /// + /// 获取列表 筛选 + /// + /// + /// + [HttpPost("list")] + public virtual async Task> GetListAsync(SfsStoreRequestInputBase sfsRequestDTO) + { + var list = await _transferLibRequestAppService.GetPagedListByFilterAsync(sfsRequestDTO, true).ConfigureAwait(false); + return list; + } + + /// + /// 获取列表 + /// + /// + /// + /// + [HttpGet("list")] + public virtual async Task> GetListAsync(int pageSize, int pageIndex) + { + + var request = new SfsStoreRequestInputBase + { + MaxResultCount = pageSize, + SkipCount = (pageIndex - 1) * pageSize, + Sorting = $"{nameof(TransferLibRequestDTO.Number)} ASC", + Condition = new Condition + { + Filters = new List + { + new(nameof(TransferLibRequestDTO.Type),EnumTransSubType.Transfer_Area.ToString(),"=="), + new(nameof(TransferLibRequestDTO.RequestStatus),EnumRequestStatus.New.ToString(),"==") + } + } + }; + + var list = await _transferLibRequestAppService.GetPagedListByFilterAsync(request, true).ConfigureAwait(false); + return list; + } + + /// + /// 获取任务数量 + /// + /// + [HttpGet("count")] + public virtual async Task> CountAsync() + { + var request = new SfsStoreRequestInputBase + { + Sorting = $"{nameof(TransferLibRequestDTO.Number)} ASC", + Condition = new Condition + { + Filters = new List + { + new(nameof(TransferLibRequestDTO.Type),EnumTransSubType.Transfer_Area.ToString(),"=="), + new(nameof(TransferLibRequestDTO.RequestStatus),EnumRequestStatus.New.ToString(),"==") + } + } + }; + + var count = await _transferLibRequestAppService.GetCountByFilterAsync(request).ConfigureAwait(false); + + return Ok(count); + } + + /// + /// 根据number获取要料详情 + /// + /// + /// + [HttpGet("{number}")] + + public virtual async Task> GetAsync(string number) + { + var result = await _transferLibRequestAppService.GetByNumberAsync(number).ConfigureAwait(false); + return Ok(result); + } + + /// + /// 完成对应的请求 + /// + /// + /// + [HttpPost("complete/{id}")] + + public virtual async Task CompleteAsync(Guid id) + { + var entity = await _transferLibRequestAppService.CompleteAsync(id).ConfigureAwait(false); + return entity; + } +} diff --git a/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application.Contracts/Equipments/DTOs/EquipmentLocCapDTO.cs b/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application.Contracts/Equipments/DTOs/EquipmentLocCapDTO.cs index 6a4ad91ce..96125bfe8 100644 --- a/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application.Contracts/Equipments/DTOs/EquipmentLocCapDTO.cs +++ b/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application.Contracts/Equipments/DTOs/EquipmentLocCapDTO.cs @@ -3,11 +3,7 @@ using Win_in.Sfs.Shared.Domain; using Win_in.Sfs.Shared.Domain.Shared; namespace Win_in.Sfs.Basedata.Application.Contracts; - - - [Display(Name = "器具容量占用信息")] - public class EquipmentLocCapDTO : SfsBaseDataDTOBase, IHasCode { /// @@ -15,12 +11,11 @@ public class EquipmentLocCapDTO : SfsBaseDataDTOBase, IHasCode /// [Display(Name = "器具代码")] public string Code { get; set; } + /// /// 占用百分比 /// [Display(Name = "占用百分比")] public decimal Percent { get; set; } - - /// /// 零件号 /// diff --git a/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application.Contracts/Equipments/Inputs/EquipmentLocCapCheckInput.cs b/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application.Contracts/Equipments/Inputs/EquipmentLocCapCheckInput.cs index d7b272c8e..2f5c63eee 100644 --- a/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application.Contracts/Equipments/Inputs/EquipmentLocCapCheckInput.cs +++ b/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application.Contracts/Equipments/Inputs/EquipmentLocCapCheckInput.cs @@ -12,6 +12,7 @@ public class EquipmentLocCapCheckInput /// [Display(Name = "器具代码")] public string Code { get; set; } + /// /// 占用百分比 /// [Display(Name = "占用百分比")] diff --git a/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application.Contracts/ProductionLines/DTOs/ProductionLineDTO.cs b/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application.Contracts/ProductionLines/DTOs/ProductionLineDTO.cs index d0f5ef4bc..d5c2980d1 100644 --- a/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application.Contracts/ProductionLines/DTOs/ProductionLineDTO.cs +++ b/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application.Contracts/ProductionLines/DTOs/ProductionLineDTO.cs @@ -1,61 +1,57 @@ +using System.Collections.Generic; using System.ComponentModel.DataAnnotations; using Win_in.Sfs.Basedata.Domain.Shared; using Win_in.Sfs.Shared.Domain; +using Win_in.Sfs.Shared.Domain.Entities; namespace Win_in.Sfs.Basedata.Application.Contracts; /// -/// 生产线 +/// 生产线 /// [Display(Name = "生产线")] - public class ProductionLineDTO : SfsBaseDataDTOBase, IHasCode, IHasName { /// - /// 编码 + /// 代码 /// - [Display(Name = "编码")] + [Display(Name = "代码")] + [Key] + [IgnoreUpdate] public string Code { get; set; } /// - /// 名称 + /// 名称 /// [Display(Name = "名称")] public string Name { get; set; } /// - /// 描述 + /// 描述 /// [Display(Name = "描述")] public string Description { get; set; } /// - /// 类型 + /// 类型 /// - [Display(Name = "类型")] public EnumProductionLineType Type { get; set; } /// - /// 车间 - /// - [Display(Name = "车间")] - public string WorkshopCode { get; set; } - - /// - /// 原料库位 + /// 原料库位 /// - [Display(Name = "原料库位")] - public string RawLocationCode { get; set; } + [Display(Name = "原料库位Json集合")] + public string RawLocationCodeListJson { get; set; } /// - /// 成品库位 + /// 成品库位 /// - [Display(Name = "成品库位")] - public string ProductLocationCode { get; set; } + [Display(Name = "完工库位Json集合")] + public string ProductLocationCodeListJson { get; set; } /// - /// 原料库位组 + /// 线边库位 /// - [Display(Name = "原料库位组")] - public string RawLocationGroupCode { get; set; } + [Display(Name = "线边库位Json集合")] + public string WipLocationCodeListJson { get; set; } } diff --git a/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application.Contracts/ProductionLines/IProductionLineAppService.cs b/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application.Contracts/ProductionLines/IProductionLineAppService.cs index 8fe6598b8..5c97fc68f 100644 --- a/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application.Contracts/ProductionLines/IProductionLineAppService.cs +++ b/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application.Contracts/ProductionLines/IProductionLineAppService.cs @@ -8,5 +8,4 @@ public interface IProductionLineAppService , ISfsGetByCodeAppService , ISfsUpsertAppService { - Task GetByLocationGroupCodeAsync(string locationGroupCode); } diff --git a/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application.Contracts/ProductionLines/Inputs/ProductionLineEditInput.cs b/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application.Contracts/ProductionLines/Inputs/ProductionLineEditInput.cs index aa6605ab1..52c391c8c 100644 --- a/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application.Contracts/ProductionLines/Inputs/ProductionLineEditInput.cs +++ b/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application.Contracts/ProductionLines/Inputs/ProductionLineEditInput.cs @@ -1,6 +1,8 @@ +using System.Collections.Generic; using System.ComponentModel.DataAnnotations; using Win_in.Sfs.Basedata.Domain.Shared; using Win_in.Sfs.Shared.Domain; +using Win_in.Sfs.Shared.Domain.Entities; namespace Win_in.Sfs.Basedata.Application.Contracts; @@ -9,63 +11,46 @@ namespace Win_in.Sfs.Basedata.Application.Contracts; /// public class ProductionLineEditInput : SfsBaseDataCreateOrUpdateInputBase { - #region Base /// - /// 名称 + /// 代码 + /// + [Display(Name = "代码")] + [Key] + [IgnoreUpdate] + public string Code { get; set; } + + /// + /// 名称 /// [Display(Name = "名称")] - [StringLength(SfsEfCorePropertyConst.NameLength, ErrorMessage = "{0}最多输入{1}个字符")] public string Name { get; set; } /// - /// 描述 + /// 描述 /// [Display(Name = "描述")] - [StringLength(SfsEfCorePropertyConst.DescLength, ErrorMessage = "{0}最多输入{1}个字符")] public string Description { get; set; } /// - /// 类型 + /// 类型 /// - [Display(Name = "类型")] public EnumProductionLineType Type { get; set; } /// - /// 车间 + /// 原料库位 /// - [Display(Name = "车间")] - [Required(ErrorMessage = "{0}是必填项")] - [StringLength(SfsEfCorePropertyConst.CodeLength, ErrorMessage = "{0}最多输入{1}个字符")] - public string WorkshopCode { get; set; } + [Display(Name = "原料库位Json集合")] + public string RawLocationCodeListJson { get; set; } /// - /// 原料库位 + /// 成品库位 /// - [Display(Name = "原料库位")] - [Required(ErrorMessage = "{0}是必填项")] - [StringLength(SfsEfCorePropertyConst.CodeLength, ErrorMessage = "{0}最多输入{1}个字符")] - public string RawLocationCode { get; set; } + [Display(Name = "完工库位Json集合")] + public string ProductLocationCodeListJson { get; set; } /// - /// 成品库位 + /// 线边库位 /// - [Display(Name = "成品库位")] - [Required(ErrorMessage = "{0}是必填项")] - [StringLength(SfsEfCorePropertyConst.CodeLength, ErrorMessage = "{0}最多输入{1}个字符")] - public string ProductLocationCode { get; set; } - - /// - /// 原料库位组 - /// - [Display(Name = "原料库位组")] - [StringLength(SfsEfCorePropertyConst.CodeLength, ErrorMessage = "{0}最多输入{1}个字符")] - public string RawLocationGroupCode { get; set; } - #endregion - - #region Create - [Display(Name = "代码")] - [Required(ErrorMessage = "{0}是必填项")] - [StringLength(SfsEfCorePropertyConst.CodeLength, ErrorMessage = "{0}最多输入{1}个字符")] - public string Code { get; set; } - #endregion + [Display(Name = "线边库位Json集合")] + public string WipLocationCodeListJson { get; set; } } diff --git a/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application.Contracts/ProductionLines/Inputs/ProductionLineImportInput.cs b/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application.Contracts/ProductionLines/Inputs/ProductionLineImportInput.cs index 2a90a38cf..bbc24b3ae 100644 --- a/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application.Contracts/ProductionLines/Inputs/ProductionLineImportInput.cs +++ b/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application.Contracts/ProductionLines/Inputs/ProductionLineImportInput.cs @@ -1,6 +1,8 @@ +using System.Collections.Generic; using System.ComponentModel.DataAnnotations; using Win_in.Sfs.Basedata.Domain.Shared; using Win_in.Sfs.Shared.Domain; +using Win_in.Sfs.Shared.Domain.Entities; namespace Win_in.Sfs.Basedata.Application.Contracts; @@ -11,65 +13,45 @@ namespace Win_in.Sfs.Basedata.Application.Contracts; public class ProductionLineImportInput : SfsBaseDataImportInputBase { /// - /// 生产线代码 + /// 代码 /// + [Display(Name = "代码")] [Key] - [Display(Name = "生产线代码")] - [Required(ErrorMessage = "物品代码是必填项")] + [IgnoreUpdate] public string Code { get; set; } /// - /// 生产线名称 + /// 名称 /// - [Display(Name = "生产线名称")] - [Required(ErrorMessage = "{生产线名称}是必填项")] + [Display(Name = "名称")] public string Name { get; set; } /// - /// 描述 + /// 描述 /// [Display(Name = "描述")] public string Description { get; set; } /// - /// 类型 + /// 类型 /// - [Display(Name = "类型")] - [Required(ErrorMessage = "{0}是必填项")] public EnumProductionLineType Type { get; set; } /// - /// 车间代码 + /// 原料库位 /// - [Display(Name = "车间代码")] - [Required(ErrorMessage = "{0}是必填项")] - public string WorkshopCode { get; set; } + [Display(Name = "原料库位Json集合")] + public string RawLocationCodeListJson { get; set; } /// - /// 原料库位 + /// 成品库位 /// - [Display(Name = "原料库位")] - [Required(ErrorMessage = "{0}是必填项")] - public string RawLocationCode { get; set; } + [Display(Name = "完工库位Json集合")] + public string ProductLocationCodeListJson { get; set; } /// - /// 成品库位 + /// 线边库位 /// - [Display(Name = "成品库位")] - [Required(ErrorMessage = "{0}是必填项")] - public string ProductLocationCode { get; set; } - - /// - /// 原料库位组 - /// - [Display(Name = "原料库位组")] - [StringLength(SfsEfCorePropertyConst.CodeLength, ErrorMessage = "{0}最多输入{1}个字符")] - public string RawLocationGroupCode { get; set; } - - /// - /// 备注 - /// - [Display(Name = "备注")] - [StringLength(SfsEfCorePropertyConst.RemarkLength, ErrorMessage = "{0}最多输入{1}个字符")] - public string Remark { get; set; } + [Display(Name = "线边库位Json集合")] + public string WipLocationCodeListJson { get; set; } } diff --git a/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/Equipments/EquipmentLocAppService.cs b/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/Equipments/EquipmentLocAppService.cs index 14ad08e9e..19258aa20 100644 --- a/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/Equipments/EquipmentLocAppService.cs +++ b/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/Equipments/EquipmentLocAppService.cs @@ -106,8 +106,8 @@ public class EquipmentLocAppService protected override async Task ValidateImportModelAsync(EquipmentLocImportInput importInput, List validationRresult) { await base.CheckItemBasicItemCodeAsync(importInput.Code, validationRresult).ConfigureAwait(false); - await base.CheckRawLocationAsync(importInput.LocCode, validationRresult).ConfigureAwait(false); - //await base.CheckComponentAndComponentQtyAsync(importInput.Component, importInput.ComponentQty, validationRresult).ConfigureAwait(false); + await base.CheckProductLocationAsync(importInput.LocCode, validationRresult).ConfigureAwait(false); + } diff --git a/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/ProductionLineItems/ProductionLineItemAutoMapperProfile.cs b/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/ProductionLineItems/ProductionLineItemAutoMapperProfile.cs index e1d527803..f8cff5004 100644 --- a/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/ProductionLineItems/ProductionLineItemAutoMapperProfile.cs +++ b/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/ProductionLineItems/ProductionLineItemAutoMapperProfile.cs @@ -13,16 +13,15 @@ public partial class BasedataApplicationAutoMapperProfile : Profile .ReverseMap(); CreateMap() - .IgnoreAuditedObjectProperties() - .Ignore(x => x.TenantId) - .Ignore(x => x.ExtraProperties) - .Ignore(x => x.ConcurrencyStamp) - ; + .IgnoreAuditedObjectProperties() + .Ignore(x => x.TenantId) + .Ignore(x => x.ExtraProperties) + .Ignore(x => x.ConcurrencyStamp) + ; CreateMap() - .Ignore(x => x.ReportStatus) + .Ignore(x => x.ReportStatus) .Ignore(x => x.ReportReason); ; - } } diff --git a/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/ProductionLines/ProductionLineAppService.cs b/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/ProductionLines/ProductionLineAppService.cs index 6ac8a8630..1f92877ce 100644 --- a/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/ProductionLines/ProductionLineAppService.cs +++ b/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/ProductionLines/ProductionLineAppService.cs @@ -41,25 +41,9 @@ public class ProductionLineAppService } [HttpPost("upsert")] - public virtual async Task UpsertAsync(ProductionLineEditInput input) { var entity = ObjectMapper.Map(input); await _repository.UpsertAsync(entity).ConfigureAwait(false); } - - [HttpGet("by-location-group/{locationGroupCode}")] - public virtual async Task GetByLocationGroupCodeAsync(string locationGroupCode) - { - var entity = await _repository.FindAsync(p => p.RawLocationGroupCode == locationGroupCode).ConfigureAwait(false); - return ObjectMapper.Map(entity); - } - - protected override async Task ValidateImportModelAsync(ProductionLineImportInput importInput, List validationRresult) - { - await base.ValidateImportModelAsync(importInput, validationRresult).ConfigureAwait(false); - await base.CheckWorkGroupWorkshopCodeAsync(importInput.WorkshopCode, validationRresult).ConfigureAwait(false); - await base.CheckRawLocationAsync(importInput.RawLocationCode, validationRresult).ConfigureAwait(false); - await base.CheckProductLocationAsync(importInput.ProductLocationCode, validationRresult).ConfigureAwait(false); - } } diff --git a/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/ProductionLines/ProductionLineAutoMapperProfile.cs b/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/ProductionLines/ProductionLineAutoMapperProfile.cs index ef063d859..47d08b6a6 100644 --- a/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/ProductionLines/ProductionLineAutoMapperProfile.cs +++ b/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/ProductionLines/ProductionLineAutoMapperProfile.cs @@ -17,11 +17,11 @@ public partial class BasedataApplicationAutoMapperProfile : Profile .Ignore(x => x.TenantId) .Ignore(x => x.ExtraProperties) .Ignore(x => x.ConcurrencyStamp) - ; + .Ignore(x=>x.Remark) + ; CreateMap() - .Ignore(x => x.ReportStatus) + .Ignore(x => x.ReportStatus) .Ignore(x => x.ReportReason); - } } diff --git a/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Domain/ProductionLines/ProductionLine.cs b/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Domain/ProductionLines/ProductionLine.cs index 9113a1b8b..7276cfc46 100644 --- a/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Domain/ProductionLines/ProductionLine.cs +++ b/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Domain/ProductionLines/ProductionLine.cs @@ -1,3 +1,4 @@ +using System.Collections.Generic; using System.ComponentModel.DataAnnotations; using Win_in.Sfs.Basedata.Domain.Shared; using Win_in.Sfs.Shared.Domain; @@ -6,61 +7,50 @@ using Win_in.Sfs.Shared.Domain.Entities; namespace Win_in.Sfs.Basedata.Domain; /// -/// 生产线 +/// 生产线 /// public class ProductionLine : SfsBaseDataAggregateRootBase, IHasCode, IHasName { - - [Display(Name = "编码")] - [Required(ErrorMessage = "{0}是必填项")] - [StringLength(SfsEfCorePropertyConst.CodeLength, ErrorMessage = "{0}最多输入{1}个字符")] + /// + /// 代码 + /// + [Display(Name = "代码")] + [Key] [IgnoreUpdate] public string Code { get; set; } /// - /// 名称 + /// 名称 /// - [Display(Name = "编码")] - [StringLength(SfsEfCorePropertyConst.CodeLength, ErrorMessage = "{0}最多输入{1}个字符")] + [Display(Name = "名称")] public string Name { get; set; } /// - /// 描述 + /// 描述 /// - [Display(Name = "编码")] - [StringLength(SfsEfCorePropertyConst.CodeLength, ErrorMessage = "{0}最多输入{1}个字符")] + [Display(Name = "描述")] public string Description { get; set; } /// - /// 类型 + /// 类型 /// public EnumProductionLineType Type { get; set; } /// - /// 车间 - /// - [Display(Name = "车间")] - [StringLength(SfsEfCorePropertyConst.CodeLength, ErrorMessage = "{0}最多输入{1}个字符")] - public string WorkshopCode { get; set; } - - /// - /// 原料库位 + /// 原料库位 /// - [Display(Name = "原料库位")] - [StringLength(SfsEfCorePropertyConst.CodeLength, ErrorMessage = "{0}最多输入{1}个字符")] - public string RawLocationCode { get; set; } + [Display(Name = "原料库位Json集合")] + public string RawLocationCodeListJson { get; set; } /// - /// 成品库位 + /// 成品库位 /// - [Display(Name = "成品库位")] - [StringLength(SfsEfCorePropertyConst.CodeLength, ErrorMessage = "{0}最多输入{1}个字符")] - public string ProductLocationCode { get; set; } + [Display(Name = "完工库位Json集合")] + public string ProductLocationCodeListJson { get; set; } /// - /// 原料库位组 + /// 线边库位 /// - [Display(Name = "原料库位组")] - [StringLength(SfsEfCorePropertyConst.CodeLength, ErrorMessage = "{0}最多输入{1}个字符")] - public string RawLocationGroupCode { get; set; } + [Display(Name = "线边库位Json集合")] + public string WipLocationCodeListJson { get; set; } } diff --git a/be/Modules/BaseData/src/Win_in.Sfs.Basedata.EntityFrameworkCore/Migrations/20240328061914_Added_First.Designer.cs b/be/Modules/BaseData/src/Win_in.Sfs.Basedata.EntityFrameworkCore/Migrations/20240328061914_Added_First.Designer.cs new file mode 100644 index 000000000..9676a40a7 --- /dev/null +++ b/be/Modules/BaseData/src/Win_in.Sfs.Basedata.EntityFrameworkCore/Migrations/20240328061914_Added_First.Designer.cs @@ -0,0 +1,4158 @@ +// +using System; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Metadata; +using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; +using Volo.Abp.EntityFrameworkCore; +using Win_in.Sfs.Basedata.EntityFrameworkCore; + +#nullable disable + +namespace Win_in.Sfs.Basedata.Migrations +{ + [DbContext(typeof(BasedataDbContext))] + [Migration("20240328061914_Added_First")] + partial class Added_First + { + protected override void BuildTargetModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder + .HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.SqlServer) + .HasAnnotation("ProductVersion", "6.0.13") + .HasAnnotation("Relational:MaxIdentifierLength", 128); + + SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder, 1L, 1); + + modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.AQL", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AbcClass") + .HasColumnType("nvarchar(max)"); + + b.Property("CeilingQty") + .HasColumnType("decimal(18,6)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("FloorQty") + .HasColumnType("decimal(18,6)"); + + b.Property("IsUsePercent") + .HasColumnType("bit"); + + b.Property("ItemCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("SamplePercent") + .HasColumnType("decimal(18,6)"); + + b.Property("SampleQty") + .HasColumnType("decimal(18,6)"); + + b.Property("SupplierCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("SupplierCode", "ItemCode", "FloorQty") + .IsUnique(); + + b.ToTable("Basedata_AQL", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.Area", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AreaType") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("Description") + .HasMaxLength(1024) + .HasColumnType("nvarchar(1024)"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("IsFunctional") + .HasColumnType("bit"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Name") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("WarehouseCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.HasKey("Id"); + + b.HasIndex("Code") + .IsUnique(); + + b.ToTable("Basedata_Area", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.Bom", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("BeginTime") + .HasColumnType("datetime2"); + + b.Property("Component") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ComponentQty") + .HasColumnType("decimal(18,6)"); + + b.Property("ComponentUom") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DistributionType") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ERPOp") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("EndTime") + .HasColumnType("datetime2"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Layer") + .ValueGeneratedOnAdd() + .HasMaxLength(64) + .HasColumnType("int") + .HasDefaultValue(1); + + b.Property("MFGOp") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("PlannedSplitRule") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Product") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("TruncType") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.HasKey("Id"); + + b.HasIndex("Product", "Component") + .IsUnique(); + + b.ToTable("Basedata_Bom", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.Calendar", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("BeginTime") + .HasColumnType("datetime2"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("EndTime") + .HasColumnType("datetime2"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Module") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)"); + + b.Property("Status") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("Module") + .IsUnique() + .HasFilter("[Module] IS NOT NULL"); + + b.ToTable("Basedata_Calendar", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.Category", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("Description") + .HasMaxLength(1024) + .HasColumnType("nvarchar(1024)"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Name") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("Code") + .IsUnique(); + + b.ToTable("Basedata_Category", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.Currency", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("Description") + .HasMaxLength(1024) + .HasColumnType("nvarchar(1024)"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("IsBasicCurrency") + .HasColumnType("bit"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("Code") + .IsUnique(); + + b.ToTable("Basedata_Currency", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.CurrencyExchange", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("BasicCurrencyId") + .HasColumnType("uniqueidentifier"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("CurrencyId") + .HasColumnType("uniqueidentifier"); + + b.Property("EfficetiveTime") + .HasColumnType("datetime2"); + + b.Property("ExpireTime") + .HasColumnType("datetime2"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Rate") + .HasColumnType("decimal(18,6)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("CurrencyId", "BasicCurrencyId") + .IsUnique(); + + b.ToTable("Basedata_CurrencyExchange", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.Customer", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Address") + .HasMaxLength(1024) + .HasColumnType("nvarchar(1024)"); + + b.Property("City") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("Contacts") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Country") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("Currency") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("Fax") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("IsActive") + .HasColumnType("bit"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Name") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Phone") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("PostID") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("ShortName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Type") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.HasKey("Id"); + + b.HasIndex("Code") + .IsUnique(); + + b.ToTable("Basedata_Customer", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.CustomerAddress", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Address") + .HasMaxLength(1024) + .HasColumnType("nvarchar(1024)"); + + b.Property("City") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("Contact") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("CustomerCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Desc") + .HasMaxLength(1024) + .HasColumnType("nvarchar(1024)"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("LocationCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Name") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Remark") + .HasMaxLength(1024) + .HasColumnType("nvarchar(1024)") + .HasColumnName("Remark"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("WarehouseCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.HasKey("Id"); + + b.HasIndex("Code", "CustomerCode") + .IsUnique(); + + b.ToTable("Basedata_CustomerAddress", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.CustomerItem", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("BeginTime") + .HasColumnType("datetime2"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("CustomerCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("CustomerItemCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("CustomerPackQty") + .HasColumnType("decimal(18,6)"); + + b.Property("CustomerPackUom") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("EndTime") + .HasColumnType("datetime2"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("ItemCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Version") + .HasMaxLength(1024) + .HasColumnType("nvarchar(1024)"); + + b.HasKey("Id"); + + b.HasIndex("CustomerCode", "ItemCode") + .IsUnique(); + + b.ToTable("Basedata_CustomerItem", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.Dict", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("Description") + .HasMaxLength(1024) + .HasColumnType("nvarchar(1024)"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Name") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("Code") + .IsUnique(); + + b.ToTable("Basedata_Dict", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.DictItem", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("Description") + .HasMaxLength(1024) + .HasColumnType("nvarchar(1024)"); + + b.Property("Enabled") + .HasColumnType("bit"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("MasterId") + .HasColumnType("uniqueidentifier"); + + b.Property("Name") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Value") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.HasKey("Id"); + + b.HasIndex("MasterId"); + + b.ToTable("Basedata_DictItem", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.Dock", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DefaultLocationCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Description") + .HasMaxLength(1024) + .HasColumnType("nvarchar(1024)"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Name") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("WarehouseCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.HasKey("Id"); + + b.HasIndex("Code") + .IsUnique(); + + b.ToTable("Basedata_Dock", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.DocumentSetting", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("Description") + .HasMaxLength(1024) + .HasColumnType("nvarchar(1024)"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Name") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("NumberFormat") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("NumberPrefix") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("NumberSeparator") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("NumberSerialLength") + .HasColumnType("int"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("TransactionType") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.HasKey("Id"); + + b.HasIndex("Code") + .IsUnique(); + + b.ToTable("Basedata_DocumentSetting", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.Equipment", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreatTime") + .HasColumnType("datetime2"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("Creator") + .HasColumnType("nvarchar(max)"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("LocCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Model") + .HasMaxLength(64) + .HasColumnType("int"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("State") + .HasColumnType("int"); + + b.Property("StdQty") + .HasColumnType("decimal(18,6)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Type") + .HasMaxLength(64) + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("Code") + .IsUnique(); + + b.ToTable("Basedata_Equipment", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.EquipmentLoc", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("LocCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("State") + .HasColumnType("int"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("Code", "LocCode") + .IsUnique(); + + b.ToTable("Basedata_EquipmentLoc", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.EquipmentLocCap", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("PartCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Percent") + .HasColumnType("decimal(18,6)"); + + b.Property("Qty") + .HasColumnType("decimal(18,6)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("StdQty") + .HasColumnType("decimal(18,6)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("Code") + .IsUnique(); + + b.ToTable("Basedata_EquipmentLocCap", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.EquipmentPartCode", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("PartCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("State") + .HasColumnType("int"); + + b.Property("StdQty") + .HasColumnType("decimal(18,2)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Unit") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("Code", "PartCode") + .IsUnique(); + + b.ToTable("Basedata_EquipmentPartCode", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.ErpLocation", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("Description") + .HasMaxLength(1024) + .HasColumnType("nvarchar(1024)"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Name") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Type") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("WarehouseCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.HasKey("Id"); + + b.HasIndex("Code") + .IsUnique(); + + b.ToTable("Basedata_ErpLocation", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.InterfaceCalendar", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("BeginTime") + .HasColumnType("datetime2"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("ConvertToTime") + .HasColumnType("datetime2"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("Description") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("EndTime") + .HasColumnType("datetime2"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Month") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Remark") + .HasColumnType("nvarchar(max)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Year") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.HasKey("Id"); + + b.HasIndex("Code") + .IsUnique(); + + b.ToTable("Basedata_InterfaceCalendar", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.ItemBasic", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AbcClass") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("BasicUom") + .HasColumnType("nvarchar(max)"); + + b.Property("CanBuy") + .HasColumnType("bit"); + + b.Property("CanMake") + .HasColumnType("bit"); + + b.Property("CanOutsourcing") + .HasColumnType("bit"); + + b.Property("Category") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Color") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("Configuration") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("Desc1") + .HasMaxLength(1024) + .HasColumnType("nvarchar(1024)"); + + b.Property("Desc2") + .HasMaxLength(1024) + .HasColumnType("nvarchar(1024)"); + + b.Property("Eco") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Elevel") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("Group") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("IsPhantom") + .HasColumnType("bit"); + + b.Property("IsRecycled") + .HasColumnType("bit"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("ManageType") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Name") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Project") + .HasColumnType("nvarchar(max)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("Status") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("StdPackQty") + .HasColumnType("decimal(18,6)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Type") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Validity") + .HasColumnType("int"); + + b.Property("ValidityUnit") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Version") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.HasKey("Id"); + + b.HasIndex("Code") + .IsUnique(); + + b.ToTable("Basedata_ItemBasic", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.ItemCategory", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CategoryCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("ItemCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Value") + .IsRequired() + .HasMaxLength(1024) + .HasColumnType("nvarchar(1024)"); + + b.HasKey("Id"); + + b.HasIndex("CategoryCode", "ItemCode") + .IsUnique(); + + b.ToTable("Basedata_ItemCategory", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.ItemGuideBook", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("Desc1") + .HasColumnType("nvarchar(max)"); + + b.Property("Desc2") + .HasColumnType("nvarchar(max)"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("ItemCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Name") + .HasColumnType("nvarchar(max)"); + + b.Property("PictureBlobName") + .HasColumnType("nvarchar(max)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("Step") + .HasMaxLength(1024) + .HasColumnType("nvarchar(1024)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("ItemCode") + .IsUnique(); + + b.ToTable("Basedata_ItemGuideBook", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.ItemPack", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("BasicUom") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("ItemCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("PackCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("PackName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("PackType") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Qty") + .HasColumnType("decimal(18,6)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("ItemCode", "PackCode") + .IsUnique(); + + b.ToTable("Basedata_ItemPack", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.ItemQuality", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("Description") + .HasMaxLength(1024) + .HasColumnType("nvarchar(1024)"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("InspectType") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ItemCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("Status") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("SupplierCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("ItemCode", "SupplierCode") + .IsUnique(); + + b.ToTable("Basedata_ItemQuality", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.ItemSafetyStock", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("FeedLine") + .HasColumnType("decimal(18,6)"); + + b.Property("FeedQty") + .HasColumnType("decimal(18,6)"); + + b.Property("FeedUM") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ItemCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("MaxStock") + .HasColumnType("decimal(18,6)"); + + b.Property("MinStock") + .HasColumnType("decimal(18,6)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("SafetyStock") + .HasColumnType("decimal(18,6)"); + + b.Property("StoreRelationType") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("StoreValue") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("WarehouseCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.HasKey("Id"); + + b.HasIndex("ItemCode", "WarehouseCode", "StoreRelationType", "StoreValue") + .IsUnique() + .HasFilter("[StoreValue] IS NOT NULL"); + + b.ToTable("Basedata_ItemSafetyStock", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.ItemStoreRelation", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AltUm") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("AltUmQty") + .HasColumnType("decimal(18,6)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("Enabled") + .HasColumnType("bit"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("IsFixed") + .HasColumnType("bit"); + + b.Property("ItemCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("MultiLoc") + .HasColumnType("int"); + + b.Property("PramaryUM") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("StoreRelationType") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("StoreUM") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("StoreValue") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("UmQty") + .HasColumnType("decimal(18,6)"); + + b.Property("WarehouseCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.HasKey("Id"); + + b.HasIndex("ItemCode", "StoreRelationType", "StoreValue") + .IsUnique() + .HasFilter("[StoreValue] IS NOT NULL"); + + b.ToTable("Basedata_ItemStoreRelation", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.Kitting", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Name") + .HasMaxLength(1024) + .HasColumnType("nvarchar(1024)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("Code") + .IsUnique(); + + b.ToTable("Basedata_Kitting", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.KittingDetail", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("Conf") + .HasColumnType("nvarchar(max)"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("Desc1") + .HasMaxLength(1024) + .HasColumnType("nvarchar(1024)"); + + b.Property("Desc2") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("MasterId") + .HasColumnType("uniqueidentifier"); + + b.Property("PartCode") + .HasColumnType("nvarchar(max)"); + + b.Property("Qty") + .HasColumnType("decimal(18,2)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("MasterId"); + + b.ToTable("Basedata_KittingDetail", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.Location", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AreaCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ColumnCode") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasDefaultValue(1); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DefaultInventoryStatus") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Description") + .HasMaxLength(1024) + .HasColumnType("nvarchar(1024)"); + + b.Property("EnableBreakStore") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(true); + + b.Property("EnableKeepZero") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(true); + + b.Property("EnableMixItem") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(true); + + b.Property("EnableMixLot") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(true); + + b.Property("EnableMixStatus") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(true); + + b.Property("EnableNegative") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(true); + + b.Property("EnableOpportunityCount") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(true); + + b.Property("EnableOverPick") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(true); + + b.Property("EnablePick") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(true); + + b.Property("EnableReceive") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(true); + + b.Property("EnableReturnFromCustomer") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(true); + + b.Property("EnableReturnToSupplier") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(true); + + b.Property("EnableShip") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(true); + + b.Property("EnableSplitBox") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(true); + + b.Property("EnableSplitPallet") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(true); + + b.Property("EnableWholeStore") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(true); + + b.Property("ErpLocationCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("LocationGroupCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Name") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("PickOrder") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasDefaultValue(0); + + b.Property("PickPriority") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasDefaultValue(0); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("RowCode") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasDefaultValue(1); + + b.Property("ShelfCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Type") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("WarehouseCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("WorkGroupCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.HasKey("Id"); + + b.HasIndex("Code") + .IsUnique(); + + b.ToTable("Basedata_Location", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.LocationGroup", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AreaCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DefaultInventoryStatus") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Description") + .HasMaxLength(1024) + .HasColumnType("nvarchar(1024)"); + + b.Property("EnableBreakStore") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(true); + + b.Property("EnableKeepZero") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(true); + + b.Property("EnableMixItem") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(true); + + b.Property("EnableMixLot") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(true); + + b.Property("EnableMixStatus") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(true); + + b.Property("EnableNegative") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(true); + + b.Property("EnableOpportunityCount") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(true); + + b.Property("EnableOverPick") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(true); + + b.Property("EnablePick") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(true); + + b.Property("EnableReceive") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(true); + + b.Property("EnableReturnFromCustomer") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(true); + + b.Property("EnableReturnToSupplier") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(true); + + b.Property("EnableShip") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(true); + + b.Property("EnableSplitBox") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(true); + + b.Property("EnableSplitPallet") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(true); + + b.Property("EnableWholeStore") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(true); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("GroupType") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Name") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("OverflowLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("PickPriority") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasDefaultValue(0); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("WarehouseCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.HasKey("Id"); + + b.HasIndex("Code") + .IsUnique(); + + b.ToTable("Basedata_LocationGroup", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.Machine", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("Description") + .HasMaxLength(1024) + .HasColumnType("nvarchar(1024)"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ProdLineId") + .HasColumnType("uniqueidentifier"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Type") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("WorkStationId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("Code") + .IsUnique(); + + b.ToTable("Basedata_Machine", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.PositionCode", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("BasicUom") + .HasColumnType("nvarchar(max)"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("LocationCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("LocationName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("PartCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("PartDesc") + .HasColumnType("nvarchar(max)"); + + b.Property("PartName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("StdPackQty") + .HasColumnType("decimal(18,6)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Type") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.HasKey("Id"); + + b.HasIndex("Code") + .IsUnique(); + + b.HasIndex("PartCode") + .IsUnique() + .HasFilter("[PartCode] IS NOT NULL"); + + b.HasIndex("Code", "PartCode", "LocationCode") + .IsUnique() + .HasFilter("[PartCode] IS NOT NULL AND [LocationCode] IS NOT NULL"); + + b.ToTable("Basedata_PositionCode", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.ProductionLine", b => + { + b.Property("Code") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("Description") + .HasMaxLength(1024) + .HasColumnType("nvarchar(1024)"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Name") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ProductLocationCodeListJson") + .HasColumnType("nvarchar(max)"); + + b.Property("RawLocationCodeListJson") + .HasColumnType("nvarchar(max)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Type") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("WipLocationCodeListJson") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Code"); + + b.HasIndex("Code") + .IsUnique(); + + b.ToTable("Basedata_ProductionLine", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.ProductionLineItem", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("ItemCode") + .IsRequired() + .HasColumnType("nvarchar(450)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("ProdLineCode") + .IsRequired() + .HasColumnType("nvarchar(450)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("ProdLineCode", "ItemCode") + .IsUnique(); + + b.ToTable("Basedata_ProductionLineItem", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.Project", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("BeginTime") + .HasColumnType("datetime2"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("CustomerCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Description") + .HasMaxLength(1024) + .HasColumnType("nvarchar(1024)"); + + b.Property("EndTime") + .HasColumnType("datetime2"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Name") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("Code") + .IsUnique(); + + b.ToTable("Basedata_Project", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.PurchasePriceSheet", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("Description") + .HasMaxLength(1024) + .HasColumnType("nvarchar(1024)"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("ItemCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("PurchasePrice") + .HasColumnType("decimal(18,6)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("SupplierCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("ItemCode", "SupplierCode") + .IsUnique() + .HasFilter("[ItemCode] IS NOT NULL AND [SupplierCode] IS NOT NULL"); + + b.ToTable("Basedata_PurchasePriceSheet", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.SalePriceSheet", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("CustomerCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Description") + .HasMaxLength(1024) + .HasColumnType("nvarchar(1024)"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("ItemCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("SalePrice") + .HasColumnType("decimal(18,6)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("CustomerCode", "ItemCode") + .IsUnique() + .HasFilter("[CustomerCode] IS NOT NULL"); + + b.ToTable("Basedata_SalePriceSheet", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.Shift", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("BeginTime") + .HasColumnType("datetime2"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("Description") + .HasMaxLength(1024) + .HasColumnType("nvarchar(1024)"); + + b.Property("EndAtNextDay") + .HasColumnType("bit"); + + b.Property("EndTime") + .HasColumnType("datetime2"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Name") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("Code") + .IsUnique(); + + b.ToTable("Basedata_Shift", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.SplitPackingRec", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ArrivalNoticNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("FromLot") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("FromPackingCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("FromQty") + .HasPrecision(18, 6) + .HasColumnType("decimal(18,6)"); + + b.Property("FromStdPackQty") + .HasColumnType("decimal(18,6)"); + + b.Property("FromTopPackingCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("FromUom") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ItemCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ItemDesc1") + .HasMaxLength(1024) + .HasColumnType("nvarchar(1024)"); + + b.Property("ItemDesc2") + .HasMaxLength(1024) + .HasColumnType("nvarchar(1024)"); + + b.Property("ItemName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("LabelType") + .HasColumnType("int"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("OprType") + .HasColumnType("int"); + + b.Property("PurchaseInfo_AsnNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("PurchaseInfo_PoNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("PutOnShelfNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ReceiptRecNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Remark") + .HasColumnType("nvarchar(max)"); + + b.Property("TaskOrderNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("ToLot") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ToPackingCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ToQty") + .HasPrecision(18, 6) + .HasColumnType("decimal(18,6)"); + + b.Property("ToStdPackQty") + .HasColumnType("decimal(18,6)"); + + b.Property("ToTopPackingCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ToUom") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.HasKey("Id"); + + b.HasIndex("ToPackingCode"); + + b.HasIndex("FromPackingCode", "ToPackingCode"); + + b.ToTable("Basedata_SplitPackingRec", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.StdCostPriceSheet", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("Description") + .HasMaxLength(1024) + .HasColumnType("nvarchar(1024)"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("ItemCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("StdCostPrice") + .HasColumnType("decimal(18,6)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("ItemCode") + .IsUnique(); + + b.ToTable("Basedata_StdCostPriceSheet", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.Supplier", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Address") + .HasMaxLength(1024) + .HasColumnType("nvarchar(1024)"); + + b.Property("Bank") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("City") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("Contacts") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Country") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("Currency") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("Fax") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("IsActive") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(true); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Phone") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("PostID") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("ShortName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("TaxRate") + .HasColumnType("decimal(18,6)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Type") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.HasKey("Id"); + + b.HasIndex("Code") + .IsUnique(); + + b.ToTable("Basedata_Supplier", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.SupplierItem", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("ItemCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ItemName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("QtyPerPallet") + .HasColumnType("decimal(18,6)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("SupplierCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("SupplierItemCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("SupplierPackQty") + .HasColumnType("decimal(18,6)"); + + b.Property("SupplierPackUom") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("SupplierSimpleName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Version") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.HasKey("Id"); + + b.HasIndex("SupplierCode", "ItemCode") + .IsUnique(); + + b.ToTable("Basedata_SupplierItem", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.SupplierTimeWindow", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("SupplierCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("SupplierName") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("TimeSlot") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Week") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.HasKey("Id"); + + b.HasIndex("SupplierCode", "TimeSlot", "Week") + .IsUnique(); + + b.ToTable("Basedata_SupplierTimeWindow", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.Team", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("Description") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Members") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Name") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("Code") + .IsUnique(); + + b.ToTable("Basedata_Team", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.TransactionType", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AutoAgreeRequest") + .HasColumnType("bit"); + + b.Property("AutoCompleteJob") + .HasColumnType("bit"); + + b.Property("AutoHandleRequest") + .HasColumnType("bit"); + + b.Property("AutoSubmitRequest") + .HasColumnType("bit"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(1024) + .HasColumnType("nvarchar(1024)"); + + b.Property("DirectCreateNote") + .HasColumnType("bit"); + + b.Property("Enabled") + .HasColumnType("bit"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("InInventoryStatuses") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("InLocationAreas") + .HasColumnType("nvarchar(max)"); + + b.Property("InLocationTypes") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ItemStatuses") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ItemTypes") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("OutInventoryStatuses") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("OutLocationAreas") + .HasColumnType("nvarchar(max)"); + + b.Property("OutLocationTypes") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("TransSubType") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("TransType") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.HasKey("Id"); + + b.HasIndex("TransType", "TransSubType") + .IsUnique(); + + b.ToTable("Basedata_TransactionType", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.Uom", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("Description") + .HasMaxLength(1024) + .HasColumnType("nvarchar(1024)"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Name") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Type") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.HasKey("Id"); + + b.HasIndex("Code") + .IsUnique(); + + b.ToTable("Basedata_Uom", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.Warehouse", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("Description") + .HasMaxLength(1024) + .HasColumnType("nvarchar(1024)"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Name") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("Code") + .IsUnique(); + + b.ToTable("Basedata_Warehouse", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.WorkGroup", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("Description") + .HasMaxLength(1024) + .HasColumnType("nvarchar(1024)"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Name") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("WarehouseCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.HasKey("Id"); + + b.HasIndex("Code") + .IsUnique(); + + b.ToTable("Basedata_WorkGroup", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.WorkShop", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("Description") + .HasMaxLength(1024) + .HasColumnType("nvarchar(1024)"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("Code") + .IsUnique(); + + b.ToTable("Basedata_WorkShop", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.WorkStation", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("Description") + .HasMaxLength(1024) + .HasColumnType("nvarchar(1024)"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ProductLocationCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ProductionLineCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("RawLocationCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Type") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.HasKey("Id"); + + b.HasIndex("Code") + .IsUnique(); + + b.ToTable("Basedata_WorkStation", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.DictItem", b => + { + b.HasOne("Win_in.Sfs.Basedata.Domain.Dict", null) + .WithMany("Items") + .HasForeignKey("MasterId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.KittingDetail", b => + { + b.HasOne("Win_in.Sfs.Basedata.Domain.Kitting", null) + .WithMany("Details") + .HasForeignKey("MasterId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.Dict", b => + { + b.Navigation("Items"); + }); + + modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.Kitting", b => + { + b.Navigation("Details"); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/be/Modules/BaseData/src/Win_in.Sfs.Basedata.EntityFrameworkCore/Migrations/20240328061914_Added_First.cs b/be/Modules/BaseData/src/Win_in.Sfs.Basedata.EntityFrameworkCore/Migrations/20240328061914_Added_First.cs new file mode 100644 index 000000000..7482b0cc2 --- /dev/null +++ b/be/Modules/BaseData/src/Win_in.Sfs.Basedata.EntityFrameworkCore/Migrations/20240328061914_Added_First.cs @@ -0,0 +1,1873 @@ +using System; +using Microsoft.EntityFrameworkCore.Migrations; + +#nullable disable + +namespace Win_in.Sfs.Basedata.Migrations +{ + public partial class Added_First : Migration + { + protected override void Up(MigrationBuilder migrationBuilder) + { + migrationBuilder.CreateTable( + name: "Basedata_AQL", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + ItemCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + SupplierCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + AbcClass = table.Column(type: "nvarchar(max)", nullable: true), + FloorQty = table.Column(type: "decimal(18,6)", nullable: false), + CeilingQty = table.Column(type: "decimal(18,6)", nullable: false), + SamplePercent = table.Column(type: "decimal(18,6)", nullable: false), + SampleQty = table.Column(type: "decimal(18,6)", nullable: false), + IsUsePercent = table.Column(type: "bit", nullable: false), + ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true), + ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: true), + CreationTime = table.Column(type: "datetime2", nullable: false), + CreatorId = table.Column(type: "uniqueidentifier", nullable: true), + LastModificationTime = table.Column(type: "datetime2", nullable: true), + LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + Remark = table.Column(type: "nvarchar(3072)", maxLength: 3072, nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_Basedata_AQL", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "Basedata_Area", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + Code = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + Name = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + Description = table.Column(type: "nvarchar(1024)", maxLength: 1024, nullable: true), + WarehouseCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + AreaType = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + IsFunctional = table.Column(type: "bit", nullable: false), + ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true), + ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: true), + CreationTime = table.Column(type: "datetime2", nullable: false), + CreatorId = table.Column(type: "uniqueidentifier", nullable: true), + LastModificationTime = table.Column(type: "datetime2", nullable: true), + LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + Remark = table.Column(type: "nvarchar(3072)", maxLength: 3072, nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_Basedata_Area", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "Basedata_Bom", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + Product = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + Component = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + ComponentUom = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + ComponentQty = table.Column(type: "decimal(18,6)", nullable: false), + BeginTime = table.Column(type: "datetime2", nullable: true), + EndTime = table.Column(type: "datetime2", nullable: true), + ERPOp = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + Layer = table.Column(type: "int", maxLength: 64, nullable: false, defaultValue: 1), + MFGOp = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + DistributionType = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + TruncType = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + PlannedSplitRule = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true), + ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: true), + CreationTime = table.Column(type: "datetime2", nullable: false), + CreatorId = table.Column(type: "uniqueidentifier", nullable: true), + LastModificationTime = table.Column(type: "datetime2", nullable: true), + LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + Remark = table.Column(type: "nvarchar(3072)", maxLength: 3072, nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_Basedata_Bom", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "Basedata_Calendar", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + Module = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + BeginTime = table.Column(type: "datetime2", nullable: true), + EndTime = table.Column(type: "datetime2", nullable: true), + Status = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true), + ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: true), + CreationTime = table.Column(type: "datetime2", nullable: false), + CreatorId = table.Column(type: "uniqueidentifier", nullable: true), + LastModificationTime = table.Column(type: "datetime2", nullable: true), + LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + Remark = table.Column(type: "nvarchar(3072)", maxLength: 3072, nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_Basedata_Calendar", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "Basedata_Category", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + Code = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + Name = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + Description = table.Column(type: "nvarchar(1024)", maxLength: 1024, nullable: true), + ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true), + ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: true), + CreationTime = table.Column(type: "datetime2", nullable: false), + CreatorId = table.Column(type: "uniqueidentifier", nullable: true), + LastModificationTime = table.Column(type: "datetime2", nullable: true), + LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + Remark = table.Column(type: "nvarchar(3072)", maxLength: 3072, nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_Basedata_Category", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "Basedata_Currency", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + Name = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + Code = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + Description = table.Column(type: "nvarchar(1024)", maxLength: 1024, nullable: true), + IsBasicCurrency = table.Column(type: "bit", nullable: false), + ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true), + ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: true), + CreationTime = table.Column(type: "datetime2", nullable: false), + CreatorId = table.Column(type: "uniqueidentifier", nullable: true), + LastModificationTime = table.Column(type: "datetime2", nullable: true), + LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + Remark = table.Column(type: "nvarchar(3072)", maxLength: 3072, nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_Basedata_Currency", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "Basedata_CurrencyExchange", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + CurrencyId = table.Column(type: "uniqueidentifier", nullable: false), + BasicCurrencyId = table.Column(type: "uniqueidentifier", nullable: false), + Rate = table.Column(type: "decimal(18,6)", nullable: false), + EfficetiveTime = table.Column(type: "datetime2", nullable: false), + ExpireTime = table.Column(type: "datetime2", nullable: false), + ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true), + ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: true), + CreationTime = table.Column(type: "datetime2", nullable: false), + CreatorId = table.Column(type: "uniqueidentifier", nullable: true), + LastModificationTime = table.Column(type: "datetime2", nullable: true), + LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + Remark = table.Column(type: "nvarchar(3072)", maxLength: 3072, nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_Basedata_CurrencyExchange", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "Basedata_Customer", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + Code = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + Name = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + ShortName = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + Address = table.Column(type: "nvarchar(1024)", maxLength: 1024, nullable: true), + Country = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + City = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + Phone = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + Fax = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + PostID = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + Contacts = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + Currency = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + IsActive = table.Column(type: "bit", nullable: false), + Type = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true), + ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: true), + CreationTime = table.Column(type: "datetime2", nullable: false), + CreatorId = table.Column(type: "uniqueidentifier", nullable: true), + LastModificationTime = table.Column(type: "datetime2", nullable: true), + LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + Remark = table.Column(type: "nvarchar(3072)", maxLength: 3072, nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_Basedata_Customer", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "Basedata_CustomerAddress", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + Code = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + Name = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + CustomerCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + Address = table.Column(type: "nvarchar(1024)", maxLength: 1024, nullable: true), + Contact = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + WarehouseCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + City = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + LocationCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + Desc = table.Column(type: "nvarchar(1024)", maxLength: 1024, nullable: true), + ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true), + ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: true), + CreationTime = table.Column(type: "datetime2", nullable: false), + CreatorId = table.Column(type: "uniqueidentifier", nullable: true), + LastModificationTime = table.Column(type: "datetime2", nullable: true), + LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + Remark = table.Column(type: "nvarchar(1024)", maxLength: 1024, nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_Basedata_CustomerAddress", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "Basedata_CustomerItem", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + CustomerCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + ItemCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + CustomerItemCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + Version = table.Column(type: "nvarchar(1024)", maxLength: 1024, nullable: true), + CustomerPackUom = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + CustomerPackQty = table.Column(type: "decimal(18,6)", nullable: false), + BeginTime = table.Column(type: "datetime2", nullable: true), + EndTime = table.Column(type: "datetime2", nullable: true), + ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true), + ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: true), + CreationTime = table.Column(type: "datetime2", nullable: false), + CreatorId = table.Column(type: "uniqueidentifier", nullable: true), + LastModificationTime = table.Column(type: "datetime2", nullable: true), + LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + Remark = table.Column(type: "nvarchar(3072)", maxLength: 3072, nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_Basedata_CustomerItem", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "Basedata_Dict", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + Code = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + Name = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + Description = table.Column(type: "nvarchar(1024)", maxLength: 1024, nullable: true), + ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true), + ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: true), + CreationTime = table.Column(type: "datetime2", nullable: false), + CreatorId = table.Column(type: "uniqueidentifier", nullable: true), + LastModificationTime = table.Column(type: "datetime2", nullable: true), + LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + Remark = table.Column(type: "nvarchar(3072)", maxLength: 3072, nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_Basedata_Dict", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "Basedata_Dock", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + Code = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + Name = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + Description = table.Column(type: "nvarchar(1024)", maxLength: 1024, nullable: true), + WarehouseCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + DefaultLocationCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true), + ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: true), + CreationTime = table.Column(type: "datetime2", nullable: false), + CreatorId = table.Column(type: "uniqueidentifier", nullable: true), + LastModificationTime = table.Column(type: "datetime2", nullable: true), + LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + Remark = table.Column(type: "nvarchar(3072)", maxLength: 3072, nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_Basedata_Dock", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "Basedata_DocumentSetting", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + Code = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + Name = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + Description = table.Column(type: "nvarchar(1024)", maxLength: 1024, nullable: true), + TransactionType = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + NumberPrefix = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + NumberFormat = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + NumberSerialLength = table.Column(type: "int", nullable: false), + NumberSeparator = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true), + ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: true), + CreationTime = table.Column(type: "datetime2", nullable: false), + CreatorId = table.Column(type: "uniqueidentifier", nullable: true), + LastModificationTime = table.Column(type: "datetime2", nullable: true), + LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + Remark = table.Column(type: "nvarchar(3072)", maxLength: 3072, nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_Basedata_DocumentSetting", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "Basedata_Equipment", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + Code = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + Type = table.Column(type: "int", maxLength: 64, nullable: false), + Model = table.Column(type: "int", maxLength: 64, nullable: false), + LocCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + State = table.Column(type: "int", nullable: false), + Creator = table.Column(type: "nvarchar(max)", nullable: true), + CreatTime = table.Column(type: "datetime2", nullable: false), + StdQty = table.Column(type: "decimal(18,6)", nullable: false), + ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true), + ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: true), + CreationTime = table.Column(type: "datetime2", nullable: false), + CreatorId = table.Column(type: "uniqueidentifier", nullable: true), + LastModificationTime = table.Column(type: "datetime2", nullable: true), + LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + Remark = table.Column(type: "nvarchar(3072)", maxLength: 3072, nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_Basedata_Equipment", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "Basedata_EquipmentLoc", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + Code = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + LocCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + State = table.Column(type: "int", nullable: false), + ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true), + ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: true), + CreationTime = table.Column(type: "datetime2", nullable: false), + CreatorId = table.Column(type: "uniqueidentifier", nullable: true), + LastModificationTime = table.Column(type: "datetime2", nullable: true), + LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + Remark = table.Column(type: "nvarchar(3072)", maxLength: 3072, nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_Basedata_EquipmentLoc", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "Basedata_EquipmentLocCap", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + Code = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + PartCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + Percent = table.Column(type: "decimal(18,6)", nullable: false), + Qty = table.Column(type: "decimal(18,6)", nullable: false), + StdQty = table.Column(type: "decimal(18,6)", nullable: false), + ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true), + ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: true), + CreationTime = table.Column(type: "datetime2", nullable: false), + CreatorId = table.Column(type: "uniqueidentifier", nullable: true), + LastModificationTime = table.Column(type: "datetime2", nullable: true), + LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + Remark = table.Column(type: "nvarchar(3072)", maxLength: 3072, nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_Basedata_EquipmentLocCap", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "Basedata_EquipmentPartCode", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + Code = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + PartCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + StdQty = table.Column(type: "decimal(18,2)", nullable: false), + State = table.Column(type: "int", nullable: false), + Unit = table.Column(type: "nvarchar(max)", nullable: true), + ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true), + ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: true), + CreationTime = table.Column(type: "datetime2", nullable: false), + CreatorId = table.Column(type: "uniqueidentifier", nullable: true), + LastModificationTime = table.Column(type: "datetime2", nullable: true), + LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + Remark = table.Column(type: "nvarchar(3072)", maxLength: 3072, nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_Basedata_EquipmentPartCode", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "Basedata_ErpLocation", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + Code = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + Name = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + Description = table.Column(type: "nvarchar(1024)", maxLength: 1024, nullable: true), + Type = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + WarehouseCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true), + ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: true), + CreationTime = table.Column(type: "datetime2", nullable: false), + CreatorId = table.Column(type: "uniqueidentifier", nullable: true), + LastModificationTime = table.Column(type: "datetime2", nullable: true), + LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + Remark = table.Column(type: "nvarchar(3072)", maxLength: 3072, nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_Basedata_ErpLocation", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "Basedata_InterfaceCalendar", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + Code = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + Name = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + Year = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + Month = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + BeginTime = table.Column(type: "datetime2", nullable: false), + EndTime = table.Column(type: "datetime2", nullable: false), + ConvertToTime = table.Column(type: "datetime2", nullable: false), + Description = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true), + ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: true), + CreationTime = table.Column(type: "datetime2", nullable: false), + CreatorId = table.Column(type: "uniqueidentifier", nullable: true), + LastModificationTime = table.Column(type: "datetime2", nullable: true), + LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + Remark = table.Column(type: "nvarchar(max)", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_Basedata_InterfaceCalendar", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "Basedata_ItemBasic", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + Code = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + Name = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + Desc1 = table.Column(type: "nvarchar(1024)", maxLength: 1024, nullable: true), + Desc2 = table.Column(type: "nvarchar(1024)", maxLength: 1024, nullable: true), + Status = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + CanMake = table.Column(type: "bit", nullable: false), + CanBuy = table.Column(type: "bit", nullable: false), + CanOutsourcing = table.Column(type: "bit", nullable: false), + IsRecycled = table.Column(type: "bit", nullable: false), + Type = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + Category = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + Group = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + Color = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + Configuration = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + BasicUom = table.Column(type: "nvarchar(max)", nullable: true), + StdPackQty = table.Column(type: "decimal(18,6)", nullable: false), + AbcClass = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + Project = table.Column(type: "nvarchar(max)", nullable: true), + Version = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + Eco = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + Validity = table.Column(type: "int", nullable: false), + ValidityUnit = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + ManageType = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + Elevel = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + IsPhantom = table.Column(type: "bit", nullable: false), + ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true), + ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: true), + CreationTime = table.Column(type: "datetime2", nullable: false), + CreatorId = table.Column(type: "uniqueidentifier", nullable: true), + LastModificationTime = table.Column(type: "datetime2", nullable: true), + LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + Remark = table.Column(type: "nvarchar(3072)", maxLength: 3072, nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_Basedata_ItemBasic", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "Basedata_ItemCategory", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + ItemCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + CategoryCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + Value = table.Column(type: "nvarchar(1024)", maxLength: 1024, nullable: false), + ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true), + ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: true), + CreationTime = table.Column(type: "datetime2", nullable: false), + CreatorId = table.Column(type: "uniqueidentifier", nullable: true), + LastModificationTime = table.Column(type: "datetime2", nullable: true), + LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + Remark = table.Column(type: "nvarchar(3072)", maxLength: 3072, nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_Basedata_ItemCategory", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "Basedata_ItemGuideBook", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + ItemCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + Name = table.Column(type: "nvarchar(max)", nullable: true), + Desc1 = table.Column(type: "nvarchar(max)", nullable: true), + Desc2 = table.Column(type: "nvarchar(max)", nullable: true), + Step = table.Column(type: "nvarchar(1024)", maxLength: 1024, nullable: true), + PictureBlobName = table.Column(type: "nvarchar(max)", nullable: true), + ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true), + ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: true), + CreationTime = table.Column(type: "datetime2", nullable: false), + CreatorId = table.Column(type: "uniqueidentifier", nullable: true), + LastModificationTime = table.Column(type: "datetime2", nullable: true), + LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + Remark = table.Column(type: "nvarchar(3072)", maxLength: 3072, nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_Basedata_ItemGuideBook", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "Basedata_ItemPack", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + PackCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + PackName = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + PackType = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + ItemCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + BasicUom = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + Qty = table.Column(type: "decimal(18,6)", nullable: false), + ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true), + ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: true), + CreationTime = table.Column(type: "datetime2", nullable: false), + CreatorId = table.Column(type: "uniqueidentifier", nullable: true), + LastModificationTime = table.Column(type: "datetime2", nullable: true), + LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + Remark = table.Column(type: "nvarchar(3072)", maxLength: 3072, nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_Basedata_ItemPack", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "Basedata_ItemQuality", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + ItemCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + SupplierCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + Status = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + Description = table.Column(type: "nvarchar(1024)", maxLength: 1024, nullable: true), + InspectType = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true), + ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: true), + CreationTime = table.Column(type: "datetime2", nullable: false), + CreatorId = table.Column(type: "uniqueidentifier", nullable: true), + LastModificationTime = table.Column(type: "datetime2", nullable: true), + LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + Remark = table.Column(type: "nvarchar(3072)", maxLength: 3072, nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_Basedata_ItemQuality", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "Basedata_ItemSafetyStock", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + ItemCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + WarehouseCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + StoreRelationType = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + StoreValue = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + MaxStock = table.Column(type: "decimal(18,6)", nullable: false), + MinStock = table.Column(type: "decimal(18,6)", nullable: false), + SafetyStock = table.Column(type: "decimal(18,6)", nullable: false), + FeedLine = table.Column(type: "decimal(18,6)", nullable: false), + FeedQty = table.Column(type: "decimal(18,6)", nullable: false), + FeedUM = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true), + ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: true), + CreationTime = table.Column(type: "datetime2", nullable: false), + CreatorId = table.Column(type: "uniqueidentifier", nullable: true), + LastModificationTime = table.Column(type: "datetime2", nullable: true), + LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + Remark = table.Column(type: "nvarchar(3072)", maxLength: 3072, nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_Basedata_ItemSafetyStock", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "Basedata_ItemStoreRelation", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + ItemCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + WarehouseCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + StoreRelationType = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + StoreValue = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + Enabled = table.Column(type: "bit", nullable: false), + StoreUM = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + UmQty = table.Column(type: "decimal(18,6)", nullable: false), + AltUm = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + AltUmQty = table.Column(type: "decimal(18,6)", nullable: false), + PramaryUM = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + IsFixed = table.Column(type: "bit", nullable: false), + MultiLoc = table.Column(type: "int", nullable: false), + ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true), + ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: true), + CreationTime = table.Column(type: "datetime2", nullable: false), + CreatorId = table.Column(type: "uniqueidentifier", nullable: true), + LastModificationTime = table.Column(type: "datetime2", nullable: true), + LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + Remark = table.Column(type: "nvarchar(3072)", maxLength: 3072, nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_Basedata_ItemStoreRelation", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "Basedata_Kitting", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + Code = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + Name = table.Column(type: "nvarchar(1024)", maxLength: 1024, nullable: true), + ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true), + ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: true), + CreationTime = table.Column(type: "datetime2", nullable: false), + CreatorId = table.Column(type: "uniqueidentifier", nullable: true), + LastModificationTime = table.Column(type: "datetime2", nullable: true), + LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + Remark = table.Column(type: "nvarchar(3072)", maxLength: 3072, nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_Basedata_Kitting", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "Basedata_Location", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + Code = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + Name = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + Description = table.Column(type: "nvarchar(1024)", maxLength: 1024, nullable: true), + Type = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + ErpLocationCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + WarehouseCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + AreaCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + LocationGroupCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + WorkGroupCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + ShelfCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + RowCode = table.Column(type: "int", nullable: false, defaultValue: 1), + ColumnCode = table.Column(type: "int", nullable: false, defaultValue: 1), + DefaultInventoryStatus = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + PickPriority = table.Column(type: "int", nullable: false, defaultValue: 0), + PickOrder = table.Column(type: "int", nullable: false, defaultValue: 0), + EnableMixItem = table.Column(type: "bit", nullable: false, defaultValue: true), + EnableMixLot = table.Column(type: "bit", nullable: false, defaultValue: true), + EnableMixStatus = table.Column(type: "bit", nullable: false, defaultValue: true), + EnableNegative = table.Column(type: "bit", nullable: false, defaultValue: true), + EnableKeepZero = table.Column(type: "bit", nullable: false, defaultValue: true), + EnableOpportunityCount = table.Column(type: "bit", nullable: false, defaultValue: true), + EnablePick = table.Column(type: "bit", nullable: false, defaultValue: true), + EnableOverPick = table.Column(type: "bit", nullable: false, defaultValue: true), + EnableWholeStore = table.Column(type: "bit", nullable: false, defaultValue: true), + EnableBreakStore = table.Column(type: "bit", nullable: false, defaultValue: true), + EnableShip = table.Column(type: "bit", nullable: false, defaultValue: true), + EnableReceive = table.Column(type: "bit", nullable: false, defaultValue: true), + EnableReturnToSupplier = table.Column(type: "bit", nullable: false, defaultValue: true), + EnableReturnFromCustomer = table.Column(type: "bit", nullable: false, defaultValue: true), + EnableSplitBox = table.Column(type: "bit", nullable: false, defaultValue: true), + EnableSplitPallet = table.Column(type: "bit", nullable: false, defaultValue: true), + ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true), + ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: true), + CreationTime = table.Column(type: "datetime2", nullable: false), + CreatorId = table.Column(type: "uniqueidentifier", nullable: true), + LastModificationTime = table.Column(type: "datetime2", nullable: true), + LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + Remark = table.Column(type: "nvarchar(3072)", maxLength: 3072, nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_Basedata_Location", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "Basedata_LocationGroup", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + Code = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + Name = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + Description = table.Column(type: "nvarchar(1024)", maxLength: 1024, nullable: true), + WarehouseCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + AreaCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + GroupType = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + DefaultInventoryStatus = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + PickPriority = table.Column(type: "int", nullable: false, defaultValue: 0), + OverflowLocationGroup = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + EnableMixItem = table.Column(type: "bit", nullable: false, defaultValue: true), + EnableMixLot = table.Column(type: "bit", nullable: false, defaultValue: true), + EnableMixStatus = table.Column(type: "bit", nullable: false, defaultValue: true), + EnableNegative = table.Column(type: "bit", nullable: false, defaultValue: true), + EnableKeepZero = table.Column(type: "bit", nullable: false, defaultValue: true), + EnableOpportunityCount = table.Column(type: "bit", nullable: false, defaultValue: true), + EnablePick = table.Column(type: "bit", nullable: false, defaultValue: true), + EnableOverPick = table.Column(type: "bit", nullable: false, defaultValue: true), + EnableWholeStore = table.Column(type: "bit", nullable: false, defaultValue: true), + EnableBreakStore = table.Column(type: "bit", nullable: false, defaultValue: true), + EnableShip = table.Column(type: "bit", nullable: false, defaultValue: true), + EnableReceive = table.Column(type: "bit", nullable: false, defaultValue: true), + EnableReturnToSupplier = table.Column(type: "bit", nullable: false, defaultValue: true), + EnableReturnFromCustomer = table.Column(type: "bit", nullable: false, defaultValue: true), + EnableSplitBox = table.Column(type: "bit", nullable: false, defaultValue: true), + EnableSplitPallet = table.Column(type: "bit", nullable: false, defaultValue: true), + ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true), + ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: true), + CreationTime = table.Column(type: "datetime2", nullable: false), + CreatorId = table.Column(type: "uniqueidentifier", nullable: true), + LastModificationTime = table.Column(type: "datetime2", nullable: true), + LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + Remark = table.Column(type: "nvarchar(3072)", maxLength: 3072, nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_Basedata_LocationGroup", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "Basedata_Machine", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + ProdLineId = table.Column(type: "uniqueidentifier", nullable: false), + WorkStationId = table.Column(type: "uniqueidentifier", nullable: false), + Name = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + Code = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + Description = table.Column(type: "nvarchar(1024)", maxLength: 1024, nullable: true), + Type = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true), + ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: true), + CreationTime = table.Column(type: "datetime2", nullable: false), + CreatorId = table.Column(type: "uniqueidentifier", nullable: true), + LastModificationTime = table.Column(type: "datetime2", nullable: true), + LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + Remark = table.Column(type: "nvarchar(3072)", maxLength: 3072, nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_Basedata_Machine", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "Basedata_PositionCode", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + Code = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + PartCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + PartName = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + PartDesc = table.Column(type: "nvarchar(max)", nullable: true), + BasicUom = table.Column(type: "nvarchar(max)", nullable: true), + LocationCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + LocationName = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + StdPackQty = table.Column(type: "decimal(18,6)", nullable: false), + Type = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true), + ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: true), + CreationTime = table.Column(type: "datetime2", nullable: false), + CreatorId = table.Column(type: "uniqueidentifier", nullable: true), + LastModificationTime = table.Column(type: "datetime2", nullable: true), + LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + Remark = table.Column(type: "nvarchar(3072)", maxLength: 3072, nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_Basedata_PositionCode", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "Basedata_ProductionLine", + columns: table => new + { + Code = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + Name = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + Description = table.Column(type: "nvarchar(1024)", maxLength: 1024, nullable: true), + Type = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + RawLocationCodeListJson = table.Column(type: "nvarchar(max)", nullable: true), + ProductLocationCodeListJson = table.Column(type: "nvarchar(max)", nullable: true), + WipLocationCodeListJson = table.Column(type: "nvarchar(max)", nullable: true), + Id = table.Column(type: "uniqueidentifier", nullable: false), + ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true), + ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: true), + CreationTime = table.Column(type: "datetime2", nullable: false), + CreatorId = table.Column(type: "uniqueidentifier", nullable: true), + LastModificationTime = table.Column(type: "datetime2", nullable: true), + LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + Remark = table.Column(type: "nvarchar(3072)", maxLength: 3072, nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_Basedata_ProductionLine", x => x.Code); + }); + + migrationBuilder.CreateTable( + name: "Basedata_ProductionLineItem", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + ProdLineCode = table.Column(type: "nvarchar(450)", nullable: false), + ItemCode = table.Column(type: "nvarchar(450)", nullable: false), + ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true), + ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: true), + CreationTime = table.Column(type: "datetime2", nullable: false), + CreatorId = table.Column(type: "uniqueidentifier", nullable: true), + LastModificationTime = table.Column(type: "datetime2", nullable: true), + LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + Remark = table.Column(type: "nvarchar(3072)", maxLength: 3072, nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_Basedata_ProductionLineItem", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "Basedata_Project", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + Code = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + Name = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + Description = table.Column(type: "nvarchar(1024)", maxLength: 1024, nullable: true), + CustomerCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + BeginTime = table.Column(type: "datetime2", nullable: true), + EndTime = table.Column(type: "datetime2", nullable: true), + ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true), + ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: true), + CreationTime = table.Column(type: "datetime2", nullable: false), + CreatorId = table.Column(type: "uniqueidentifier", nullable: true), + LastModificationTime = table.Column(type: "datetime2", nullable: true), + LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + Remark = table.Column(type: "nvarchar(3072)", maxLength: 3072, nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_Basedata_Project", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "Basedata_PurchasePriceSheet", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + ItemCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + SupplierCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + Description = table.Column(type: "nvarchar(1024)", maxLength: 1024, nullable: true), + PurchasePrice = table.Column(type: "decimal(18,6)", nullable: false), + ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true), + ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: true), + CreationTime = table.Column(type: "datetime2", nullable: false), + CreatorId = table.Column(type: "uniqueidentifier", nullable: true), + LastModificationTime = table.Column(type: "datetime2", nullable: true), + LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + Remark = table.Column(type: "nvarchar(3072)", maxLength: 3072, nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_Basedata_PurchasePriceSheet", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "Basedata_SalePriceSheet", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + CustomerCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + ItemCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + Description = table.Column(type: "nvarchar(1024)", maxLength: 1024, nullable: true), + SalePrice = table.Column(type: "decimal(18,6)", nullable: false), + ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true), + ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: true), + CreationTime = table.Column(type: "datetime2", nullable: false), + CreatorId = table.Column(type: "uniqueidentifier", nullable: true), + LastModificationTime = table.Column(type: "datetime2", nullable: true), + LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + Remark = table.Column(type: "nvarchar(3072)", maxLength: 3072, nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_Basedata_SalePriceSheet", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "Basedata_Shift", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + Code = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + Name = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + Description = table.Column(type: "nvarchar(1024)", maxLength: 1024, nullable: true), + BeginTime = table.Column(type: "datetime2", nullable: true), + EndTime = table.Column(type: "datetime2", nullable: true), + EndAtNextDay = table.Column(type: "bit", nullable: false), + ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true), + ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: true), + CreationTime = table.Column(type: "datetime2", nullable: false), + CreatorId = table.Column(type: "uniqueidentifier", nullable: true), + LastModificationTime = table.Column(type: "datetime2", nullable: true), + LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + Remark = table.Column(type: "nvarchar(3072)", maxLength: 3072, nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_Basedata_Shift", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "Basedata_SplitPackingRec", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + OprType = table.Column(type: "int", nullable: false), + FromPackingCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + FromTopPackingCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + FromStdPackQty = table.Column(type: "decimal(18,6)", nullable: false), + FromUom = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + FromQty = table.Column(type: "decimal(18,6)", precision: 18, scale: 6, nullable: false), + ToPackingCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + ToTopPackingCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + ToStdPackQty = table.Column(type: "decimal(18,6)", nullable: false), + ToUom = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + ToQty = table.Column(type: "decimal(18,6)", precision: 18, scale: 6, nullable: false), + ItemCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + ItemName = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + ItemDesc1 = table.Column(type: "nvarchar(1024)", maxLength: 1024, nullable: true), + ItemDesc2 = table.Column(type: "nvarchar(1024)", maxLength: 1024, nullable: true), + FromLot = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + ToLot = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + PurchaseInfo_PoNumber = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + PurchaseInfo_AsnNumber = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + ArrivalNoticNumber = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + TaskOrderNumber = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + ReceiptRecNumber = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + PutOnShelfNumber = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + LabelType = table.Column(type: "int", nullable: false), + ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true), + ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: true), + CreationTime = table.Column(type: "datetime2", nullable: false), + CreatorId = table.Column(type: "uniqueidentifier", nullable: true), + LastModificationTime = table.Column(type: "datetime2", nullable: true), + LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + Remark = table.Column(type: "nvarchar(max)", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_Basedata_SplitPackingRec", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "Basedata_StdCostPriceSheet", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + ItemCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + Description = table.Column(type: "nvarchar(1024)", maxLength: 1024, nullable: true), + StdCostPrice = table.Column(type: "decimal(18,6)", nullable: false), + ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true), + ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: true), + CreationTime = table.Column(type: "datetime2", nullable: false), + CreatorId = table.Column(type: "uniqueidentifier", nullable: true), + LastModificationTime = table.Column(type: "datetime2", nullable: true), + LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + Remark = table.Column(type: "nvarchar(3072)", maxLength: 3072, nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_Basedata_StdCostPriceSheet", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "Basedata_Supplier", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + Code = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + Name = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + ShortName = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + Address = table.Column(type: "nvarchar(1024)", maxLength: 1024, nullable: true), + Country = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + City = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + Phone = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + Fax = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + PostID = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + Contacts = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + Bank = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + Currency = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + TaxRate = table.Column(type: "decimal(18,6)", nullable: false), + IsActive = table.Column(type: "bit", nullable: false, defaultValue: true), + Type = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true), + ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: true), + CreationTime = table.Column(type: "datetime2", nullable: false), + CreatorId = table.Column(type: "uniqueidentifier", nullable: true), + LastModificationTime = table.Column(type: "datetime2", nullable: true), + LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + Remark = table.Column(type: "nvarchar(3072)", maxLength: 3072, nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_Basedata_Supplier", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "Basedata_SupplierItem", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + SupplierCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + SupplierSimpleName = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + ItemCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + ItemName = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + SupplierItemCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + Version = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + SupplierPackUom = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + SupplierPackQty = table.Column(type: "decimal(18,6)", nullable: false), + QtyPerPallet = table.Column(type: "decimal(18,6)", nullable: false), + ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true), + ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: true), + CreationTime = table.Column(type: "datetime2", nullable: false), + CreatorId = table.Column(type: "uniqueidentifier", nullable: true), + LastModificationTime = table.Column(type: "datetime2", nullable: true), + LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + Remark = table.Column(type: "nvarchar(3072)", maxLength: 3072, nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_Basedata_SupplierItem", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "Basedata_SupplierTimeWindow", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + SupplierCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + SupplierName = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + TimeSlot = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + Week = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true), + ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: true), + CreationTime = table.Column(type: "datetime2", nullable: false), + CreatorId = table.Column(type: "uniqueidentifier", nullable: true), + LastModificationTime = table.Column(type: "datetime2", nullable: true), + LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + Remark = table.Column(type: "nvarchar(3072)", maxLength: 3072, nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_Basedata_SupplierTimeWindow", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "Basedata_Team", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + Code = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + Name = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + Description = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + Members = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true), + ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: true), + CreationTime = table.Column(type: "datetime2", nullable: false), + CreatorId = table.Column(type: "uniqueidentifier", nullable: true), + LastModificationTime = table.Column(type: "datetime2", nullable: true), + LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + Remark = table.Column(type: "nvarchar(3072)", maxLength: 3072, nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_Basedata_Team", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "Basedata_TransactionType", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + TransType = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + TransSubType = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + Description = table.Column(type: "nvarchar(1024)", maxLength: 1024, nullable: false), + InLocationTypes = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + OutLocationTypes = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + InLocationAreas = table.Column(type: "nvarchar(max)", nullable: true), + OutLocationAreas = table.Column(type: "nvarchar(max)", nullable: true), + ItemStatuses = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + ItemTypes = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + InInventoryStatuses = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + OutInventoryStatuses = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + AutoSubmitRequest = table.Column(type: "bit", nullable: false), + AutoAgreeRequest = table.Column(type: "bit", nullable: false), + AutoHandleRequest = table.Column(type: "bit", nullable: false), + AutoCompleteJob = table.Column(type: "bit", nullable: false), + DirectCreateNote = table.Column(type: "bit", nullable: false), + Enabled = table.Column(type: "bit", nullable: false), + ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true), + ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: true), + CreationTime = table.Column(type: "datetime2", nullable: false), + CreatorId = table.Column(type: "uniqueidentifier", nullable: true), + LastModificationTime = table.Column(type: "datetime2", nullable: true), + LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + Remark = table.Column(type: "nvarchar(3072)", maxLength: 3072, nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_Basedata_TransactionType", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "Basedata_Uom", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + Name = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + Code = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + Description = table.Column(type: "nvarchar(1024)", maxLength: 1024, nullable: true), + Type = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true), + ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: true), + CreationTime = table.Column(type: "datetime2", nullable: false), + CreatorId = table.Column(type: "uniqueidentifier", nullable: true), + LastModificationTime = table.Column(type: "datetime2", nullable: true), + LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + Remark = table.Column(type: "nvarchar(3072)", maxLength: 3072, nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_Basedata_Uom", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "Basedata_Warehouse", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + Code = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + Name = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + Description = table.Column(type: "nvarchar(1024)", maxLength: 1024, nullable: true), + ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true), + ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: true), + CreationTime = table.Column(type: "datetime2", nullable: false), + CreatorId = table.Column(type: "uniqueidentifier", nullable: true), + LastModificationTime = table.Column(type: "datetime2", nullable: true), + LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + Remark = table.Column(type: "nvarchar(3072)", maxLength: 3072, nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_Basedata_Warehouse", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "Basedata_WorkGroup", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + Code = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + Name = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + Description = table.Column(type: "nvarchar(1024)", maxLength: 1024, nullable: true), + WarehouseCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true), + ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: true), + CreationTime = table.Column(type: "datetime2", nullable: false), + CreatorId = table.Column(type: "uniqueidentifier", nullable: true), + LastModificationTime = table.Column(type: "datetime2", nullable: true), + LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + Remark = table.Column(type: "nvarchar(3072)", maxLength: 3072, nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_Basedata_WorkGroup", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "Basedata_WorkShop", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + Code = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + Name = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + Description = table.Column(type: "nvarchar(1024)", maxLength: 1024, nullable: true), + ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true), + ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: true), + CreationTime = table.Column(type: "datetime2", nullable: false), + CreatorId = table.Column(type: "uniqueidentifier", nullable: true), + LastModificationTime = table.Column(type: "datetime2", nullable: true), + LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + Remark = table.Column(type: "nvarchar(3072)", maxLength: 3072, nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_Basedata_WorkShop", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "Basedata_WorkStation", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + Code = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + Name = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + Description = table.Column(type: "nvarchar(1024)", maxLength: 1024, nullable: true), + ProductionLineCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + RawLocationCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + ProductLocationCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + Type = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true), + ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: true), + CreationTime = table.Column(type: "datetime2", nullable: false), + CreatorId = table.Column(type: "uniqueidentifier", nullable: true), + LastModificationTime = table.Column(type: "datetime2", nullable: true), + LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + Remark = table.Column(type: "nvarchar(3072)", maxLength: 3072, nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_Basedata_WorkStation", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "Basedata_DictItem", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + MasterId = table.Column(type: "uniqueidentifier", nullable: false), + Code = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + Name = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + Value = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + Description = table.Column(type: "nvarchar(1024)", maxLength: 1024, nullable: true), + Enabled = table.Column(type: "bit", nullable: false), + Remark = table.Column(type: "nvarchar(3072)", maxLength: 3072, nullable: true), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + CreationTime = table.Column(type: "datetime2", nullable: false), + CreatorId = table.Column(type: "uniqueidentifier", nullable: true), + LastModificationTime = table.Column(type: "datetime2", nullable: true), + LastModifierId = table.Column(type: "uniqueidentifier", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_Basedata_DictItem", x => x.Id); + table.ForeignKey( + name: "FK_Basedata_DictItem_Basedata_Dict_MasterId", + column: x => x.MasterId, + principalTable: "Basedata_Dict", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }); + + migrationBuilder.CreateTable( + name: "Basedata_KittingDetail", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + MasterId = table.Column(type: "uniqueidentifier", nullable: false), + PartCode = table.Column(type: "nvarchar(max)", nullable: true), + Desc1 = table.Column(type: "nvarchar(1024)", maxLength: 1024, nullable: true), + Desc2 = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + Qty = table.Column(type: "decimal(18,2)", nullable: false), + Conf = table.Column(type: "nvarchar(max)", nullable: true), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + Remark = table.Column(type: "nvarchar(3072)", maxLength: 3072, nullable: true), + CreationTime = table.Column(type: "datetime2", nullable: false), + CreatorId = table.Column(type: "uniqueidentifier", nullable: true), + LastModificationTime = table.Column(type: "datetime2", nullable: true), + LastModifierId = table.Column(type: "uniqueidentifier", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_Basedata_KittingDetail", x => x.Id); + table.ForeignKey( + name: "FK_Basedata_KittingDetail_Basedata_Kitting_MasterId", + column: x => x.MasterId, + principalTable: "Basedata_Kitting", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }); + + migrationBuilder.CreateIndex( + name: "IX_Basedata_AQL_SupplierCode_ItemCode_FloorQty", + table: "Basedata_AQL", + columns: new[] { "SupplierCode", "ItemCode", "FloorQty" }, + unique: true); + + migrationBuilder.CreateIndex( + name: "IX_Basedata_Area_Code", + table: "Basedata_Area", + column: "Code", + unique: true); + + migrationBuilder.CreateIndex( + name: "IX_Basedata_Bom_Product_Component", + table: "Basedata_Bom", + columns: new[] { "Product", "Component" }, + unique: true); + + migrationBuilder.CreateIndex( + name: "IX_Basedata_Calendar_Module", + table: "Basedata_Calendar", + column: "Module", + unique: true, + filter: "[Module] IS NOT NULL"); + + migrationBuilder.CreateIndex( + name: "IX_Basedata_Category_Code", + table: "Basedata_Category", + column: "Code", + unique: true); + + migrationBuilder.CreateIndex( + name: "IX_Basedata_Currency_Code", + table: "Basedata_Currency", + column: "Code", + unique: true); + + migrationBuilder.CreateIndex( + name: "IX_Basedata_CurrencyExchange_CurrencyId_BasicCurrencyId", + table: "Basedata_CurrencyExchange", + columns: new[] { "CurrencyId", "BasicCurrencyId" }, + unique: true); + + migrationBuilder.CreateIndex( + name: "IX_Basedata_Customer_Code", + table: "Basedata_Customer", + column: "Code", + unique: true); + + migrationBuilder.CreateIndex( + name: "IX_Basedata_CustomerAddress_Code_CustomerCode", + table: "Basedata_CustomerAddress", + columns: new[] { "Code", "CustomerCode" }, + unique: true); + + migrationBuilder.CreateIndex( + name: "IX_Basedata_CustomerItem_CustomerCode_ItemCode", + table: "Basedata_CustomerItem", + columns: new[] { "CustomerCode", "ItemCode" }, + unique: true); + + migrationBuilder.CreateIndex( + name: "IX_Basedata_Dict_Code", + table: "Basedata_Dict", + column: "Code", + unique: true); + + migrationBuilder.CreateIndex( + name: "IX_Basedata_DictItem_MasterId", + table: "Basedata_DictItem", + column: "MasterId"); + + migrationBuilder.CreateIndex( + name: "IX_Basedata_Dock_Code", + table: "Basedata_Dock", + column: "Code", + unique: true); + + migrationBuilder.CreateIndex( + name: "IX_Basedata_DocumentSetting_Code", + table: "Basedata_DocumentSetting", + column: "Code", + unique: true); + + migrationBuilder.CreateIndex( + name: "IX_Basedata_Equipment_Code", + table: "Basedata_Equipment", + column: "Code", + unique: true); + + migrationBuilder.CreateIndex( + name: "IX_Basedata_EquipmentLoc_Code_LocCode", + table: "Basedata_EquipmentLoc", + columns: new[] { "Code", "LocCode" }, + unique: true); + + migrationBuilder.CreateIndex( + name: "IX_Basedata_EquipmentLocCap_Code", + table: "Basedata_EquipmentLocCap", + column: "Code", + unique: true); + + migrationBuilder.CreateIndex( + name: "IX_Basedata_EquipmentPartCode_Code_PartCode", + table: "Basedata_EquipmentPartCode", + columns: new[] { "Code", "PartCode" }, + unique: true); + + migrationBuilder.CreateIndex( + name: "IX_Basedata_ErpLocation_Code", + table: "Basedata_ErpLocation", + column: "Code", + unique: true); + + migrationBuilder.CreateIndex( + name: "IX_Basedata_InterfaceCalendar_Code", + table: "Basedata_InterfaceCalendar", + column: "Code", + unique: true); + + migrationBuilder.CreateIndex( + name: "IX_Basedata_ItemBasic_Code", + table: "Basedata_ItemBasic", + column: "Code", + unique: true); + + migrationBuilder.CreateIndex( + name: "IX_Basedata_ItemCategory_CategoryCode_ItemCode", + table: "Basedata_ItemCategory", + columns: new[] { "CategoryCode", "ItemCode" }, + unique: true); + + migrationBuilder.CreateIndex( + name: "IX_Basedata_ItemGuideBook_ItemCode", + table: "Basedata_ItemGuideBook", + column: "ItemCode", + unique: true); + + migrationBuilder.CreateIndex( + name: "IX_Basedata_ItemPack_ItemCode_PackCode", + table: "Basedata_ItemPack", + columns: new[] { "ItemCode", "PackCode" }, + unique: true); + + migrationBuilder.CreateIndex( + name: "IX_Basedata_ItemQuality_ItemCode_SupplierCode", + table: "Basedata_ItemQuality", + columns: new[] { "ItemCode", "SupplierCode" }, + unique: true); + + migrationBuilder.CreateIndex( + name: "IX_Basedata_ItemSafetyStock_ItemCode_WarehouseCode_StoreRelationType_StoreValue", + table: "Basedata_ItemSafetyStock", + columns: new[] { "ItemCode", "WarehouseCode", "StoreRelationType", "StoreValue" }, + unique: true, + filter: "[StoreValue] IS NOT NULL"); + + migrationBuilder.CreateIndex( + name: "IX_Basedata_ItemStoreRelation_ItemCode_StoreRelationType_StoreValue", + table: "Basedata_ItemStoreRelation", + columns: new[] { "ItemCode", "StoreRelationType", "StoreValue" }, + unique: true, + filter: "[StoreValue] IS NOT NULL"); + + migrationBuilder.CreateIndex( + name: "IX_Basedata_Kitting_Code", + table: "Basedata_Kitting", + column: "Code", + unique: true); + + migrationBuilder.CreateIndex( + name: "IX_Basedata_KittingDetail_MasterId", + table: "Basedata_KittingDetail", + column: "MasterId"); + + migrationBuilder.CreateIndex( + name: "IX_Basedata_Location_Code", + table: "Basedata_Location", + column: "Code", + unique: true); + + migrationBuilder.CreateIndex( + name: "IX_Basedata_LocationGroup_Code", + table: "Basedata_LocationGroup", + column: "Code", + unique: true); + + migrationBuilder.CreateIndex( + name: "IX_Basedata_Machine_Code", + table: "Basedata_Machine", + column: "Code", + unique: true); + + migrationBuilder.CreateIndex( + name: "IX_Basedata_PositionCode_Code", + table: "Basedata_PositionCode", + column: "Code", + unique: true); + + migrationBuilder.CreateIndex( + name: "IX_Basedata_PositionCode_Code_PartCode_LocationCode", + table: "Basedata_PositionCode", + columns: new[] { "Code", "PartCode", "LocationCode" }, + unique: true, + filter: "[PartCode] IS NOT NULL AND [LocationCode] IS NOT NULL"); + + migrationBuilder.CreateIndex( + name: "IX_Basedata_PositionCode_PartCode", + table: "Basedata_PositionCode", + column: "PartCode", + unique: true, + filter: "[PartCode] IS NOT NULL"); + + migrationBuilder.CreateIndex( + name: "IX_Basedata_ProductionLine_Code", + table: "Basedata_ProductionLine", + column: "Code", + unique: true); + + migrationBuilder.CreateIndex( + name: "IX_Basedata_ProductionLineItem_ProdLineCode_ItemCode", + table: "Basedata_ProductionLineItem", + columns: new[] { "ProdLineCode", "ItemCode" }, + unique: true); + + migrationBuilder.CreateIndex( + name: "IX_Basedata_Project_Code", + table: "Basedata_Project", + column: "Code", + unique: true); + + migrationBuilder.CreateIndex( + name: "IX_Basedata_PurchasePriceSheet_ItemCode_SupplierCode", + table: "Basedata_PurchasePriceSheet", + columns: new[] { "ItemCode", "SupplierCode" }, + unique: true, + filter: "[ItemCode] IS NOT NULL AND [SupplierCode] IS NOT NULL"); + + migrationBuilder.CreateIndex( + name: "IX_Basedata_SalePriceSheet_CustomerCode_ItemCode", + table: "Basedata_SalePriceSheet", + columns: new[] { "CustomerCode", "ItemCode" }, + unique: true, + filter: "[CustomerCode] IS NOT NULL"); + + migrationBuilder.CreateIndex( + name: "IX_Basedata_Shift_Code", + table: "Basedata_Shift", + column: "Code", + unique: true); + + migrationBuilder.CreateIndex( + name: "IX_Basedata_SplitPackingRec_FromPackingCode_ToPackingCode", + table: "Basedata_SplitPackingRec", + columns: new[] { "FromPackingCode", "ToPackingCode" }); + + migrationBuilder.CreateIndex( + name: "IX_Basedata_SplitPackingRec_ToPackingCode", + table: "Basedata_SplitPackingRec", + column: "ToPackingCode"); + + migrationBuilder.CreateIndex( + name: "IX_Basedata_StdCostPriceSheet_ItemCode", + table: "Basedata_StdCostPriceSheet", + column: "ItemCode", + unique: true); + + migrationBuilder.CreateIndex( + name: "IX_Basedata_Supplier_Code", + table: "Basedata_Supplier", + column: "Code", + unique: true); + + migrationBuilder.CreateIndex( + name: "IX_Basedata_SupplierItem_SupplierCode_ItemCode", + table: "Basedata_SupplierItem", + columns: new[] { "SupplierCode", "ItemCode" }, + unique: true); + + migrationBuilder.CreateIndex( + name: "IX_Basedata_SupplierTimeWindow_SupplierCode_TimeSlot_Week", + table: "Basedata_SupplierTimeWindow", + columns: new[] { "SupplierCode", "TimeSlot", "Week" }, + unique: true); + + migrationBuilder.CreateIndex( + name: "IX_Basedata_Team_Code", + table: "Basedata_Team", + column: "Code", + unique: true); + + migrationBuilder.CreateIndex( + name: "IX_Basedata_TransactionType_TransType_TransSubType", + table: "Basedata_TransactionType", + columns: new[] { "TransType", "TransSubType" }, + unique: true); + + migrationBuilder.CreateIndex( + name: "IX_Basedata_Uom_Code", + table: "Basedata_Uom", + column: "Code", + unique: true); + + migrationBuilder.CreateIndex( + name: "IX_Basedata_Warehouse_Code", + table: "Basedata_Warehouse", + column: "Code", + unique: true); + + migrationBuilder.CreateIndex( + name: "IX_Basedata_WorkGroup_Code", + table: "Basedata_WorkGroup", + column: "Code", + unique: true); + + migrationBuilder.CreateIndex( + name: "IX_Basedata_WorkShop_Code", + table: "Basedata_WorkShop", + column: "Code", + unique: true); + + migrationBuilder.CreateIndex( + name: "IX_Basedata_WorkStation_Code", + table: "Basedata_WorkStation", + column: "Code", + unique: true); + } + + protected override void Down(MigrationBuilder migrationBuilder) + { + migrationBuilder.DropTable( + name: "Basedata_AQL"); + + migrationBuilder.DropTable( + name: "Basedata_Area"); + + migrationBuilder.DropTable( + name: "Basedata_Bom"); + + migrationBuilder.DropTable( + name: "Basedata_Calendar"); + + migrationBuilder.DropTable( + name: "Basedata_Category"); + + migrationBuilder.DropTable( + name: "Basedata_Currency"); + + migrationBuilder.DropTable( + name: "Basedata_CurrencyExchange"); + + migrationBuilder.DropTable( + name: "Basedata_Customer"); + + migrationBuilder.DropTable( + name: "Basedata_CustomerAddress"); + + migrationBuilder.DropTable( + name: "Basedata_CustomerItem"); + + migrationBuilder.DropTable( + name: "Basedata_DictItem"); + + migrationBuilder.DropTable( + name: "Basedata_Dock"); + + migrationBuilder.DropTable( + name: "Basedata_DocumentSetting"); + + migrationBuilder.DropTable( + name: "Basedata_Equipment"); + + migrationBuilder.DropTable( + name: "Basedata_EquipmentLoc"); + + migrationBuilder.DropTable( + name: "Basedata_EquipmentLocCap"); + + migrationBuilder.DropTable( + name: "Basedata_EquipmentPartCode"); + + migrationBuilder.DropTable( + name: "Basedata_ErpLocation"); + + migrationBuilder.DropTable( + name: "Basedata_InterfaceCalendar"); + + migrationBuilder.DropTable( + name: "Basedata_ItemBasic"); + + migrationBuilder.DropTable( + name: "Basedata_ItemCategory"); + + migrationBuilder.DropTable( + name: "Basedata_ItemGuideBook"); + + migrationBuilder.DropTable( + name: "Basedata_ItemPack"); + + migrationBuilder.DropTable( + name: "Basedata_ItemQuality"); + + migrationBuilder.DropTable( + name: "Basedata_ItemSafetyStock"); + + migrationBuilder.DropTable( + name: "Basedata_ItemStoreRelation"); + + migrationBuilder.DropTable( + name: "Basedata_KittingDetail"); + + migrationBuilder.DropTable( + name: "Basedata_Location"); + + migrationBuilder.DropTable( + name: "Basedata_LocationGroup"); + + migrationBuilder.DropTable( + name: "Basedata_Machine"); + + migrationBuilder.DropTable( + name: "Basedata_PositionCode"); + + migrationBuilder.DropTable( + name: "Basedata_ProductionLine"); + + migrationBuilder.DropTable( + name: "Basedata_ProductionLineItem"); + + migrationBuilder.DropTable( + name: "Basedata_Project"); + + migrationBuilder.DropTable( + name: "Basedata_PurchasePriceSheet"); + + migrationBuilder.DropTable( + name: "Basedata_SalePriceSheet"); + + migrationBuilder.DropTable( + name: "Basedata_Shift"); + + migrationBuilder.DropTable( + name: "Basedata_SplitPackingRec"); + + migrationBuilder.DropTable( + name: "Basedata_StdCostPriceSheet"); + + migrationBuilder.DropTable( + name: "Basedata_Supplier"); + + migrationBuilder.DropTable( + name: "Basedata_SupplierItem"); + + migrationBuilder.DropTable( + name: "Basedata_SupplierTimeWindow"); + + migrationBuilder.DropTable( + name: "Basedata_Team"); + + migrationBuilder.DropTable( + name: "Basedata_TransactionType"); + + migrationBuilder.DropTable( + name: "Basedata_Uom"); + + migrationBuilder.DropTable( + name: "Basedata_Warehouse"); + + migrationBuilder.DropTable( + name: "Basedata_WorkGroup"); + + migrationBuilder.DropTable( + name: "Basedata_WorkShop"); + + migrationBuilder.DropTable( + name: "Basedata_WorkStation"); + + migrationBuilder.DropTable( + name: "Basedata_Dict"); + + migrationBuilder.DropTable( + name: "Basedata_Kitting"); + } + } +} diff --git a/be/Modules/BaseData/src/Win_in.Sfs.Basedata.EntityFrameworkCore/Migrations/BasedataDbContextModelSnapshot.cs b/be/Modules/BaseData/src/Win_in.Sfs.Basedata.EntityFrameworkCore/Migrations/BasedataDbContextModelSnapshot.cs new file mode 100644 index 000000000..02214cf52 --- /dev/null +++ b/be/Modules/BaseData/src/Win_in.Sfs.Basedata.EntityFrameworkCore/Migrations/BasedataDbContextModelSnapshot.cs @@ -0,0 +1,4156 @@ +// +using System; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Metadata; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; +using Volo.Abp.EntityFrameworkCore; +using Win_in.Sfs.Basedata.EntityFrameworkCore; + +#nullable disable + +namespace Win_in.Sfs.Basedata.Migrations +{ + [DbContext(typeof(BasedataDbContext))] + partial class BasedataDbContextModelSnapshot : ModelSnapshot + { + protected override void BuildModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder + .HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.SqlServer) + .HasAnnotation("ProductVersion", "6.0.13") + .HasAnnotation("Relational:MaxIdentifierLength", 128); + + SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder, 1L, 1); + + modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.AQL", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AbcClass") + .HasColumnType("nvarchar(max)"); + + b.Property("CeilingQty") + .HasColumnType("decimal(18,6)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("FloorQty") + .HasColumnType("decimal(18,6)"); + + b.Property("IsUsePercent") + .HasColumnType("bit"); + + b.Property("ItemCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("SamplePercent") + .HasColumnType("decimal(18,6)"); + + b.Property("SampleQty") + .HasColumnType("decimal(18,6)"); + + b.Property("SupplierCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("SupplierCode", "ItemCode", "FloorQty") + .IsUnique(); + + b.ToTable("Basedata_AQL", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.Area", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AreaType") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("Description") + .HasMaxLength(1024) + .HasColumnType("nvarchar(1024)"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("IsFunctional") + .HasColumnType("bit"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Name") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("WarehouseCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.HasKey("Id"); + + b.HasIndex("Code") + .IsUnique(); + + b.ToTable("Basedata_Area", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.Bom", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("BeginTime") + .HasColumnType("datetime2"); + + b.Property("Component") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ComponentQty") + .HasColumnType("decimal(18,6)"); + + b.Property("ComponentUom") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DistributionType") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ERPOp") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("EndTime") + .HasColumnType("datetime2"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Layer") + .ValueGeneratedOnAdd() + .HasMaxLength(64) + .HasColumnType("int") + .HasDefaultValue(1); + + b.Property("MFGOp") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("PlannedSplitRule") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Product") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("TruncType") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.HasKey("Id"); + + b.HasIndex("Product", "Component") + .IsUnique(); + + b.ToTable("Basedata_Bom", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.Calendar", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("BeginTime") + .HasColumnType("datetime2"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("EndTime") + .HasColumnType("datetime2"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Module") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)"); + + b.Property("Status") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("Module") + .IsUnique() + .HasFilter("[Module] IS NOT NULL"); + + b.ToTable("Basedata_Calendar", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.Category", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("Description") + .HasMaxLength(1024) + .HasColumnType("nvarchar(1024)"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Name") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("Code") + .IsUnique(); + + b.ToTable("Basedata_Category", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.Currency", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("Description") + .HasMaxLength(1024) + .HasColumnType("nvarchar(1024)"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("IsBasicCurrency") + .HasColumnType("bit"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("Code") + .IsUnique(); + + b.ToTable("Basedata_Currency", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.CurrencyExchange", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("BasicCurrencyId") + .HasColumnType("uniqueidentifier"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("CurrencyId") + .HasColumnType("uniqueidentifier"); + + b.Property("EfficetiveTime") + .HasColumnType("datetime2"); + + b.Property("ExpireTime") + .HasColumnType("datetime2"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Rate") + .HasColumnType("decimal(18,6)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("CurrencyId", "BasicCurrencyId") + .IsUnique(); + + b.ToTable("Basedata_CurrencyExchange", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.Customer", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Address") + .HasMaxLength(1024) + .HasColumnType("nvarchar(1024)"); + + b.Property("City") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("Contacts") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Country") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("Currency") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("Fax") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("IsActive") + .HasColumnType("bit"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Name") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Phone") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("PostID") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("ShortName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Type") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.HasKey("Id"); + + b.HasIndex("Code") + .IsUnique(); + + b.ToTable("Basedata_Customer", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.CustomerAddress", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Address") + .HasMaxLength(1024) + .HasColumnType("nvarchar(1024)"); + + b.Property("City") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("Contact") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("CustomerCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Desc") + .HasMaxLength(1024) + .HasColumnType("nvarchar(1024)"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("LocationCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Name") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Remark") + .HasMaxLength(1024) + .HasColumnType("nvarchar(1024)") + .HasColumnName("Remark"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("WarehouseCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.HasKey("Id"); + + b.HasIndex("Code", "CustomerCode") + .IsUnique(); + + b.ToTable("Basedata_CustomerAddress", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.CustomerItem", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("BeginTime") + .HasColumnType("datetime2"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("CustomerCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("CustomerItemCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("CustomerPackQty") + .HasColumnType("decimal(18,6)"); + + b.Property("CustomerPackUom") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("EndTime") + .HasColumnType("datetime2"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("ItemCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Version") + .HasMaxLength(1024) + .HasColumnType("nvarchar(1024)"); + + b.HasKey("Id"); + + b.HasIndex("CustomerCode", "ItemCode") + .IsUnique(); + + b.ToTable("Basedata_CustomerItem", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.Dict", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("Description") + .HasMaxLength(1024) + .HasColumnType("nvarchar(1024)"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Name") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("Code") + .IsUnique(); + + b.ToTable("Basedata_Dict", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.DictItem", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("Description") + .HasMaxLength(1024) + .HasColumnType("nvarchar(1024)"); + + b.Property("Enabled") + .HasColumnType("bit"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("MasterId") + .HasColumnType("uniqueidentifier"); + + b.Property("Name") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Value") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.HasKey("Id"); + + b.HasIndex("MasterId"); + + b.ToTable("Basedata_DictItem", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.Dock", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DefaultLocationCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Description") + .HasMaxLength(1024) + .HasColumnType("nvarchar(1024)"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Name") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("WarehouseCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.HasKey("Id"); + + b.HasIndex("Code") + .IsUnique(); + + b.ToTable("Basedata_Dock", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.DocumentSetting", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("Description") + .HasMaxLength(1024) + .HasColumnType("nvarchar(1024)"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Name") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("NumberFormat") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("NumberPrefix") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("NumberSeparator") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("NumberSerialLength") + .HasColumnType("int"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("TransactionType") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.HasKey("Id"); + + b.HasIndex("Code") + .IsUnique(); + + b.ToTable("Basedata_DocumentSetting", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.Equipment", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreatTime") + .HasColumnType("datetime2"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("Creator") + .HasColumnType("nvarchar(max)"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("LocCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Model") + .HasMaxLength(64) + .HasColumnType("int"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("State") + .HasColumnType("int"); + + b.Property("StdQty") + .HasColumnType("decimal(18,6)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Type") + .HasMaxLength(64) + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("Code") + .IsUnique(); + + b.ToTable("Basedata_Equipment", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.EquipmentLoc", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("LocCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("State") + .HasColumnType("int"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("Code", "LocCode") + .IsUnique(); + + b.ToTable("Basedata_EquipmentLoc", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.EquipmentLocCap", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("PartCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Percent") + .HasColumnType("decimal(18,6)"); + + b.Property("Qty") + .HasColumnType("decimal(18,6)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("StdQty") + .HasColumnType("decimal(18,6)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("Code") + .IsUnique(); + + b.ToTable("Basedata_EquipmentLocCap", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.EquipmentPartCode", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("PartCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("State") + .HasColumnType("int"); + + b.Property("StdQty") + .HasColumnType("decimal(18,2)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Unit") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("Code", "PartCode") + .IsUnique(); + + b.ToTable("Basedata_EquipmentPartCode", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.ErpLocation", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("Description") + .HasMaxLength(1024) + .HasColumnType("nvarchar(1024)"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Name") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Type") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("WarehouseCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.HasKey("Id"); + + b.HasIndex("Code") + .IsUnique(); + + b.ToTable("Basedata_ErpLocation", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.InterfaceCalendar", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("BeginTime") + .HasColumnType("datetime2"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("ConvertToTime") + .HasColumnType("datetime2"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("Description") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("EndTime") + .HasColumnType("datetime2"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Month") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Remark") + .HasColumnType("nvarchar(max)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Year") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.HasKey("Id"); + + b.HasIndex("Code") + .IsUnique(); + + b.ToTable("Basedata_InterfaceCalendar", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.ItemBasic", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AbcClass") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("BasicUom") + .HasColumnType("nvarchar(max)"); + + b.Property("CanBuy") + .HasColumnType("bit"); + + b.Property("CanMake") + .HasColumnType("bit"); + + b.Property("CanOutsourcing") + .HasColumnType("bit"); + + b.Property("Category") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Color") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("Configuration") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("Desc1") + .HasMaxLength(1024) + .HasColumnType("nvarchar(1024)"); + + b.Property("Desc2") + .HasMaxLength(1024) + .HasColumnType("nvarchar(1024)"); + + b.Property("Eco") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Elevel") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("Group") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("IsPhantom") + .HasColumnType("bit"); + + b.Property("IsRecycled") + .HasColumnType("bit"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("ManageType") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Name") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Project") + .HasColumnType("nvarchar(max)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("Status") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("StdPackQty") + .HasColumnType("decimal(18,6)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Type") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Validity") + .HasColumnType("int"); + + b.Property("ValidityUnit") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Version") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.HasKey("Id"); + + b.HasIndex("Code") + .IsUnique(); + + b.ToTable("Basedata_ItemBasic", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.ItemCategory", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CategoryCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("ItemCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Value") + .IsRequired() + .HasMaxLength(1024) + .HasColumnType("nvarchar(1024)"); + + b.HasKey("Id"); + + b.HasIndex("CategoryCode", "ItemCode") + .IsUnique(); + + b.ToTable("Basedata_ItemCategory", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.ItemGuideBook", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("Desc1") + .HasColumnType("nvarchar(max)"); + + b.Property("Desc2") + .HasColumnType("nvarchar(max)"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("ItemCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Name") + .HasColumnType("nvarchar(max)"); + + b.Property("PictureBlobName") + .HasColumnType("nvarchar(max)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("Step") + .HasMaxLength(1024) + .HasColumnType("nvarchar(1024)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("ItemCode") + .IsUnique(); + + b.ToTable("Basedata_ItemGuideBook", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.ItemPack", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("BasicUom") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("ItemCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("PackCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("PackName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("PackType") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Qty") + .HasColumnType("decimal(18,6)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("ItemCode", "PackCode") + .IsUnique(); + + b.ToTable("Basedata_ItemPack", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.ItemQuality", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("Description") + .HasMaxLength(1024) + .HasColumnType("nvarchar(1024)"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("InspectType") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ItemCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("Status") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("SupplierCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("ItemCode", "SupplierCode") + .IsUnique(); + + b.ToTable("Basedata_ItemQuality", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.ItemSafetyStock", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("FeedLine") + .HasColumnType("decimal(18,6)"); + + b.Property("FeedQty") + .HasColumnType("decimal(18,6)"); + + b.Property("FeedUM") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ItemCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("MaxStock") + .HasColumnType("decimal(18,6)"); + + b.Property("MinStock") + .HasColumnType("decimal(18,6)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("SafetyStock") + .HasColumnType("decimal(18,6)"); + + b.Property("StoreRelationType") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("StoreValue") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("WarehouseCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.HasKey("Id"); + + b.HasIndex("ItemCode", "WarehouseCode", "StoreRelationType", "StoreValue") + .IsUnique() + .HasFilter("[StoreValue] IS NOT NULL"); + + b.ToTable("Basedata_ItemSafetyStock", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.ItemStoreRelation", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AltUm") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("AltUmQty") + .HasColumnType("decimal(18,6)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("Enabled") + .HasColumnType("bit"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("IsFixed") + .HasColumnType("bit"); + + b.Property("ItemCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("MultiLoc") + .HasColumnType("int"); + + b.Property("PramaryUM") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("StoreRelationType") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("StoreUM") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("StoreValue") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("UmQty") + .HasColumnType("decimal(18,6)"); + + b.Property("WarehouseCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.HasKey("Id"); + + b.HasIndex("ItemCode", "StoreRelationType", "StoreValue") + .IsUnique() + .HasFilter("[StoreValue] IS NOT NULL"); + + b.ToTable("Basedata_ItemStoreRelation", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.Kitting", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Name") + .HasMaxLength(1024) + .HasColumnType("nvarchar(1024)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("Code") + .IsUnique(); + + b.ToTable("Basedata_Kitting", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.KittingDetail", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("Conf") + .HasColumnType("nvarchar(max)"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("Desc1") + .HasMaxLength(1024) + .HasColumnType("nvarchar(1024)"); + + b.Property("Desc2") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("MasterId") + .HasColumnType("uniqueidentifier"); + + b.Property("PartCode") + .HasColumnType("nvarchar(max)"); + + b.Property("Qty") + .HasColumnType("decimal(18,2)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("MasterId"); + + b.ToTable("Basedata_KittingDetail", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.Location", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AreaCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ColumnCode") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasDefaultValue(1); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DefaultInventoryStatus") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Description") + .HasMaxLength(1024) + .HasColumnType("nvarchar(1024)"); + + b.Property("EnableBreakStore") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(true); + + b.Property("EnableKeepZero") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(true); + + b.Property("EnableMixItem") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(true); + + b.Property("EnableMixLot") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(true); + + b.Property("EnableMixStatus") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(true); + + b.Property("EnableNegative") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(true); + + b.Property("EnableOpportunityCount") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(true); + + b.Property("EnableOverPick") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(true); + + b.Property("EnablePick") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(true); + + b.Property("EnableReceive") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(true); + + b.Property("EnableReturnFromCustomer") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(true); + + b.Property("EnableReturnToSupplier") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(true); + + b.Property("EnableShip") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(true); + + b.Property("EnableSplitBox") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(true); + + b.Property("EnableSplitPallet") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(true); + + b.Property("EnableWholeStore") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(true); + + b.Property("ErpLocationCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("LocationGroupCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Name") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("PickOrder") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasDefaultValue(0); + + b.Property("PickPriority") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasDefaultValue(0); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("RowCode") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasDefaultValue(1); + + b.Property("ShelfCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Type") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("WarehouseCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("WorkGroupCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.HasKey("Id"); + + b.HasIndex("Code") + .IsUnique(); + + b.ToTable("Basedata_Location", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.LocationGroup", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AreaCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DefaultInventoryStatus") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Description") + .HasMaxLength(1024) + .HasColumnType("nvarchar(1024)"); + + b.Property("EnableBreakStore") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(true); + + b.Property("EnableKeepZero") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(true); + + b.Property("EnableMixItem") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(true); + + b.Property("EnableMixLot") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(true); + + b.Property("EnableMixStatus") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(true); + + b.Property("EnableNegative") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(true); + + b.Property("EnableOpportunityCount") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(true); + + b.Property("EnableOverPick") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(true); + + b.Property("EnablePick") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(true); + + b.Property("EnableReceive") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(true); + + b.Property("EnableReturnFromCustomer") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(true); + + b.Property("EnableReturnToSupplier") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(true); + + b.Property("EnableShip") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(true); + + b.Property("EnableSplitBox") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(true); + + b.Property("EnableSplitPallet") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(true); + + b.Property("EnableWholeStore") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(true); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("GroupType") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Name") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("OverflowLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("PickPriority") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasDefaultValue(0); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("WarehouseCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.HasKey("Id"); + + b.HasIndex("Code") + .IsUnique(); + + b.ToTable("Basedata_LocationGroup", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.Machine", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("Description") + .HasMaxLength(1024) + .HasColumnType("nvarchar(1024)"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ProdLineId") + .HasColumnType("uniqueidentifier"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Type") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("WorkStationId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("Code") + .IsUnique(); + + b.ToTable("Basedata_Machine", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.PositionCode", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("BasicUom") + .HasColumnType("nvarchar(max)"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("LocationCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("LocationName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("PartCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("PartDesc") + .HasColumnType("nvarchar(max)"); + + b.Property("PartName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("StdPackQty") + .HasColumnType("decimal(18,6)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Type") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.HasKey("Id"); + + b.HasIndex("Code") + .IsUnique(); + + b.HasIndex("PartCode") + .IsUnique() + .HasFilter("[PartCode] IS NOT NULL"); + + b.HasIndex("Code", "PartCode", "LocationCode") + .IsUnique() + .HasFilter("[PartCode] IS NOT NULL AND [LocationCode] IS NOT NULL"); + + b.ToTable("Basedata_PositionCode", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.ProductionLine", b => + { + b.Property("Code") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("Description") + .HasMaxLength(1024) + .HasColumnType("nvarchar(1024)"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Name") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ProductLocationCodeListJson") + .HasColumnType("nvarchar(max)"); + + b.Property("RawLocationCodeListJson") + .HasColumnType("nvarchar(max)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Type") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("WipLocationCodeListJson") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Code"); + + b.HasIndex("Code") + .IsUnique(); + + b.ToTable("Basedata_ProductionLine", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.ProductionLineItem", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("ItemCode") + .IsRequired() + .HasColumnType("nvarchar(450)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("ProdLineCode") + .IsRequired() + .HasColumnType("nvarchar(450)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("ProdLineCode", "ItemCode") + .IsUnique(); + + b.ToTable("Basedata_ProductionLineItem", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.Project", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("BeginTime") + .HasColumnType("datetime2"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("CustomerCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Description") + .HasMaxLength(1024) + .HasColumnType("nvarchar(1024)"); + + b.Property("EndTime") + .HasColumnType("datetime2"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Name") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("Code") + .IsUnique(); + + b.ToTable("Basedata_Project", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.PurchasePriceSheet", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("Description") + .HasMaxLength(1024) + .HasColumnType("nvarchar(1024)"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("ItemCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("PurchasePrice") + .HasColumnType("decimal(18,6)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("SupplierCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("ItemCode", "SupplierCode") + .IsUnique() + .HasFilter("[ItemCode] IS NOT NULL AND [SupplierCode] IS NOT NULL"); + + b.ToTable("Basedata_PurchasePriceSheet", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.SalePriceSheet", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("CustomerCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Description") + .HasMaxLength(1024) + .HasColumnType("nvarchar(1024)"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("ItemCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("SalePrice") + .HasColumnType("decimal(18,6)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("CustomerCode", "ItemCode") + .IsUnique() + .HasFilter("[CustomerCode] IS NOT NULL"); + + b.ToTable("Basedata_SalePriceSheet", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.Shift", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("BeginTime") + .HasColumnType("datetime2"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("Description") + .HasMaxLength(1024) + .HasColumnType("nvarchar(1024)"); + + b.Property("EndAtNextDay") + .HasColumnType("bit"); + + b.Property("EndTime") + .HasColumnType("datetime2"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Name") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("Code") + .IsUnique(); + + b.ToTable("Basedata_Shift", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.SplitPackingRec", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ArrivalNoticNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("FromLot") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("FromPackingCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("FromQty") + .HasPrecision(18, 6) + .HasColumnType("decimal(18,6)"); + + b.Property("FromStdPackQty") + .HasColumnType("decimal(18,6)"); + + b.Property("FromTopPackingCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("FromUom") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ItemCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ItemDesc1") + .HasMaxLength(1024) + .HasColumnType("nvarchar(1024)"); + + b.Property("ItemDesc2") + .HasMaxLength(1024) + .HasColumnType("nvarchar(1024)"); + + b.Property("ItemName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("LabelType") + .HasColumnType("int"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("OprType") + .HasColumnType("int"); + + b.Property("PurchaseInfo_AsnNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("PurchaseInfo_PoNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("PutOnShelfNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ReceiptRecNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Remark") + .HasColumnType("nvarchar(max)"); + + b.Property("TaskOrderNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("ToLot") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ToPackingCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ToQty") + .HasPrecision(18, 6) + .HasColumnType("decimal(18,6)"); + + b.Property("ToStdPackQty") + .HasColumnType("decimal(18,6)"); + + b.Property("ToTopPackingCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ToUom") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.HasKey("Id"); + + b.HasIndex("ToPackingCode"); + + b.HasIndex("FromPackingCode", "ToPackingCode"); + + b.ToTable("Basedata_SplitPackingRec", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.StdCostPriceSheet", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("Description") + .HasMaxLength(1024) + .HasColumnType("nvarchar(1024)"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("ItemCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("StdCostPrice") + .HasColumnType("decimal(18,6)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("ItemCode") + .IsUnique(); + + b.ToTable("Basedata_StdCostPriceSheet", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.Supplier", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Address") + .HasMaxLength(1024) + .HasColumnType("nvarchar(1024)"); + + b.Property("Bank") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("City") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("Contacts") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Country") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("Currency") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("Fax") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("IsActive") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(true); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Phone") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("PostID") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("ShortName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("TaxRate") + .HasColumnType("decimal(18,6)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Type") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.HasKey("Id"); + + b.HasIndex("Code") + .IsUnique(); + + b.ToTable("Basedata_Supplier", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.SupplierItem", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("ItemCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ItemName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("QtyPerPallet") + .HasColumnType("decimal(18,6)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("SupplierCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("SupplierItemCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("SupplierPackQty") + .HasColumnType("decimal(18,6)"); + + b.Property("SupplierPackUom") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("SupplierSimpleName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Version") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.HasKey("Id"); + + b.HasIndex("SupplierCode", "ItemCode") + .IsUnique(); + + b.ToTable("Basedata_SupplierItem", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.SupplierTimeWindow", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("SupplierCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("SupplierName") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("TimeSlot") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Week") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.HasKey("Id"); + + b.HasIndex("SupplierCode", "TimeSlot", "Week") + .IsUnique(); + + b.ToTable("Basedata_SupplierTimeWindow", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.Team", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("Description") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Members") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Name") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("Code") + .IsUnique(); + + b.ToTable("Basedata_Team", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.TransactionType", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AutoAgreeRequest") + .HasColumnType("bit"); + + b.Property("AutoCompleteJob") + .HasColumnType("bit"); + + b.Property("AutoHandleRequest") + .HasColumnType("bit"); + + b.Property("AutoSubmitRequest") + .HasColumnType("bit"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(1024) + .HasColumnType("nvarchar(1024)"); + + b.Property("DirectCreateNote") + .HasColumnType("bit"); + + b.Property("Enabled") + .HasColumnType("bit"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("InInventoryStatuses") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("InLocationAreas") + .HasColumnType("nvarchar(max)"); + + b.Property("InLocationTypes") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ItemStatuses") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ItemTypes") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("OutInventoryStatuses") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("OutLocationAreas") + .HasColumnType("nvarchar(max)"); + + b.Property("OutLocationTypes") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("TransSubType") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("TransType") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.HasKey("Id"); + + b.HasIndex("TransType", "TransSubType") + .IsUnique(); + + b.ToTable("Basedata_TransactionType", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.Uom", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("Description") + .HasMaxLength(1024) + .HasColumnType("nvarchar(1024)"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Name") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Type") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.HasKey("Id"); + + b.HasIndex("Code") + .IsUnique(); + + b.ToTable("Basedata_Uom", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.Warehouse", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("Description") + .HasMaxLength(1024) + .HasColumnType("nvarchar(1024)"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Name") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("Code") + .IsUnique(); + + b.ToTable("Basedata_Warehouse", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.WorkGroup", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("Description") + .HasMaxLength(1024) + .HasColumnType("nvarchar(1024)"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Name") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("WarehouseCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.HasKey("Id"); + + b.HasIndex("Code") + .IsUnique(); + + b.ToTable("Basedata_WorkGroup", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.WorkShop", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("Description") + .HasMaxLength(1024) + .HasColumnType("nvarchar(1024)"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("Code") + .IsUnique(); + + b.ToTable("Basedata_WorkShop", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.WorkStation", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("Description") + .HasMaxLength(1024) + .HasColumnType("nvarchar(1024)"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ProductLocationCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ProductionLineCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("RawLocationCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Type") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.HasKey("Id"); + + b.HasIndex("Code") + .IsUnique(); + + b.ToTable("Basedata_WorkStation", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.DictItem", b => + { + b.HasOne("Win_in.Sfs.Basedata.Domain.Dict", null) + .WithMany("Items") + .HasForeignKey("MasterId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.KittingDetail", b => + { + b.HasOne("Win_in.Sfs.Basedata.Domain.Kitting", null) + .WithMany("Details") + .HasForeignKey("MasterId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.Dict", b => + { + b.Navigation("Items"); + }); + + modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.Kitting", b => + { + b.Navigation("Details"); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/be/Modules/BaseData/src/Win_in.Sfs.Basedata.EntityFrameworkCore/ProductionLines/ProductionLineDbContextModelCreatingExtensions.cs b/be/Modules/BaseData/src/Win_in.Sfs.Basedata.EntityFrameworkCore/ProductionLines/ProductionLineDbContextModelCreatingExtensions.cs index 91460e9e0..e9484173b 100644 --- a/be/Modules/BaseData/src/Win_in.Sfs.Basedata.EntityFrameworkCore/ProductionLines/ProductionLineDbContextModelCreatingExtensions.cs +++ b/be/Modules/BaseData/src/Win_in.Sfs.Basedata.EntityFrameworkCore/ProductionLines/ProductionLineDbContextModelCreatingExtensions.cs @@ -20,11 +20,8 @@ public static class ProductionLineDbContextModelCreatingExtensions b.Property(x => x.Name).HasMaxLength(SfsPropertyConst.CodeLength); b.Property(x => x.Description).HasMaxLength(SfsPropertyConst.DescLength); b.Property(x => x.Type).IsRequired().HasMaxLength(SfsPropertyConst.NameLength).HasConversion(); - b.Property(q => q.WorkshopCode).HasMaxLength(SfsPropertyConst.CodeLength); - b.Property(q => q.RawLocationCode).HasMaxLength(SfsPropertyConst.CodeLength); - b.Property(q => q.ProductLocationCode).HasMaxLength(SfsPropertyConst.CodeLength); - b.Property(q => q.RawLocationGroupCode).HasMaxLength(SfsPropertyConst.CodeLength); b.Property(q => q.Remark).HasMaxLength(SfsPropertyConst.RemarkLength); + b.HasKey(q => q.Code); b.HasIndex(x => new { x.Code }).IsUnique(); }); diff --git a/be/Modules/BaseData/src/Win_in.Sfs.Basedata.EntityFrameworkCore/ProductionLines/ProductionLineEfCoreRepository.cs b/be/Modules/BaseData/src/Win_in.Sfs.Basedata.EntityFrameworkCore/ProductionLines/ProductionLineEfCoreRepository.cs index f5305dac7..4f4d9f20d 100644 --- a/be/Modules/BaseData/src/Win_in.Sfs.Basedata.EntityFrameworkCore/ProductionLines/ProductionLineEfCoreRepository.cs +++ b/be/Modules/BaseData/src/Win_in.Sfs.Basedata.EntityFrameworkCore/ProductionLines/ProductionLineEfCoreRepository.cs @@ -29,7 +29,6 @@ public class ProductionLineEfCoreRepository : SfsBaseDataEfCoreRepositoryBase + + + + diff --git a/be/Modules/Shared/src/Win_in.Sfs.Shared.Domain.Shared/Enums/Inventory/EnumTransType.cs b/be/Modules/Shared/src/Win_in.Sfs.Shared.Domain.Shared/Enums/Inventory/EnumTransType.cs index 845532ea3..f1259ee84 100644 --- a/be/Modules/Shared/src/Win_in.Sfs.Shared.Domain.Shared/Enums/Inventory/EnumTransType.cs +++ b/be/Modules/Shared/src/Win_in.Sfs.Shared.Domain.Shared/Enums/Inventory/EnumTransType.cs @@ -91,6 +91,13 @@ public enum EnumTransType [Display(Name = "库内转移")] Transfer = 31, + /// + /// 新版库内转移 + /// + [Display(Name = "新版库内转移")] + TransferLib = 68, + + /// /// 库间调拨 /// diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/IssueJobs/AssembleJobs/AssembleJobPermissions.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/IssueJobs/AssembleJobs/AssembleJobPermissions.cs new file mode 100644 index 000000000..ec726a250 --- /dev/null +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/IssueJobs/AssembleJobs/AssembleJobPermissions.cs @@ -0,0 +1,27 @@ +using Volo.Abp.Authorization.Permissions; +using Win_in.Sfs.Wms.Store.Domain; + +namespace Win_in.Sfs.Wms.Store.Application.Contracts; + +public static class AssembleJobPermissions +{ + + public const string Default = StorePermissions.GroupName + "." + nameof(AssembleJob); + public const string Create = Default + "." + StorePermissions.CreateStr; + public const string Update = Default + "." + StorePermissions.UpdateStr; + public const string Delete = Default + "." + StorePermissions.DeleteStr; + + //自动发料任务 + public const string AutoAssembleJob = StorePermissions.GroupName + "." + nameof(AutoAssembleJob); + + public static void AddAssembleJobPermission(this PermissionGroupDefinition permissionGroup) + { + var AssembleJobPermission = permissionGroup.AddPermission(Default, StorePermissionDefinitionProvider.L(nameof(AssembleJob))); + AssembleJobPermission.AddChild(Create, StorePermissionDefinitionProvider.L(StorePermissions.CreateStr)); + AssembleJobPermission.AddChild(Update, StorePermissionDefinitionProvider.L(StorePermissions.UpdateStr)); + AssembleJobPermission.AddChild(Delete, StorePermissionDefinitionProvider.L(StorePermissions.DeleteStr)); + + permissionGroup.AddPermission(AutoAssembleJob, StorePermissionDefinitionProvider.L(nameof(AutoAssembleJob))); + + } +} diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/IssueJobs/AssembleJobs/DTOs/AssembleJobDTO.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/IssueJobs/AssembleJobs/DTOs/AssembleJobDTO.cs new file mode 100644 index 000000000..3e1f8691f --- /dev/null +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/IssueJobs/AssembleJobs/DTOs/AssembleJobDTO.cs @@ -0,0 +1,46 @@ +using System.ComponentModel.DataAnnotations; +using Win_in.Sfs.Shared.Domain; + +namespace Win_in.Sfs.Wms.Store.Application.Contracts; + +/// +/// 装配发料任务 +/// +[Display(Name = "装配发料任务")] +public class AssembleJobDTO : SfsJobDTOBase +{ + /// + /// 叫料请求类型 + /// + [Display(Name = "叫料请求类型")] + [StringLength(SfsEfCorePropertyConst.CodeLength, ErrorMessage = "{0}最多输入{1}个字符")] + public string RequestType { get; set; } + + /// + /// 生产线 + /// + [Display(Name = "生产线")] + [StringLength(SfsEfCorePropertyConst.CodeLength, ErrorMessage = "{0}最多输入{1}个字符")] + public string ProdLine { get; set; } + + /// + /// 要货单号 + /// + [Display(Name = "要货单号")] + [StringLength(SfsEfCorePropertyConst.CodeLength, ErrorMessage = "{0}最多输入{1}个字符")] + public string AssembleRequestNumber { get; set; } + + /// + /// 车间 + /// + [Display(Name = "车间")] + [StringLength(SfsEfCorePropertyConst.CodeLength, ErrorMessage = "{0}最多输入{1}个字符")] + public string Workshop { get; set; } + + /// + /// 使用在途库 + /// + [Display(Name = "使用在途库")] + public bool UseOnTheWayLocation { get; set; } + +} diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/IssueJobs/AssembleJobs/DTOs/AssembleJobDetailDTO.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/IssueJobs/AssembleJobs/DTOs/AssembleJobDetailDTO.cs new file mode 100644 index 000000000..c89aa7d8f --- /dev/null +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/IssueJobs/AssembleJobs/DTOs/AssembleJobDetailDTO.cs @@ -0,0 +1,112 @@ +using System; +using System.ComponentModel.DataAnnotations; +using Win_in.Sfs.Shared.Domain; +using Win_in.Sfs.Shared.Domain.Shared; + +namespace Win_in.Sfs.Wms.Store.Application.Contracts; + +public class AssembleJobDetailDTO : SfsJobRecommendFromDetailDTOBase, IHasToLocation +{ + + /// + /// 请求库位 + /// + [Display(Name = "请求库位")] + public string RequestLocationCode { get; set; } + + /// + /// 到库位 + /// + [Display(Name = "到库位")] + public string ToLocationCode { get; set; } + + /// + /// 到库区 + /// + [Display(Name = "到库区")] + public string ToLocationArea { get; set; } + + /// + /// 到库位组 + /// + [Display(Name = "到库位组")] + public string ToLocationGroup { get; set; } + + /// + /// 到ERP库位 + /// + [Display(Name = "到ERP库位")] + public string ToLocationErpCode { get; set; } + + /// + /// 到仓库 + /// + [Display(Name = "到仓库")] + public string ToWarehouseCode { get; set; } + + /// + /// 在途库库位 + /// + [Display(Name = "在途库库位")] + public string OnTheWayLocationCode { get; set; } + + /// + /// 生产线 + /// + [Display(Name = "生产线")] + public string ProdLine { get; set; } + + /// + /// 工作中心 + /// + [Display(Name = "工作中心")] + public string WorkStation { get; set; } + + /// + /// 过期时间 + /// + [Display(Name = "过期时间")] + public DateTime ExpiredTime { get; set; } + + /// + /// 工序 + /// + [Display(Name = "工序")] + public string Operation { get; set; } + + /// + /// 配送方式 + /// + [Display(Name = "配送方式")] + public EnumDistributionType DistributionType { get; set; } + + /// + /// 取整方式 + /// + [Display(Name = "取整方式")] + public EnumTruncType TruncType { get; set; } + + /// + /// 取整后数量 + /// + [Display(Name = "取整后数量")] + public decimal RoundedQty { get; set; } + + /// + /// 计划拆分规则 + /// + [Display(Name = "计划拆分规则")] + public EnumPlannedSplitRule PlannedSplitRule { get; set; } + + /// + /// 计划开始时间 + /// + [Display(Name = "计划开始时间")] + public DateTime PlanBeginTime { get; set; } + + /// + /// 每次配送数量 + /// + [Display(Name = "每次配送数量")] + public decimal DeliveryQty { get; set; } +} diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/IssueJobs/AssembleJobs/IAssembleJobAppService.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/IssueJobs/AssembleJobs/IAssembleJobAppService.cs new file mode 100644 index 000000000..fae62f6c7 --- /dev/null +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/IssueJobs/AssembleJobs/IAssembleJobAppService.cs @@ -0,0 +1,26 @@ +using System.Collections.Generic; +using System.Threading; +using System.Threading.Tasks; +using Volo.Abp.Application.Dtos; + +namespace Win_in.Sfs.Wms.Store.Application.Contracts; + +public interface IAssembleJobAppService + : ISfsJobAppServiceBase +{ + Task> CheckJobExistByItemCodeAndLocationCode(string itemCode, string locationCode); + + Task CancelByMaterialRequestAsync(string assembleNumber); + + Task> GetListByTypeAsync(SfsJobRequestInputBase requestInput, string requestType, + bool includeDetails = false, CancellationToken cancellationToken = default); + + Task> GetByRequestNumberAsync(string requestNumber); + + /// + /// 保存拆箱时涉及的明细修改 + /// + /// + Task SaveDetail_SplitPackingAsync(SplitPacking_UpdateJobDetailInput input); + +} diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/IssueJobs/AssembleJobs/Inputs/AssembleJobCheckInput.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/IssueJobs/AssembleJobs/Inputs/AssembleJobCheckInput.cs new file mode 100644 index 000000000..ef75e7d73 --- /dev/null +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/IssueJobs/AssembleJobs/Inputs/AssembleJobCheckInput.cs @@ -0,0 +1,6 @@ +namespace Win_in.Sfs.Wms.Store.Application.Contracts; + +public class AssembleJobCheckInput : SfsJobCheckInputBase +{ + +} diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/IssueJobs/AssembleJobs/Inputs/AssembleJobDetailInput.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/IssueJobs/AssembleJobs/Inputs/AssembleJobDetailInput.cs new file mode 100644 index 000000000..18b59ae9d --- /dev/null +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/IssueJobs/AssembleJobs/Inputs/AssembleJobDetailInput.cs @@ -0,0 +1,134 @@ +using System; +using System.ComponentModel.DataAnnotations; +using Win_in.Sfs.Shared.Domain; +using Win_in.Sfs.Shared.Domain.Shared; + +namespace Win_in.Sfs.Wms.Store.Application.Contracts; + +public class AssembleJobDetailInput : SfsJobRecommendFromDetailInputBase, IHasToLocation +{ + + /// + /// 请求库位 + /// + [Display(Name = "请求库位")] + [Required(ErrorMessage = "{0}是必填项")] + [StringLength(SfsEfCorePropertyConst.CodeLength, ErrorMessage = "{0}最多输入{1}个字符")] + public string RequestLocationCode { get; set; } + + /// + /// 到库位 + /// + [Display(Name = "到库位")] + [Required(ErrorMessage = "{0}是必填项")] + [StringLength(SfsEfCorePropertyConst.CodeLength, ErrorMessage = "{0}最多输入{1}个字符")] + public string ToLocationCode { get; set; } + + /// + /// 到库区 + /// + [Display(Name = "到库区")] + public string ToLocationArea { get; set; } + + /// + /// 到库位组 + /// + [Display(Name = "到库位组")] + public string ToLocationGroup { get; set; } + + /// + /// 到ERP库位 + /// + [Display(Name = "到ERP库位")] + [Required(ErrorMessage = "{0}是必填项")] + [StringLength(SfsEfCorePropertyConst.CodeLength, ErrorMessage = "{0}最多输入{1}个字符")] + public string ToLocationErpCode { get; set; } + + /// + /// 到仓库 + /// + [Display(Name = "到仓库")] + [Required(ErrorMessage = "{0}是必填项")] + [StringLength(SfsEfCorePropertyConst.CodeLength, ErrorMessage = "{0}最多输入{1}个字符")] + public string ToWarehouseCode { get; set; } + + /// + /// 在途库库位 + /// + [Display(Name = "在途库库位")] + public string OnTheWayLocationCode { get; set; } + + /// + /// 生产线 + /// + [Display(Name = "生产线")] + [StringLength(SfsEfCorePropertyConst.CodeLength, ErrorMessage = "{0}最多输入{1}个字符")] + public string ProdLine { get; set; } + + /// + /// 工作中心 + /// + [Display(Name = "工作中心")] + [StringLength(SfsEfCorePropertyConst.CodeLength, ErrorMessage = "{0}最多输入{1}个字符")] + public string WorkStation { get; set; } + + /// + /// 过期时间 + /// + [Display(Name = "过期时间")] + [Required(ErrorMessage = "{0}是必填项")] + public DateTime ExpiredTime { get; set; } + + /// + /// 工序 + /// + [Display(Name = "工序")] + [StringLength(SfsEfCorePropertyConst.CodeLength, ErrorMessage = "{0}最多输入{1}个字符")] + public string Operation { get; set; } + + /// + /// 配送方式 + /// + [Display(Name = "配送方式")] + public EnumDistributionType DistributionType { get; set; } + + /// + /// 取整方式 + /// + [Display(Name = "取整方式")] + public EnumTruncType TruncType { get; set; } + + /// + /// 取整后数量 + /// + [Display(Name = "取整后数量")] + public decimal RoundedQty { get; set; } + + /// + /// 计划拆分规则 + /// + [Display(Name = "计划拆分规则")] + public EnumPlannedSplitRule PlannedSplitRule { get; set; } + + /// + /// 计划开始时间 + /// + [Display(Name = "计划开始时间")] + public DateTime PlanBeginTime { get; set; } + + /// + /// 每次配送数量 + /// + [Display(Name = "每次配送数量")] + public decimal DeliveryQty { get; set; } + + /// + /// 位置码 + /// + public string PositionCode { get; set; } + + /// + /// 推荐类型 + /// + public EnumRecommendType RecommendType { get; set; } +} diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/IssueJobs/AssembleJobs/Inputs/AssembleJobEditInput.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/IssueJobs/AssembleJobs/Inputs/AssembleJobEditInput.cs new file mode 100644 index 000000000..8e719283c --- /dev/null +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/IssueJobs/AssembleJobs/Inputs/AssembleJobEditInput.cs @@ -0,0 +1,82 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; +using Win_in.Sfs.Shared.Domain; +using Win_in.Sfs.Shared.Domain.Shared; + +namespace Win_in.Sfs.Wms.Store.Application.Contracts; + +public class AssembleJobEditInput : SfsJobCreateUpdateInputBase, ISfsJobCreateInput +{ + #region Create + /// + /// 上游任务编号 + /// + [Display(Name = "上游任务编号")] + [StringLength(SfsEfCorePropertyConst.CodeLength, ErrorMessage = "{0}最多输入{1}个字符")] + public string UpStreamJobNumber { get; set; } + + /// + /// 要货单号 + /// + [Display(Name = "要货单号")] + [Required(ErrorMessage = "{0}是必填项")] + [StringLength(SfsEfCorePropertyConst.CodeLength, ErrorMessage = "{0}最多输入{1}个字符")] + public string AssembleRequestNumber { get; set; } + + /// + /// 叫料请求类型 + /// + [Display(Name = "叫料请求类型")] + [StringLength(SfsEfCorePropertyConst.CodeLength, ErrorMessage = "{0}最多输入{1}个字符")] + public string RequestType { get; set; } + + /// + /// 任务类型 + /// + [Display(Name = "任务类型")] + [Required(ErrorMessage = "{0}是必填项")] + public EnumJobType JobType { get; set; } + + /// + /// 是否自动完成 + /// + [Display(Name = "是否自动完成")] + [Required(ErrorMessage = "{0}是必填项")] + public bool IsAutoComplete { get; set; } + + /// + /// 过期时间 + /// + [Display(Name = "过期时间")] + [Required(ErrorMessage = "{0}是必填项")] + public DateTime ExpiredTime { get; set; } + + /// + /// 任务明细 + /// + [Display(Name = "任务明细")] + [Required(ErrorMessage = "{0}是必填项")] + public List Details { get; set; } = new(); + + /// + /// 车间 + /// + [Display(Name = "车间")] + [StringLength(SfsEfCorePropertyConst.CodeLength, ErrorMessage = "{0}最多输入{1}个字符")] + public string Workshop { get; set; } + + /// + /// 生产线 + /// + [Display(Name = "生产线")] + [StringLength(SfsEfCorePropertyConst.CodeLength, ErrorMessage = "{0}最多输入{1}个字符")] + public string ProdLine { get; set; } + + /// + /// 使用在途库 + /// + [Display(Name = "使用在途库")] + public bool UseOnTheWayLocation { get; set; } + #endregion +} diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/IssueJobs/CoatingIssueJobs/CoatingIssueJobCheckInput.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/IssueJobs/CoatingIssueJobs/CoatingIssueJobCheckInput.cs new file mode 100644 index 000000000..2c5c3dd6d --- /dev/null +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/IssueJobs/CoatingIssueJobs/CoatingIssueJobCheckInput.cs @@ -0,0 +1,8 @@ +using Win_in.Sfs.Wms.Store.Application.Contracts; + +namespace Win_in.Sfs.Wms.Store.Jobs.IssueJobs; + +public class CoatingIssueJobCheckInput : SfsJobCheckInputBase +{ + +} diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/IssueJobs/CoatingIssueJobs/CoatingIssueJobDTO.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/IssueJobs/CoatingIssueJobs/CoatingIssueJobDTO.cs new file mode 100644 index 000000000..2d61113ec --- /dev/null +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/IssueJobs/CoatingIssueJobs/CoatingIssueJobDTO.cs @@ -0,0 +1,47 @@ +using System.ComponentModel.DataAnnotations; +using Win_in.Sfs.Shared.Domain; +using Win_in.Sfs.Wms.Store.Application.Contracts; + +namespace Win_in.Sfs.Wms.Store.Jobs.IssueJobs; + +/// +/// 发料任务 +/// +[Display(Name = "发料任务")] +public class CoatingIssueJobDTO : SfsJobDTOBase +{ + /// + /// 叫料请求类型 + /// + [Display(Name = "叫料请求类型")] + [StringLength(SfsEfCorePropertyConst.CodeLength, ErrorMessage = "{0}最多输入{1}个字符")] + public string RequestType { get; set; } + + /// + /// 生产线 + /// + [Display(Name = "生产线")] + [StringLength(SfsEfCorePropertyConst.CodeLength, ErrorMessage = "{0}最多输入{1}个字符")] + public string ProdLine { get; set; } + + /// + /// 要货单号 + /// + [Display(Name = "要货单号")] + [StringLength(SfsEfCorePropertyConst.CodeLength, ErrorMessage = "{0}最多输入{1}个字符")] + public string MaterialRequestNumber { get; set; } + + /// + /// 车间 + /// + [Display(Name = "车间")] + [StringLength(SfsEfCorePropertyConst.CodeLength, ErrorMessage = "{0}最多输入{1}个字符")] + public string Workshop { get; set; } + + /// + /// 使用在途库 + /// + [Display(Name = "使用在途库")] + public bool UseOnTheWayLocation { get; set; } + +} diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/IssueJobs/CoatingIssueJobs/CoatingIssueJobDetailDTO.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/IssueJobs/CoatingIssueJobs/CoatingIssueJobDetailDTO.cs new file mode 100644 index 000000000..b8baa0cb7 --- /dev/null +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/IssueJobs/CoatingIssueJobs/CoatingIssueJobDetailDTO.cs @@ -0,0 +1,113 @@ +using System; +using System.ComponentModel.DataAnnotations; +using Win_in.Sfs.Shared.Domain; +using Win_in.Sfs.Shared.Domain.Shared; +using Win_in.Sfs.Wms.Store.Application.Contracts; + +namespace Win_in.Sfs.Wms.Store.Jobs.IssueJobs; + +public class CoatingIssueJobDetailDTO : SfsJobRecommendFromDetailDTOBase, IHasToLocation +{ + + /// + /// 请求库位 + /// + [Display(Name = "请求库位")] + public string RequestLocationCode { get; set; } + + /// + /// 到库位 + /// + [Display(Name = "到库位")] + public string ToLocationCode { get; set; } + + /// + /// 到库区 + /// + [Display(Name = "到库区")] + public string ToLocationArea { get; set; } + + /// + /// 到库位组 + /// + [Display(Name = "到库位组")] + public string ToLocationGroup { get; set; } + + /// + /// 到ERP库位 + /// + [Display(Name = "到ERP库位")] + public string ToLocationErpCode { get; set; } + + /// + /// 到仓库 + /// + [Display(Name = "到仓库")] + public string ToWarehouseCode { get; set; } + + /// + /// 在途库库位 + /// + [Display(Name = "在途库库位")] + public string OnTheWayLocationCode { get; set; } + + /// + /// 生产线 + /// + [Display(Name = "生产线")] + public string ProdLine { get; set; } + + /// + /// 工作中心 + /// + [Display(Name = "工作中心")] + public string WorkStation { get; set; } + + /// + /// 过期时间 + /// + [Display(Name = "过期时间")] + public DateTime ExpiredTime { get; set; } + + /// + /// 工序 + /// + [Display(Name = "工序")] + public string Operation { get; set; } + + /// + /// 配送方式 + /// + [Display(Name = "配送方式")] + public EnumDistributionType DistributionType { get; set; } + + /// + /// 取整方式 + /// + [Display(Name = "取整方式")] + public EnumTruncType TruncType { get; set; } + + /// + /// 取整后数量 + /// + [Display(Name = "取整后数量")] + public decimal RoundedQty { get; set; } + + /// + /// 计划拆分规则 + /// + [Display(Name = "计划拆分规则")] + public EnumPlannedSplitRule PlannedSplitRule { get; set; } + + /// + /// 计划开始时间 + /// + [Display(Name = "计划开始时间")] + public DateTime PlanBeginTime { get; set; } + + /// + /// 每次配送数量 + /// + [Display(Name = "每次配送数量")] + public decimal DeliveryQty { get; set; } +} diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/IssueJobs/CoatingIssueJobs/CoatingIssueJobDetailInput.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/IssueJobs/CoatingIssueJobs/CoatingIssueJobDetailInput.cs new file mode 100644 index 000000000..5d0339639 --- /dev/null +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/IssueJobs/CoatingIssueJobs/CoatingIssueJobDetailInput.cs @@ -0,0 +1,135 @@ +using System; +using System.ComponentModel.DataAnnotations; +using Win_in.Sfs.Shared.Domain; +using Win_in.Sfs.Shared.Domain.Shared; +using Win_in.Sfs.Wms.Store.Application.Contracts; + +namespace Win_in.Sfs.Wms.Store.Jobs.IssueJobs; + +public class CoatingIssueJobDetailInput : SfsJobRecommendFromDetailInputBase, IHasToLocation +{ + + /// + /// 请求库位 + /// + [Display(Name = "请求库位")] + [Required(ErrorMessage = "{0}是必填项")] + [StringLength(SfsEfCorePropertyConst.CodeLength, ErrorMessage = "{0}最多输入{1}个字符")] + public string RequestLocationCode { get; set; } + + /// + /// 到库位 + /// + [Display(Name = "到库位")] + [Required(ErrorMessage = "{0}是必填项")] + [StringLength(SfsEfCorePropertyConst.CodeLength, ErrorMessage = "{0}最多输入{1}个字符")] + public string ToLocationCode { get; set; } + + /// + /// 到库区 + /// + [Display(Name = "到库区")] + public string ToLocationArea { get; set; } + + /// + /// 到库位组 + /// + [Display(Name = "到库位组")] + public string ToLocationGroup { get; set; } + + /// + /// 到ERP库位 + /// + [Display(Name = "到ERP库位")] + [Required(ErrorMessage = "{0}是必填项")] + [StringLength(SfsEfCorePropertyConst.CodeLength, ErrorMessage = "{0}最多输入{1}个字符")] + public string ToLocationErpCode { get; set; } + + /// + /// 到仓库 + /// + [Display(Name = "到仓库")] + [Required(ErrorMessage = "{0}是必填项")] + [StringLength(SfsEfCorePropertyConst.CodeLength, ErrorMessage = "{0}最多输入{1}个字符")] + public string ToWarehouseCode { get; set; } + + /// + /// 在途库库位 + /// + [Display(Name = "在途库库位")] + public string OnTheWayLocationCode { get; set; } + + /// + /// 生产线 + /// + [Display(Name = "生产线")] + [StringLength(SfsEfCorePropertyConst.CodeLength, ErrorMessage = "{0}最多输入{1}个字符")] + public string ProdLine { get; set; } + + /// + /// 工作中心 + /// + [Display(Name = "工作中心")] + [StringLength(SfsEfCorePropertyConst.CodeLength, ErrorMessage = "{0}最多输入{1}个字符")] + public string WorkStation { get; set; } + + /// + /// 过期时间 + /// + [Display(Name = "过期时间")] + [Required(ErrorMessage = "{0}是必填项")] + public DateTime ExpiredTime { get; set; } + + /// + /// 工序 + /// + [Display(Name = "工序")] + [StringLength(SfsEfCorePropertyConst.CodeLength, ErrorMessage = "{0}最多输入{1}个字符")] + public string Operation { get; set; } + + /// + /// 配送方式 + /// + [Display(Name = "配送方式")] + public EnumDistributionType DistributionType { get; set; } + + /// + /// 取整方式 + /// + [Display(Name = "取整方式")] + public EnumTruncType TruncType { get; set; } + + /// + /// 取整后数量 + /// + [Display(Name = "取整后数量")] + public decimal RoundedQty { get; set; } + + /// + /// 计划拆分规则 + /// + [Display(Name = "计划拆分规则")] + public EnumPlannedSplitRule PlannedSplitRule { get; set; } + + /// + /// 计划开始时间 + /// + [Display(Name = "计划开始时间")] + public DateTime PlanBeginTime { get; set; } + + /// + /// 每次配送数量 + /// + [Display(Name = "每次配送数量")] + public decimal DeliveryQty { get; set; } + + /// + /// 位置码 + /// + public string PositionCode { get; set; } + + /// + /// 推荐类型 + /// + public EnumRecommendType RecommendType { get; set; } +} diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/IssueJobs/CoatingIssueJobs/CoatingIssueJobEditInput.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/IssueJobs/CoatingIssueJobs/CoatingIssueJobEditInput.cs new file mode 100644 index 000000000..d1975b46e --- /dev/null +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/IssueJobs/CoatingIssueJobs/CoatingIssueJobEditInput.cs @@ -0,0 +1,83 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; +using Win_in.Sfs.Shared.Domain; +using Win_in.Sfs.Shared.Domain.Shared; +using Win_in.Sfs.Wms.Store.Application.Contracts; + +namespace Win_in.Sfs.Wms.Store.Jobs.IssueJobs; + +public class CoatingIssueJobEditInput : SfsJobCreateUpdateInputBase, ISfsJobCreateInput +{ + #region Create + /// + /// 上游任务编号 + /// + [Display(Name = "上游任务编号")] + [StringLength(SfsEfCorePropertyConst.CodeLength, ErrorMessage = "{0}最多输入{1}个字符")] + public string UpStreamJobNumber { get; set; } + + /// + /// 要货单号 + /// + [Display(Name = "要货单号")] + [Required(ErrorMessage = "{0}是必填项")] + [StringLength(SfsEfCorePropertyConst.CodeLength, ErrorMessage = "{0}最多输入{1}个字符")] + public string MaterialRequestNumber { get; set; } + + /// + /// 叫料请求类型 + /// + [Display(Name = "叫料请求类型")] + [StringLength(SfsEfCorePropertyConst.CodeLength, ErrorMessage = "{0}最多输入{1}个字符")] + public string RequestType { get; set; } + + /// + /// 任务类型 + /// + [Display(Name = "任务类型")] + [Required(ErrorMessage = "{0}是必填项")] + public EnumJobType JobType { get; set; } + + /// + /// 是否自动完成 + /// + [Display(Name = "是否自动完成")] + [Required(ErrorMessage = "{0}是必填项")] + public bool IsAutoComplete { get; set; } + + /// + /// 过期时间 + /// + [Display(Name = "过期时间")] + [Required(ErrorMessage = "{0}是必填项")] + public DateTime ExpiredTime { get; set; } + + /// + /// 任务明细 + /// + [Display(Name = "任务明细")] + [Required(ErrorMessage = "{0}是必填项")] + public List Details { get; set; } = new(); + + /// + /// 车间 + /// + [Display(Name = "车间")] + [StringLength(SfsEfCorePropertyConst.CodeLength, ErrorMessage = "{0}最多输入{1}个字符")] + public string Workshop { get; set; } + + /// + /// 生产线 + /// + [Display(Name = "生产线")] + [StringLength(SfsEfCorePropertyConst.CodeLength, ErrorMessage = "{0}最多输入{1}个字符")] + public string ProdLine { get; set; } + + /// + /// 使用在途库 + /// + [Display(Name = "使用在途库")] + public bool UseOnTheWayLocation { get; set; } + #endregion +} diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/IssueJobs/CoatingIssueJobs/CoatingIssueJobPermissions.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/IssueJobs/CoatingIssueJobs/CoatingIssueJobPermissions.cs new file mode 100644 index 000000000..7ab1d8458 --- /dev/null +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/IssueJobs/CoatingIssueJobs/CoatingIssueJobPermissions.cs @@ -0,0 +1,28 @@ +using Volo.Abp.Authorization.Permissions; +using Win_in.Sfs.Wms.Store.Application.Contracts; +using Win_in.Sfs.Wms.Store.Domain; + +namespace Win_in.Sfs.Wms.Store.Jobs.IssueJobs; + +public static class CoatingIssueJobPermissions +{ + + public const string Default = StorePermissions.GroupName + "." + nameof(IssueJob); + public const string Create = Default + "." + StorePermissions.CreateStr; + public const string Update = Default + "." + StorePermissions.UpdateStr; + public const string Delete = Default + "." + StorePermissions.DeleteStr; + + //自动发料任务 + public const string AutoIssueJob = StorePermissions.GroupName + "." + nameof(AutoIssueJob); + + public static void AddCoatingIssueJobPermission(this PermissionGroupDefinition permissionGroup) + { + var IssueJobPermission = permissionGroup.AddPermission(Default, StorePermissionDefinitionProvider.L(nameof(IssueJob))); + IssueJobPermission.AddChild(Create, StorePermissionDefinitionProvider.L(StorePermissions.CreateStr)); + IssueJobPermission.AddChild(Update, StorePermissionDefinitionProvider.L(StorePermissions.UpdateStr)); + IssueJobPermission.AddChild(Delete, StorePermissionDefinitionProvider.L(StorePermissions.DeleteStr)); + + permissionGroup.AddPermission(AutoIssueJob, StorePermissionDefinitionProvider.L(nameof(AutoIssueJob))); + + } +} diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/IssueJobs/CoatingIssueJobs/ICoatingIssueJobAppService.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/IssueJobs/CoatingIssueJobs/ICoatingIssueJobAppService.cs new file mode 100644 index 000000000..d989cb12e --- /dev/null +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/IssueJobs/CoatingIssueJobs/ICoatingIssueJobAppService.cs @@ -0,0 +1,27 @@ +using System.Collections.Generic; +using System.Threading; +using System.Threading.Tasks; +using Volo.Abp.Application.Dtos; +using Win_in.Sfs.Wms.Store.Application.Contracts; + +namespace Win_in.Sfs.Wms.Store.Jobs.IssueJobs; + +public interface ICoatingIssueJobAppService + : ISfsJobAppServiceBase +{ + Task> CheckJobExistByItemCodeAndLocationCode(string itemCode, string locationCode); + + Task CancelByMaterialRequestAsync(string materialNumber); + + Task> GetListByTypeAsync(SfsJobRequestInputBase requestInput, string requestType, + bool includeDetails = false, CancellationToken cancellationToken = default); + + Task> GetByRequestNumberAsync(string requestNumber); + + /// + /// 保存拆箱时涉及的明细修改 + /// + /// + Task SaveDetail_SplitPackingAsync(SplitPacking_UpdateJobDetailInput input); + +} diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/IssueJobs/InjectionJobs/DTOs/InjectionJobDTO.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/IssueJobs/InjectionJobs/DTOs/InjectionJobDTO.cs new file mode 100644 index 000000000..bde149b68 --- /dev/null +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/IssueJobs/InjectionJobs/DTOs/InjectionJobDTO.cs @@ -0,0 +1,46 @@ +using System.ComponentModel.DataAnnotations; +using Win_in.Sfs.Shared.Domain; + +namespace Win_in.Sfs.Wms.Store.Application.Contracts; + +/// +/// 注塑发料任务 +/// +[Display(Name = "注塑发料任务")] +public class InjectionJobDTO : SfsJobDTOBase +{ + /// + /// 叫料请求类型 + /// + [Display(Name = "叫料请求类型")] + [StringLength(SfsEfCorePropertyConst.CodeLength, ErrorMessage = "{0}最多输入{1}个字符")] + public string RequestType { get; set; } + + /// + /// 生产线 + /// + [Display(Name = "生产线")] + [StringLength(SfsEfCorePropertyConst.CodeLength, ErrorMessage = "{0}最多输入{1}个字符")] + public string ProdLine { get; set; } + + /// + /// 要货单号 + /// + [Display(Name = "要货单号")] + [StringLength(SfsEfCorePropertyConst.CodeLength, ErrorMessage = "{0}最多输入{1}个字符")] + public string InjectionRequestNumber { get; set; } + + /// + /// 车间 + /// + //[Display(Name = "车间")] + //[StringLength(SfsEfCorePropertyConst.CodeLength, ErrorMessage = "{0}最多输入{1}个字符")] + //public string Workshop { get; set; } + + /// + /// 使用在途库 + /// + [Display(Name = "使用在途库")] + public bool UseOnTheWayLocation { get; set; } + +} diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/IssueJobs/InjectionJobs/DTOs/InjectionJobDetailDTO.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/IssueJobs/InjectionJobs/DTOs/InjectionJobDetailDTO.cs new file mode 100644 index 000000000..363521370 --- /dev/null +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/IssueJobs/InjectionJobs/DTOs/InjectionJobDetailDTO.cs @@ -0,0 +1,112 @@ +using System; +using System.ComponentModel.DataAnnotations; +using Win_in.Sfs.Shared.Domain; +using Win_in.Sfs.Shared.Domain.Shared; + +namespace Win_in.Sfs.Wms.Store.Application.Contracts; + +public class InjectionJobDetailDTO : SfsJobRecommendFromDetailDTOBase, IHasToLocation +{ + + /// + /// 请求库位 + /// + [Display(Name = "请求库位")] + public string RequestLocationCode { get; set; } + + /// + /// 到库位 + /// + [Display(Name = "到库位")] + public string ToLocationCode { get; set; } + + /// + /// 到库区 + /// + [Display(Name = "到库区")] + public string ToLocationArea { get; set; } + + /// + /// 到库位组 + /// + [Display(Name = "到库位组")] + public string ToLocationGroup { get; set; } + + /// + /// 到ERP库位 + /// + [Display(Name = "到ERP库位")] + public string ToLocationErpCode { get; set; } + + /// + /// 到仓库 + /// + [Display(Name = "到仓库")] + public string ToWarehouseCode { get; set; } + + /// + /// 在途库库位 + /// + [Display(Name = "在途库库位")] + public string OnTheWayLocationCode { get; set; } + + /// + /// 生产线 + /// + [Display(Name = "生产线")] + public string ProdLine { get; set; } + + /// + /// 工作中心 + /// + [Display(Name = "工作中心")] + public string WorkStation { get; set; } + + /// + /// 过期时间 + /// + [Display(Name = "过期时间")] + public DateTime ExpiredTime { get; set; } + + /// + /// 工序 + /// + [Display(Name = "工序")] + public string Operation { get; set; } + + /// + /// 配送方式 + /// + [Display(Name = "配送方式")] + public EnumDistributionType DistributionType { get; set; } + + /// + /// 取整方式 + /// + [Display(Name = "取整方式")] + public EnumTruncType TruncType { get; set; } + + /// + /// 取整后数量 + /// + [Display(Name = "取整后数量")] + public decimal RoundedQty { get; set; } + + /// + /// 计划拆分规则 + /// + [Display(Name = "计划拆分规则")] + public EnumPlannedSplitRule PlannedSplitRule { get; set; } + + /// + /// 计划开始时间 + /// + [Display(Name = "计划开始时间")] + public DateTime PlanBeginTime { get; set; } + + /// + /// 每次配送数量 + /// + [Display(Name = "每次配送数量")] + public decimal DeliveryQty { get; set; } +} diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/IssueJobs/InjectionJobs/IInjectionJobAppService.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/IssueJobs/InjectionJobs/IInjectionJobAppService.cs new file mode 100644 index 000000000..a238cf57b --- /dev/null +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/IssueJobs/InjectionJobs/IInjectionJobAppService.cs @@ -0,0 +1,26 @@ +using System.Collections.Generic; +using System.Threading; +using System.Threading.Tasks; +using Volo.Abp.Application.Dtos; + +namespace Win_in.Sfs.Wms.Store.Application.Contracts; + +public interface IInjectionJobAppService + : ISfsJobAppServiceBase +{ + Task> CheckJobExistByItemCodeAndLocationCode(string itemCode, string locationCode); + + Task CancelByMaterialRequestAsync(string injectionNumber); + + Task> GetListByTypeAsync(SfsJobRequestInputBase requestInput, string requestType, + bool includeDetails = false, CancellationToken cancellationToken = default); + + Task> GetByRequestNumberAsync(string requestNumber); + + /// + /// 保存拆箱时涉及的明细修改 + /// + /// + Task SaveDetail_SplitPackingAsync(SplitPacking_UpdateJobDetailInput input); + +} diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/IssueJobs/InjectionJobs/InjectionJobPermissions.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/IssueJobs/InjectionJobs/InjectionJobPermissions.cs new file mode 100644 index 000000000..31b455675 --- /dev/null +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/IssueJobs/InjectionJobs/InjectionJobPermissions.cs @@ -0,0 +1,27 @@ +using Volo.Abp.Authorization.Permissions; +using Win_in.Sfs.Wms.Store.Domain; + +namespace Win_in.Sfs.Wms.Store.Application.Contracts; + +public static class InjectionJobPermissions +{ + + public const string Default = StorePermissions.GroupName + "." + nameof(InjectionJob); + public const string Create = Default + "." + StorePermissions.CreateStr; + public const string Update = Default + "." + StorePermissions.UpdateStr; + public const string Delete = Default + "." + StorePermissions.DeleteStr; + + //自动发料任务 + public const string AutoInjectionJob = StorePermissions.GroupName + "." + nameof(AutoInjectionJob); + + public static void AddInjectionJobPermission(this PermissionGroupDefinition permissionGroup) + { + var InjectionJobPermission = permissionGroup.AddPermission(Default, StorePermissionDefinitionProvider.L(nameof(InjectionJob))); + InjectionJobPermission.AddChild(Create, StorePermissionDefinitionProvider.L(StorePermissions.CreateStr)); + InjectionJobPermission.AddChild(Update, StorePermissionDefinitionProvider.L(StorePermissions.UpdateStr)); + InjectionJobPermission.AddChild(Delete, StorePermissionDefinitionProvider.L(StorePermissions.DeleteStr)); + + permissionGroup.AddPermission(AutoInjectionJob, StorePermissionDefinitionProvider.L(nameof(AutoInjectionJob))); + + } +} diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/IssueJobs/InjectionJobs/Inputs/InjectionJobCheckInput.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/IssueJobs/InjectionJobs/Inputs/InjectionJobCheckInput.cs new file mode 100644 index 000000000..45aff0d7e --- /dev/null +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/IssueJobs/InjectionJobs/Inputs/InjectionJobCheckInput.cs @@ -0,0 +1,6 @@ +namespace Win_in.Sfs.Wms.Store.Application.Contracts; + +public class InjectionJobCheckInput : SfsJobCheckInputBase +{ + +} diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/IssueJobs/InjectionJobs/Inputs/InjectionJobDetailInput.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/IssueJobs/InjectionJobs/Inputs/InjectionJobDetailInput.cs new file mode 100644 index 000000000..38890b9a9 --- /dev/null +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/IssueJobs/InjectionJobs/Inputs/InjectionJobDetailInput.cs @@ -0,0 +1,134 @@ +using System; +using System.ComponentModel.DataAnnotations; +using Win_in.Sfs.Shared.Domain; +using Win_in.Sfs.Shared.Domain.Shared; + +namespace Win_in.Sfs.Wms.Store.Application.Contracts; + +public class InjectionJobDetailInput : SfsJobRecommendFromDetailInputBase, IHasToLocation +{ + + /// + /// 请求库位 + /// + [Display(Name = "请求库位")] + [Required(ErrorMessage = "{0}是必填项")] + [StringLength(SfsEfCorePropertyConst.CodeLength, ErrorMessage = "{0}最多输入{1}个字符")] + public string RequestLocationCode { get; set; } + + /// + /// 到库位 + /// + [Display(Name = "到库位")] + [Required(ErrorMessage = "{0}是必填项")] + [StringLength(SfsEfCorePropertyConst.CodeLength, ErrorMessage = "{0}最多输入{1}个字符")] + public string ToLocationCode { get; set; } + + /// + /// 到库区 + /// + [Display(Name = "到库区")] + public string ToLocationArea { get; set; } + + /// + /// 到库位组 + /// + [Display(Name = "到库位组")] + public string ToLocationGroup { get; set; } + + /// + /// 到ERP库位 + /// + [Display(Name = "到ERP库位")] + [Required(ErrorMessage = "{0}是必填项")] + [StringLength(SfsEfCorePropertyConst.CodeLength, ErrorMessage = "{0}最多输入{1}个字符")] + public string ToLocationErpCode { get; set; } + + /// + /// 到仓库 + /// + [Display(Name = "到仓库")] + [Required(ErrorMessage = "{0}是必填项")] + [StringLength(SfsEfCorePropertyConst.CodeLength, ErrorMessage = "{0}最多输入{1}个字符")] + public string ToWarehouseCode { get; set; } + + /// + /// 在途库库位 + /// + [Display(Name = "在途库库位")] + public string OnTheWayLocationCode { get; set; } + + /// + /// 生产线 + /// + [Display(Name = "生产线")] + [StringLength(SfsEfCorePropertyConst.CodeLength, ErrorMessage = "{0}最多输入{1}个字符")] + public string ProdLine { get; set; } + + /// + /// 工作中心 + /// + [Display(Name = "工作中心")] + [StringLength(SfsEfCorePropertyConst.CodeLength, ErrorMessage = "{0}最多输入{1}个字符")] + public string WorkStation { get; set; } + + /// + /// 过期时间 + /// + [Display(Name = "过期时间")] + [Required(ErrorMessage = "{0}是必填项")] + public DateTime ExpiredTime { get; set; } + + /// + /// 工序 + /// + [Display(Name = "工序")] + [StringLength(SfsEfCorePropertyConst.CodeLength, ErrorMessage = "{0}最多输入{1}个字符")] + public string Operation { get; set; } + + /// + /// 配送方式 + /// + [Display(Name = "配送方式")] + public EnumDistributionType DistributionType { get; set; } + + /// + /// 取整方式 + /// + [Display(Name = "取整方式")] + public EnumTruncType TruncType { get; set; } + + /// + /// 取整后数量 + /// + [Display(Name = "取整后数量")] + public decimal RoundedQty { get; set; } + + /// + /// 计划拆分规则 + /// + [Display(Name = "计划拆分规则")] + public EnumPlannedSplitRule PlannedSplitRule { get; set; } + + /// + /// 计划开始时间 + /// + [Display(Name = "计划开始时间")] + public DateTime PlanBeginTime { get; set; } + + /// + /// 每次配送数量 + /// + [Display(Name = "每次配送数量")] + public decimal DeliveryQty { get; set; } + + /// + /// 位置码 + /// + public string PositionCode { get; set; } + + /// + /// 推荐类型 + /// + public EnumRecommendType RecommendType { get; set; } +} diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/IssueJobs/InjectionJobs/Inputs/InjectionJobEditInput.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/IssueJobs/InjectionJobs/Inputs/InjectionJobEditInput.cs new file mode 100644 index 000000000..16d83428c --- /dev/null +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/IssueJobs/InjectionJobs/Inputs/InjectionJobEditInput.cs @@ -0,0 +1,82 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; +using Win_in.Sfs.Shared.Domain; +using Win_in.Sfs.Shared.Domain.Shared; + +namespace Win_in.Sfs.Wms.Store.Application.Contracts; + +public class InjectionJobEditInput : SfsJobCreateUpdateInputBase, ISfsJobCreateInput +{ + #region Create + /// + /// 上游任务编号 + /// + [Display(Name = "上游任务编号")] + [StringLength(SfsEfCorePropertyConst.CodeLength, ErrorMessage = "{0}最多输入{1}个字符")] + public string UpStreamJobNumber { get; set; } + + /// + /// 要货单号 + /// + [Display(Name = "要货单号")] + [Required(ErrorMessage = "{0}是必填项")] + [StringLength(SfsEfCorePropertyConst.CodeLength, ErrorMessage = "{0}最多输入{1}个字符")] + public string InjectionRequestNumber { get; set; } + + /// + /// 叫料请求类型 + /// + [Display(Name = "叫料请求类型")] + [StringLength(SfsEfCorePropertyConst.CodeLength, ErrorMessage = "{0}最多输入{1}个字符")] + public string RequestType { get; set; } + + /// + /// 任务类型 + /// + [Display(Name = "任务类型")] + [Required(ErrorMessage = "{0}是必填项")] + public EnumJobType JobType { get; set; } + + /// + /// 是否自动完成 + /// + [Display(Name = "是否自动完成")] + [Required(ErrorMessage = "{0}是必填项")] + public bool IsAutoComplete { get; set; } + + /// + /// 过期时间 + /// + [Display(Name = "过期时间")] + [Required(ErrorMessage = "{0}是必填项")] + public DateTime ExpiredTime { get; set; } + + /// + /// 任务明细 + /// + [Display(Name = "任务明细")] + [Required(ErrorMessage = "{0}是必填项")] + public List Details { get; set; } = new(); + + /// + /// 车间 + /// + //[Display(Name = "车间")] + //[StringLength(SfsEfCorePropertyConst.CodeLength, ErrorMessage = "{0}最多输入{1}个字符")] + //public string Workshop { get; set; } + + /// + /// 生产线 + /// + [Display(Name = "生产线")] + [StringLength(SfsEfCorePropertyConst.CodeLength, ErrorMessage = "{0}最多输入{1}个字符")] + public string ProdLine { get; set; } + + /// + /// 使用在途库 + /// + [Display(Name = "使用在途库")] + public bool UseOnTheWayLocation { get; set; } + #endregion +} diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/TransferLibJobs/DTOs/TransferLibJobDTO.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/TransferLibJobs/DTOs/TransferLibJobDTO.cs new file mode 100644 index 000000000..4f7c46397 --- /dev/null +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/TransferLibJobs/DTOs/TransferLibJobDTO.cs @@ -0,0 +1,50 @@ +using System; +using System.ComponentModel.DataAnnotations; +using Win_in.Sfs.Shared.Domain; +using Win_in.Sfs.Shared.Domain.Shared.Enums.Store; + +namespace Win_in.Sfs.Wms.Store.Application.Contracts; + +/// +/// 非生产领料任务 +/// +[Display(Name = "非生产领料任务")] +public class TransferLibJobDTO : SfsJobDTOBase, IHasNumber +{ + /// + /// 调拨申请单号 + /// + [Display(Name = "调拨申请单号")] + public string RequestNumber { get; set; } + + /// + /// 任务ID + /// + [Display(Name = "任务ID")] + public string JobNumber { get; set; } + + /// + /// 调拨类型 + /// + [Display(Name = "调拨类型")] + public string Type { get; set; } + + /// + /// 使用中间库 + /// + [Display(Name = "使用中间库")] + public bool UseOnTheWayLocation { get; set; } + + /// + /// 已确认 + /// + [Display(Name = "已确认")] + public bool Confirmed { get; set; } + + /// + /// 确认时间 + /// + [Display(Name = "确认时间")] + public DateTime? ConfirmTime { get; set; } + +} diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/TransferLibJobs/DTOs/TransferLibJobDetailDTO.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/TransferLibJobs/DTOs/TransferLibJobDetailDTO.cs new file mode 100644 index 000000000..140bc8f91 --- /dev/null +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/TransferLibJobs/DTOs/TransferLibJobDetailDTO.cs @@ -0,0 +1,25 @@ +using System.ComponentModel.DataAnnotations; +using Win_in.Sfs.Shared.Domain.Shared; +using Win_in.Sfs.Shared.Domain.Shared.Enums.Store; + +namespace Win_in.Sfs.Wms.Store.Application.Contracts; + +public class TransferLibJobDetailDTO : SfsStoreDetailWithFromToDTOBase +{ + /// + /// 在途库地址 + /// + [Display(Name = "在途库地址")] + public string OnTheWayLocationCode { get; set; } + /// + /// 原因 + /// + [Display(Name = "原因")] + public string Reason { get; set; } + + /// + /// 执行任务状态 + /// + public EnumJobStatus JobStatus { get; set; } + +} diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/TransferLibJobs/ITransferLibJobAppService.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/TransferLibJobs/ITransferLibJobAppService.cs new file mode 100644 index 000000000..d98931e79 --- /dev/null +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/TransferLibJobs/ITransferLibJobAppService.cs @@ -0,0 +1,7 @@ +namespace Win_in.Sfs.Wms.Store.Application.Contracts; + +public interface ITransferLibJobAppService + : ISfsJobAppServiceBase +{ + +} diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/TransferLibJobs/Inputs/TransferLibJobCheckInput.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/TransferLibJobs/Inputs/TransferLibJobCheckInput.cs new file mode 100644 index 000000000..6b606f80a --- /dev/null +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/TransferLibJobs/Inputs/TransferLibJobCheckInput.cs @@ -0,0 +1,6 @@ +namespace Win_in.Sfs.Wms.Store.Application.Contracts; + +public class TransferLibJobCheckInput : SfsJobCheckInputBase +{ + +} diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/TransferLibJobs/Inputs/TransferLibJobDetailInput.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/TransferLibJobs/Inputs/TransferLibJobDetailInput.cs new file mode 100644 index 000000000..c7fc99f54 --- /dev/null +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/TransferLibJobs/Inputs/TransferLibJobDetailInput.cs @@ -0,0 +1,29 @@ +using System.ComponentModel.DataAnnotations; +using Volo.Abp.Data; +using Win_in.Sfs.Shared.Domain; +using Win_in.Sfs.Shared.Domain.Shared; +using Win_in.Sfs.Shared.Domain.Shared.Enums.Store; + +namespace Win_in.Sfs.Wms.Store.Application.Contracts; + +public class TransferLibJobDetailInput : SfsStoreDetailWithFromToInputBase +{ + /// + /// 在途库地址 + /// + [Display(Name = "在途库地址")] + public string OnTheWayLocationCode { get; set; } + + /// + /// 原因 + /// + [Display(Name = "原因")] + [StringLength(SfsEfCorePropertyConst.RemarkLength, ErrorMessage = "{0}最多输入{1}个字符")] + public string Reason { get; set; } + + /// + /// 执行任务状态 + /// + public EnumJobStatus JobStatus { get; set; } + +} diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/TransferLibJobs/Inputs/TransferLibJobEditInput.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/TransferLibJobs/Inputs/TransferLibJobEditInput.cs new file mode 100644 index 000000000..bcd2cc091 --- /dev/null +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/TransferLibJobs/Inputs/TransferLibJobEditInput.cs @@ -0,0 +1,62 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; +using Win_in.Sfs.Shared.Domain; +using Win_in.Sfs.Shared.Domain.Shared; +using Win_in.Sfs.Shared.Domain.Shared.Enums.Store; + +namespace Win_in.Sfs.Wms.Store.Application.Contracts; + +public class TransferLibJobEditInput : SfsJobCreateUpdateInputBase, ISfsJobCreateInput +{ + #region Base + /// + /// 已确认 + /// + [Display(Name = "已确认")] + public bool Confirmed { get; set; } + #endregion + + #region Update + /// + /// 确认时间 + /// + [Display(Name = "确认时间")] + public DateTime? ConfirmTime { get; set; } + #endregion + + /// + /// 调拨申请单号 + /// + [Display(Name = "调拨申请单号")] + public string RequestNumber { get; set; } + + /// + /// 任务ID + /// + [Display(Name = "任务ID")] + public string JobNumber { get; set; } + + /// + /// 调拨类型 + /// + [Display(Name = "调拨类型")] + public string Type { get; set; } + + /// + /// 使用中间库 + /// + [Display(Name = "使用中间库")] + public bool UseOnTheWayLocation { get; set; } + + + /// + /// 任务明细 + /// + [Display(Name = "任务明细")] + [Required(ErrorMessage = "{0}是必填项")] + public List Details { get; set; } + public string UpStreamJobNumber { get; set; } + public EnumJobType JobType { get; set; } + public bool IsAutoComplete { get; set; } +} diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/TransferLibJobs/TransferLibJobPermissions.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/TransferLibJobs/TransferLibJobPermissions.cs new file mode 100644 index 000000000..de3768e3e --- /dev/null +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/TransferLibJobs/TransferLibJobPermissions.cs @@ -0,0 +1,21 @@ +using Volo.Abp.Authorization.Permissions; +using Win_in.Sfs.Wms.Store.Domain; + +namespace Win_in.Sfs.Wms.Store.Application.Contracts; + +public static class TransferLibJobPermissions +{ + + public const string Default = StorePermissions.GroupName + "." + nameof(TransferLibJob); + public const string Create = Default + "." + StorePermissions.CreateStr; + public const string Update = Default + "." + StorePermissions.UpdateStr; + public const string Delete = Default + "." + StorePermissions.DeleteStr; + + public static void AddTransferLibJobPermission(this PermissionGroupDefinition permissionGroup) + { + var IssueJobPermission = permissionGroup.AddPermission(Default, StorePermissionDefinitionProvider.L(nameof(TransferLibJob))); + IssueJobPermission.AddChild(Create, StorePermissionDefinitionProvider.L(StorePermissions.CreateStr)); + IssueJobPermission.AddChild(Update, StorePermissionDefinitionProvider.L(StorePermissions.UpdateStr)); + IssueJobPermission.AddChild(Delete, StorePermissionDefinitionProvider.L(StorePermissions.DeleteStr)); + } +} diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/IssueNotes/AssembleNotes/AssembleNotePermissions.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/IssueNotes/AssembleNotes/AssembleNotePermissions.cs new file mode 100644 index 000000000..1b05f191c --- /dev/null +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/IssueNotes/AssembleNotes/AssembleNotePermissions.cs @@ -0,0 +1,30 @@ +using Volo.Abp.Authorization.Permissions; +using Win_in.Sfs.Wms.Store.Domain; + +namespace Win_in.Sfs.Wms.Store.Application.Contracts; + +public static class AssembleNotePermissions +{ + + public const string Default = StorePermissions.GroupName + "." + nameof(AssembleNote); + public const string Create = Default + "." + StorePermissions.CreateStr; + public const string Update = Default + "." + StorePermissions.UpdateStr; + public const string Delete = Default + "." + StorePermissions.DeleteStr; + + //自动发料记录 + public const string AutoAssembleNote = StorePermissions.GroupName + "." + nameof(AutoAssembleNote); + + //直接发料 + public const string DirectAssembleNote = StorePermissions.GroupName + "." + nameof(DirectAssembleNote); + + public static void AddAssembleNotePermission(this PermissionGroupDefinition permissionGroup) + { + var AssembleNotePermission = permissionGroup.AddPermission(Default, StorePermissionDefinitionProvider.L(nameof(AssembleNote))); + AssembleNotePermission.AddChild(Create, StorePermissionDefinitionProvider.L(StorePermissions.CreateStr)); + AssembleNotePermission.AddChild(Update, StorePermissionDefinitionProvider.L(StorePermissions.UpdateStr)); + AssembleNotePermission.AddChild(Delete, StorePermissionDefinitionProvider.L(StorePermissions.DeleteStr)); + + permissionGroup.AddPermission(AutoAssembleNote, StorePermissionDefinitionProvider.L(nameof(AutoAssembleNote))); + permissionGroup.AddPermission(DirectAssembleNote, StorePermissionDefinitionProvider.L(nameof(DirectAssembleNote))); + } +} diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/IssueNotes/AssembleNotes/DTOs/AssembleNoteDTO.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/IssueNotes/AssembleNotes/DTOs/AssembleNoteDTO.cs new file mode 100644 index 000000000..6db88f8bb --- /dev/null +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/IssueNotes/AssembleNotes/DTOs/AssembleNoteDTO.cs @@ -0,0 +1,54 @@ +using System; +using System.ComponentModel.DataAnnotations; +using Win_in.Sfs.Shared.Domain; + +namespace Win_in.Sfs.Wms.Store.Application.Contracts; + +public class AssembleNoteDTO : SfsStoreDTOBase, IHasJobNumber, IHasRequestNumber +{ + + /// + /// 任务ID + /// + [Display(Name = "任务ID")] + public string JobNumber { get; set; } + + /// + /// 车间 + /// + [Display(Name = "车间")] + [StringLength(SfsEfCorePropertyConst.CodeLength, ErrorMessage = "{0}最多输入{1}个字符")] + public string Workshop { get; set; } + + /// + /// 请求代码 + /// + [Display(Name = "请求代码")] + public string RequestNumber { get; set; } + + /// + /// 叫料请求类型 + /// + [Display(Name = "叫料请求类型")] + [StringLength(SfsEfCorePropertyConst.CodeLength, ErrorMessage = "{0}最多输入{1}个字符")] + public string RequestType { get; set; } + + /// + /// 使用在途库 + /// + [Display(Name = "使用在途库")] + public bool UseOnTheWayLocation { get; set; } + + /// + /// 已确认 + /// + [Display(Name = "已确认")] + public bool Confirmed { get; set; } + + /// + /// 确认时间 + /// + [Display(Name = "确认时间")] + public DateTime? ConfirmTime { get; set; } + +} diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/IssueNotes/AssembleNotes/DTOs/AssembleNoteDetailDTO.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/IssueNotes/AssembleNotes/DTOs/AssembleNoteDetailDTO.cs new file mode 100644 index 000000000..cefbe75a5 --- /dev/null +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/IssueNotes/AssembleNotes/DTOs/AssembleNoteDetailDTO.cs @@ -0,0 +1,42 @@ +using System; +using System.ComponentModel.DataAnnotations; +using Win_in.Sfs.Shared.Domain; + +namespace Win_in.Sfs.Wms.Store.Application.Contracts; + +public class AssembleNoteDetailDTO : SfsStoreRecommendFromDetailWithFromToDTOBase +{ + + /// + /// 发料时间 + /// + [Display(Name = "发料时间")] + public DateTime IssueTime { get; set; } + + /// + /// 过期时间 + /// + [Display(Name = "过期时间")] + public DateTime ExpiredTime { get; set; } + + /// + /// 生产线 + /// + [Display(Name = "生产线")] + [StringLength(SfsEfCorePropertyConst.CodeLength, ErrorMessage = "{0}最多输入{1}个字符")] + public string ProdLine { get; set; } + + /// + /// 工作中心 + /// + [Display(Name = "工作中心")] + [StringLength(SfsEfCorePropertyConst.CodeLength, ErrorMessage = "{0}最多输入{1}个字符")] + public string WorkStation { get; set; } + + /// + /// 在途库库位 + /// + [Display(Name = "在途库库位")] + public string OnTheWayLocationCode { get; set; } + +} diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/IssueNotes/AssembleNotes/IAssembleNoteAppService.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/IssueNotes/AssembleNotes/IAssembleNoteAppService.cs new file mode 100644 index 000000000..af04bbaf4 --- /dev/null +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/IssueNotes/AssembleNotes/IAssembleNoteAppService.cs @@ -0,0 +1,21 @@ +using System; +using System.Collections.Generic; +using System.Threading; +using System.Threading.Tasks; +using Volo.Abp.Application.Dtos; + +namespace Win_in.Sfs.Wms.Store.Application.Contracts; + +public interface IAssembleNoteAppService : ISfsStoreMasterReadOnlyAppServiceBase +{ + Task CreateAsync(AssembleNoteEditInput input); + + Task ConfirmAsync(Guid id); + + Task ConfirmAsync(string number); + + Task> GetListByTypeAsync(SfsStoreRequestInputBase requestInput, + string requestType, bool includeDetails = false, CancellationToken cancellationToken = default); + + Task> GetListUnConfirmedByTypeAsync(string requestType); +} diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/IssueNotes/AssembleNotes/Inputs/AssembleNoteDetailInput.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/IssueNotes/AssembleNotes/Inputs/AssembleNoteDetailInput.cs new file mode 100644 index 000000000..4a194dc44 --- /dev/null +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/IssueNotes/AssembleNotes/Inputs/AssembleNoteDetailInput.cs @@ -0,0 +1,53 @@ +using System; +using System.ComponentModel.DataAnnotations; +using Win_in.Sfs.Shared.Domain; +using Win_in.Sfs.Shared.Domain.Shared; + +namespace Win_in.Sfs.Wms.Store.Application.Contracts; + +public class AssembleNoteDetailInput : SfsStoreRecommendFromDetailWithFromToInputBase +{ + + /// + /// 发料时间 + /// + [Display(Name = "发料时间")] + public DateTime IssueTime { get; set; } + + /// + /// 过期时间 + /// + [Display(Name = "过期时间")] + public DateTime ExpiredTime { get; set; } + + /// + /// 生产线 + /// + [Display(Name = "生产线")] + [StringLength(SfsEfCorePropertyConst.CodeLength, ErrorMessage = "{0}最多输入{1}个字符")] + public string ProdLine { get; set; } + + /// + /// 工作中心 + /// + [Display(Name = "工作中心")] + [StringLength(SfsEfCorePropertyConst.CodeLength, ErrorMessage = "{0}最多输入{1}个字符")] + public string WorkStation { get; set; } + + /// + /// 在途库库位 + /// + [Display(Name = "在途库库位")] + public string OnTheWayLocationCode { get; set; } + + /// + /// 位置码 + /// + public string PositionCode { get; set; } + + /// + /// 推荐类型 + /// + public EnumRecommendType RecommendType { get; set; } + +} diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/IssueNotes/AssembleNotes/Inputs/AssembleNoteEditInput.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/IssueNotes/AssembleNotes/Inputs/AssembleNoteEditInput.cs new file mode 100644 index 000000000..b3c23c67f --- /dev/null +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/IssueNotes/AssembleNotes/Inputs/AssembleNoteEditInput.cs @@ -0,0 +1,63 @@ +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; +using Win_in.Sfs.Shared.Domain; + +namespace Win_in.Sfs.Wms.Store.Application.Contracts; + +public class AssembleNoteEditInput : SfsStoreCreateOrUpdateInputBase +{ + #region Base + /// + /// 已确认 + /// + [Display(Name = "已确认")] + public bool Confirmed { get; set; } + #endregion + + #region Create + /// + /// 发料记录号 + /// + [Display(Name = "发料记录号")] + public string Number { get; set; } + + /// + /// 任务ID + /// + [Display(Name = "任务ID")] + [Required(ErrorMessage = "{0}是必填项")] + public string JobNumber { get; set; } + + /// + /// 车间 + /// + [Display(Name = "车间")] + [StringLength(SfsEfCorePropertyConst.CodeLength, ErrorMessage = "{0}最多输入{1}个字符")] + public string Workshop { get; set; } + + /// + /// 明细列表 + /// + [Display(Name = "明细列表")] + public List Details { get; set; } + + /// + /// 请求号码 + /// + [Display(Name = "请求号码")] + public string RequestNumber { get; set; } + + /// + /// 叫料请求类型 + /// + [Display(Name = "叫料请求类型")] + [StringLength(SfsEfCorePropertyConst.CodeLength, ErrorMessage = "{0}最多输入{1}个字符")] + public string RequestType { get; set; } + + /// + /// 使用在途库 + /// + [Display(Name = "使用在途库")] + public bool UseOnTheWayLocation { get; set; } + #endregion +} diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/IssueNotes/AssembleNotes/Inputs/AssembleNoteImportInput.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/IssueNotes/AssembleNotes/Inputs/AssembleNoteImportInput.cs new file mode 100644 index 000000000..415f3334c --- /dev/null +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/IssueNotes/AssembleNotes/Inputs/AssembleNoteImportInput.cs @@ -0,0 +1,33 @@ +using System.ComponentModel.DataAnnotations; + +namespace Win_in.Sfs.Wms.Store.Application.Contracts; + +public class AssembleNoteImportInput : SfsStoreImportInputBase, IHasJobNumber, IHasRequestNumber +{ + /// + /// 任务ID + /// + [Display(Name = "任务ID")] + public string JobNumber { get; set; } + + /// + /// 车间 + /// + [Display(Name = "车间")] + public string Workshop { get; set; } + + public string RequestNumber { get; set; } + + /// + /// 叫料请求类型 + /// + [Display(Name = "叫料请求类型")] + public string RequestType { get; set; } + + /// + /// 使用在途库 + /// + [Display(Name = "使用在途库")] + [Required(ErrorMessage = "{0}是必填项")] + public bool UseOnTheWayLocation { get; set; } +} diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/IssueNotes/CoatingIssueNotes/CoatingIssueNoteDTO.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/IssueNotes/CoatingIssueNotes/CoatingIssueNoteDTO.cs new file mode 100644 index 000000000..096f03254 --- /dev/null +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/IssueNotes/CoatingIssueNotes/CoatingIssueNoteDTO.cs @@ -0,0 +1,55 @@ +using System; +using System.ComponentModel.DataAnnotations; +using Win_in.Sfs.Shared.Domain; +using Win_in.Sfs.Wms.Store.Application.Contracts; + +namespace Win_in.Sfs.Wms.Store.Notes.IssueNotes; + +public class CoatingIssueNoteDTO : SfsStoreDTOBase, IHasJobNumber, IHasRequestNumber +{ + + /// + /// 任务ID + /// + [Display(Name = "任务ID")] + public string JobNumber { get; set; } + + /// + /// 车间 + /// + [Display(Name = "车间")] + [StringLength(SfsEfCorePropertyConst.CodeLength, ErrorMessage = "{0}最多输入{1}个字符")] + public string Workshop { get; set; } + + /// + /// 请求代码 + /// + [Display(Name = "请求代码")] + public string RequestNumber { get; set; } + + /// + /// 叫料请求类型 + /// + [Display(Name = "叫料请求类型")] + [StringLength(SfsEfCorePropertyConst.CodeLength, ErrorMessage = "{0}最多输入{1}个字符")] + public string RequestType { get; set; } + + /// + /// 使用在途库 + /// + [Display(Name = "使用在途库")] + public bool UseOnTheWayLocation { get; set; } + + /// + /// 已确认 + /// + [Display(Name = "已确认")] + public bool Confirmed { get; set; } + + /// + /// 确认时间 + /// + [Display(Name = "确认时间")] + public DateTime? ConfirmTime { get; set; } + +} diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/IssueNotes/CoatingIssueNotes/CoatingIssueNoteDetailDTO.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/IssueNotes/CoatingIssueNotes/CoatingIssueNoteDetailDTO.cs new file mode 100644 index 000000000..afbcf4f81 --- /dev/null +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/IssueNotes/CoatingIssueNotes/CoatingIssueNoteDetailDTO.cs @@ -0,0 +1,43 @@ +using System; +using System.ComponentModel.DataAnnotations; +using Win_in.Sfs.Shared.Domain; +using Win_in.Sfs.Wms.Store.Application.Contracts; + +namespace Win_in.Sfs.Wms.Store.Notes.IssueNotes; + +public class CoatingIssueNoteDetailDTO : SfsStoreRecommendFromDetailWithFromToDTOBase +{ + + /// + /// 发料时间 + /// + [Display(Name = "发料时间")] + public DateTime IssueTime { get; set; } + + /// + /// 过期时间 + /// + [Display(Name = "过期时间")] + public DateTime ExpiredTime { get; set; } + + /// + /// 生产线 + /// + [Display(Name = "生产线")] + [StringLength(SfsEfCorePropertyConst.CodeLength, ErrorMessage = "{0}最多输入{1}个字符")] + public string ProdLine { get; set; } + + /// + /// 工作中心 + /// + [Display(Name = "工作中心")] + [StringLength(SfsEfCorePropertyConst.CodeLength, ErrorMessage = "{0}最多输入{1}个字符")] + public string WorkStation { get; set; } + + /// + /// 在途库库位 + /// + [Display(Name = "在途库库位")] + public string OnTheWayLocationCode { get; set; } + +} diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/IssueNotes/CoatingIssueNotes/CoatingIssueNoteDetailInput.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/IssueNotes/CoatingIssueNotes/CoatingIssueNoteDetailInput.cs new file mode 100644 index 000000000..41b375822 --- /dev/null +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/IssueNotes/CoatingIssueNotes/CoatingIssueNoteDetailInput.cs @@ -0,0 +1,54 @@ +using System; +using System.ComponentModel.DataAnnotations; +using Win_in.Sfs.Shared.Domain; +using Win_in.Sfs.Shared.Domain.Shared; +using Win_in.Sfs.Wms.Store.Application.Contracts; + +namespace Win_in.Sfs.Wms.Store.Notes.IssueNotes; + +public class CoatingIssueNoteDetailInput : SfsStoreRecommendFromDetailWithFromToInputBase +{ + + /// + /// 发料时间 + /// + [Display(Name = "发料时间")] + public DateTime IssueTime { get; set; } + + /// + /// 过期时间 + /// + [Display(Name = "过期时间")] + public DateTime ExpiredTime { get; set; } + + /// + /// 生产线 + /// + [Display(Name = "生产线")] + [StringLength(SfsEfCorePropertyConst.CodeLength, ErrorMessage = "{0}最多输入{1}个字符")] + public string ProdLine { get; set; } + + /// + /// 工作中心 + /// + [Display(Name = "工作中心")] + [StringLength(SfsEfCorePropertyConst.CodeLength, ErrorMessage = "{0}最多输入{1}个字符")] + public string WorkStation { get; set; } + + /// + /// 在途库库位 + /// + [Display(Name = "在途库库位")] + public string OnTheWayLocationCode { get; set; } + + /// + /// 位置码 + /// + public string PositionCode { get; set; } + + /// + /// 推荐类型 + /// + public EnumRecommendType RecommendType { get; set; } + +} diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/IssueNotes/CoatingIssueNotes/CoatingIssueNoteEditInput.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/IssueNotes/CoatingIssueNotes/CoatingIssueNoteEditInput.cs new file mode 100644 index 000000000..d1b7307c3 --- /dev/null +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/IssueNotes/CoatingIssueNotes/CoatingIssueNoteEditInput.cs @@ -0,0 +1,64 @@ +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; +using Win_in.Sfs.Shared.Domain; +using Win_in.Sfs.Wms.Store.Application.Contracts; + +namespace Win_in.Sfs.Wms.Store.Notes.IssueNotes; + +public class CoatingIssueNoteEditInput : SfsStoreCreateOrUpdateInputBase +{ + #region Base + /// + /// 已确认 + /// + [Display(Name = "已确认")] + public bool Confirmed { get; set; } + #endregion + + #region Create + /// + /// 发料记录号 + /// + [Display(Name = "发料记录号")] + public string Number { get; set; } + + /// + /// 任务ID + /// + [Display(Name = "任务ID")] + [Required(ErrorMessage = "{0}是必填项")] + public string JobNumber { get; set; } + + /// + /// 车间 + /// + [Display(Name = "车间")] + [StringLength(SfsEfCorePropertyConst.CodeLength, ErrorMessage = "{0}最多输入{1}个字符")] + public string Workshop { get; set; } + + /// + /// 明细列表 + /// + [Display(Name = "明细列表")] + public List Details { get; set; } + + /// + /// 请求号码 + /// + [Display(Name = "请求号码")] + public string RequestNumber { get; set; } + + /// + /// 叫料请求类型 + /// + [Display(Name = "叫料请求类型")] + [StringLength(SfsEfCorePropertyConst.CodeLength, ErrorMessage = "{0}最多输入{1}个字符")] + public string RequestType { get; set; } + + /// + /// 使用在途库 + /// + [Display(Name = "使用在途库")] + public bool UseOnTheWayLocation { get; set; } + #endregion +} diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/IssueNotes/CoatingIssueNotes/CoatingIssueNoteImportInput.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/IssueNotes/CoatingIssueNotes/CoatingIssueNoteImportInput.cs new file mode 100644 index 000000000..5d180cb21 --- /dev/null +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/IssueNotes/CoatingIssueNotes/CoatingIssueNoteImportInput.cs @@ -0,0 +1,34 @@ +using System.ComponentModel.DataAnnotations; +using Win_in.Sfs.Wms.Store.Application.Contracts; + +namespace Win_in.Sfs.Wms.Store.Notes.IssueNotes; + +public class CoatingIssueNoteImportInput : SfsStoreImportInputBase, IHasJobNumber, IHasRequestNumber +{ + /// + /// 任务ID + /// + [Display(Name = "任务ID")] + public string JobNumber { get; set; } + + /// + /// 车间 + /// + [Display(Name = "车间")] + public string Workshop { get; set; } + + public string RequestNumber { get; set; } + + /// + /// 叫料请求类型 + /// + [Display(Name = "叫料请求类型")] + public string RequestType { get; set; } + + /// + /// 使用在途库 + /// + [Display(Name = "使用在途库")] + [Required(ErrorMessage = "{0}是必填项")] + public bool UseOnTheWayLocation { get; set; } +} diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/IssueNotes/CoatingIssueNotes/CoatingIssueNotePermissions.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/IssueNotes/CoatingIssueNotes/CoatingIssueNotePermissions.cs new file mode 100644 index 000000000..9f497fc34 --- /dev/null +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/IssueNotes/CoatingIssueNotes/CoatingIssueNotePermissions.cs @@ -0,0 +1,31 @@ +using Volo.Abp.Authorization.Permissions; +using Win_in.Sfs.Wms.Store.Application.Contracts; +using Win_in.Sfs.Wms.Store.Domain; + +namespace Win_in.Sfs.Wms.Store.Notes.IssueNotes; + +public static class CoatingIssueNotePermissions +{ + + public const string Default = StorePermissions.GroupName + "." + nameof(IssueNote); + public const string Create = Default + "." + StorePermissions.CreateStr; + public const string Update = Default + "." + StorePermissions.UpdateStr; + public const string Delete = Default + "." + StorePermissions.DeleteStr; + + //自动发料记录 + public const string AutoIssueNote = StorePermissions.GroupName + "." + nameof(AutoIssueNote); + + //直接发料 + public const string DirectIssueNote = StorePermissions.GroupName + "." + nameof(DirectIssueNote); + + public static void AddCoatingIssueNotePermission(this PermissionGroupDefinition permissionGroup) + { + var issueNotePermission = permissionGroup.AddPermission(Default, StorePermissionDefinitionProvider.L(nameof(IssueNote))); + issueNotePermission.AddChild(Create, StorePermissionDefinitionProvider.L(StorePermissions.CreateStr)); + issueNotePermission.AddChild(Update, StorePermissionDefinitionProvider.L(StorePermissions.UpdateStr)); + issueNotePermission.AddChild(Delete, StorePermissionDefinitionProvider.L(StorePermissions.DeleteStr)); + + permissionGroup.AddPermission(AutoIssueNote, StorePermissionDefinitionProvider.L(nameof(AutoIssueNote))); + permissionGroup.AddPermission(DirectIssueNote, StorePermissionDefinitionProvider.L(nameof(DirectIssueNote))); + } +} diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/IssueNotes/CoatingIssueNotes/ICoatingIssueNoteAppService.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/IssueNotes/CoatingIssueNotes/ICoatingIssueNoteAppService.cs new file mode 100644 index 000000000..79fbe99cc --- /dev/null +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/IssueNotes/CoatingIssueNotes/ICoatingIssueNoteAppService.cs @@ -0,0 +1,22 @@ +using System; +using System.Collections.Generic; +using System.Threading; +using System.Threading.Tasks; +using Volo.Abp.Application.Dtos; +using Win_in.Sfs.Wms.Store.Application.Contracts; + +namespace Win_in.Sfs.Wms.Store.Notes.IssueNotes; + +public interface ICoatingIssueNoteAppService : ISfsStoreMasterReadOnlyAppServiceBase +{ + Task CreateAsync(CoatingIssueNoteEditInput input); + + Task ConfirmAsync(Guid id); + + Task ConfirmAsync(string number); + + Task> GetListByTypeAsync(SfsStoreRequestInputBase requestInput, + string requestType, bool includeDetails = false, CancellationToken cancellationToken = default); + + Task> GetListUnConfirmedByTypeAsync(string requestType); +} diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/IssueNotes/InjectionNotes/DTOs/InjectionNoteDTO.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/IssueNotes/InjectionNotes/DTOs/InjectionNoteDTO.cs new file mode 100644 index 000000000..96f533b19 --- /dev/null +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/IssueNotes/InjectionNotes/DTOs/InjectionNoteDTO.cs @@ -0,0 +1,54 @@ +using System; +using System.ComponentModel.DataAnnotations; +using Win_in.Sfs.Shared.Domain; + +namespace Win_in.Sfs.Wms.Store.Application.Contracts; + +public class InjectionNoteDTO : SfsStoreDTOBase, IHasJobNumber, IHasRequestNumber +{ + + /// + /// 任务ID + /// + [Display(Name = "任务ID")] + public string JobNumber { get; set; } + + /// + /// 车间 + /// + [Display(Name = "车间")] + [StringLength(SfsEfCorePropertyConst.CodeLength, ErrorMessage = "{0}最多输入{1}个字符")] + public string Workshop { get; set; } + + /// + /// 请求代码 + /// + [Display(Name = "请求代码")] + public string RequestNumber { get; set; } + + /// + /// 叫料请求类型 + /// + [Display(Name = "叫料请求类型")] + [StringLength(SfsEfCorePropertyConst.CodeLength, ErrorMessage = "{0}最多输入{1}个字符")] + public string RequestType { get; set; } + + /// + /// 使用在途库 + /// + [Display(Name = "使用在途库")] + public bool UseOnTheWayLocation { get; set; } + + /// + /// 已确认 + /// + [Display(Name = "已确认")] + public bool Confirmed { get; set; } + + /// + /// 确认时间 + /// + [Display(Name = "确认时间")] + public DateTime? ConfirmTime { get; set; } + +} diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/IssueNotes/InjectionNotes/DTOs/InjectionNoteDetailDTO.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/IssueNotes/InjectionNotes/DTOs/InjectionNoteDetailDTO.cs new file mode 100644 index 000000000..e36d271b3 --- /dev/null +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/IssueNotes/InjectionNotes/DTOs/InjectionNoteDetailDTO.cs @@ -0,0 +1,42 @@ +using System; +using System.ComponentModel.DataAnnotations; +using Win_in.Sfs.Shared.Domain; + +namespace Win_in.Sfs.Wms.Store.Application.Contracts; + +public class InjectionNoteDetailDTO : SfsStoreRecommendFromDetailWithFromToDTOBase +{ + + /// + /// 发料时间 + /// + [Display(Name = "发料时间")] + public DateTime IssueTime { get; set; } + + /// + /// 过期时间 + /// + [Display(Name = "过期时间")] + public DateTime ExpiredTime { get; set; } + + /// + /// 生产线 + /// + [Display(Name = "生产线")] + [StringLength(SfsEfCorePropertyConst.CodeLength, ErrorMessage = "{0}最多输入{1}个字符")] + public string ProdLine { get; set; } + + /// + /// 工作中心 + /// + [Display(Name = "工作中心")] + [StringLength(SfsEfCorePropertyConst.CodeLength, ErrorMessage = "{0}最多输入{1}个字符")] + public string WorkStation { get; set; } + + /// + /// 在途库库位 + /// + [Display(Name = "在途库库位")] + public string OnTheWayLocationCode { get; set; } + +} diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/IssueNotes/InjectionNotes/IInjectionNoteAppService.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/IssueNotes/InjectionNotes/IInjectionNoteAppService.cs new file mode 100644 index 000000000..8d88bd51d --- /dev/null +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/IssueNotes/InjectionNotes/IInjectionNoteAppService.cs @@ -0,0 +1,21 @@ +using System; +using System.Collections.Generic; +using System.Threading; +using System.Threading.Tasks; +using Volo.Abp.Application.Dtos; + +namespace Win_in.Sfs.Wms.Store.Application.Contracts; + +public interface IInjectionNoteAppService : ISfsStoreMasterReadOnlyAppServiceBase +{ + Task CreateAsync(InjectionNoteEditInput input); + + Task ConfirmAsync(Guid id); + + Task ConfirmAsync(string number); + + Task> GetListByTypeAsync(SfsStoreRequestInputBase requestInput, + string requestType, bool includeDetails = false, CancellationToken cancellationToken = default); + + Task> GetListUnConfirmedByTypeAsync(string requestType); +} diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/IssueNotes/InjectionNotes/InjectionNotePermissions.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/IssueNotes/InjectionNotes/InjectionNotePermissions.cs new file mode 100644 index 000000000..ec202d6be --- /dev/null +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/IssueNotes/InjectionNotes/InjectionNotePermissions.cs @@ -0,0 +1,30 @@ +using Volo.Abp.Authorization.Permissions; +using Win_in.Sfs.Wms.Store.Domain; + +namespace Win_in.Sfs.Wms.Store.Application.Contracts; + +public static class InjectionNotePermissions +{ + + public const string Default = StorePermissions.GroupName + "." + nameof(InjectionNote); + public const string Create = Default + "." + StorePermissions.CreateStr; + public const string Update = Default + "." + StorePermissions.UpdateStr; + public const string Delete = Default + "." + StorePermissions.DeleteStr; + + //自动发料记录 + public const string AutoInjectionNote = StorePermissions.GroupName + "." + nameof(AutoInjectionNote); + + //直接发料 + public const string DirectInjectionNote = StorePermissions.GroupName + "." + nameof(DirectInjectionNote); + + public static void AddInjectionNotePermission(this PermissionGroupDefinition permissionGroup) + { + var injectionNotePermission = permissionGroup.AddPermission(Default, StorePermissionDefinitionProvider.L(nameof(InjectionNote))); + injectionNotePermission.AddChild(Create, StorePermissionDefinitionProvider.L(StorePermissions.CreateStr)); + injectionNotePermission.AddChild(Update, StorePermissionDefinitionProvider.L(StorePermissions.UpdateStr)); + injectionNotePermission.AddChild(Delete, StorePermissionDefinitionProvider.L(StorePermissions.DeleteStr)); + + permissionGroup.AddPermission(AutoInjectionNote, StorePermissionDefinitionProvider.L(nameof(AutoInjectionNote))); + permissionGroup.AddPermission(DirectInjectionNote, StorePermissionDefinitionProvider.L(nameof(DirectInjectionNote))); + } +} diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/IssueNotes/InjectionNotes/Inputs/InjectionNoteDetailInput.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/IssueNotes/InjectionNotes/Inputs/InjectionNoteDetailInput.cs new file mode 100644 index 000000000..48714bb23 --- /dev/null +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/IssueNotes/InjectionNotes/Inputs/InjectionNoteDetailInput.cs @@ -0,0 +1,53 @@ +using System; +using System.ComponentModel.DataAnnotations; +using Win_in.Sfs.Shared.Domain; +using Win_in.Sfs.Shared.Domain.Shared; + +namespace Win_in.Sfs.Wms.Store.Application.Contracts; + +public class InjectionNoteDetailInput : SfsStoreRecommendFromDetailWithFromToInputBase +{ + + /// + /// 发料时间 + /// + [Display(Name = "发料时间")] + public DateTime IssueTime { get; set; } + + /// + /// 过期时间 + /// + [Display(Name = "过期时间")] + public DateTime ExpiredTime { get; set; } + + /// + /// 生产线 + /// + [Display(Name = "生产线")] + [StringLength(SfsEfCorePropertyConst.CodeLength, ErrorMessage = "{0}最多输入{1}个字符")] + public string ProdLine { get; set; } + + /// + /// 工作中心 + /// + [Display(Name = "工作中心")] + [StringLength(SfsEfCorePropertyConst.CodeLength, ErrorMessage = "{0}最多输入{1}个字符")] + public string WorkStation { get; set; } + + /// + /// 在途库库位 + /// + [Display(Name = "在途库库位")] + public string OnTheWayLocationCode { get; set; } + + /// + /// 位置码 + /// + public string PositionCode { get; set; } + + /// + /// 推荐类型 + /// + public EnumRecommendType RecommendType { get; set; } + +} diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/IssueNotes/InjectionNotes/Inputs/InjectionNoteEditInput.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/IssueNotes/InjectionNotes/Inputs/InjectionNoteEditInput.cs new file mode 100644 index 000000000..410903705 --- /dev/null +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/IssueNotes/InjectionNotes/Inputs/InjectionNoteEditInput.cs @@ -0,0 +1,63 @@ +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; +using Win_in.Sfs.Shared.Domain; + +namespace Win_in.Sfs.Wms.Store.Application.Contracts; + +public class InjectionNoteEditInput : SfsStoreCreateOrUpdateInputBase +{ + #region Base + /// + /// 已确认 + /// + [Display(Name = "已确认")] + public bool Confirmed { get; set; } + #endregion + + #region Create + /// + /// 发料记录号 + /// + [Display(Name = "发料记录号")] + public string Number { get; set; } + + /// + /// 任务ID + /// + [Display(Name = "任务ID")] + [Required(ErrorMessage = "{0}是必填项")] + public string JobNumber { get; set; } + + /// + /// 车间 + /// + [Display(Name = "车间")] + [StringLength(SfsEfCorePropertyConst.CodeLength, ErrorMessage = "{0}最多输入{1}个字符")] + public string Workshop { get; set; } + + /// + /// 明细列表 + /// + [Display(Name = "明细列表")] + public List Details { get; set; } + + /// + /// 请求号码 + /// + [Display(Name = "请求号码")] + public string RequestNumber { get; set; } + + /// + /// 叫料请求类型 + /// + [Display(Name = "叫料请求类型")] + [StringLength(SfsEfCorePropertyConst.CodeLength, ErrorMessage = "{0}最多输入{1}个字符")] + public string RequestType { get; set; } + + /// + /// 使用在途库 + /// + [Display(Name = "使用在途库")] + public bool UseOnTheWayLocation { get; set; } + #endregion +} diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/IssueNotes/InjectionNotes/Inputs/InjectionNoteImportInput.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/IssueNotes/InjectionNotes/Inputs/InjectionNoteImportInput.cs new file mode 100644 index 000000000..2876aa4ee --- /dev/null +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/IssueNotes/InjectionNotes/Inputs/InjectionNoteImportInput.cs @@ -0,0 +1,33 @@ +using System.ComponentModel.DataAnnotations; + +namespace Win_in.Sfs.Wms.Store.Application.Contracts; + +public class InjectionNoteImportInput : SfsStoreImportInputBase, IHasJobNumber, IHasRequestNumber +{ + /// + /// 任务ID + /// + [Display(Name = "任务ID")] + public string JobNumber { get; set; } + + /// + /// 车间 + /// + [Display(Name = "车间")] + public string Workshop { get; set; } + + public string RequestNumber { get; set; } + + /// + /// 叫料请求类型 + /// + [Display(Name = "叫料请求类型")] + public string RequestType { get; set; } + + /// + /// 使用在途库 + /// + [Display(Name = "使用在途库")] + [Required(ErrorMessage = "{0}是必填项")] + public bool UseOnTheWayLocation { get; set; } +} diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/TransferLibNotes/DTOs/TransferLibNoteDTO.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/TransferLibNotes/DTOs/TransferLibNoteDTO.cs new file mode 100644 index 000000000..ca3b97c07 --- /dev/null +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/TransferLibNotes/DTOs/TransferLibNoteDTO.cs @@ -0,0 +1,47 @@ +using System; +using System.ComponentModel.DataAnnotations; + +namespace Win_in.Sfs.Wms.Store.Application.Contracts; + +/// +/// 库存转移记录-实体DTO +/// +public class TransferLibNoteDTO : SfsStoreDTOBase, IHasNumber +{ + /// + /// 调拨申请单号 + /// + [Display(Name = "调拨申请单号")] + public string RequestNumber { get; set; } + + /// + /// 任务ID + /// + [Display(Name = "任务ID")] + public string JobNumber { get; set; } + + /// + /// 调拨类型 + /// + [Display(Name = "调拨类型")] + public string Type { get; set; } + + /// + /// 使用中间库 + /// + [Display(Name = "使用中间库")] + public bool UseOnTheWayLocation { get; set; } + + /// + /// 已确认 + /// + [Display(Name = "已确认")] + public bool Confirmed { get; set; } + + /// + /// 确认时间 + /// + [Display(Name = "确认时间")] + public DateTime? ConfirmTime { get; set; } + +} diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/TransferLibNotes/DTOs/TransferLibNoteDetailDTO.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/TransferLibNotes/DTOs/TransferLibNoteDetailDTO.cs new file mode 100644 index 000000000..21f1b2f9f --- /dev/null +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/TransferLibNotes/DTOs/TransferLibNoteDetailDTO.cs @@ -0,0 +1,28 @@ +using System.ComponentModel.DataAnnotations; +using Win_in.Sfs.Shared.Domain.Shared; + +namespace Win_in.Sfs.Wms.Store.Application.Contracts; + +/// +/// 库存转移记录-明细表 +/// +public class TransferLibNoteDetailDTO : SfsStoreDetailWithFromToDTOBase +{ + + /// + /// 在途库地址 + /// + [Display(Name = "在途库地址")] + public string OnTheWayLocationCode { get; set; } + /// + /// 原因 + /// + [Display(Name = "原因")] + public string Reason { get; set; } + + /// + /// 执行任务状态 + /// + public EnumJobStatus JobStatus { get; set; } + +} diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/TransferLibNotes/ITransferLibNoteAppService.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/TransferLibNotes/ITransferLibNoteAppService.cs new file mode 100644 index 000000000..548a8cb10 --- /dev/null +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/TransferLibNotes/ITransferLibNoteAppService.cs @@ -0,0 +1,90 @@ +using System; +using System.Collections.Generic; +using System.Threading; +using System.Threading.Tasks; +using Volo.Abp.Application.Dtos; + +namespace Win_in.Sfs.Wms.Store.Application.Contracts; + +public interface ITransferLibNoteAppService : + ISfsStoreMasterReadOnlyAppServiceBase +{ + Task CreateAsync(TransferLibNoteEditInput input); + + Task> GetWipTransferListAsync(SfsStoreRequestInputBase sfsRequestDTO, bool includeDetails = false, + CancellationToken cancellationToken = default); + + Task> GetAreaTransferListAsync(SfsStoreRequestInputBase sfsRequestDTO, bool includeDetails = false, + CancellationToken cancellationToken = default); + + Task> GetCustomerTransferListAsync(SfsStoreRequestInputBase sfsRequestDTO, bool includeDetails = false, + CancellationToken cancellationToken = default); + + Task> GetListForDiffERPLocAsync( + SfsStoreRequestInputBase sfsRequestDTO, + bool includeDetails = false, + CancellationToken cancellationToken = default); + + Task> GetInsideTransferListAsync( + SfsStoreRequestInputBase sfsRequestDTO, + bool includeDetails = false, + CancellationToken cancellationToken = default); + + Task ConfirmAsync(Guid id); + + /// + /// 库存转移 + /// + /// + /// + Task> CreateManyAsync(List input); + + /// + /// 拆箱 + /// + /// + /// + Task SplitPackingAsync(TransferLibNoteEditInput transferLibNoteEditInput); + + /// + /// 按条件获取拆箱的分页列表 + /// request sample + /// { + /// "maxResultCount": 1000, + /// "skipCount": 0, + /// "sorting": "", + /// "condition": { "filters": []} + /// } + /// + /// + /// + /// + /// + Task> GetSplitPackingTransferListAsync( + SfsStoreRequestInputBase sfsRequestDTO, bool includeDetails = false, + CancellationToken cancellationToken = default); + + /// + /// 采购收货拆箱,同时更新、插入PurchaseReceipt任务表、申请表 + /// + /// + /// + /// + Task SplitPacking_PurchaseReceiptAsync(TransferLibNoteEditInput transferLibNoteEditInput, SplitPacking_UpdateJobDetailInput updateJobDetailInput); + + /// + /// 质检拆箱,同时更新、插入Inspect任务表(不更新申请表) + /// + /// + /// + /// + Task SplitPacking_InspectAsync(TransferLibNoteEditInput transferLibNoteEditInput, SplitPacking_UpdateJobDetailInput updateJobDetailInput); + + /// + /// 发料拆箱,同时更新、插入Inspect任务表(没有找到申请表//??) + /// + /// + /// + /// + Task SplitPacking_IssueAsync(TransferLibNoteEditInput transferLibNoteEditInput, SplitPacking_UpdateJobDetailInput updateJobDetailInput); +} diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/TransferLibNotes/Inputs/TransferLibNoteDetailInput.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/TransferLibNotes/Inputs/TransferLibNoteDetailInput.cs new file mode 100644 index 000000000..81a4bdb89 --- /dev/null +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/TransferLibNotes/Inputs/TransferLibNoteDetailInput.cs @@ -0,0 +1,32 @@ +using System.ComponentModel.DataAnnotations; +using Win_in.Sfs.Shared.Domain; +using Win_in.Sfs.Shared.Domain.Shared; + +namespace Win_in.Sfs.Wms.Store.Application.Contracts; + +/// +/// 库存转移记录-明细表 +/// +public class TransferLibNoteDetailInput : SfsStoreDetailWithFromToInputBase +{ + + /// + /// 在途库地址 + /// + [Display(Name = "在途库地址")] + public string OnTheWayLocationCode { get; set; } + + /// + /// 原因 + /// + [Display(Name = "原因")] + [StringLength(SfsEfCorePropertyConst.RemarkLength, ErrorMessage = "{0}最多输入{1}个字符")] + public string Reason { get; set; } + /// + /// 执行任务状态 + /// + public EnumJobStatus JobStatus { get; set; } + + + +} diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/TransferLibNotes/Inputs/TransferLibNoteEditInput.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/TransferLibNotes/Inputs/TransferLibNoteEditInput.cs new file mode 100644 index 000000000..2e45f8df1 --- /dev/null +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/TransferLibNotes/Inputs/TransferLibNoteEditInput.cs @@ -0,0 +1,55 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; + +namespace Win_in.Sfs.Wms.Store.Application.Contracts; + +/// +/// 新增和更新基础DTO +/// +public class TransferLibNoteEditInput : SfsStoreCreateOrUpdateInputBase, IHasNumber +{ + #region Base + /// + /// 已确认 + /// + [Display(Name = "已确认")] + public bool Confirmed { get; set; } + #endregion + + #region Update + /// + /// 确认时间 + /// + [Display(Name = "确认时间")] + public DateTime? ConfirmTime { get; set; } + #endregion + + /// + /// 调拨申请单号 + /// + [Display(Name = "调拨申请单号")] + public string RequestNumber { get; set; } + + /// + /// 任务ID + /// + [Display(Name = "任务ID")] + public string JobNumber { get; set; } + + /// + /// 调拨类型 + /// + [Display(Name = "调拨类型")] + public string Type { get; set; } + + /// + /// 使用中间库 + /// + [Display(Name = "使用中间库")] + public bool UseOnTheWayLocation { get; set; } + + [Display(Name = "详情")] + public List Details { get; set; } = new List(); + public string Number { get; set; } +} diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/TransferLibNotes/Inputs/TransferLibNoteImportInput.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/TransferLibNotes/Inputs/TransferLibNoteImportInput.cs new file mode 100644 index 000000000..4c3652ac0 --- /dev/null +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/TransferLibNotes/Inputs/TransferLibNoteImportInput.cs @@ -0,0 +1,85 @@ +using System; +using System.ComponentModel.DataAnnotations; +using DocumentFormat.OpenXml.Drawing; +using Win_in.Sfs.Shared.Application.Contracts; +using Win_in.Sfs.Shared.Domain.Shared; + +namespace Win_in.Sfs.Wms.Store.Application.Contracts; + +public class TransferLibNoteImportInput : SfsStoreImportInputBase +{ + /// + /// 调拨类型 + /// + [Display(Name = "调拨类型")] + [Required(ErrorMessage = "{0}是必填项")] + [ImporterHeader(Name = "调拨类型")] + [ExporterHeader(DisplayName = "调拨类型")] + [ValueMapping("区域内调拨(储位内移库)", EnumTransSubType.Transfer_Inside)] + public string Type { get; set; } + + /// + /// 使用中间库 + /// + [Display(Name = "使用中间库")] + [Required(ErrorMessage = "{0}是必填项")] + public bool UseOnTheWayLocation { get; set; } + + /// + /// 在途库地址 + /// + [Display(Name = "在途库地址")] + [ImporterHeader(IsIgnore = true)] + public string OnTheWayLocationCode { get; set; } + + /// + /// 已确认 + /// + [Display(Name = "已确认")] + [ImporterHeader(IsIgnore = true)] + [Required(ErrorMessage = "{0}是必填项")] + public bool Confirmed { get; set; } + + /// + /// 物料号 + /// + [Display(Name = "物料号")] + [Required(ErrorMessage = "{0}是必填项")] + public string ItemCode { get; set; } + + /// + /// 调拨数量 + /// + [Display(Name = "调拨数量")] + [Required(ErrorMessage = "{0}是必填项")] + public decimal Qty { get; set; } + + /// + /// 调出库位 + /// + [Display(Name = "调出库位")] + [Required(ErrorMessage = "{0}是必填项")] + public string FromLocationCode { get; set; } + + /// + /// 调入库位 + /// + [Display(Name = "调入库位")] + [Required(ErrorMessage = "{0}是必填项")] + public string ToLocationCode { get; set; } + + /// + /// 箱码 + /// + [Display(Name = "箱码")] + [Required(ErrorMessage = "{0}是必填项")] + public string PackingCode { get; set; } + + /// + /// 状态 + /// + [Display(Name = "状态")] + [Required(ErrorMessage = "{0}是必填项")] + public EnumInventoryStatus Status { get; set; } + +} diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/TransferLibNotes/TransferLibNotePermissions.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/TransferLibNotes/TransferLibNotePermissions.cs new file mode 100644 index 000000000..1337fc9d0 --- /dev/null +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/TransferLibNotes/TransferLibNotePermissions.cs @@ -0,0 +1,41 @@ +using Volo.Abp.Authorization.Permissions; +using Win_in.Sfs.Wms.Store.Domain; + +namespace Win_in.Sfs.Wms.Store.Application.Contracts; + +public static class TransferLibNotePermissions +{ + public const string Default = StorePermissions.GroupName + "." + nameof(TransferLibNote); + public const string Create = Default + "." + StorePermissions.CreateStr; + public const string Update = Default + "." + StorePermissions.UpdateStr; + public const string Delete = Default + "." + StorePermissions.DeleteStr; + + //线边调拨记录 + public const string WipTransferLibNote = StorePermissions.GroupName + "." + nameof(WipTransferLibNote); + //线边调拨记录确认 + public const string WipTransferLibNoteConfirm = StorePermissions.GroupName + "." + nameof(WipTransferLibNoteConfirm); + //客户调拨记录 + public const string CustomerTransferLibNote = StorePermissions.GroupName + "." + nameof(CustomerTransferLibNote); + //客户调拨记录确认 + public const string CustomerTransferLibNoteConfirm = StorePermissions.GroupName + "." + nameof(CustomerTransferLibNoteConfirm); + //库区间调拨记录 + public const string BetweenAreaTransferLibNote = StorePermissions.GroupName + "." + nameof(BetweenAreaTransferLibNote); + //库区内调拨记录 + public const string WithinAreaTransferLibNote = StorePermissions.GroupName + "." + nameof(WithinAreaTransferLibNote); + + public static void AddTransferLibNotePermission(this PermissionGroupDefinition permissionGroup) + { + var transferLibNotePermission = permissionGroup.AddPermission(Default, StorePermissionDefinitionProvider.L(nameof(TransferLibNote))); + transferLibNotePermission.AddChild(Create, StorePermissionDefinitionProvider.L(StorePermissions.CreateStr)); + transferLibNotePermission.AddChild(Update, StorePermissionDefinitionProvider.L(StorePermissions.UpdateStr)); + transferLibNotePermission.AddChild(Delete, StorePermissionDefinitionProvider.L(StorePermissions.DeleteStr)); + + permissionGroup.AddPermission(WipTransferLibNote, StorePermissionDefinitionProvider.L(nameof(WipTransferLibNote))); + permissionGroup.AddPermission(WipTransferLibNoteConfirm, StorePermissionDefinitionProvider.L(nameof(WipTransferLibNoteConfirm))); + permissionGroup.AddPermission(CustomerTransferLibNote, StorePermissionDefinitionProvider.L(nameof(CustomerTransferLibNote))); + permissionGroup.AddPermission(CustomerTransferLibNoteConfirm, StorePermissionDefinitionProvider.L(nameof(CustomerTransferLibNoteConfirm))); + permissionGroup.AddPermission(BetweenAreaTransferLibNote, StorePermissionDefinitionProvider.L(nameof(BetweenAreaTransferLibNote))); + permissionGroup.AddPermission(WithinAreaTransferLibNote, StorePermissionDefinitionProvider.L(nameof(WithinAreaTransferLibNote))); + + } +} diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Permissions/StorePermissionDefinitionProvider.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Permissions/StorePermissionDefinitionProvider.cs index b45ea84a6..52618b9ac 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Permissions/StorePermissionDefinitionProvider.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Permissions/StorePermissionDefinitionProvider.cs @@ -26,8 +26,12 @@ public class StorePermissionDefinitionProvider : PermissionDefinitionProvider storeGroup.AddPurchaseReturnNotePermission(); storeGroup.AddPutawayNotePermission(); storeGroup.AddMaterialRequestPermission(); + storeGroup.AddInjectionRequestPermission(); + storeGroup.AddAssembleRequestPermission(); storeGroup.AddContainerRequestPermission(); storeGroup.AddIssueNotePermission(); + storeGroup.AddInjectionNotePermission(); + storeGroup.AddAssembleNotePermission(); storeGroup.AddContainerNotePermission(); storeGroup.AddUnplannedReceiptNotePermission(); storeGroup.AddUnplannedIssueNotePermission(); @@ -90,6 +94,8 @@ public class StorePermissionDefinitionProvider : PermissionDefinitionProvider storeGroup.AddInspectJobPermission(); storeGroup.AddPutawayJobPermission(); storeGroup.AddIssueJobPermission(); + storeGroup.AddInjectionJobPermission(); + storeGroup.AddAssembleJobPermission(); storeGroup.AddContainerJobPermission(); storeGroup.AddDeliverJobPermission(); storeGroup.AddPurchaseReturnJobPermission(); diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/MaterialRequests/AssembleRequests/AssembleRequestPermissions.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/MaterialRequests/AssembleRequests/AssembleRequestPermissions.cs new file mode 100644 index 000000000..f7c0f9228 --- /dev/null +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/MaterialRequests/AssembleRequests/AssembleRequestPermissions.cs @@ -0,0 +1,27 @@ +using Volo.Abp.Authorization.Permissions; +using Win_in.Sfs.Wms.Store.Domain; + +namespace Win_in.Sfs.Wms.Store.Application.Contracts; + +public static class AssembleRequestPermissions +{ + + public const string Default = StorePermissions.GroupName + "." + nameof(AssembleRequest); + public const string Create = Default + "." + StorePermissions.CreateStr; + public const string Update = Default + "." + StorePermissions.UpdateStr; + public const string Delete = Default + "." + StorePermissions.DeleteStr; + + //自动叫料申请 + public const string AutoAssembleRequest = StorePermissions.GroupName + "." + nameof(AutoAssembleRequest); + + public static void AddAssembleRequestPermission(this PermissionGroupDefinition permissionGroup) + { + var AssembleRequestPermission = permissionGroup.AddPermission(Default, StorePermissionDefinitionProvider.L(nameof(AssembleRequest))); + AssembleRequestPermission.AddChild(Create, StorePermissionDefinitionProvider.L(StorePermissions.CreateStr)); + AssembleRequestPermission.AddChild(Update, StorePermissionDefinitionProvider.L(StorePermissions.UpdateStr)); + AssembleRequestPermission.AddChild(Delete, StorePermissionDefinitionProvider.L(StorePermissions.DeleteStr)); + + permissionGroup.AddPermission(AutoAssembleRequest, StorePermissionDefinitionProvider.L(nameof(AutoAssembleRequest))); + + } +} diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/MaterialRequests/AssembleRequests/DTOs/AssembleRequestDTO.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/MaterialRequests/AssembleRequests/DTOs/AssembleRequestDTO.cs new file mode 100644 index 000000000..7582d35a7 --- /dev/null +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/MaterialRequests/AssembleRequests/DTOs/AssembleRequestDTO.cs @@ -0,0 +1,40 @@ +using System.ComponentModel.DataAnnotations; + +namespace Win_in.Sfs.Wms.Store.Application.Contracts; + +public class AssembleRequestDTO : SfsStoreRequestDTOBase, IHasNumber +{ + /// + /// 叫料类型 + /// + [Display(Name = "叫料类型")] + public string Type { get; set; } + + /// + /// 生产线 + /// + [Display(Name = "生产线")] + public string ProdLine { get; set; } + + /// + /// 是否使用在途库 + /// + [Display(Name = "是否使用在途库")] + public bool IsUseOnTheWayLocation { get; set; } + + /// + /// 可用来源库位Json集合 + /// + public string FromLocationCodeJsonList { get; set; } + + /// + /// 叫料库位 + /// + public string ToLocationCode { get; set; } + + /// + /// 目标ERP储位 + /// + [Display(Name = "目标ERP储位")] + public string ToLocationErpCode { get; set; } +} diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/MaterialRequests/AssembleRequests/DTOs/AssembleRequestDetailDTO.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/MaterialRequests/AssembleRequests/DTOs/AssembleRequestDetailDTO.cs new file mode 100644 index 000000000..71a9dbcf0 --- /dev/null +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/MaterialRequests/AssembleRequests/DTOs/AssembleRequestDetailDTO.cs @@ -0,0 +1,50 @@ +using System; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using Win_in.Sfs.Shared.Domain; +using Win_in.Sfs.Shared.Domain.Shared; + +namespace Win_in.Sfs.Wms.Store.Application.Contracts; + +public class AssembleRequestDetailDTO : SfsStoreDetailWithQtyDTOBase +{ + /// + /// 已发数量 + /// + [Display(Name = "已发数量")] + public decimal IssuedQty { get; set; } + + /// + /// 已收数量 + /// + [Display(Name = "已收数量")] + public decimal ReceivedQty { get; set; } + + /// + /// 明细状态 + /// + [Display(Name = "明细状态")] + public EnumStatus Status { get; set; } + + /// + /// 请求未发 + /// + [Display(Name = "请求未发")] + [NotMapped] + public decimal ToBeIssuedQty => Qty - IssuedQty; + + /// + /// 已发未收 + /// + [Display(Name = "已发未收")] + [NotMapped] + public decimal ToBeReceivedQty => IssuedQty - ReceivedQty; + + /// + /// 请求未收 + /// + [Display(Name = "请求未收")] + [NotMapped] + public decimal NotFinishQty => Qty - ReceivedQty; + +} diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/MaterialRequests/AssembleRequests/IAssembleRequestAppService.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/MaterialRequests/AssembleRequests/IAssembleRequestAppService.cs new file mode 100644 index 000000000..34e3ec465 --- /dev/null +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/MaterialRequests/AssembleRequests/IAssembleRequestAppService.cs @@ -0,0 +1,13 @@ +using System.Collections.Generic; +using System.Threading; +using System.Threading.Tasks; +using Volo.Abp.Application.Dtos; + +namespace Win_in.Sfs.Wms.Store.Application.Contracts; + +public interface IAssembleRequestAppService + : ISfsStoreRequestMasterAppServiceBase + +{ + +} diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/MaterialRequests/AssembleRequests/Inputs/AssembleRequestDetailInput.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/MaterialRequests/AssembleRequests/Inputs/AssembleRequestDetailInput.cs new file mode 100644 index 000000000..befe44e2f --- /dev/null +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/MaterialRequests/AssembleRequests/Inputs/AssembleRequestDetailInput.cs @@ -0,0 +1,85 @@ +using System; +using System.ComponentModel.DataAnnotations; +using Win_in.Sfs.Shared.Domain; +using Win_in.Sfs.Shared.Domain.Shared; + +namespace Win_in.Sfs.Wms.Store.Application.Contracts; + +public class AssembleRequestDetailInput : SfsStoreDetailWithQtyInputBase +{ + /// + /// 目标库位 + /// + [Display(Name = "目标库位")] + [StringLength(SfsEfCorePropertyConst.CodeLength, ErrorMessage = "{0}最多输入{1}个字符")] + public string ToLocationCode { get; set; } + + /// + /// 来源库区 + /// + [Display(Name = "来源库区")] + [StringLength(SfsEfCorePropertyConst.CodeLength, ErrorMessage = "{0}最多输入{1}个字符")] + public string FromLocationArea { get; set; } + + /// + /// 生产线 + /// + [Display(Name = "生产线")] + [StringLength(SfsEfCorePropertyConst.CodeLength, ErrorMessage = "{0}最多输入{1}个字符")] + public string ProdLine { get; set; } + + /// + /// 工作中心 + /// + [Display(Name = "工作中心")] + [StringLength(SfsEfCorePropertyConst.CodeLength, ErrorMessage = "{0}最多输入{1}个字符")] + public string WorkStation { get; set; } + + /// + /// 过期时间 + /// + [Display(Name = "过期时间")] + public DateTime ExpiredTime { get; set; } + + /// + /// 状态 + /// + [Display(Name = "状态")] + public EnumRequestStatus RequestStatus { get; set; } = EnumRequestStatus.New; + + /// + /// ERP储位 + /// + [Display(Name = "ERP储位")] + public string ToLocationErpCode { get; set; } + + /// + /// 已发数量 + /// + [Display(Name = "已发数量")] + public decimal IssuedQty { get; set; } + + /// + /// 已收数量 + /// + [Display(Name = "已收数量")] + public decimal ReceivedQty { get; set; } + + /// + /// 明细状态 + /// + [Display(Name = "明细状态")] + public EnumStatus Status { get; set; } + + /// + /// 位置码 + /// + public string PositionCode { get; set; } + + /// + /// 推荐类型 + /// + public EnumRecommendType RecommendType { get; set; } + + +} diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/MaterialRequests/AssembleRequests/Inputs/AssembleRequestEditInput.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/MaterialRequests/AssembleRequests/Inputs/AssembleRequestEditInput.cs new file mode 100644 index 000000000..2dbba1a36 --- /dev/null +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/MaterialRequests/AssembleRequests/Inputs/AssembleRequestEditInput.cs @@ -0,0 +1,58 @@ +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; +using Win_in.Sfs.Shared.Domain; + +namespace Win_in.Sfs.Wms.Store.Application.Contracts; + +public class AssembleRequestEditInput : SfsStoreRequestCreateOrUpdateInputBase +{ + #region Base + /// + /// 车间 + /// + [Display(Name = "车间")] + [StringLength(SfsEfCorePropertyConst.CodeLength, ErrorMessage = "{0}最多输入{1}个字符")] + public string Workshop { get; set; } + + /// + /// 生产线 + /// + [Display(Name = "生产线")] + [StringLength(SfsEfCorePropertyConst.CodeLength, ErrorMessage = "{0}最多输入{1}个字符")] + public string ProdLine { get; set; } + + /// + /// 使用在途库 + /// + [Display(Name = "使用在途库")] + public bool UseOnTheWayLocation { get; set; } + #endregion + + #region Create + /// + /// 要货单号 + /// + [Display(Name = "要货单号")] + [StringLength(SfsEfCorePropertyConst.CodeLength, ErrorMessage = "{0}最多输入{1}个字符")] + public string Number { get; set; } + + /// + /// 叫料类型 + /// + [Display(Name = "叫料类型")] + public string Type { get; set; } + + /// + /// 备料计划单号 + /// + [Display(Name = "备料计划单号")] + [StringLength(SfsEfCorePropertyConst.CodeLength, ErrorMessage = "{0}最多输入{1}个字符")] + public string PreparationPlanNumber { get; set; } + + /// + /// 明细列表 + /// + [Display(Name = "明细列表")] + public List Details { get; set; } = new List(); + #endregion +} diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/MaterialRequests/AssembleRequests/Inputs/AssembleRequestImportInput.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/MaterialRequests/AssembleRequests/Inputs/AssembleRequestImportInput.cs new file mode 100644 index 000000000..d5fe8bc84 --- /dev/null +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/MaterialRequests/AssembleRequests/Inputs/AssembleRequestImportInput.cs @@ -0,0 +1,53 @@ +using System.ComponentModel.DataAnnotations; +using Win_in.Sfs.Shared.Application.Contracts; +using Win_in.Sfs.Shared.Domain.Shared; + +namespace Win_in.Sfs.Wms.Store.Application.Contracts; + +[Display(Name = "叫料申请")] +public class AssembleRequestImportInput : SfsStoreImportInputBase +{ + /// + /// 叫料类型 + /// + [Display(Name = "叫料类型")] + [Required(ErrorMessage = "{0}是必填项")] + [ImporterHeader(Name = "叫料类型")] + [ExporterHeader(DisplayName = "叫料类型")] + [ValueMapping("人工拉动", EnumMaterialRequestType.Issue_Manual)] + public string Type { get; set; } + + /// + /// 物品代码 + /// + [Display(Name = "物品代码")] + [Required] + public string ItemCode { get; set; } + + /// + /// 目标库位 + /// + [Display(Name = "目标库位")] + [Required] + public string ToLocationCode { get; set; } + + /// + /// 来源库区 + /// + [Display(Name = "调出库区")] + [Required] + public string FromLocationArea { get; set; } + + /// + /// 数量 + /// + [Display(Name = "数量")] + [Required(ErrorMessage = "{0}是必填项")] + public decimal Qty { get; set; } + + /// + /// 备注 + /// + [Display(Name = "备注")] + public string Remark { get; set; } +} diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/MaterialRequests/CoatingMaterialRequests/CoatingMaterialRequestDTO.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/MaterialRequests/CoatingMaterialRequests/CoatingMaterialRequestDTO.cs new file mode 100644 index 000000000..8417f1a70 --- /dev/null +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/MaterialRequests/CoatingMaterialRequests/CoatingMaterialRequestDTO.cs @@ -0,0 +1,38 @@ +using System.ComponentModel.DataAnnotations; +using Win_in.Sfs.Wms.Store.Application.Contracts; + +namespace Win_in.Sfs.Wms.Store.Requests.MaterialRequests; + +public class CoatingMaterialRequestDTO : SfsStoreRequestDTOBase, IHasNumber +{ + /// + /// 叫料类型 + /// + [Display(Name = "叫料类型")] + public string Type { get; set; } + + /// + /// 备料计划单号 + /// + [Display(Name = "备料计划单号")] + public string PreparationPlanNumber { get; set; } + + /// + /// 生产线 + /// + [Display(Name = "生产线")] + public string ProdLine { get; set; } + + /// + /// 车间 + /// + [Display(Name = "车间")] + public string Workshop { get; set; } + + /// + /// 使用在途库 + /// + [Display(Name = "使用在途库")] + public bool UseOnTheWayLocation { get; set; } + +} diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/MaterialRequests/CoatingMaterialRequests/CoatingMaterialRequestDetailDTO.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/MaterialRequests/CoatingMaterialRequests/CoatingMaterialRequestDetailDTO.cs new file mode 100644 index 000000000..578944333 --- /dev/null +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/MaterialRequests/CoatingMaterialRequests/CoatingMaterialRequestDetailDTO.cs @@ -0,0 +1,95 @@ +using System; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using Win_in.Sfs.Shared.Domain; +using Win_in.Sfs.Shared.Domain.Shared; +using Win_in.Sfs.Wms.Store.Application.Contracts; + +namespace Win_in.Sfs.Wms.Store.Requests.MaterialRequests; + +public class CoatingMaterialRequestDetailDTO : SfsStoreDetailWithQtyDTOBase + +{ + + /// + /// 目标库位 + /// + [Display(Name = "目标库位")] + public string ToLocationCode { get; set; } + + /// + /// 来源库区 + /// + [Display(Name = "来源库区")] + [StringLength(SfsEfCorePropertyConst.CodeLength, ErrorMessage = "{0}最多输入{1}个字符")] + public string FromLocationArea { get; set; } + + // /// + // /// 在途库库位 + // /// + // public string OnTheWayLocationCode { get; set; } + + /// + /// 生产线 + /// + [Display(Name = "生产线")] + public string ProdLine { get; set; } + + /// + /// 工作中心 + /// + [Display(Name = "工作中心")] + public string WorkStation { get; set; } + + /// + /// 过期时间 + /// + [Display(Name = "过期时间")] + public DateTime ExpiredTime { get; set; } + + /// + /// 目标ERP储位 + /// + [Display(Name = "目标ERP储位")] + public string ToLocationErpCode { get; set; } + + /// + /// 已发数量 + /// + [Display(Name = "已发数量")] + public decimal IssuedQty { get; set; } + + /// + /// 已收数量 + /// + [Display(Name = "已收数量")] + public decimal ReceivedQty { get; set; } + + /// + /// 明细状态 + /// + [Display(Name = "明细状态")] + public EnumStatus Status { get; set; } + + /// + /// 请求未发 + /// + [Display(Name = "请求未发")] + [NotMapped] + public decimal ToBeIssuedQty => Qty - IssuedQty; + + /// + /// 已发未收 + /// + [Display(Name = "已发未收")] + [NotMapped] + public decimal ToBeReceivedQty => IssuedQty - ReceivedQty; + + /// + /// 请求未收 + /// + [Display(Name = "请求未收")] + [NotMapped] + public decimal NotFinishQty => Qty - ReceivedQty; + +} diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/MaterialRequests/CoatingMaterialRequests/CoatingMaterialRequestDetailInput.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/MaterialRequests/CoatingMaterialRequests/CoatingMaterialRequestDetailInput.cs new file mode 100644 index 000000000..ffdffd63b --- /dev/null +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/MaterialRequests/CoatingMaterialRequests/CoatingMaterialRequestDetailInput.cs @@ -0,0 +1,86 @@ +using System; +using System.ComponentModel.DataAnnotations; +using Win_in.Sfs.Shared.Domain; +using Win_in.Sfs.Shared.Domain.Shared; +using Win_in.Sfs.Wms.Store.Application.Contracts; + +namespace Win_in.Sfs.Wms.Store.Requests.MaterialRequests; + +public class CoatingMaterialRequestDetailInput : SfsStoreDetailWithQtyInputBase +{ + /// + /// 目标库位 + /// + [Display(Name = "目标库位")] + [StringLength(SfsEfCorePropertyConst.CodeLength, ErrorMessage = "{0}最多输入{1}个字符")] + public string ToLocationCode { get; set; } + + /// + /// 来源库区 + /// + [Display(Name = "来源库区")] + [StringLength(SfsEfCorePropertyConst.CodeLength, ErrorMessage = "{0}最多输入{1}个字符")] + public string FromLocationArea { get; set; } + + /// + /// 生产线 + /// + [Display(Name = "生产线")] + [StringLength(SfsEfCorePropertyConst.CodeLength, ErrorMessage = "{0}最多输入{1}个字符")] + public string ProdLine { get; set; } + + /// + /// 工作中心 + /// + [Display(Name = "工作中心")] + [StringLength(SfsEfCorePropertyConst.CodeLength, ErrorMessage = "{0}最多输入{1}个字符")] + public string WorkStation { get; set; } + + /// + /// 过期时间 + /// + [Display(Name = "过期时间")] + public DateTime ExpiredTime { get; set; } + + /// + /// 状态 + /// + [Display(Name = "状态")] + public EnumRequestStatus RequestStatus { get; set; } = EnumRequestStatus.New; + + /// + /// ERP储位 + /// + [Display(Name = "ERP储位")] + public string ToLocationErpCode { get; set; } + + /// + /// 已发数量 + /// + [Display(Name = "已发数量")] + public decimal IssuedQty { get; set; } + + /// + /// 已收数量 + /// + [Display(Name = "已收数量")] + public decimal ReceivedQty { get; set; } + + /// + /// 明细状态 + /// + [Display(Name = "明细状态")] + public EnumStatus Status { get; set; } + + /// + /// 位置码 + /// + public string PositionCode { get; set; } + + /// + /// 推荐类型 + /// + public EnumRecommendType RecommendType { get; set; } + + +} diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/MaterialRequests/CoatingMaterialRequests/CoatingMaterialRequestEditInput.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/MaterialRequests/CoatingMaterialRequests/CoatingMaterialRequestEditInput.cs new file mode 100644 index 000000000..cd9a306fe --- /dev/null +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/MaterialRequests/CoatingMaterialRequests/CoatingMaterialRequestEditInput.cs @@ -0,0 +1,59 @@ +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; +using Win_in.Sfs.Shared.Domain; +using Win_in.Sfs.Wms.Store.Application.Contracts; + +namespace Win_in.Sfs.Wms.Store.Requests.MaterialRequests; + +public class CoatingMaterialRequestEditInput : SfsStoreRequestCreateOrUpdateInputBase +{ + #region Base + /// + /// 车间 + /// + [Display(Name = "车间")] + [StringLength(SfsEfCorePropertyConst.CodeLength, ErrorMessage = "{0}最多输入{1}个字符")] + public string Workshop { get; set; } + + /// + /// 生产线 + /// + [Display(Name = "生产线")] + [StringLength(SfsEfCorePropertyConst.CodeLength, ErrorMessage = "{0}最多输入{1}个字符")] + public string ProdLine { get; set; } + + /// + /// 使用在途库 + /// + [Display(Name = "使用在途库")] + public bool UseOnTheWayLocation { get; set; } + #endregion + + #region Create + /// + /// 要货单号 + /// + [Display(Name = "要货单号")] + [StringLength(SfsEfCorePropertyConst.CodeLength, ErrorMessage = "{0}最多输入{1}个字符")] + public string Number { get; set; } + + /// + /// 叫料类型 + /// + [Display(Name = "叫料类型")] + public string Type { get; set; } + + /// + /// 备料计划单号 + /// + [Display(Name = "备料计划单号")] + [StringLength(SfsEfCorePropertyConst.CodeLength, ErrorMessage = "{0}最多输入{1}个字符")] + public string PreparationPlanNumber { get; set; } + + /// + /// 明细列表 + /// + [Display(Name = "明细列表")] + public List Details { get; set; } = new List(); + #endregion +} diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/MaterialRequests/CoatingMaterialRequests/CoatingMaterialRequestImportInput.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/MaterialRequests/CoatingMaterialRequests/CoatingMaterialRequestImportInput.cs new file mode 100644 index 000000000..53b7a3da1 --- /dev/null +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/MaterialRequests/CoatingMaterialRequests/CoatingMaterialRequestImportInput.cs @@ -0,0 +1,54 @@ +using System.ComponentModel.DataAnnotations; +using Win_in.Sfs.Shared.Application.Contracts; +using Win_in.Sfs.Shared.Domain.Shared; +using Win_in.Sfs.Wms.Store.Application.Contracts; + +namespace Win_in.Sfs.Wms.Store.Requests.MaterialRequests; + +[Display(Name = "叫料申请")] +public class CoatingMaterialRequestImportInput : SfsStoreImportInputBase +{ + /// + /// 叫料类型 + /// + [Display(Name = "叫料类型")] + [Required(ErrorMessage = "{0}是必填项")] + [ImporterHeader(Name = "叫料类型")] + [ExporterHeader(DisplayName = "叫料类型")] + [ValueMapping("人工拉动", EnumMaterialRequestType.Issue_Manual)] + public string Type { get; set; } + + /// + /// 物品代码 + /// + [Display(Name = "物品代码")] + [Required] + public string ItemCode { get; set; } + + /// + /// 目标库位 + /// + [Display(Name = "目标库位")] + [Required] + public string ToLocationCode { get; set; } + + /// + /// 来源库区 + /// + [Display(Name = "调出库区")] + [Required] + public string FromLocationArea { get; set; } + + /// + /// 数量 + /// + [Display(Name = "数量")] + [Required(ErrorMessage = "{0}是必填项")] + public decimal Qty { get; set; } + + /// + /// 备注 + /// + [Display(Name = "备注")] + public string Remark { get; set; } +} diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/MaterialRequests/CoatingMaterialRequests/CoatingMaterialRequestPermissions.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/MaterialRequests/CoatingMaterialRequests/CoatingMaterialRequestPermissions.cs new file mode 100644 index 000000000..6c4b538a1 --- /dev/null +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/MaterialRequests/CoatingMaterialRequests/CoatingMaterialRequestPermissions.cs @@ -0,0 +1,27 @@ +using Volo.Abp.Authorization.Permissions; +using Win_in.Sfs.Wms.Store.Application.Contracts; + +namespace Win_in.Sfs.Wms.Store.Requests.MaterialRequests; + +public static class CoatingMaterialRequestPermissions +{ + + public const string Default = StorePermissions.GroupName + "." + nameof(CoatingMaterialRequest); + public const string Create = Default + "." + StorePermissions.CreateStr; + public const string Update = Default + "." + StorePermissions.UpdateStr; + public const string Delete = Default + "." + StorePermissions.DeleteStr; + + //自动叫料申请 + public const string AutoMaterialRequest = StorePermissions.GroupName + "." + nameof(AutoMaterialRequest); + + public static void AddCoatingMaterialRequestPermission(this PermissionGroupDefinition permissionGroup) + { + var MaterialRequestPermission = permissionGroup.AddPermission(Default, StorePermissionDefinitionProvider.L(nameof(CoatingMaterialRequest))); + MaterialRequestPermission.AddChild(Create, StorePermissionDefinitionProvider.L(StorePermissions.CreateStr)); + MaterialRequestPermission.AddChild(Update, StorePermissionDefinitionProvider.L(StorePermissions.UpdateStr)); + MaterialRequestPermission.AddChild(Delete, StorePermissionDefinitionProvider.L(StorePermissions.DeleteStr)); + + permissionGroup.AddPermission(AutoMaterialRequest, StorePermissionDefinitionProvider.L(nameof(AutoMaterialRequest))); + + } +} diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/MaterialRequests/CoatingMaterialRequests/ICoatingMaterialRequestAppService.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/MaterialRequests/CoatingMaterialRequests/ICoatingMaterialRequestAppService.cs new file mode 100644 index 000000000..5caa7b60c --- /dev/null +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/MaterialRequests/CoatingMaterialRequests/ICoatingMaterialRequestAppService.cs @@ -0,0 +1,36 @@ +using System.Collections.Generic; +using System.Threading; +using System.Threading.Tasks; +using Volo.Abp.Application.Dtos; +using Win_in.Sfs.Wms.Store.Application.Contracts; + +namespace Win_in.Sfs.Wms.Store.Requests.MaterialRequests; + +public interface ICoatingMaterialRequestAppService + : ISfsStoreRequestMasterAppServiceBase + +{ + Task CreateAndHandleAsync(CoatingMaterialRequestEditInput input); + + /// + /// 根据备料计划生成 叫料请求 + /// + /// + Task CreateAndHandleByPreparationPlan(string productionPlanNumber); + + Task CreateAndHandleByAPIAsync(CoatingMaterialRequestEditInput input); + + /// + /// 根据类型获取叫料请求 + /// + /// + /// 叫料请求类型 + /// + /// + /// + Task> GetListByTypeAsync(SfsStoreRequestInputBase requestInput, + string type, bool includeDetails = false, CancellationToken cancellationToken = default); + + Task> GetListByTypeAsync(string type); + +} diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/MaterialRequests/InjectionRequests/DTOs/InjectionRequestDTO.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/MaterialRequests/InjectionRequests/DTOs/InjectionRequestDTO.cs new file mode 100644 index 000000000..654107abe --- /dev/null +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/MaterialRequests/InjectionRequests/DTOs/InjectionRequestDTO.cs @@ -0,0 +1,40 @@ +using System.ComponentModel.DataAnnotations; + +namespace Win_in.Sfs.Wms.Store.Application.Contracts; + +public class InjectionRequestDTO : SfsStoreRequestDTOBase, IHasNumber +{ + /// + /// 叫料类型 + /// + [Display(Name = "叫料类型")] + public string Type { get; set; } + + /// + /// 生产线 + /// + [Display(Name = "生产线")] + public string ProdLine { get; set; } + + /// + /// 是否使用在途库 + /// + [Display(Name = "是否使用在途库")] + public bool IsUseOnTheWayLocation { get; set; } + + /// + /// 可用来源库位Json集合 + /// + public string FromLocationCodeJsonList { get; set; } + + /// + /// 叫料库位 + /// + public string ToLocationCode { get; set; } + + /// + /// 目标ERP储位 + /// + [Display(Name = "目标ERP储位")] + public string ToLocationErpCode { get; set; } +} diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/MaterialRequests/InjectionRequests/DTOs/InjectionRequestDetailDTO.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/MaterialRequests/InjectionRequests/DTOs/InjectionRequestDetailDTO.cs new file mode 100644 index 000000000..45f7be885 --- /dev/null +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/MaterialRequests/InjectionRequests/DTOs/InjectionRequestDetailDTO.cs @@ -0,0 +1,50 @@ +using System; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using Win_in.Sfs.Shared.Domain; +using Win_in.Sfs.Shared.Domain.Shared; + +namespace Win_in.Sfs.Wms.Store.Application.Contracts; + +public class InjectionRequestDetailDTO : SfsStoreDetailWithQtyDTOBase +{ + /// + /// 已发数量 + /// + [Display(Name = "已发数量")] + public decimal IssuedQty { get; set; } + + /// + /// 已收数量 + /// + [Display(Name = "已收数量")] + public decimal ReceivedQty { get; set; } + + /// + /// 明细状态 + /// + [Display(Name = "明细状态")] + public EnumStatus Status { get; set; } + + /// + /// 请求未发 + /// + [Display(Name = "请求未发")] + [NotMapped] + public decimal ToBeIssuedQty => Qty - IssuedQty; + + /// + /// 已发未收 + /// + [Display(Name = "已发未收")] + [NotMapped] + public decimal ToBeReceivedQty => IssuedQty - ReceivedQty; + + /// + /// 请求未收 + /// + [Display(Name = "请求未收")] + [NotMapped] + public decimal NotFinishQty => Qty - ReceivedQty; + +} diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/MaterialRequests/InjectionRequests/IInjectionRequestAppService.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/MaterialRequests/InjectionRequests/IInjectionRequestAppService.cs new file mode 100644 index 000000000..dd2cf5639 --- /dev/null +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/MaterialRequests/InjectionRequests/IInjectionRequestAppService.cs @@ -0,0 +1,13 @@ +using System.Collections.Generic; +using System.Threading; +using System.Threading.Tasks; +using Volo.Abp.Application.Dtos; + +namespace Win_in.Sfs.Wms.Store.Application.Contracts; + +public interface IInjectionRequestAppService + : ISfsStoreRequestMasterAppServiceBase + +{ + +} diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/MaterialRequests/InjectionRequests/InjectionRequestPermissions.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/MaterialRequests/InjectionRequests/InjectionRequestPermissions.cs new file mode 100644 index 000000000..1757aaada --- /dev/null +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/MaterialRequests/InjectionRequests/InjectionRequestPermissions.cs @@ -0,0 +1,27 @@ +using Volo.Abp.Authorization.Permissions; +using Win_in.Sfs.Wms.Store.Domain; + +namespace Win_in.Sfs.Wms.Store.Application.Contracts; + +public static class InjectionRequestPermissions +{ + + public const string Default = StorePermissions.GroupName + "." + nameof(InjectionRequest); + public const string Create = Default + "." + StorePermissions.CreateStr; + public const string Update = Default + "." + StorePermissions.UpdateStr; + public const string Delete = Default + "." + StorePermissions.DeleteStr; + + //自动叫料申请 + public const string AutoInjectionRequest = StorePermissions.GroupName + "." + nameof(AutoInjectionRequest); + + public static void AddInjectionRequestPermission(this PermissionGroupDefinition permissionGroup) + { + var InjectionRequestPermission = permissionGroup.AddPermission(Default, StorePermissionDefinitionProvider.L(nameof(InjectionRequest))); + InjectionRequestPermission.AddChild(Create, StorePermissionDefinitionProvider.L(StorePermissions.CreateStr)); + InjectionRequestPermission.AddChild(Update, StorePermissionDefinitionProvider.L(StorePermissions.UpdateStr)); + InjectionRequestPermission.AddChild(Delete, StorePermissionDefinitionProvider.L(StorePermissions.DeleteStr)); + + permissionGroup.AddPermission(AutoInjectionRequest, StorePermissionDefinitionProvider.L(nameof(AutoInjectionRequest))); + + } +} diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/MaterialRequests/InjectionRequests/Inputs/InjectionRequestDetailInput.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/MaterialRequests/InjectionRequests/Inputs/InjectionRequestDetailInput.cs new file mode 100644 index 000000000..f1e0eb41b --- /dev/null +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/MaterialRequests/InjectionRequests/Inputs/InjectionRequestDetailInput.cs @@ -0,0 +1,85 @@ +using System; +using System.ComponentModel.DataAnnotations; +using Win_in.Sfs.Shared.Domain; +using Win_in.Sfs.Shared.Domain.Shared; + +namespace Win_in.Sfs.Wms.Store.Application.Contracts; + +public class InjectionRequestDetailInput : SfsStoreDetailWithQtyInputBase +{ + /// + /// 目标库位 + /// + [Display(Name = "目标库位")] + [StringLength(SfsEfCorePropertyConst.CodeLength, ErrorMessage = "{0}最多输入{1}个字符")] + public string ToLocationCode { get; set; } + + /// + /// 来源库区 + /// + [Display(Name = "来源库区")] + [StringLength(SfsEfCorePropertyConst.CodeLength, ErrorMessage = "{0}最多输入{1}个字符")] + public string FromLocationArea { get; set; } + + /// + /// 生产线 + /// + [Display(Name = "生产线")] + [StringLength(SfsEfCorePropertyConst.CodeLength, ErrorMessage = "{0}最多输入{1}个字符")] + public string ProdLine { get; set; } + + /// + /// 工作中心 + /// + [Display(Name = "工作中心")] + [StringLength(SfsEfCorePropertyConst.CodeLength, ErrorMessage = "{0}最多输入{1}个字符")] + public string WorkStation { get; set; } + + /// + /// 过期时间 + /// + [Display(Name = "过期时间")] + public DateTime ExpiredTime { get; set; } + + /// + /// 状态 + /// + [Display(Name = "状态")] + public EnumRequestStatus RequestStatus { get; set; } = EnumRequestStatus.New; + + /// + /// ERP储位 + /// + [Display(Name = "ERP储位")] + public string ToLocationErpCode { get; set; } + + /// + /// 已发数量 + /// + [Display(Name = "已发数量")] + public decimal IssuedQty { get; set; } + + /// + /// 已收数量 + /// + [Display(Name = "已收数量")] + public decimal ReceivedQty { get; set; } + + /// + /// 明细状态 + /// + [Display(Name = "明细状态")] + public EnumStatus Status { get; set; } + + /// + /// 位置码 + /// + public string PositionCode { get; set; } + + /// + /// 推荐类型 + /// + public EnumRecommendType RecommendType { get; set; } + + +} diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/MaterialRequests/InjectionRequests/Inputs/InjectionRequestEditInput.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/MaterialRequests/InjectionRequests/Inputs/InjectionRequestEditInput.cs new file mode 100644 index 000000000..7277bf50c --- /dev/null +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/MaterialRequests/InjectionRequests/Inputs/InjectionRequestEditInput.cs @@ -0,0 +1,58 @@ +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; +using Win_in.Sfs.Shared.Domain; + +namespace Win_in.Sfs.Wms.Store.Application.Contracts; + +public class InjectionRequestEditInput : SfsStoreRequestCreateOrUpdateInputBase +{ + #region Base + /// + /// 车间 + /// + [Display(Name = "车间")] + [StringLength(SfsEfCorePropertyConst.CodeLength, ErrorMessage = "{0}最多输入{1}个字符")] + public string Workshop { get; set; } + + /// + /// 生产线 + /// + [Display(Name = "生产线")] + [StringLength(SfsEfCorePropertyConst.CodeLength, ErrorMessage = "{0}最多输入{1}个字符")] + public string ProdLine { get; set; } + + /// + /// 使用在途库 + /// + [Display(Name = "使用在途库")] + public bool UseOnTheWayLocation { get; set; } + #endregion + + #region Create + /// + /// 要货单号 + /// + [Display(Name = "要货单号")] + [StringLength(SfsEfCorePropertyConst.CodeLength, ErrorMessage = "{0}最多输入{1}个字符")] + public string Number { get; set; } + + /// + /// 叫料类型 + /// + [Display(Name = "叫料类型")] + public string Type { get; set; } + + /// + /// 备料计划单号 + /// + [Display(Name = "备料计划单号")] + [StringLength(SfsEfCorePropertyConst.CodeLength, ErrorMessage = "{0}最多输入{1}个字符")] + public string PreparationPlanNumber { get; set; } + + /// + /// 明细列表 + /// + [Display(Name = "明细列表")] + public List Details { get; set; } = new List(); + #endregion +} diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/MaterialRequests/InjectionRequests/Inputs/InjectionRequestImportInput.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/MaterialRequests/InjectionRequests/Inputs/InjectionRequestImportInput.cs new file mode 100644 index 000000000..e661693ef --- /dev/null +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/MaterialRequests/InjectionRequests/Inputs/InjectionRequestImportInput.cs @@ -0,0 +1,53 @@ +using System.ComponentModel.DataAnnotations; +using Win_in.Sfs.Shared.Application.Contracts; +using Win_in.Sfs.Shared.Domain.Shared; + +namespace Win_in.Sfs.Wms.Store.Application.Contracts; + +[Display(Name = "叫料申请")] +public class InjectionRequestImportInput : SfsStoreImportInputBase +{ + /// + /// 叫料类型 + /// + [Display(Name = "叫料类型")] + [Required(ErrorMessage = "{0}是必填项")] + [ImporterHeader(Name = "叫料类型")] + [ExporterHeader(DisplayName = "叫料类型")] + [ValueMapping("人工拉动", EnumMaterialRequestType.Issue_Manual)] + public string Type { get; set; } + + /// + /// 物品代码 + /// + [Display(Name = "物品代码")] + [Required] + public string ItemCode { get; set; } + + /// + /// 目标库位 + /// + [Display(Name = "目标库位")] + [Required] + public string ToLocationCode { get; set; } + + /// + /// 来源库区 + /// + [Display(Name = "调出库区")] + [Required] + public string FromLocationArea { get; set; } + + /// + /// 数量 + /// + [Display(Name = "数量")] + [Required(ErrorMessage = "{0}是必填项")] + public decimal Qty { get; set; } + + /// + /// 备注 + /// + [Display(Name = "备注")] + public string Remark { get; set; } +} diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/TransferLibRequests/DTOs/TransferLibRequestDTO.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/TransferLibRequests/DTOs/TransferLibRequestDTO.cs new file mode 100644 index 000000000..924a47290 --- /dev/null +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/TransferLibRequests/DTOs/TransferLibRequestDTO.cs @@ -0,0 +1,23 @@ +using System.ComponentModel.DataAnnotations; + +namespace Win_in.Sfs.Wms.Store.Application.Contracts; + +/// +/// 库存转移记录-实体DTO +/// +public class TransferLibRequestDTO : SfsStoreRequestDTOBase, IHasNumber +{ + + /// + /// 调拨类型 + /// + [Display(Name = "调拨类型")] + public string Type { get; set; } + + /// + /// 使用中间库 + /// + [Display(Name = "使用中间库")] + public bool UseOnTheWayLocation { get; set; } + +} diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/TransferLibRequests/DTOs/TransferLibRequestDetailDTO.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/TransferLibRequests/DTOs/TransferLibRequestDetailDTO.cs new file mode 100644 index 000000000..afcac60e0 --- /dev/null +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/TransferLibRequests/DTOs/TransferLibRequestDetailDTO.cs @@ -0,0 +1,23 @@ +using System.ComponentModel.DataAnnotations; +using Win_in.Sfs.Shared.Domain.Shared; + +namespace Win_in.Sfs.Wms.Store.Application.Contracts; + +/// +/// 库存转移记录-明细表 +/// +public class TransferLibRequestDetailDTO : SfsStoreDetailWithFromToDTOBase +{ + + /// + /// 原因 + /// + [Display(Name = "原因")] + public string Reason { get; set; } + + /// + /// 执行任务状态 + /// + public EnumJobStatus JobStatus { get; set; } + +} diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/TransferLibRequests/ITransferLibRequestAppService.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/TransferLibRequests/ITransferLibRequestAppService.cs new file mode 100644 index 000000000..c42656894 --- /dev/null +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/TransferLibRequests/ITransferLibRequestAppService.cs @@ -0,0 +1,20 @@ +using System.Threading; +using System.Threading.Tasks; +using Volo.Abp.Application.Dtos; + +namespace Win_in.Sfs.Wms.Store.Application.Contracts; + +public interface ITransferLibRequestAppService +: ISfsStoreRequestMasterAppServiceBase +{ + + Task> GetListForWipAsync(SfsStoreRequestInputBase sfsRequestDTO, bool includeDetails = false, + CancellationToken cancellationToken = default); + + Task> GetListForERPLocAsync(SfsStoreRequestInputBase sfsRequestDTO, bool includeDetails = false, + CancellationToken cancellationToken = default); + + Task> GetListForCustomAsync(SfsStoreRequestInputBase sfsRequestDTO, bool includeDetails = false, + CancellationToken cancellationToken = default); + +} diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/TransferLibRequests/Inputs/TransferLibRequestDetailInput.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/TransferLibRequests/Inputs/TransferLibRequestDetailInput.cs new file mode 100644 index 000000000..d4c93f493 --- /dev/null +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/TransferLibRequests/Inputs/TransferLibRequestDetailInput.cs @@ -0,0 +1,25 @@ +using System.ComponentModel.DataAnnotations; +using Win_in.Sfs.Shared.Domain; +using Win_in.Sfs.Shared.Domain.Shared; + +namespace Win_in.Sfs.Wms.Store.Application.Contracts; + +/// +/// 库存转移记录-明细表 +/// +public class TransferLibRequestDetailInput : SfsStoreDetailWithFromToInputBase +{ + /// + /// 原因 + /// + [Display(Name = "原因")] + [StringLength(SfsEfCorePropertyConst.RemarkLength, ErrorMessage = "{0}最多输入{1}个字符")] + public string Reason { get; set; } + + /// + /// 执行任务状态 + /// + public EnumJobStatus JobStatus { get; set; } + + +} diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/TransferLibRequests/Inputs/TransferLibRequestEditInput.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/TransferLibRequests/Inputs/TransferLibRequestEditInput.cs new file mode 100644 index 000000000..0c32b5949 --- /dev/null +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/TransferLibRequests/Inputs/TransferLibRequestEditInput.cs @@ -0,0 +1,40 @@ +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; +using Win_in.Sfs.Shared.Domain; + +namespace Win_in.Sfs.Wms.Store.Application.Contracts; + +/// +/// 新增和更新基础DTO +/// +public class TransferLibRequestEditInput : SfsStoreRequestCreateOrUpdateInputBase +{ + #region Base + /// + /// 调拨类型 + /// + [Display(Name = "调拨类型")] + public string Type { get; set; } + + /// + /// 使用中间库 + /// + [Display(Name = "使用中间库")] + public bool UseOnTheWayLocation { get; set; } + #endregion + + #region Create + /// + /// 转移记录单号 + /// + [Display(Name = "转移记录单号")] + [StringLength(SfsEfCorePropertyConst.CodeLength, ErrorMessage = "{0}最多输入{1}个字符")] + public string Number { get; set; } + + /// + /// 明细列表 + /// + [Display(Name = "明细列表")] + public List Details { get; set; } + #endregion +} diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/TransferLibRequests/Inputs/TransferLibRequestImportInput.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/TransferLibRequests/Inputs/TransferLibRequestImportInput.cs new file mode 100644 index 000000000..d58c187c3 --- /dev/null +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/TransferLibRequests/Inputs/TransferLibRequestImportInput.cs @@ -0,0 +1,75 @@ +using System.ComponentModel.DataAnnotations; +using Win_in.Sfs.Shared.Application.Contracts; +using Win_in.Sfs.Shared.Domain.Shared; + +namespace Win_in.Sfs.Wms.Store.Application.Contracts; + +public class TransferLibRequestImportInput : SfsStoreImportInputBase +{ + + /// + /// 调拨类型 + /// + [Display(Name = "调拨类型")] + [Required(ErrorMessage = "{0}是必填项")] + [ImporterHeader(Name = "调拨类型")] + [ExporterHeader(DisplayName = "调拨类型")] + [ValueMapping("区域间调拨(储位调拨)", EnumTransSubType.Transfer_Area)] + [ValueMapping("线边调拨(线边仓调拨)", EnumTransSubType.Transfer_WIP)] + [ValueMapping("客户库位调拨(客户储位调拨)", EnumTransSubType.Transfer_Customer)] + public string Type { get; set; } + + /// + /// 使用中间库 + /// + [Display(Name = "使用中间库")] + [Required(ErrorMessage = "{0}是必填项")] + public bool UseOnTheWayLocation { get; set; } + + /// + /// 在途库地址 + /// + [Display(Name = "在途库地址")] + public string OnTheWayLocationCode { get; set; } + + /// + /// 物料号 + /// + [Display(Name = "物料号")] + [Required(ErrorMessage = "{0}是必填项")] + public string ItemCode { get; set; } + + /// + /// 调拨数量 + /// + [Display(Name = "调拨数量")] + [Required(ErrorMessage = "{0}是必填项")] + public decimal Qty { get; set; } + + /// + /// 调出库位 + /// + [Display(Name = "调出库位")] + [Required(ErrorMessage = "{0}是必填项")] + public string FromLocationCode { get; set; } + + /// + /// 调入库位 + /// + [Display(Name = "调入库位")] + [Required(ErrorMessage = "{0}是必填项")] + public string ToLocationCode { get; set; } + + /// + /// 箱码 + /// + [Display(Name = "箱码")] + public string PackingCode { get; set; } + + /// + /// 状态 + /// + [Display(Name = "状态")] + [Required(ErrorMessage = "{0}是必填项")] + public EnumInventoryStatus Status { get; set; } +} diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/TransferLibRequests/TransferLibRequestPermissions.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/TransferLibRequests/TransferLibRequestPermissions.cs new file mode 100644 index 000000000..83115206b --- /dev/null +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Requests/TransferLibRequests/TransferLibRequestPermissions.cs @@ -0,0 +1,29 @@ +using Volo.Abp.Authorization.Permissions; +using Win_in.Sfs.Wms.Store.Domain; + +namespace Win_in.Sfs.Wms.Store.Application.Contracts; + +public static class TransferLibRequestPermissions +{ + public const string Default = StorePermissions.GroupName + "." + nameof(TransferLibRequest); + public const string Create = Default + "." + StorePermissions.CreateStr; + public const string Update = Default + "." + StorePermissions.UpdateStr; + public const string Delete = Default + "." + StorePermissions.DeleteStr; + + //线边调拨记录 + public const string WipTransferLibRequest = StorePermissions.GroupName + "." + nameof(WipTransferLibRequest); + //客户调拨记录 + public const string CustomerTransferLibRequest = StorePermissions.GroupName + "." + nameof(CustomerTransferLibRequest); + + public static void AddTransferLibRequestPermission(this PermissionGroupDefinition permissionGroup) + { + var transferLibRequestPermission = permissionGroup.AddPermission(Default, StorePermissionDefinitionProvider.L(nameof(TransferLibRequest))); + transferLibRequestPermission.AddChild(Create, StorePermissionDefinitionProvider.L(StorePermissions.CreateStr)); + transferLibRequestPermission.AddChild(Update, StorePermissionDefinitionProvider.L(StorePermissions.UpdateStr)); + transferLibRequestPermission.AddChild(Delete, StorePermissionDefinitionProvider.L(StorePermissions.DeleteStr)); + + permissionGroup.AddPermission(WipTransferLibRequest, StorePermissionDefinitionProvider.L(nameof(WipTransferLibRequest))); + permissionGroup.AddPermission(CustomerTransferLibRequest, StorePermissionDefinitionProvider.L(nameof(CustomerTransferLibRequest))); + + } +} diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Jobs/IssueJobs/AssembleJobs/AssembleJobAppService.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Jobs/IssueJobs/AssembleJobs/AssembleJobAppService.cs new file mode 100644 index 000000000..e58d26e1b --- /dev/null +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Jobs/IssueJobs/AssembleJobs/AssembleJobAppService.cs @@ -0,0 +1,144 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Linq.Expressions; +using System.Threading; +using System.Threading.Tasks; +using Microsoft.AspNetCore.Authorization; +using Microsoft.AspNetCore.Mvc; +using Volo.Abp; +using Volo.Abp.Application.Dtos; +using Volo.Abp.ObjectMapping; +using Win_in.Sfs.Basedata.Domain.Shared; +using Win_in.Sfs.Shared.Domain; +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; + +namespace Win_in.Sfs.Wms.Store.Application; + +[Authorize] +[Route($"{StoreConsts.RootPath}assemble-job")] +public class AssembleJobAppService + : SfsJobAppServiceBase, + IAssembleJobAppService +{ + private readonly IAssembleJobManager _assembleJobManager; + + public AssembleJobAppService( + IAssembleJobRepository repository, IAssembleJobManager assembleJobManager + ) : base(repository, assembleJobManager) + { + _assembleJobManager = assembleJobManager; + } + + /// + /// 根据物品和库位 检查是否存在发料任务 + /// + /// + /// + /// + /// + [Authorize] + [HttpGet("check-job-exist")] + public virtual async Task> CheckJobExistByItemCodeAndLocationCode(string itemCode, + string locationCode) + { + var entities = await _repository.GetListAsync(c => + c.Details.Any(p => + (p.ItemCode == itemCode && p.RecommendFromLocationCode == locationCode) || + (p.ItemCode == itemCode && p.ToLocationCode == locationCode)) + && (c.JobStatus == EnumJobStatus.Open || c.JobStatus == EnumJobStatus.Doing), true).ConfigureAwait(false); + var dtos = ObjectMapper.Map, List>(entities); + return dtos; + } + + [HttpPost("cancel-by-request/{assembleNumber}")] + public virtual async Task CancelByMaterialRequestAsync(string assembleNumber) + { + var entities = await _repository.GetListAsync(p => p.AssembleRequestNumber == assembleNumber).ConfigureAwait(false); + foreach (var entity in entities) + { + await _assembleJobManager.CancelAsync(entity).ConfigureAwait(false); + } + } + + [HttpPost("invalid")] + public override async Task CancelAsync(Guid id) + { + var assembleJob = await _repository.GetAsync(id).ConfigureAwait(false); + if (assembleJob == null) + { + throw new UserFriendlyException($"未找到ID为 {id} 的任务"); + } + + await _assembleJobManager.CancelAsync(assembleJob).ConfigureAwait(false); + + } + + /// + /// 根据叫料请求类型获取发料任务 + /// + /// + /// + /// 叫料请求类型: + /// 人工拉动:Issue_Manual; + /// 线边拉动:Issue_WIP; + /// + /// + /// + /// + [HttpPost("by-type/{requestType}")] + public virtual async Task> GetListByTypeAsync(SfsJobRequestInputBase requestInput, + string requestType, bool includeDetails = false, CancellationToken cancellationToken = default) + { + Expression> expression = p => p.RequestType == requestType; + if (requestInput.Condition.Filters?.Count > 0) + { + expression = expression.And(requestInput.Condition.Filters.ToLambda()); + } + + return await GetPagedListAsync(expression, requestInput.SkipCount, requestInput.MaxResultCount, + requestInput.Sorting, includeDetails, cancellationToken).ConfigureAwait(false); + + } + + [HttpPost("by-request-number/{requestNumber}")] + public virtual async Task> GetByRequestNumberAsync(string requestNumber) + { + var entitys = await _repository.GetListAsync(p => p.AssembleRequestNumber == requestNumber).ConfigureAwait(false); + return ObjectMapper.Map, List>(entitys); + } + + /// + /// 保存拆箱时涉及的明细修改 + /// + /// + [HttpPost("save-detail-split-packing")] + public virtual async Task SaveDetail_SplitPackingAsync(SplitPacking_UpdateJobDetailInput input) + { + var job = await _repository.FindAsync(p => p.Number == input.Number).ConfigureAwait(false); + AssembleJobDetail detail = job.Details.FirstOrDefault(p => p.RecommendPackingCode == input.FromPackingCode ); /*&& p.HandledQty == input.FromQty*/ + if (detail == null) + { + //throw new UserFriendlyException($"根据HandledPackingCode={input.FromPackingCode}取AssembleJobDetail表为空!"); + throw new UserFriendlyException($"根据RecommendPackingCode={input.FromPackingCode}取AssembleJobDetail表为空!"); + } + //插入目标箱 + var newDetail = CommonHelper.CloneObj(detail); + newDetail.SetId(GuidGenerator.Create()); + newDetail.RecommendPackingCode = input.ToPackingCode; + newDetail.RecommendQty = input.ToQty; + newDetail.HandledPackingCode = detail.HandledPackingCode.HasValue() ? input.ToPackingCode : null; //源实际实际箱码有值,则新记录实际箱码有值 + newDetail.HandledQty = detail.HandledQty > 0 ? input.ToQty : 0; + //newDetail.CreationTime = CommonHelper.CurTime; + job.Details.Add(newDetail); + //修改源箱 + detail.RecommendQty = input.FromQty - input.ToQty; + detail.HandledQty = detail.HandledQty > 0 ? input.FromQty - input.ToQty : 0; + var entity = await _repository.UpdateAsync(job).ConfigureAwait(false); + var ret = ObjectMapper.Map(entity); + return ret; + } +} diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Jobs/IssueJobs/AssembleJobs/AssembleJobAutoMapperProfile.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Jobs/IssueJobs/AssembleJobs/AssembleJobAutoMapperProfile.cs new file mode 100644 index 000000000..d60824554 --- /dev/null +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Jobs/IssueJobs/AssembleJobs/AssembleJobAutoMapperProfile.cs @@ -0,0 +1,29 @@ +using AutoMapper; +using Volo.Abp.AutoMapper; +using Win_in.Sfs.Wms.Store.Application.Contracts; +using Win_in.Sfs.Wms.Store.Domain; + +namespace Win_in.Sfs.Wms.Store.Application; + +public partial class StoreApplicationAutoMapperProfile : Profile +{ + private void AssembleJobAutoMapperProfile() + { + CreateMap() + .ReverseMap(); + + CreateMap() + ; + + CreateMap() + ; + + 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/Jobs/IssueJobs/CoatingIssueJobs/CoatingIssueJobAppService.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Jobs/IssueJobs/CoatingIssueJobs/CoatingIssueJobAppService.cs new file mode 100644 index 000000000..3d7d19faf --- /dev/null +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Jobs/IssueJobs/CoatingIssueJobs/CoatingIssueJobAppService.cs @@ -0,0 +1,195 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Linq.Expressions; +using System.Threading; +using System.Threading.Tasks; +using Microsoft.AspNetCore.Authorization; +using Microsoft.AspNetCore.Mvc; +using Volo.Abp; +using Volo.Abp.Application.Dtos; +using Volo.Abp.ObjectMapping; +using Win_in.Sfs.Basedata.Domain.Shared; +using Win_in.Sfs.Shared.Domain; +using Win_in.Sfs.Shared.Domain.Shared; +using Win_in.Sfs.Wms.Store.Application; +using Win_in.Sfs.Wms.Store.Application.Contracts; +using Win_in.Sfs.Wms.Store.Domain.Shared; + +namespace Win_in.Sfs.Wms.Store.Jobs.IssueJobs; + +[Authorize] +[Route($"{StoreConsts.RootPath}coatingissue-job")] + +public class CoatingIssueJobAppService + : SfsJobAppServiceBase, + ICoatingIssueJobAppService +{ + private readonly ICoatingIssueJobManager _CoatingIssueJobManager; + + public CoatingIssueJobAppService( + ICoatingIssueJobRepository repository, ICoatingIssueJobManager CoatingIssueJobManager + ) : base(repository, CoatingIssueJobManager) + { + _CoatingIssueJobManager = CoatingIssueJobManager; + } + + /// + /// 根据物品和库位 检查是否存在发料任务 + /// + /// + /// + /// + /// + [Authorize] + [HttpGet("check-job-exist")] + public virtual async Task> CheckJobExistByItemCodeAndLocationCode(string itemCode, + string locationCode) + { + var entities = await _repository.GetListAsync(c => + c.Details.Any(p => + p.ItemCode == itemCode && p.RecommendFromLocationCode == locationCode || + p.ItemCode == itemCode && p.ToLocationCode == locationCode) + && (c.JobStatus == EnumJobStatus.Open || c.JobStatus == EnumJobStatus.Doing), true).ConfigureAwait(false); + var dtos = ObjectMapper.Map, List>(entities); + return dtos; + } + + [HttpPost("cancel-by-request/{materialNumber}")] + public virtual async Task CancelByMaterialRequestAsync(string materialNumber) + { + var entities = await _repository.GetListAsync(p => p.MaterialRequestNumber == materialNumber).ConfigureAwait(false); + foreach (var entity in entities) + { + await _CoatingIssueJobManager.CancelAsync(entity).ConfigureAwait(false); + } + } + + //[Authorize(CoatingIssueJobPermissions.Delete)] + //[HttpDelete("details/{id}")] + //public virtual async Task DeleteDetailAsync(Guid id, Guid detailId) + //{ + // var entity = await _repository.GetAsync(id); + // Check.NotNull(entity, EntityClassName); + + // var input = new CoatingIssueJobCheckInput + // { + // JobStatuses = new List() { EnumJobStatus.Pending, EnumJobStatus.Open }, + // }; + // var result = new AbpValidationResult(); + + // var detail = entity.GetDetail(detailId); + + // _CoatingIssueJobManager.CheckJobStatus(entity, input.JobStatuses, result); + // if (result.Errors.Any()) + // { + // throw new AbpValidationException("任务状态错误,不能进行删除明细操作"); + // } + // entity.RemoveDetail(detailId); + //} + + //[Authorize(CoatingIssueJobPermissions.Delete)] + [HttpPost("invalid")] + public override async Task CancelAsync(Guid id) + { + var CoatingIssueJob = await _repository.GetAsync(id).ConfigureAwait(false); + if (CoatingIssueJob == null) + { + throw new UserFriendlyException($"未找到ID为 {id} 的任务"); + } + + /* + var listLocationCode = new List();//取出所有当前job 影响的库位code + foreach (var detail in CoatingIssueJob.Details) + { + if (detail.HandledLocationCode != null) + { + listLocationCode.Add(detail.HandledLocationCode); + } + if (detail.HandledLocationCode != null) + { + listLocationCode.Add(detail.RecommendLocationCode); + } + if (detail.HandledLocationCode != null) + { + listLocationCode.Add(detail.RequestLocationCode); + } + if (detail.HandledLocationCode != null) + { + listLocationCode.Add(detail.ToLocationCode); + } + } + listLocationCode = listLocationCode.Distinct().ToList(); + */ + + await _CoatingIssueJobManager.CancelAsync(CoatingIssueJob).ConfigureAwait(false); + + } + + /// + /// 根据叫料请求类型获取发料任务 + /// + /// + /// + /// 叫料请求类型: + /// 人工拉动:Issue_Manual; + /// 线边拉动:Issue_WIP; + /// + /// + /// + /// + [HttpPost("by-type/{requestType}")] + public virtual async Task> GetListByTypeAsync(SfsJobRequestInputBase requestInput, + string requestType, bool includeDetails = false, CancellationToken cancellationToken = default) + { + Expression> expression = p => p.RequestType == requestType; + if (requestInput.Condition.Filters?.Count > 0) + { + expression = expression.And(requestInput.Condition.Filters.ToLambda()); + } + + return await GetPagedListAsync(expression, requestInput.SkipCount, requestInput.MaxResultCount, + requestInput.Sorting, includeDetails, cancellationToken).ConfigureAwait(false); + + } + + [HttpPost("by-request-number/{requestNumber}")] + public virtual async Task> GetByRequestNumberAsync(string requestNumber) + { + var entitys = await _repository.GetListAsync(p => p.MaterialRequestNumber == requestNumber).ConfigureAwait(false); + return ObjectMapper.Map, List>(entitys); + } + + /// + /// 保存拆箱时涉及的明细修改 + /// + /// + [HttpPost("save-detail-split-packing")] + public virtual async Task SaveDetail_SplitPackingAsync(SplitPacking_UpdateJobDetailInput input) + { + var job = await _repository.FindAsync(p => p.Number == input.Number).ConfigureAwait(false); + var detail = job.Details.FirstOrDefault(p => p.RecommendPackingCode == input.FromPackingCode); /*&& p.HandledQty == input.FromQty*/ + if (detail == null) + { + throw new UserFriendlyException($"根据RecommendPackingCode={input.FromPackingCode}取CoatingIssueJobDetail表为空!"); + } + //插入目标箱 + var newDetail = CommonHelper.CloneObj(detail); + newDetail.SetId(GuidGenerator.Create()); + newDetail.RecommendPackingCode = input.ToPackingCode; + newDetail.RecommendQty = input.ToQty; + newDetail.HandledPackingCode = detail.HandledPackingCode.HasValue() ? input.ToPackingCode : null; //源实际实际箱码有值,则新记录实际箱码有值 + newDetail.HandledQty = detail.HandledQty > 0 ? input.ToQty : 0; + //newDetail.CreationTime = CommonHelper.CurTime; + job.Details.Add(newDetail); + //修改源箱 + detail.RecommendQty = input.FromQty - input.ToQty; + detail.HandledQty = detail.HandledQty > 0 ? input.FromQty - input.ToQty : 0; + var entity = await _repository.UpdateAsync(job).ConfigureAwait(false); + var ret = ObjectMapper.Map(entity); + return ret; + } + + + +} diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Jobs/IssueJobs/CoatingIssueJobs/CoatingIssueJobAutoMapperProfile.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Jobs/IssueJobs/CoatingIssueJobs/CoatingIssueJobAutoMapperProfile.cs new file mode 100644 index 000000000..6de2d02e7 --- /dev/null +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Jobs/IssueJobs/CoatingIssueJobs/CoatingIssueJobAutoMapperProfile.cs @@ -0,0 +1,29 @@ +using AutoMapper; +using Volo.Abp.AutoMapper; +using Win_in.Sfs.Wms.Store.Jobs.IssueJobs; + +namespace Win_in.Sfs.Wms.Store.Application; + +public partial class StoreApplicationAutoMapperProfile : Profile +{ + private void CoatingIssueJobAutoMapperProfile() + { + CreateMap(); + + CreateMap(); + + CreateMap() + ; + + CreateMap() + ; + + 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/Jobs/IssueJobs/InjectionJobs/InjectionJobAppService.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Jobs/IssueJobs/InjectionJobs/InjectionJobAppService.cs new file mode 100644 index 000000000..a8ff9b2bd --- /dev/null +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Jobs/IssueJobs/InjectionJobs/InjectionJobAppService.cs @@ -0,0 +1,144 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Linq.Expressions; +using System.Threading; +using System.Threading.Tasks; +using Microsoft.AspNetCore.Authorization; +using Microsoft.AspNetCore.Mvc; +using Volo.Abp; +using Volo.Abp.Application.Dtos; +using Volo.Abp.ObjectMapping; +using Win_in.Sfs.Basedata.Domain.Shared; +using Win_in.Sfs.Shared.Domain; +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; + +namespace Win_in.Sfs.Wms.Store.Application; + +[Authorize] +[Route($"{StoreConsts.RootPath}injection-job")] +public class InjectionJobAppService + : SfsJobAppServiceBase, + IInjectionJobAppService +{ + private readonly IInjectionJobManager _injectionJobManager; + + public InjectionJobAppService( + IInjectionJobRepository repository, IInjectionJobManager injectionJobManager + ) : base(repository, injectionJobManager) + { + _injectionJobManager = injectionJobManager; + } + + /// + /// 根据物品和库位 检查是否存在发料任务 + /// + /// + /// + /// + /// + [Authorize] + [HttpGet("check-job-exist")] + public virtual async Task> CheckJobExistByItemCodeAndLocationCode(string itemCode, + string locationCode) + { + var entities = await _repository.GetListAsync(c => + c.Details.Any(p => + (p.ItemCode == itemCode && p.RecommendFromLocationCode == locationCode) || + (p.ItemCode == itemCode && p.ToLocationCode == locationCode)) + && (c.JobStatus == EnumJobStatus.Open || c.JobStatus == EnumJobStatus.Doing), true).ConfigureAwait(false); + var dtos = ObjectMapper.Map, List>(entities); + return dtos; + } + + [HttpPost("cancel-by-request/{injectionNumber}")] + public virtual async Task CancelByMaterialRequestAsync(string injectionNumber) + { + var entities = await _repository.GetListAsync(p => p.InjectionRequestNumber == injectionNumber).ConfigureAwait(false); + foreach (var entity in entities) + { + await _injectionJobManager.CancelAsync(entity).ConfigureAwait(false); + } + } + + [HttpPost("invalid")] + public override async Task CancelAsync(Guid id) + { + var injectionJob = await _repository.GetAsync(id).ConfigureAwait(false); + if (injectionJob == null) + { + throw new UserFriendlyException($"未找到ID为 {id} 的任务"); + } + + await _injectionJobManager.CancelAsync(injectionJob).ConfigureAwait(false); + + } + + /// + /// 根据叫料请求类型获取发料任务 + /// + /// + /// + /// 叫料请求类型: + /// 人工拉动:Issue_Manual; + /// 线边拉动:Issue_WIP; + /// + /// + /// + /// + [HttpPost("by-type/{requestType}")] + public virtual async Task> GetListByTypeAsync(SfsJobRequestInputBase requestInput, + string requestType, bool includeDetails = false, CancellationToken cancellationToken = default) + { + Expression> expression = p => p.RequestType == requestType; + if (requestInput.Condition.Filters?.Count > 0) + { + expression = expression.And(requestInput.Condition.Filters.ToLambda()); + } + + return await GetPagedListAsync(expression, requestInput.SkipCount, requestInput.MaxResultCount, + requestInput.Sorting, includeDetails, cancellationToken).ConfigureAwait(false); + + } + + [HttpPost("by-request-number/{requestNumber}")] + public virtual async Task> GetByRequestNumberAsync(string requestNumber) + { + var entitys = await _repository.GetListAsync(p => p.InjectionRequestNumber == requestNumber).ConfigureAwait(false); + return ObjectMapper.Map, List>(entitys); + } + + /// + /// 保存拆箱时涉及的明细修改 + /// + /// + [HttpPost("save-detail-split-packing")] + public virtual async Task SaveDetail_SplitPackingAsync(SplitPacking_UpdateJobDetailInput input) + { + var job = await _repository.FindAsync(p => p.Number == input.Number).ConfigureAwait(false); + InjectionJobDetail detail = job.Details.FirstOrDefault(p => p.RecommendPackingCode == input.FromPackingCode ); /*&& p.HandledQty == input.FromQty*/ + if (detail == null) + { + //throw new UserFriendlyException($"根据HandledPackingCode={input.FromPackingCode}取InjectionJobDetail表为空!"); + throw new UserFriendlyException($"根据RecommendPackingCode={input.FromPackingCode}取InjectionJobDetail表为空!"); + } + //插入目标箱 + var newDetail = CommonHelper.CloneObj(detail); + newDetail.SetId(GuidGenerator.Create()); + newDetail.RecommendPackingCode = input.ToPackingCode; + newDetail.RecommendQty = input.ToQty; + newDetail.HandledPackingCode = detail.HandledPackingCode.HasValue() ? input.ToPackingCode : null; //源实际实际箱码有值,则新记录实际箱码有值 + newDetail.HandledQty = detail.HandledQty > 0 ? input.ToQty : 0; + //newDetail.CreationTime = CommonHelper.CurTime; + job.Details.Add(newDetail); + //修改源箱 + detail.RecommendQty = input.FromQty - input.ToQty; + detail.HandledQty = detail.HandledQty > 0 ? input.FromQty - input.ToQty : 0; + var entity = await _repository.UpdateAsync(job).ConfigureAwait(false); + var ret = ObjectMapper.Map(entity); + return ret; + } +} diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Jobs/IssueJobs/InjectionJobs/InjectionJobAutoMapperProfile.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Jobs/IssueJobs/InjectionJobs/InjectionJobAutoMapperProfile.cs new file mode 100644 index 000000000..883f77001 --- /dev/null +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Jobs/IssueJobs/InjectionJobs/InjectionJobAutoMapperProfile.cs @@ -0,0 +1,31 @@ +using AutoMapper; +using Volo.Abp.AutoMapper; +using Win_in.Sfs.Wms.Store.Application.Contracts; +using Win_in.Sfs.Wms.Store.Domain; + +namespace Win_in.Sfs.Wms.Store.Application; + +public partial class StoreApplicationAutoMapperProfile : Profile +{ + private void InjectionJobAutoMapperProfile() + { + CreateMap() + .ReverseMap(); + + //CreateMap(); + + CreateMap() + ; + + CreateMap() + ; + + 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/Jobs/TransferLibJobs/TransferLibJobAppService.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Jobs/TransferLibJobs/TransferLibJobAppService.cs new file mode 100644 index 000000000..fd4796d16 --- /dev/null +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Jobs/TransferLibJobs/TransferLibJobAppService.cs @@ -0,0 +1,21 @@ +using Microsoft.AspNetCore.Authorization; +using Microsoft.AspNetCore.Mvc; +using Win_in.Sfs.Wms.Store.Application.Contracts; +using Win_in.Sfs.Wms.Store.Domain; +using Win_in.Sfs.Wms.Store.Domain.Shared; + +namespace Win_in.Sfs.Wms.Store.Application; + +[Authorize] +[Route($"{StoreConsts.RootPath}transfer-lib-job")] + +public class TransferLibJobAppService + : SfsJobAppServiceBase, + ITransferLibJobAppService +{ + public TransferLibJobAppService( + ITransferLibJobRepository repository, ITransferLibJobManager TransferLibJobManager + ) : base(repository, TransferLibJobManager) + { + } +} diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Jobs/TransferLibJobs/TransferLibJobAutoMapperProfile.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Jobs/TransferLibJobs/TransferLibJobAutoMapperProfile.cs new file mode 100644 index 000000000..f210ab4c0 --- /dev/null +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Jobs/TransferLibJobs/TransferLibJobAutoMapperProfile.cs @@ -0,0 +1,33 @@ +using AutoMapper; +using Volo.Abp.AutoMapper; +using Win_in.Sfs.Wms.Store.Application.Contracts; +using Win_in.Sfs.Wms.Store.Domain; + +namespace Win_in.Sfs.Wms.Store.Application; + +public partial class StoreApplicationAutoMapperProfile : Profile +{ + private void TransferLibJobAutoMapperProfile() + { + CreateMap() + .ReverseMap(); + + CreateMap() + .ReverseMap(); + + CreateMap() + .IgnoreAuditedObjectProperties() + .Ignore(x => x.MasterID) + .Ignore(x => x.TenantId) + .Ignore(x => x.Number) + .Ignore(x => x.Id) + .IgnoreAuditedObjectProperties(); + + CreateMap() + .IgnoreAuditedObjectProperties() + .Ignore(x => x.Number) + .Ignore(x => x.Id) + .IgnoreAuditedObjectProperties(); + + } +} diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/IssueNotes/AssembleNotes/AssembleNoteAppService.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/IssueNotes/AssembleNotes/AssembleNoteAppService.cs new file mode 100644 index 000000000..32675638b --- /dev/null +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/IssueNotes/AssembleNotes/AssembleNoteAppService.cs @@ -0,0 +1,108 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Linq.Expressions; +using System.Threading; +using System.Threading.Tasks; +using Microsoft.AspNetCore.Authorization; +using Microsoft.AspNetCore.Mvc; +using Volo.Abp; +using Volo.Abp.Application.Dtos; +using Volo.Abp.Domain.Entities; +using Win_in.Sfs.Shared.Domain; +using Win_in.Sfs.Shared.Event; +using Win_in.Sfs.Wms.Store.Application.Contracts; +using Win_in.Sfs.Wms.Store.Domain; +using Win_in.Sfs.Wms.Store.Domain.Shared; + +namespace Win_in.Sfs.Wms.Store.Application; + +[Authorize] +[Route($"{StoreConsts.RootPath}assemble-note")] +public class AssembleNoteAppService : + SfsStoreWithDetailsAppServiceBase, + IAssembleNoteAppService +{ + private readonly IAssembleNoteManager _assembleNoteManager; + + public AssembleNoteAppService( + IAssembleNoteRepository repository, + IAssembleNoteManager assembleNoteManager + ) : base(repository) + { + _assembleNoteManager = assembleNoteManager; + } + + [HttpPost("")] + //[Authorize(AssembleNotePermissions.Create)] + public override async Task CreateAsync(AssembleNoteEditInput input) + { + var entity = ObjectMapper.Map(input); + await _assembleNoteManager.CreateAsync(entity).ConfigureAwait(false); + var dto = ObjectMapper.Map(entity); + return dto; + } + + /// + /// 确认对应的记录单 + /// + /// + /// + [HttpPost("confirm/{id}")] + public virtual async Task ConfirmAsync(Guid id) + { + var assembleNote= await _repository.GetAsync(id).ConfigureAwait(false); + assembleNote.Confirmed = true; + assembleNote=await _repository.UpdateAsync(assembleNote).ConfigureAwait(false); + await LocalEventBus.PublishAsync(new SfsConfirmedEntityEventData(assembleNote), false).ConfigureAwait(false); + return ObjectMapper.Map(assembleNote); + } + + [HttpPost("confirm-by-number/{number}")] + public virtual async Task ConfirmAsync(string number) + { + var entity = await _repository.FindAsync(p => p.Number == number).ConfigureAwait(false); + Check.NotNull(entity, nameof(AssembleNote)); + var result = await _assembleNoteManager.ConfirmAsync(entity.Id).ConfigureAwait(false); + var dto = ObjectMapper.Map(result); + return dto; + } + /// + /// 根据叫料请求类型获取发料记录 + /// + /// + /// + /// 叫料请求类型: + /// 人工拉动:Issue_Manual; + /// 线边拉动:Issue_WIP; + /// + /// + /// + /// + [HttpPost("by-type/{requestType}")] + public virtual async Task> GetListByTypeAsync(SfsStoreRequestInputBase requestInput, + string requestType, bool includeDetails = false, CancellationToken cancellationToken = default) + { + Expression> expression = p => p.RequestType == requestType; + if (requestInput.Condition.Filters?.Count > 0) + { + expression = expression.And(requestInput.Condition.Filters.ToLambda()); + } + + return await GetPagedListAsync(expression, requestInput.SkipCount, requestInput.MaxResultCount, + requestInput.Sorting, includeDetails, cancellationToken).ConfigureAwait(false); + } + + [HttpGet("list/un-confirmed/{requestType}")] + public virtual async Task> GetListUnConfirmedByTypeAsync(string requestType) + { + var entities = await _repository.GetListAsync(c => !c.Confirmed && c.RequestType == requestType) + .ConfigureAwait(false); + + var dtos = ObjectMapper.Map, List>(entities); + + return dtos; + } + +} diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/IssueNotes/AssembleNotes/AssembleNoteAutoMapperProfile.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/IssueNotes/AssembleNotes/AssembleNoteAutoMapperProfile.cs new file mode 100644 index 000000000..04a6875d3 --- /dev/null +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/IssueNotes/AssembleNotes/AssembleNoteAutoMapperProfile.cs @@ -0,0 +1,31 @@ +using AutoMapper; +using Volo.Abp.AutoMapper; +using Win_in.Sfs.Wms.Store.Application.Contracts; +using Win_in.Sfs.Wms.Store.Domain; + +namespace Win_in.Sfs.Wms.Store.Application; + +public partial class StoreApplicationAutoMapperProfile : Profile +{ + private void AssembleNoteAutoMapperProfile() + { + CreateMap() + .ReverseMap(); + + CreateMap(); + + CreateMap() + .IgnoreAuditedObjectProperties() + .Ignore(x => x.MasterID) + .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/IssueNotes/CoatingIssueNotes/CoatingIssueNoteAppService.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/IssueNotes/CoatingIssueNotes/CoatingIssueNoteAppService.cs new file mode 100644 index 000000000..f95ca5eae --- /dev/null +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/IssueNotes/CoatingIssueNotes/CoatingIssueNoteAppService.cs @@ -0,0 +1,133 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Linq.Expressions; +using System.Threading; +using System.Threading.Tasks; +using Microsoft.AspNetCore.Authorization; +using Microsoft.AspNetCore.Mvc; +using Volo.Abp; +using Volo.Abp.Application.Dtos; +using Volo.Abp.Domain.Entities; +using Win_in.Sfs.Shared.Domain; +using Win_in.Sfs.Shared.Event; +using Win_in.Sfs.Wms.Store.Application; +using Win_in.Sfs.Wms.Store.Application.Contracts; +using Win_in.Sfs.Wms.Store.Domain.Shared; +using Win_in.Sfs.Wms.Store.Notes.IssueNotes; + +namespace Win_in.Sfs.Wms.Store.Notes.IssueNotes; + +[Authorize] +[Route($"{StoreConsts.RootPath}coatingissue-note")] + + +public class CoatingIssueNoteAppService : + SfsStoreWithDetailsAppServiceBase, + ICoatingIssueNoteAppService +{ + private readonly ICoatingIssueNoteManager _CoatingIssueNoteManager; + + public CoatingIssueNoteAppService( + ICoatingIssueNoteRepository repository, + ICoatingIssueNoteManager CoatingIssueNoteManager + ) : base(repository) + { + _CoatingIssueNoteManager = CoatingIssueNoteManager; + } + + [HttpPost("")] + //[Authorize(CoatingIssueNotePermissions.Create)] + public override async Task CreateAsync(CoatingIssueNoteEditInput input) + { + var entity = ObjectMapper.Map(input); + await _CoatingIssueNoteManager.CreateAsync(entity).ConfigureAwait(false); + var dto = ObjectMapper.Map(entity); + return dto; + } + + /// + /// 确认对应的记录单 + /// + /// + /// + [HttpPost("confirm/{id}")] + public virtual async Task ConfirmAsync(Guid id) + { + var issueNote = await _repository.GetAsync(id).ConfigureAwait(false); + issueNote.Confirmed = true; + issueNote = await _repository.UpdateAsync(issueNote).ConfigureAwait(false); + await LocalEventBus.PublishAsync(new SfsConfirmedEntityEventData(issueNote), false).ConfigureAwait(false); + return ObjectMapper.Map(issueNote); + } + + [HttpPost("confirm-by-number/{number}")] + public virtual async Task ConfirmAsync(string number) + { + var entity = await _repository.FindAsync(p => p.Number == number).ConfigureAwait(false); + Check.NotNull(entity, nameof(CoatingIssueNote)); + var result = await _CoatingIssueNoteManager.ConfirmAsync(entity.Id).ConfigureAwait(false); + var dto = ObjectMapper.Map(result); + return dto; + } + /// + /// 根据叫料请求类型获取发料记录 + /// + /// + /// + /// 叫料请求类型: + /// 人工拉动:Issue_Manual; + /// 线边拉动:Issue_WIP; + /// + /// + /// + /// + [HttpPost("by-type/{requestType}")] + public virtual async Task> GetListByTypeAsync(SfsStoreRequestInputBase requestInput, + string requestType, bool includeDetails = false, CancellationToken cancellationToken = default) + { + Expression> expression = p => p.RequestType == requestType; + if (requestInput.Condition.Filters?.Count > 0) + { + expression = expression.And(requestInput.Condition.Filters.ToLambda()); + } + + return await GetPagedListAsync(expression, requestInput.SkipCount, requestInput.MaxResultCount, + requestInput.Sorting, includeDetails, cancellationToken).ConfigureAwait(false); + } + + [HttpGet("list/un-confirmed/{requestType}")] + public virtual async Task> GetListUnConfirmedByTypeAsync(string requestType) + { + var entities = await _repository.GetListAsync(c => !c.Confirmed && c.RequestType == requestType) + .ConfigureAwait(false); + + var dtos = ObjectMapper.Map, List>(entities); + + return dtos; + } + + //[HttpPost("")] + //[Authorize(IssueNotePermissions.Create)] + //public override Task CreateAsync(IssueNoteCreateInput input) + //{ + // return base.CreateAsync(input); + //} + + //[HttpPut] + //[Route($"{StoreConsts.RootPath}{id}")] + //[Authorize(IssueNotePermissions.Update)] + //public override Task UpdateAsync(Guid id, IssueNoteUpdateInput input) + //{ + // return base.UpdateAsync(id, input); + //} + + //[HttpDelete] + //[Route($"{StoreConsts.RootPath}{id}")] + //[Authorize(IssueNotePermissions.Delete)] + //public override Task DeleteAsync(Guid id) + //{ + // return base.DeleteAsync(id); + //} +} diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/IssueNotes/CoatingIssueNotes/CoatingIssueNoteAutoMapperProfile.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/IssueNotes/CoatingIssueNotes/CoatingIssueNoteAutoMapperProfile.cs new file mode 100644 index 000000000..d6ce0f0fa --- /dev/null +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/IssueNotes/CoatingIssueNotes/CoatingIssueNoteAutoMapperProfile.cs @@ -0,0 +1,31 @@ +using AutoMapper; +using Volo.Abp.AutoMapper; +using Win_in.Sfs.Wms.Store.Notes.IssueNotes; + + +namespace Win_in.Sfs.Wms.Store.Application; + +public partial class StoreApplicationAutoMapperProfile : Profile +{ + private void CoatingIssueNoteAutoMapperProfile() + { + CreateMap() + .ReverseMap(); + + CreateMap(); + + CreateMap() + .IgnoreAuditedObjectProperties() + .Ignore(x => x.MasterID) + .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/IssueNotes/InjectionNotes/InjectionNoteAppService.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/IssueNotes/InjectionNotes/InjectionNoteAppService.cs new file mode 100644 index 000000000..c4bad1cfb --- /dev/null +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/IssueNotes/InjectionNotes/InjectionNoteAppService.cs @@ -0,0 +1,108 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Linq.Expressions; +using System.Threading; +using System.Threading.Tasks; +using Microsoft.AspNetCore.Authorization; +using Microsoft.AspNetCore.Mvc; +using Volo.Abp; +using Volo.Abp.Application.Dtos; +using Volo.Abp.Domain.Entities; +using Win_in.Sfs.Shared.Domain; +using Win_in.Sfs.Shared.Event; +using Win_in.Sfs.Wms.Store.Application.Contracts; +using Win_in.Sfs.Wms.Store.Domain; +using Win_in.Sfs.Wms.Store.Domain.Shared; + +namespace Win_in.Sfs.Wms.Store.Application; + +[Authorize] +[Route($"{StoreConsts.RootPath}injection-note")] +public class InjectionNoteAppService : + SfsStoreWithDetailsAppServiceBase, + IInjectionNoteAppService +{ + private readonly IInjectionNoteManager _injectionNoteManager; + + public InjectionNoteAppService( + IInjectionNoteRepository repository, + IInjectionNoteManager injectionNoteManager + ) : base(repository) + { + _injectionNoteManager = injectionNoteManager; + } + + [HttpPost("")] + //[Authorize(InjectionNotePermissions.Create)] + public override async Task CreateAsync(InjectionNoteEditInput input) + { + var entity = ObjectMapper.Map(input); + await _injectionNoteManager.CreateAsync(entity).ConfigureAwait(false); + var dto = ObjectMapper.Map(entity); + return dto; + } + + /// + /// 确认对应的记录单 + /// + /// + /// + [HttpPost("confirm/{id}")] + public virtual async Task ConfirmAsync(Guid id) + { + var injectionNote= await _repository.GetAsync(id).ConfigureAwait(false); + injectionNote.Confirmed = true; + injectionNote=await _repository.UpdateAsync(injectionNote).ConfigureAwait(false); + await LocalEventBus.PublishAsync(new SfsConfirmedEntityEventData(injectionNote), false).ConfigureAwait(false); + return ObjectMapper.Map(injectionNote); + } + + [HttpPost("confirm-by-number/{number}")] + public virtual async Task ConfirmAsync(string number) + { + var entity = await _repository.FindAsync(p => p.Number == number).ConfigureAwait(false); + Check.NotNull(entity, nameof(InjectionNote)); + var result = await _injectionNoteManager.ConfirmAsync(entity.Id).ConfigureAwait(false); + var dto = ObjectMapper.Map(result); + return dto; + } + /// + /// 根据叫料请求类型获取发料记录 + /// + /// + /// + /// 叫料请求类型: + /// 人工拉动:Issue_Manual; + /// 线边拉动:Issue_WIP; + /// + /// + /// + /// + [HttpPost("by-type/{requestType}")] + public virtual async Task> GetListByTypeAsync(SfsStoreRequestInputBase requestInput, + string requestType, bool includeDetails = false, CancellationToken cancellationToken = default) + { + Expression> expression = p => p.RequestType == requestType; + if (requestInput.Condition.Filters?.Count > 0) + { + expression = expression.And(requestInput.Condition.Filters.ToLambda()); + } + + return await GetPagedListAsync(expression, requestInput.SkipCount, requestInput.MaxResultCount, + requestInput.Sorting, includeDetails, cancellationToken).ConfigureAwait(false); + } + + [HttpGet("list/un-confirmed/{requestType}")] + public virtual async Task> GetListUnConfirmedByTypeAsync(string requestType) + { + var entities = await _repository.GetListAsync(c => !c.Confirmed && c.RequestType == requestType) + .ConfigureAwait(false); + + var dtos = ObjectMapper.Map, List>(entities); + + return dtos; + } + +} diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/IssueNotes/InjectionNotes/InjectionNoteAutoMapperProfile.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/IssueNotes/InjectionNotes/InjectionNoteAutoMapperProfile.cs new file mode 100644 index 000000000..937b4edcb --- /dev/null +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/IssueNotes/InjectionNotes/InjectionNoteAutoMapperProfile.cs @@ -0,0 +1,31 @@ +using AutoMapper; +using Volo.Abp.AutoMapper; +using Win_in.Sfs.Wms.Store.Application.Contracts; +using Win_in.Sfs.Wms.Store.Domain; + +namespace Win_in.Sfs.Wms.Store.Application; + +public partial class StoreApplicationAutoMapperProfile : Profile +{ + private void InjectionNoteAutoMapperProfile() + { + CreateMap() + .ReverseMap(); + + CreateMap(); + + CreateMap() + .IgnoreAuditedObjectProperties() + .Ignore(x => x.MasterID) + .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/ProductRecycleNotes/ProductRecycleNoteAutoMapperProfile.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/ProductRecycleNotes/ProductRecycleNoteAutoMapperProfile.cs index bed3ee5c7..97e507c24 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/ProductRecycleNotes/ProductRecycleNoteAutoMapperProfile.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/ProductRecycleNotes/ProductRecycleNoteAutoMapperProfile.cs @@ -15,6 +15,8 @@ public partial class StoreApplicationAutoMapperProfile : Profile CreateMap(); + CreateMap(); + CreateMap() .IgnoreAuditedObjectProperties() .Ignore(x => x.MasterID) diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/ProductionReturnNotes/ProductionReturnNoteAppService.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/ProductionReturnNotes/ProductionReturnNoteAppService.cs index 35db79092..3577dcc3c 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/ProductionReturnNotes/ProductionReturnNoteAppService.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/ProductionReturnNotes/ProductionReturnNoteAppService.cs @@ -43,4 +43,7 @@ public class ProductionReturnNoteAppService : var dto = ObjectMapper.Map(entity); return dto; } + + + } diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/TransferLibNotes/TransferLibNoteAppService.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/TransferLibNotes/TransferLibNoteAppService.cs new file mode 100644 index 000000000..2467421e4 --- /dev/null +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/TransferLibNotes/TransferLibNoteAppService.cs @@ -0,0 +1,512 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading; +using System.Threading.Tasks; +using Microsoft.AspNetCore.Authorization; +using Microsoft.AspNetCore.Mvc; +using Microsoft.EntityFrameworkCore; +using Volo.Abp; +using Volo.Abp.Application.Dtos; +using Win_in.Sfs.Basedata.Application.Contracts; +using Win_in.Sfs.Basedata.Domain.Shared; +using Win_in.Sfs.Basedata.SplitPackings.Commons; +using Win_in.Sfs.Shared.Domain; +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.Shared; + +namespace Win_in.Sfs.Wms.Store.Application; + +/// +/// 调拨转移记录 +/// +[Authorize] +[Route($"{StoreConsts.RootPath}transferlib-note")] +public class TransferLibNoteAppService : SfsStoreWithDetailsAppServiceBase + , + ITransferLibNoteAppService +{ + private readonly ITransferLibNoteManager _transferLibNoteManager; + private readonly IBalanceAppService _balanceAppService; + private readonly ILocationAppService _locationAppService; + private readonly ISplitPackingRecAppService _splitPackingRecAppService; + private readonly IPurchaseReceiptJobAppService _purchaseReceiptJobAppService; + private readonly IPurchaseReceiptRequestAppService _purchaseReceiptRequestAppService; //采购收货 + private readonly IInspectJobAppService _inspectJobAppService; //质检 + private readonly IIssueJobAppService _issueJobAppService; //发料 + + private readonly IExpectOutAppService _expectOutAppService; // + + + + + + public TransferLibNoteAppService( + ITransferLibNoteRepository repository, + ITransferLibNoteManager transferLibNoteManager, + IBalanceAppService balanceAppService, + ILocationAppService locationAppService, + ISplitPackingRecAppService splitPackingRecAppService, + IPurchaseReceiptJobAppService purchaseReceiptJobAppService, + IPurchaseReceiptRequestAppService purchaseReceiptRequestAppService, + IInspectJobAppService inspectJobAppService, + IIssueJobAppService issueJobAppService, + IExpectOutAppService expectOutAppService) : base(repository) + { + _transferLibNoteManager = transferLibNoteManager; + _balanceAppService = balanceAppService; + _locationAppService = locationAppService; + _splitPackingRecAppService = splitPackingRecAppService; + _purchaseReceiptJobAppService = purchaseReceiptJobAppService; + _purchaseReceiptRequestAppService = purchaseReceiptRequestAppService; + _inspectJobAppService = inspectJobAppService; + _issueJobAppService = issueJobAppService; + _expectOutAppService = expectOutAppService; + } + + #region 东阳使用 + + /// + /// 用来重写 导入数据时可以加工数据 + /// + /// + /// + protected override async Task> ImportProcessingEntityAsync( + Dictionary dictionary) + { + var addList = dictionary.Where(p => p.Value == EntityState.Added).Select(p => p.Key); + + foreach (var transferLibNote in addList) + { + if (transferLibNote.Type == EnumTransSubType.Transfer_Inside.GetDisplayName()) //储位内调拨 + { + transferLibNote.Type = EnumTransSubType.Transfer_Inside.ToString();//重点 需要转换 + foreach (var detail in transferLibNote.Details) + { + var balanceDto = await _balanceAppService.GetByItemLocationAndPackingAsync(detail.FromPackingCode, + detail.ItemCode, detail.FromLocationCode).ConfigureAwait(false); + var toLocationDto = await _locationAppService.GetByCodeAsync(detail.ToLocationCode).ConfigureAwait(false); + var fromLocationDto = await _locationAppService.GetByCodeAsync(detail.FromLocationCode).ConfigureAwait(false); + + CheckLocation(toLocationDto, detail); + CheckFromLocation(fromLocationDto, detail); + if (toLocationDto.Type != fromLocationDto.Type) + { + throw new UserFriendlyException($"来源库位与目标库位类型不一致"); + } + + detail.OnTheWayLocationCode = bool.FalseString; + detail.ItemCode=balanceDto.ItemCode; + detail.ArriveDate=balanceDto.ArriveDate; + detail.ItemDesc1=balanceDto.ItemDesc1; + detail.ItemDesc2=balanceDto.ItemDesc2; + detail.ItemName=balanceDto.ItemName; + detail.ProduceDate=balanceDto.ProduceDate; + detail.Qty=balanceDto.Qty; + detail.Uom=balanceDto.Uom; + detail.ExpireDate=balanceDto.ExpireDate; + detail.StdPackQty=balanceDto.StdPackQty; + detail.SupplierBatch=balanceDto.SupplierBatch; + + detail.FromLocationArea = balanceDto.LocationArea; + detail.FromContainerCode = balanceDto.ContainerCode; + detail.FromLocationErpCode = balanceDto.LocationErpCode; + detail.FromLocationGroup = balanceDto.LocationGroup; + detail.FromPackingCode = balanceDto.PackingCode; + detail.FromLocationArea = balanceDto.LocationArea; + detail.FromStatus = balanceDto.Status; + detail.FromWarehouseCode = balanceDto.WarehouseCode; + detail.FromLot = balanceDto.Lot; + + detail.ToLocationArea = toLocationDto.AreaCode; + detail.ToLocationErpCode = toLocationDto.ErpLocationCode; + detail.ToLocationGroup = toLocationDto.LocationGroupCode; + detail.ToWarehouseCode = toLocationDto.WarehouseCode; + detail.ToContainerCode = balanceDto.ContainerCode; + detail.ToPackingCode = balanceDto.PackingCode; + detail.ToLocationArea = balanceDto.LocationArea; + detail.ToStatus = balanceDto.Status; + detail.ToLot = balanceDto.Lot; + } + } + } + + return dictionary; + } + + /// + /// 拆箱 + /// + /// + /// + [HttpPost("split-packing")] + public async Task SplitPackingAsync(TransferLibNoteEditInput transferLibNoteEditInput) + { + //插入拆箱记录表 + await WriteSplitPackingRec(transferLibNoteEditInput).ConfigureAwait(false); + //更新库存 + transferLibNoteEditInput.Type = EnumTransSubType.Transfer_SplitPacking.ToString(); + return await CreateAsync(transferLibNoteEditInput).ConfigureAwait(false); + } + + #region 校验 + private void CheckLocation(LocationDTO locationDto, TransferLibNoteDetail detail) + { + if (locationDto == null) + { + throw new UserFriendlyException($"库位代码为【{detail.ToLocationCode}】不存在"); + } + } + private void CheckFromLocation(LocationDTO locationDto, TransferLibNoteDetail detail) + { + if (locationDto == null) + { + throw new UserFriendlyException($"库位代码为【{detail.FromLocationCode}】不存在"); + } + } + #endregion + + /// + /// 按条件获取拆箱的分页列表 + /// request sample + /// { + /// "maxResultCount": 1000, + /// "skipCount": 0, + /// "sorting": "", + /// "condition": { "filters": []} + /// } + /// + /// + /// + /// + /// + [HttpPost("get-split-packing-list")] + public virtual async Task> GetSplitPackingTransferListAsync( + SfsStoreRequestInputBase sfsRequestDTO, bool includeDetails = false, + CancellationToken cancellationToken = default) + { + return await GetSubTypeListAsync(sfsRequestDTO, EnumTransSubType.Transfer_SplitPacking, includeDetails, + cancellationToken).ConfigureAwait(false); + } + + /// + /// 按条件获取线边调拨的分页列表 + /// request sample + /// { + /// "maxResultCount": 1000, + /// "skipCount": 0, + /// "sorting": "", + /// "condition": { "filters": []} + /// } + /// + /// + /// + /// + /// + [HttpPost("get-wip-list")] + public virtual async Task> GetWipTransferListAsync( + SfsStoreRequestInputBase sfsRequestDTO, bool includeDetails = false, + CancellationToken cancellationToken = default) + { + return await GetSubTypeListAsync(sfsRequestDTO, EnumTransSubType.Transfer_WIP, includeDetails, + cancellationToken).ConfigureAwait(false); + } + + /// + /// 按条件获取储位间调拨的分页列表 + /// request sample + /// { + /// "maxResultCount": 1000, + /// "skipCount": 0, + /// "sorting": "", + /// "condition": { "filters": []} + /// } + /// + /// + /// + /// + /// + [HttpPost("get-erp-loc-list")] + public virtual async Task> GetAreaTransferListAsync( + SfsStoreRequestInputBase sfsRequestDTO, bool includeDetails = false, + CancellationToken cancellationToken = default) + { + return await GetSubTypeListAsync(sfsRequestDTO, EnumTransSubType.Transfer_Area, includeDetails, + cancellationToken).ConfigureAwait(false); + } + + /// + /// 按条件获取储位内移库的分页列表 + /// request sample + /// { + /// "maxResultCount": 1000, + /// "skipCount": 0, + /// "sorting": "", + /// "condition": { "filters": []} + /// } + /// + /// + /// + /// + /// + [HttpPost("get-inside-list")] + public virtual async Task> GetInsideTransferListAsync( + SfsStoreRequestInputBase sfsRequestDTO, bool includeDetails = false, + CancellationToken cancellationToken = default) + { + return await GetSubTypeListAsync(sfsRequestDTO, EnumTransSubType.Transfer_Inside, includeDetails, + cancellationToken).ConfigureAwait(false); + } + + /// + /// 按条件获取客户储位间调拨的分页列表 + /// request sample + /// { + /// "maxResultCount": 1000, + /// "skipCount": 0, + /// "sorting": "", + /// "condition": { "filters": []} + /// } + /// + /// + /// + /// + /// + [HttpPost("get-custom-loc-list")] + public virtual async Task> GetCustomerTransferListAsync( + SfsStoreRequestInputBase sfsRequestDTO, bool includeDetails = false, + CancellationToken cancellationToken = default) + { + return await GetSubTypeListAsync(sfsRequestDTO, EnumTransSubType.Transfer_Customer, includeDetails, + cancellationToken).ConfigureAwait(false); + } + + /// + /// 按条件获取储位间调拨的分页列表 + /// request sample + /// { + /// "maxResultCount": 1000, + /// "skipCount": 0, + /// "sorting": "", + /// "condition": { "filters": []} + /// } + /// + /// + /// + /// + /// + [HttpPost("get-diff-erp-loc-list")] + public virtual async Task> GetListForDiffERPLocAsync( + SfsStoreRequestInputBase sfsRequestDTO, bool includeDetails = false, + CancellationToken cancellationToken = default) + { + return await GetSubTypeListAsync(sfsRequestDTO, EnumTransSubType.Transfer_Warehouse, includeDetails, + cancellationToken).ConfigureAwait(false); + } + + private async Task> GetSubTypeListAsync(SfsStoreRequestInputBase sfsRequestDTO, + EnumTransSubType type, bool includeDetails = false, + CancellationToken cancellationToken = default) + { + sfsRequestDTO.Condition.Filters.Add(new Filter + { + Action = "==", + Column = "Type", + Logic = EnumFilterLogic.And.ToString(), + Value = type.ToString() + }); + + var expression = sfsRequestDTO.Condition.Filters?.Count > 0 + ? sfsRequestDTO.Condition.Filters.ToLambda() + : p => true; + + return await GetPagedListAsync(expression, sfsRequestDTO.SkipCount, sfsRequestDTO.MaxResultCount, + sfsRequestDTO.Sorting, includeDetails, cancellationToken).ConfigureAwait(false); + } + + #endregion + + /// + /// 库存转移 + /// + /// + /// + [HttpPost("")] + public override async Task CreateAsync(TransferLibNoteEditInput input) + { + var entity = ObjectMapper.Map(input); + + entity=await _transferLibNoteManager.CreateAsync(entity).ConfigureAwait(false); + + var dto = ObjectMapper.Map(entity); + + return dto; + } + + /// + /// 【批量】 库存转移 + /// + /// + /// + [HttpPost("create-many")] + public async Task> CreateManyAsync(List input) + { + var entitys = ObjectMapper.Map, List>(input); + + var resultEntity = new List(); + + foreach (var entity in entitys) + { + resultEntity.Add(await _transferLibNoteManager.CreateAsync(entity).ConfigureAwait(false)); + _ = ObjectMapper.Map(entity); + } + + return ObjectMapper.Map, List>(resultEntity); + } + + /// + /// 确认对应的记录单 + /// + /// + /// + [HttpPost("confirm/{id}")] + public virtual async Task ConfirmAsync(Guid id) + { + var entity = await _transferLibNoteManager.ConfirmAsync(id).ConfigureAwait(false); + var dto = ObjectMapper.Map(entity); + return dto; + } + + /// + /// 插入拆箱记录表 + /// + /// + /// + private async Task WriteSplitPackingRec(TransferLibNoteEditInput transferLibNoteEditInput) + { + List recLst = new List(); + foreach (var inputDetail in transferLibNoteEditInput.Details) + { + SplitPackingRecEditInput packRec = new SplitPackingRecEditInput(); + packRec.OprType = OprTypeEnum.SplitBox; + packRec.FromPackingCode = inputDetail.FromPackingCode; + //packRec.FromTopPackingCode = inputDetail.; + packRec.FromStdPackQty = inputDetail.StdPackQty; + packRec.FromUom = inputDetail.Uom; + packRec.FromQty = inputDetail.Qty; + packRec.ToPackingCode = inputDetail.ToPackingCode; + //packRec.ToTopPackingCode = inputDetail.; + packRec.ToStdPackQty = inputDetail.StdPackQty; + packRec.ToUom = inputDetail.Uom; + packRec.ToQty = inputDetail.Qty; + packRec.ItemCode = inputDetail.ItemCode; + packRec.ItemName = inputDetail.ItemName; + packRec.ItemDesc1 = inputDetail.ItemDesc1; + packRec.ItemDesc2 = inputDetail.ItemDesc2; + packRec.FromLot = inputDetail.FromLot; + packRec.ToLot = inputDetail.ToLot; + //packRec.PurchaseInfo_PoNumber = inputDetail.; // 采购订单 + //packRec.PurchaseInfo_AsnNumber = inputDetail.; //供应商发货单 + //packRec.ArrivalNoticNumber = inputDetail.; //到货通知 + //packRec.TaskOrderNumber = inputDetail.; //任务单 + //packRec.ReceiptRecNumber = inputDetail.; //收货记录单 + //packRec.PutOnShelfNumber = inputDetail.; //上架单 + recLst.Add(packRec); + } + var ret = await _splitPackingRecAppService.BatchInsertAsync(recLst).ConfigureAwait(false); + return ret; + } + + /// + /// 采购收货拆箱,同时更新、插入PurchaseReceipt任务表、申请表 + /// + /// + /// + /// + [HttpPost("split-packing-purchase-receipt")] + public async Task SplitPacking_PurchaseReceiptAsync(TransferLibNoteEditInput transferLibNoteEditInput, [FromQuery] SplitPacking_UpdateJobDetailInput updateJobDetailInput) + { + var jobRet = await _purchaseReceiptJobAppService.SaveDetail_SplitPackingAsync(updateJobDetailInput).ConfigureAwait(false); + var requestRet = await _purchaseReceiptRequestAppService.SaveDetail_SplitPackingAsync(updateJobDetailInput, jobRet.PurchaseReceiptRequestNumber).ConfigureAwait(false); + bool ret = await WriteSplitPackingRec(transferLibNoteEditInput).ConfigureAwait(false); //采购收货-目检-拆箱时,还没有入库,不涉及库存操作 + return ret; + } + + /// + /// 质检拆箱,同时更新、插入Inspect任务表(不更新申请表) + /// + /// + /// + /// + [HttpPost("split-packing-inspect")] + public async Task SplitPacking_InspectAsync(TransferLibNoteEditInput transferLibNoteEditInput, [FromQuery] SplitPacking_UpdateJobDetailInput updateJobDetailInput) + { + //SplitPacking_UpdateDetailInput newInput = new SplitPacking_UpdateDetailInput(); + //newInput.Number = updateJobDetailInput.Number; + //newInput.FromPackingCode = updateJobDetailInput.FromPackingCode; + //newInput.FromQty = updateJobDetailInput.FromQty; + //newInput.ToPackingCode = updateJobDetailInput.ToPackingCode; + //newInput.ToQty = updateJobDetailInput.ToQty; + //newInput.FromLocationCode = transferLibNoteEditInput.Details[0].FromLocationCode; + //newInput.ToLocationCode = transferLibNoteEditInput.Details[0].ToLocationCode; + //var expectOutRet = await _expectOutAppService.SaveDetail_SplitPackingAsync(newInput).ConfigureAwait(false); + var jobRet = await _inspectJobAppService.SaveDetail_SplitPackingAsync(updateJobDetailInput).ConfigureAwait(false); + var ret = await SplitPackingAsync(transferLibNoteEditInput).ConfigureAwait(false); //库存操作 + return ret; + } + + /// + /// 发料拆箱,同时更新、插入Inspect任务表(没有找到申请表//??) + /// + /// + /// + /// + [HttpPost("split-packing-issue")] + public async Task SplitPacking_IssueAsync(TransferLibNoteEditInput transferLibNoteEditInput, [FromQuery] SplitPacking_UpdateJobDetailInput updateJobDetailInput) + { + SplitPacking_UpdateDetailInput newInput = new SplitPacking_UpdateDetailInput(); + newInput.Number = updateJobDetailInput.Number; + newInput.FromPackingCode = updateJobDetailInput.FromPackingCode; + newInput.FromQty = updateJobDetailInput.FromQty; + newInput.ToPackingCode = updateJobDetailInput.ToPackingCode; + newInput.ToQty = updateJobDetailInput.ToQty; + newInput.FromLocationCode = transferLibNoteEditInput.Details[0].FromLocationCode; + newInput.ToLocationCode = transferLibNoteEditInput.Details[0].ToLocationCode; + var expectOutRet = await _expectOutAppService.SaveDetail_SplitPackingAsync(newInput).ConfigureAwait(false); + var jobRet = await _issueJobAppService.SaveDetail_SplitPackingAsync(updateJobDetailInput).ConfigureAwait(false); + var ret = await SplitPackingAsync(transferLibNoteEditInput).ConfigureAwait(false); //库存操作 + return ret; + } + + /// + /// 拆箱,预计出表存在数据时不允许办理 + /// + /// + /// + /// + [HttpPost("split-packing-check-expect-out")] + public async Task SplitPackingCheckExpectOutAsync(TransferLibNoteEditInput transferLibNoteEditInput, [FromQuery] SplitPacking_UpdateJobDetailInputBase updateJobDetailInputBase) + { + var detailObj = transferLibNoteEditInput.Details[0]; + SplitPacking_UpdateDetailInput newInput = new SplitPacking_UpdateDetailInput(); + newInput.Number = updateJobDetailInputBase.Number; + newInput.FromPackingCode = detailObj.FromPackingCode; + newInput.FromQty = detailObj.Qty; + newInput.ToPackingCode = detailObj.ToPackingCode; + newInput.ToQty = detailObj.Qty; + newInput.FromLocationCode = detailObj.FromLocationCode; + newInput.ToLocationCode = detailObj.ToLocationCode; + var expectOutLst = await _expectOutAppService.GetListByJobNumberAsync(newInput).ConfigureAwait(false); + if (expectOutLst.Count > 0) + { + throw new UserFriendlyException($"预计出表存在数据,不允许办理拆箱:JobNumber={newInput.Number}|PackingCode={newInput.FromPackingCode}|Qty={newInput.FromQty}|LocationCode={newInput.FromLocationCode}"); + } + var ret = await SplitPackingAsync(transferLibNoteEditInput).ConfigureAwait(false); + return ret; + + } +} diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/TransferLibNotes/TransferLibNoteMapperProfile.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/TransferLibNotes/TransferLibNoteMapperProfile.cs new file mode 100644 index 000000000..2a7587d42 --- /dev/null +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/TransferLibNotes/TransferLibNoteMapperProfile.cs @@ -0,0 +1,71 @@ +using AutoMapper; +using Volo.Abp.AutoMapper; +using Win_in.Sfs.Wms.Store.Application.Contracts; +using Win_in.Sfs.Wms.Store.Domain; + +namespace Win_in.Sfs.Wms.Store.Application; + +public partial class StoreApplicationAutoMapperProfile : Profile +{ + private void TransferLibNoteMapperProfile() + { + CreateMap() + .ReverseMap(); + CreateMap() + .ReverseMap(); + CreateMap() + .IgnoreAuditedObjectProperties(); + + CreateMap() + .IgnoreAuditedObjectProperties() + .Ignore(x => x.MasterID) + .Ignore(x => x.TenantId) + .Ignore(x => x.Number) + .Ignore(x => x.Id); + + CreateMap() + .IgnoreAuditedObjectProperties() + .Ignore(x => x.ConfirmTime) + .Ignore(x => x.RequestNumber) + .Ignore(x => x.JobNumber) + .Ignore(x => x.ActiveDate) + .Ignore(x => x.Remark) + .Ignore(x => x.ExtraProperties) + .Ignore(x => x.ConcurrencyStamp) + .Ignore(x => x.Details) + .Ignore(x => x.TenantId) + .Ignore(x => x.Number) + .Ignore(x => x.Id); + + CreateMap() + .IgnoreAuditedObjectProperties() + .ForMember(x => x.ToPackingCode, y => y.MapFrom(d => d.PackingCode)) + .ForMember(x => x.FromPackingCode, y => y.MapFrom(d => d.PackingCode)) + .ForMember(x => x.FromStatus, y => y.MapFrom(d => d.Status)) + .ForMember(x => x.ToStatus, y => y.MapFrom(d => d.Status)) + .Ignore(x => x.FromLocationGroup) + .Ignore(x => x.FromLocationArea) + .Ignore(x => x.FromLocationErpCode) + .Ignore(x => x.FromWarehouseCode) + .Ignore(x => x.ToLocationArea) + .Ignore(x => x.ToLocationGroup) + .Ignore(x => x.ToLocationErpCode) + .Ignore(x => x.ToWarehouseCode) + .Ignore(x => x.Reason) + .Ignore(x => x.SupplierBatch).Ignore(x => x.ArriveDate).Ignore(x => x.ProduceDate).Ignore(x => x.ExpireDate) + .Ignore(x => x.Remark) + .Ignore(x => x.ItemName) + .Ignore(x => x.ItemDesc1) + .Ignore(x => x.ItemDesc2) + .Ignore(x => x.FromContainerCode) + .Ignore(x => x.ToContainerCode) + .Ignore(x => x.FromLot) + .Ignore(x => x.ToLot) + .Ignore(x => x.StdPackQty) + .Ignore(x => x.Uom) + .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/Requests/MaterialRequests/AssembleRequests/AssembleRequestAppService.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/MaterialRequests/AssembleRequests/AssembleRequestAppService.cs new file mode 100644 index 000000000..567997a51 --- /dev/null +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/MaterialRequests/AssembleRequests/AssembleRequestAppService.cs @@ -0,0 +1,302 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; +using System.Linq; +using System.Linq.Expressions; +using System.Threading; +using System.Threading.Tasks; +using DocumentFormat.OpenXml.Office.PowerPoint.Y2021.M06.Main; +using IdentityModel; +using Microsoft.AspNetCore.Authorization; +using Microsoft.AspNetCore.Mvc; +using Microsoft.EntityFrameworkCore; +using Volo.Abp; +using Volo.Abp.Application.Dtos; +using Volo.Abp.Domain.Entities; +using Volo.Abp.Domain.Repositories; +using Volo.Abp.ObjectMapping; +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.Store.Application.Contracts; +using Win_in.Sfs.Wms.Store.Domain; +using Win_in.Sfs.Wms.Store.Domain.Shared; + +namespace Win_in.Sfs.Wms.Store.Application; + +/// +/// 装配叫料 +/// +[Authorize] +[Route($"{StoreConsts.RootPath}assemble-request")] +public class AssembleRequestAppService : SfsStoreRequestAppServiceBase, + IAssembleRequestAppService +{ + private readonly IAssembleRequestManager _assembleRequestManager; + private readonly IItemStoreRelationAppService _itemStoreRelationApp; + private readonly IAreaAppService _areaApp; + private readonly ILocationAppService _locationAppService; + private readonly IItemBasicAppService _itemBasicAppService; + private readonly IProductionLineAppService _productionLineAppService; + private readonly IInjectionJobAppService _issueJobAppService; + public AssembleRequestAppService( + IAssembleRequestRepository repository, + IAssembleRequestManager assembleRequestManager, + IPreparationPlanManager preparationPlanManager, + IItemStoreRelationAppService itemStoreRelationApp, + IAreaAppService areaApp, + ILocationAppService locationAppService, + IItemBasicAppService itemBasicAppService, + IProductionLineAppService productionLineAppService, + IInjectionJobAppService issueJobAppService) + : base(repository, assembleRequestManager) + { + _assembleRequestManager = assembleRequestManager; + _itemStoreRelationApp = itemStoreRelationApp; + _areaApp = areaApp; + _locationAppService = locationAppService; + _itemBasicAppService = itemBasicAppService; + _productionLineAppService = productionLineAppService; + _issueJobAppService = issueJobAppService; + } + + + #region 东阳V2 + + public override async Task HandleAsync(Guid id) + { + var entity = await _repository.GetAsync(id).ConfigureAwait(false); + await LocalEventBus.PublishAsync(new SfsHandledEntityEventData(entity), false).ConfigureAwait(false); + return ObjectMapper.Map(entity); + } + + [HttpPost("")] + //[Authorize(AssembleRequestPermissions.Create)] + public override async Task CreateAsync(AssembleRequestEditInput input) + { + foreach (var item in input.Details) + { + if (item.Qty <= 0) + { + throw new UserFriendlyException($"{item.ItemCode} 物料的需求量必须大于0"); + } + } + + foreach (var detailInput in input.Details) //赋值生产线 + { + var toLocationDto = await _locationAppService.GetByCodeAsync(detailInput.ToLocationCode).ConfigureAwait(false); + CheckLocation(toLocationDto, detailInput.ToLocationCode); + var itemBasicDto = await _itemBasicAppService.GetByCodeAsync(detailInput.ItemCode).ConfigureAwait(false); + CheckItemBasic(itemBasicDto, detailInput.ItemCode); + + detailInput.ProdLine = detailInput.ToLocationCode; + detailInput.ToLocationErpCode = toLocationDto.ErpLocationCode; + } + + input.AutoSubmit = true; + input.AutoAgree = true; + input.AutoHandle = true; + input.AutoCompleteJob = false; + input.DirectCreateNote = false; + + var entity = ObjectMapper.Map(input); + + var result = await _assembleRequestManager.CreateAsync(entity).ConfigureAwait(false); + + var dto = ObjectMapper.Map(result); + + return dto; + } + + //[Authorize(AssembleRequestPermissions.Create)] + [HttpPost("create-and-handle")] + public async Task CreateAndHandleAsync(AssembleRequestEditInput input) + { + var assembleRequestDto = await CreateAsync(input).ConfigureAwait(false); + + await HandleAsync(assembleRequestDto.Id).ConfigureAwait(false); + + return assembleRequestDto; + } + + #endregion + + /// + /// 根据类型 获取叫料申请 + /// + /// + /// + [HttpGet("list/by-type/{type}")] + public virtual async Task> GetListByTypeAsync(string type) + { + var entities = await _repository.GetListAsync(c => c.Type == type).ConfigureAwait(false); + + var dtos = ObjectMapper.Map, List>(entities); + + return dtos; + } + + #region 导入 + + /// + /// 用来重写 导入数据时可以加工数据 + /// + /// + /// + protected override async Task> ImportProcessingEntityAsync( + Dictionary dictionary) + { + var addList = dictionary.Where(p => p.Value == EntityState.Added).Select(p => p.Key); + + foreach (var assembleRequest in addList) + { + assembleRequest.Worker = CurrentUser.GetUserName(); + assembleRequest.CreatorId = CurrentUser.Id; + if (assembleRequest.Type == EnumTransSubType.Issue_Manual.GetDisplayName()) + { + assembleRequest.Type = EnumTransSubType.Issue_Manual.ToString(); + } + + foreach (var detail in assembleRequest.Details) + { + var locationDto = await _locationAppService.GetByCodeAsync(detail.ToLocationCode).ConfigureAwait(false); + CheckLocation(locationDto, detail.ToLocationCode); + + var itemBasicDto = await _itemBasicAppService.GetByCodeAsync(detail.ItemCode).ConfigureAwait(false); + CheckItemBasic(itemBasicDto, detail.ItemCode); + + detail.ToLocationArea = locationDto.AreaCode; + detail.ToLocationErpCode = locationDto.ErpLocationCode; + detail.ToLocationGroup = locationDto.LocationGroupCode; + detail.ToWarehouseCode = locationDto.WarehouseCode; + detail.ItemDesc1 = itemBasicDto.Desc1; + detail.ItemDesc2 = itemBasicDto.Desc2; + detail.ItemName = itemBasicDto.Name; + detail.Uom = itemBasicDto.BasicUom; + } + } + + return dictionary; + } + + /// + /// 导入验证 + /// + /// + /// + /// + protected override async Task ValidateImportModelAsync(AssembleRequestImportInput model, + List validationRresult) + { + _ = new Dictionary(); + _ = await CheckItemBasicAsync(model, validationRresult).ConfigureAwait(false); + _ = await CheckLocationAsync(model, validationRresult).ConfigureAwait(false); + await CheckAreaAsync(model, validationRresult).ConfigureAwait(false); + await CheckStoreRelationAsync(model, validationRresult).ConfigureAwait(false); + } + + #region 校验 + + protected override async Task ValidateImportEntities(Dictionary dict) + { + foreach (var entity in dict.Keys) + { + var tranType = await TransactionTypeAclService + .GetByTransTypeAsync(EnumTransType.Issue, EnumTransSubType.None).ConfigureAwait(false); + + Check.NotNull(tranType, "事务类型", "事务类型不存在"); + + entity.AutoCompleteJob = tranType.AutoCompleteJob; + entity.AutoSubmit = tranType.AutoSubmitRequest; + entity.AutoAgree = tranType.AutoAgreeRequest; + entity.AutoHandle = tranType.AutoHandleRequest; + entity.DirectCreateNote = tranType.DirectCreateNote; + } + + return await base.ValidateImportEntities(dict).ConfigureAwait(false); + } + + protected async Task CheckItemBasicAsync(AssembleRequestImportInput importInput, + List validationRresult) + { + var item = await _itemBasicAppService.GetByCodeAsync(importInput.ItemCode).ConfigureAwait(false); + if (item == null) + { + validationRresult.Add(new ValidationResult($"物品代码{importInput.ItemCode}不存在", new[] { "物品代码" })); + } + else if (item.StdPackQty == 0) + { + validationRresult.Add( + new ValidationResult($"物品代码{importInput.ItemCode}的物品信息中标准包装等于0或不存在", new[] { "标准包装" })); + } + + return item; + } + + protected async Task CheckLocationAsync(AssembleRequestImportInput importInput, + List validationRresult) + { + var location = await _locationAppService.GetByCodeAsync(importInput.ToLocationCode).ConfigureAwait(false); + if (location == null) + { + validationRresult.Add(new ValidationResult($"目标库位{importInput.ToLocationCode}不存在", new[] { "目标库位" })); + } + + return location; + } + + protected async Task CheckAreaAsync(AssembleRequestImportInput importInput, + List validationRresult) + { + var area = await _areaApp.GetByCodeAsync(importInput.FromLocationArea).ConfigureAwait(false); + if (area == null) + { + validationRresult.Add(new ValidationResult($"调出库区{importInput.FromLocationArea}不存在", new[] { "调出库区" })); + } + } + + protected async Task CheckStoreRelationAsync(AssembleRequestImportInput importInput, + List validationRresult) + { + var itemStoreRelation = await _itemStoreRelationApp + .GetFirstAsync(importInput.ItemCode, importInput.ToLocationCode).ConfigureAwait(false); + if (itemStoreRelation == null) + { + validationRresult.Add(new ValidationResult( + $"物品代码{importInput.ItemCode}与目标库位{importInput.ToLocationCode}不存在对应关", new[] { "物品库位对应关系" })); + } + } + + #endregion + + #endregion + + #region 校验 + + private void CheckItemBasic(ItemBasicDTO ItemBasicDto, string itemCode) + { + if (ItemBasicDto == null) + { + throw new UserFriendlyException($"物品代码为【{itemCode}】不存在"); + } + } + + private void CheckLocation(LocationDTO LocationDto, string LocationCode) + { + if (LocationDto == null) + { + throw new UserFriendlyException($"库位代码为【{LocationCode}】不存在"); + } + + if (LocationDto.Type != EnumLocationType.WIP) + { + throw new UserFriendlyException($"库位代码【{LocationCode}】不是【{EnumLocationType.WIP.GetDisplayName()}】类型"); + } + } + + + #endregion +} diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/MaterialRequests/AssembleRequests/AssembleRequestAutoMapperProfile.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/MaterialRequests/AssembleRequests/AssembleRequestAutoMapperProfile.cs new file mode 100644 index 000000000..182f8a6ed --- /dev/null +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/MaterialRequests/AssembleRequests/AssembleRequestAutoMapperProfile.cs @@ -0,0 +1,72 @@ +using AutoMapper; +using Volo.Abp.AutoMapper; +using Win_in.Sfs.Shared.Domain.Shared; +using Win_in.Sfs.Wms.Store.Application.Contracts; +using Win_in.Sfs.Wms.Store.Domain; + +namespace Win_in.Sfs.Wms.Store.Application; + +public partial class StoreApplicationAutoMapperProfile : Profile +{ + private void AssembleRequestAutoMapperProfile() + { + CreateMap() + .ReverseMap(); + + CreateMap() + .ReverseMap(); + + CreateMap() + .IgnoreAuditedObjectProperties() + .Ignore(x => x.ToLocationArea) + .Ignore(x => x.ToLocationGroup) + .Ignore(x => x.ToWarehouseCode) + .Ignore(x => x.MasterID) + .Ignore(x => x.TenantId) + .Ignore(x => x.Number) + .Ignore(x => x.Id); + + CreateMap() + .IgnoreAuditedObjectProperties() + .ForMember(x => x.Type, y => y.MapFrom(t => t.Type.ToString())) + .Ignore(x => x.ProdLine) + .Ignore(x => x.UseOnTheWayLocation) + .Ignore(x => x.Details) + .Ignore(x => x.Remark) + .Ignore(x => x.TenantId) + .Ignore(x => x.Number) + .Ignore(x => x.RequestStatus) + .Ignore(x => x.ConcurrencyStamp) + .Ignore(x => x.ExtraProperties) + .Ignore(x => x.ActiveDate) + .Ignore(x => x.Remark); + + CreateMap() + .IgnoreAuditedObjectProperties() + .ForMember(x => x.Status, y => y.MapFrom(t => EnumStatus.Open)) + .Ignore(x => x.ToLocationErpCode) + .Ignore(x => x.ToWarehouseCode) + .Ignore(x => x.ToLocationArea) + .Ignore(x => x.ToLocationGroup) + .Ignore(x => x.ItemName).Ignore(x => x.ItemDesc1).Ignore(x => x.ItemDesc2) + .Ignore(x => x.ProdLine) + .Ignore(x => x.WorkStation) + .Ignore(x => x.ExpiredTime) + .Ignore(x => x.IssuedQty) + .Ignore(x => x.ReceivedQty) + .Ignore(x => x.ToBeIssuedQty) + .Ignore(x => x.ToBeReceivedQty) + .Ignore(x => x.NotFinishQty) + .Ignore(x => x.StdPackQty) + .Ignore(x => x.Uom) + .Ignore(x => x.TenantId) + .Ignore(x => x.MasterID) + .Ignore(x => x.Number) + .Ignore(x => x.Id) + .Ignore(x => x.Remark); + CreateMap() + .IgnoreAuditedObjectProperties() + .Ignore(x => x.RequestStatus) + .Ignore(x => x.ConcurrencyStamp).Ignore(x => x.Id); + } +} diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/MaterialRequests/CoatingMaterialRequests/CoatingMaterialRequestAppService.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/MaterialRequests/CoatingMaterialRequests/CoatingMaterialRequestAppService.cs new file mode 100644 index 000000000..05fd60fef --- /dev/null +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/MaterialRequests/CoatingMaterialRequests/CoatingMaterialRequestAppService.cs @@ -0,0 +1,520 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; +using System.Linq; +using System.Linq.Expressions; +using System.Threading; +using System.Threading.Tasks; +using DocumentFormat.OpenXml.Office.PowerPoint.Y2021.M06.Main; +using IdentityModel; +using Microsoft.AspNetCore.Authorization; +using Microsoft.AspNetCore.Mvc; +using Microsoft.EntityFrameworkCore; +using Volo.Abp; +using Volo.Abp.Application.Dtos; +using Volo.Abp.Domain.Entities; +using Volo.Abp.Domain.Repositories; +using Volo.Abp.ObjectMapping; +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.Store.Application; +using Win_in.Sfs.Wms.Store.Application.Contracts; +using Win_in.Sfs.Wms.Store.Domain; +using Win_in.Sfs.Wms.Store.Domain.Shared; + +namespace Win_in.Sfs.Wms.Store.Requests.MaterialRequests.CoatingMaterialRequests; + + + + +[Authorize] +[Route($"{StoreConsts.RootPath}coatingmaterial-request")] +public class CoatingMaterialRequestAppService : SfsStoreRequestAppServiceBase, + ICoatingMaterialRequestAppService +{ + private readonly ICoatingMaterialRequestManager _materialRequestManager; + + private readonly IPreparationPlanManager _preparationPlanManager; + + private readonly IItemStoreRelationAppService _itemStoreRelationApp; + + private readonly IAreaAppService _areaApp; + + private readonly ILocationAppService _locationAppService; + + private readonly IItemBasicAppService _itemBasicAppService; + private readonly IProductionLineAppService _productionLineAppService; + private readonly IIssueJobAppService _issueJobAppService; + public CoatingMaterialRequestAppService( + ICoatingMaterialRequestRepository repository, + ICoatingMaterialRequestManager CoatingMaterialRequestManager, + IPreparationPlanManager preparationPlanManager, + IItemStoreRelationAppService itemStoreRelationApp, + IAreaAppService areaApp, + ILocationAppService locationAppService, + IItemBasicAppService itemBasicAppService, + IProductionLineAppService productionLineAppService, + IIssueJobAppService issueJobAppService) + : base(repository, CoatingMaterialRequestManager) + { + _materialRequestManager = CoatingMaterialRequestManager; + _preparationPlanManager = preparationPlanManager; + _itemStoreRelationApp = itemStoreRelationApp; + _areaApp = areaApp; + _locationAppService = locationAppService; + _itemBasicAppService = itemBasicAppService; + _productionLineAppService = productionLineAppService; + _issueJobAppService = issueJobAppService; + } + + #region 东阳使用 + + /// + /// 用来重写 导入数据时可以加工数据 + /// + /// + /// + protected override async Task> ImportProcessingEntityAsync( + Dictionary dictionary) + { + var addList = dictionary.Where(p => p.Value == EntityState.Added).Select(p => p.Key); + + foreach (var materialRequest in addList) + { + materialRequest.Worker = CurrentUser.GetUserName(); + materialRequest.CreatorId = CurrentUser.Id; + if (materialRequest.Type == EnumTransSubType.Issue_Manual.GetDisplayName()) + { + materialRequest.Type = EnumTransSubType.Issue_Manual.ToString(); + } + + foreach (var detail in materialRequest.Details) + { + var locationDto = await _locationAppService.GetByCodeAsync(detail.ToLocationCode).ConfigureAwait(false); + CheckLocation(locationDto, detail.ToLocationCode); + + var itemBasicDto = await _itemBasicAppService.GetByCodeAsync(detail.ItemCode).ConfigureAwait(false); + CheckItemBasic(itemBasicDto, detail.ItemCode); + + detail.ToLocationArea = locationDto.AreaCode; + detail.ToLocationErpCode = locationDto.ErpLocationCode; + detail.ToLocationGroup = locationDto.LocationGroupCode; + detail.ToWarehouseCode = locationDto.WarehouseCode; + detail.ItemDesc1 = itemBasicDto.Desc1; + detail.ItemDesc2 = itemBasicDto.Desc2; + detail.ItemName = itemBasicDto.Name; + detail.Uom = itemBasicDto.BasicUom; + } + } + + return dictionary; + } + + public override async Task HandleAsync(Guid id) + { + var entity = await _repository.GetAsync(id).ConfigureAwait(false); + await LocalEventBus.PublishAsync(new SfsHandledEntityEventData(entity), false).ConfigureAwait(false); + return ObjectMapper.Map(entity); + } + + #region 校验 + + private void CheckItemBasic(ItemBasicDTO ItemBasicDto, string itemCode) + { + if (ItemBasicDto == null) + { + throw new UserFriendlyException($"物品代码为【{itemCode}】不存在"); + } + } + + private void CheckLocation(LocationDTO LocationDto, string LocationCode) + { + if (LocationDto == null) + { + throw new UserFriendlyException($"库位代码为【{LocationCode}】不存在"); + } + + if (LocationDto.Type != EnumLocationType.WIP) + { + throw new UserFriendlyException($"库位代码【{LocationCode}】不是【{EnumLocationType.WIP.GetDisplayName()}】类型"); + } + } + + + #endregion + + #endregion + + [HttpPost("")] + //[Authorize(CoatingMaterialRequestPermissions.Create)] + public override async Task CreateAsync(CoatingMaterialRequestEditInput input) + { + foreach (var item in input.Details) + { + if (item.Qty <= 0) + { + throw new UserFriendlyException($"{item.ItemCode} 物料的需求量必须大于 0"); + } + } + + //检验备料计划是否存在要料请求 + if (!string.IsNullOrWhiteSpace(input.PreparationPlanNumber)) + { + var exist = await CheckExistByPreparationPlanAsync(input.PreparationPlanNumber).ConfigureAwait(false); + if (exist.Count > 0) + { + throw new UserFriendlyException($"{input.PreparationPlanNumber} 备料计划已存在要料申请"); + } + } + + foreach (var item in input.Details) //赋值生产线 + { + var location = await LocationAclService.GetByCodeAsync(item.ToLocationCode).ConfigureAwait(false); + item.ProdLine = location.LocationGroupCode; + input.ProdLine = location.LocationGroupCode; + } + + var entity = ObjectMapper.Map(input); + + var result = await _materialRequestManager.CreateAsync(entity).ConfigureAwait(false); + + var dto = ObjectMapper.Map(result); + return dto; + } + + /// + /// 创建并且执行叫料请求 + /// + /// + /// + /// + [HttpPost("create-and-handle-api")] + //[Authorize(CoatingMaterialRequestPermissions.Create)] + public virtual async Task CreateAndHandleByAPIAsync(CoatingMaterialRequestEditInput input) + { + foreach (var item in input.Details) + { + if (item.Qty <= 0) + { + throw new UserFriendlyException($"{item.ItemCode} 物料的需求量必须大于 0"); + } + } + + + input.AutoSubmit = true; + input.AutoAgree = true; + input.AutoHandle = true; + input.AutoCompleteJob = false; + input.DirectCreateNote = false; + + foreach (var detailInput in input.Details) + { + var toLocationDto = await _locationAppService.GetByCodeAsync(detailInput.ToLocationCode).ConfigureAwait(false); + CheckLocation(toLocationDto, detailInput.ToLocationCode); + var itemBasicDto = await _itemBasicAppService.GetByCodeAsync(detailInput.ItemCode).ConfigureAwait(false); + CheckItemBasic(itemBasicDto, detailInput.ItemCode); + detailInput.ItemDesc1 = itemBasicDto.Desc1; + if (detailInput.PositionCode.Contains('W')) + { + detailInput.RecommendType = EnumRecommendType.W; + } + else if (detailInput.PositionCode.Contains('Q')) + { + detailInput.RecommendType = EnumRecommendType.Q; + } + else if (detailInput.PositionCode.Contains('K')) + { + detailInput.RecommendType = EnumRecommendType.K; + } + else + { + detailInput.RecommendType = EnumRecommendType.None; + } + + //var productionLineDto = await _productionLineAppService.GetByLocationGroupCodeAsync(toLocationDto.LocationGroupCode).ConfigureAwait(false); + + //detailInput.ToLocationCode = toLocationDto.ErpLocationCode; + //if (productionLineDto != null) + //{ + // detailInput.ProdLine = productionLineDto.Code; + //} + } + + var entity = ObjectMapper.Map(input); + foreach (var detail in entity.Details) + { + var toLocationDto = await _locationAppService.GetByCodeAsync(detail.ToLocationCode).ConfigureAwait(false); + //var productionLineDto = await _productionLineAppService.GetByLocationGroupCodeAsync(toLocationDto.LocationGroupCode).ConfigureAwait(false); + + detail.ToLocationArea = toLocationDto.AreaCode; + detail.ToLocationErpCode = toLocationDto.ErpLocationCode; + detail.ToLocationGroup = toLocationDto.LocationGroupCode; + detail.ToWarehouseCode = toLocationDto.WarehouseCode; + } + + entity.UseOnTheWayLocation = false; + + var result = await _materialRequestManager.CreateBynNumberAsync(entity).ConfigureAwait(false); + + var dto = ObjectMapper.Map(result); + + return dto; + } + + /// + /// 创建并且执行叫料请求 + /// + /// + /// + /// + [HttpPost("create-and-handle")] + //[Authorize(CoatingMaterialRequestPermissions.Create)] + public virtual async Task CreateAndHandleAsync(CoatingMaterialRequestEditInput input) + { + foreach (var item in input.Details) + { + if (item.Qty <= 0) + { + throw new UserFriendlyException($"{item.ItemCode} 物料的需求量必须大于0"); + } + } + + //检验备料计划是否存在要料请求 + if (!string.IsNullOrWhiteSpace(input.PreparationPlanNumber)) + { + var exist = await CheckExistByPreparationPlanAsync(input.PreparationPlanNumber).ConfigureAwait(false); + if (exist.Count > 0) + { + throw new UserFriendlyException($"{input.PreparationPlanNumber} 备料计划已存在要料申请"); + } + } + + foreach (var detailInput in input.Details) //赋值生产线 + { + var toLocationDto = await _locationAppService.GetByCodeAsync(detailInput.ToLocationCode).ConfigureAwait(false); + CheckLocation(toLocationDto, detailInput.ToLocationCode); + var itemBasicDto = await _itemBasicAppService.GetByCodeAsync(detailInput.ItemCode).ConfigureAwait(false); + CheckItemBasic(itemBasicDto, detailInput.ItemCode); + + var location = await LocationAclService.GetByCodeAsync(detailInput.ToLocationCode).ConfigureAwait(false); + detailInput.ProdLine = location.LocationGroupCode; + input.ProdLine = location.LocationGroupCode; + input.Worker = input.Worker; + } + + input.AutoSubmit = true; + input.AutoAgree = true; + input.AutoHandle = true; + input.AutoCompleteJob = false; + input.DirectCreateNote = false; + + var entity = ObjectMapper.Map(input); + + var result = await _materialRequestManager.CreateAsync(entity).ConfigureAwait(false); + + var dto = ObjectMapper.Map(result); + + return dto; + } + + /// + /// 根据备料计划生成 叫料请求 + /// + /// + [HttpPost("create-and-handle-by-preparation-plan/{number}")] + public virtual async Task CreateAndHandleByPreparationPlan(string number) + { + var prodPreparationPlan = await _preparationPlanManager.GetByNumberAsync(number).ConfigureAwait(false); + + var materialRequestCreateInput = new CoatingMaterialRequestEditInput { Worker = CurrentUser.GetUserName() }; + + foreach (var preparationPlanDetail in prodPreparationPlan.Details) + { + var detail = new CoatingMaterialRequestDetailInput + { + ItemCode = preparationPlanDetail.ItemCode, + ItemName = preparationPlanDetail.ItemName, + ItemDesc1 = preparationPlanDetail.ItemDesc1, + ItemDesc2 = preparationPlanDetail.ItemDesc2, + Uom = preparationPlanDetail.Uom, + Qty = preparationPlanDetail.Qty, + StdPackQty = preparationPlanDetail.StdPackQty, + ToLocationCode = preparationPlanDetail.ToLocationCode + }; + + materialRequestCreateInput.Details.Add(detail); + } + + var dto = await CreateAndHandleAsync(materialRequestCreateInput).ConfigureAwait(false); + + return dto; + } + + /// + /// 检验备料计划是否存在要料请求 + /// + /// + /// + private async Task> CheckExistByPreparationPlanAsync(string preparationPlanNumber) + { + var entities = await _repository.GetListAsync(c => c.PreparationPlanNumber == preparationPlanNumber) + .ConfigureAwait(false); + return entities; + } + + /// + /// 根据类型获取叫料请求 + /// + /// + /// + /// 叫料请求类型: + /// 人工拉动:Issue_Manual; + /// 线边拉动:Issue_WIP; + /// + /// + /// + /// + [HttpPost("by-type/{type}")] + public virtual async Task> GetListByTypeAsync( + SfsStoreRequestInputBase requestInput, + string type, + bool includeDetails = false, + CancellationToken cancellationToken = default) + { + Expression> expression = p => p.Type == type; + if (requestInput.Condition.Filters?.Count > 0) + { + expression = expression.And(requestInput.Condition.Filters.ToLambda()); + } + + return await GetPagedListAsync(expression, requestInput.SkipCount, requestInput.MaxResultCount, + requestInput.Sorting, includeDetails, cancellationToken).ConfigureAwait(false); + } + + #region 导入 + + //protected override async Task CheckImportInputBusinessAsync(CoatingMaterialRequestImportInput importInput, EnumImportMethod importMethod) + //{ + // //await base.CheckImportInputBusinessAsync(importInput, importMethod); + + // var item = await CheckItemBasicAsync(importInput); + // await CheckItemPackAsync(importInput); + // var location = await CheckLocationAsync(importInput); + // await CheckAreaAsync(importInput); + // await CheckStoreRelationAsync(importInput); + // var transactionType = await CheckTransactionTypeAsync(); + + // CheckTransactionType(EnumTransInOut.In, EnumInventoryStatus.OK, transactionType, item, location); + //} + + /// + /// 导入验证 + /// + /// + /// + /// + protected override async Task ValidateImportModelAsync(CoatingMaterialRequestImportInput model, + List validationRresult) + { + _ = new Dictionary(); + _ = await CheckItemBasicAsync(model, validationRresult).ConfigureAwait(false); + _ = await CheckLocationAsync(model, validationRresult).ConfigureAwait(false); + await CheckAreaAsync(model, validationRresult).ConfigureAwait(false); + await CheckStoreRelationAsync(model, validationRresult).ConfigureAwait(false); + } + + #region 校验 + + protected override async Task ValidateImportEntities(Dictionary dict) + { + foreach (var entity in dict.Keys) + { + var tranType = await TransactionTypeAclService + .GetByTransTypeAsync(EnumTransType.Issue, EnumTransSubType.None).ConfigureAwait(false); + + Check.NotNull(tranType, "事务类型", "事务类型不存在"); + + entity.AutoCompleteJob = tranType.AutoCompleteJob; + entity.AutoSubmit = tranType.AutoSubmitRequest; + entity.AutoAgree = tranType.AutoAgreeRequest; + entity.AutoHandle = tranType.AutoHandleRequest; + entity.DirectCreateNote = tranType.DirectCreateNote; + } + + return await base.ValidateImportEntities(dict).ConfigureAwait(false); + } + + protected async Task CheckItemBasicAsync(CoatingMaterialRequestImportInput importInput, + List validationRresult) + { + var item = await _itemBasicAppService.GetByCodeAsync(importInput.ItemCode).ConfigureAwait(false); + if (item == null) + { + validationRresult.Add(new ValidationResult($"物品代码{importInput.ItemCode}不存在", new[] { "物品代码" })); + } + else if (item.StdPackQty == 0) + { + validationRresult.Add( + new ValidationResult($"物品代码{importInput.ItemCode}的物品信息中标准包装等于0或不存在", new[] { "标准包装" })); + } + + return item; + } + + protected async Task CheckLocationAsync(CoatingMaterialRequestImportInput importInput, + List validationRresult) + { + var location = await _locationAppService.GetByCodeAsync(importInput.ToLocationCode).ConfigureAwait(false); + if (location == null) + { + validationRresult.Add(new ValidationResult($"目标库位{importInput.ToLocationCode}不存在", new[] { "目标库位" })); + } + + return location; + } + + protected async Task CheckAreaAsync(CoatingMaterialRequestImportInput importInput, + List validationRresult) + { + var area = await _areaApp.GetByCodeAsync(importInput.FromLocationArea).ConfigureAwait(false); + if (area == null) + { + validationRresult.Add(new ValidationResult($"调出库区{importInput.FromLocationArea}不存在", new[] { "调出库区" })); + } + } + + protected async Task CheckStoreRelationAsync(CoatingMaterialRequestImportInput importInput, + List validationRresult) + { + var itemStoreRelation = await _itemStoreRelationApp + .GetFirstAsync(importInput.ItemCode, importInput.ToLocationCode).ConfigureAwait(false); + if (itemStoreRelation == null) + { + validationRresult.Add(new ValidationResult( + $"物品代码{importInput.ItemCode}与目标库位{importInput.ToLocationCode}不存在对应关", new[] { "物品库位对应关系" })); + } + } + + #endregion + + #endregion + + /// + /// 根据类型 获取叫料申请 + /// + /// + /// + [HttpGet("list/by-type/{type}")] + public virtual async Task> GetListByTypeAsync(string type) + { + var entities = await _repository.GetListAsync(c => c.Type == type).ConfigureAwait(false); + + var dtos = ObjectMapper.Map, List>(entities); + + return dtos; + } +} diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/MaterialRequests/CoatingMaterialRequests/CoatingMaterialRequestAutoMapperProfile.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/MaterialRequests/CoatingMaterialRequests/CoatingMaterialRequestAutoMapperProfile.cs new file mode 100644 index 000000000..360416b97 --- /dev/null +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/MaterialRequests/CoatingMaterialRequests/CoatingMaterialRequestAutoMapperProfile.cs @@ -0,0 +1,73 @@ +using AutoMapper; +using Volo.Abp.AutoMapper; +using Win_in.Sfs.Shared.Domain.Shared; +using Win_in.Sfs.Wms.Store.Requests.MaterialRequests; + +namespace Win_in.Sfs.Wms.Store.Application; + +public partial class StoreApplicationAutoMapperProfile : Profile +{ + private void CoatingMaterialRequestAutoMapperProfile() + { + CreateMap() + .ReverseMap(); + + CreateMap() + .ReverseMap(); + + CreateMap() + .IgnoreAuditedObjectProperties() + .Ignore(x => x.ToLocationArea) + .Ignore(x => x.ToLocationGroup) + .Ignore(x => x.ToWarehouseCode) + .Ignore(x => x.MasterID) + .Ignore(x => x.TenantId) + .Ignore(x => x.Number) + .Ignore(x => x.Id); + + CreateMap() + .IgnoreAuditedObjectProperties() + .ForMember(x => x.Type, y => y.MapFrom(t => t.Type.ToString())) + .Ignore(x => x.PreparationPlanNumber) + .Ignore(x => x.ProdLine) + .Ignore(x => x.Workshop) + .Ignore(x => x.UseOnTheWayLocation) + .Ignore(x => x.Details) + .Ignore(x => x.Remark) + .Ignore(x => x.TenantId) + .Ignore(x => x.Number) + .Ignore(x => x.RequestStatus) + .Ignore(x => x.ConcurrencyStamp) + .Ignore(x => x.ExtraProperties) + .Ignore(x => x.ActiveDate) + .Ignore(x => x.Remark); + + CreateMap() + .IgnoreAuditedObjectProperties() + .ForMember(x => x.Status, y => y.MapFrom(t => EnumStatus.Open)) + .Ignore(x => x.ToLocationErpCode) + .Ignore(x => x.ToWarehouseCode) + .Ignore(x => x.ToLocationArea) + .Ignore(x => x.ToLocationGroup) + .Ignore(x => x.ItemName).Ignore(x => x.ItemDesc1).Ignore(x => x.ItemDesc2) + .Ignore(x => x.ProdLine) + .Ignore(x => x.WorkStation) + .Ignore(x => x.ExpiredTime) + .Ignore(x => x.IssuedQty) + .Ignore(x => x.ReceivedQty) + .Ignore(x => x.ToBeIssuedQty) + .Ignore(x => x.ToBeReceivedQty) + .Ignore(x => x.NotFinishQty) + .Ignore(x => x.StdPackQty) + .Ignore(x => x.Uom) + .Ignore(x => x.TenantId) + .Ignore(x => x.MasterID) + .Ignore(x => x.Number) + .Ignore(x => x.Id) + .Ignore(x => x.Remark); + CreateMap() + .IgnoreAuditedObjectProperties() + .Ignore(x => x.RequestStatus) + .Ignore(x => x.ConcurrencyStamp).Ignore(x => x.Id); + } +} diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/MaterialRequests/InjectionRequests/InjectionRequestAppService.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/MaterialRequests/InjectionRequests/InjectionRequestAppService.cs new file mode 100644 index 000000000..c12bd69d5 --- /dev/null +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/MaterialRequests/InjectionRequests/InjectionRequestAppService.cs @@ -0,0 +1,300 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; +using System.Linq; +using System.Linq.Expressions; +using System.Threading; +using System.Threading.Tasks; +using DocumentFormat.OpenXml.Office.PowerPoint.Y2021.M06.Main; +using IdentityModel; +using Microsoft.AspNetCore.Authorization; +using Microsoft.AspNetCore.Mvc; +using Microsoft.EntityFrameworkCore; +using Volo.Abp; +using Volo.Abp.Application.Dtos; +using Volo.Abp.Domain.Entities; +using Volo.Abp.Domain.Repositories; +using Volo.Abp.ObjectMapping; +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.Store.Application.Contracts; +using Win_in.Sfs.Wms.Store.Domain; +using Win_in.Sfs.Wms.Store.Domain.Shared; + +namespace Win_in.Sfs.Wms.Store.Application; + +//注塑叫料 +[Authorize] +[Route($"{StoreConsts.RootPath}injection-request")] +public class InjectionRequestAppService : SfsStoreRequestAppServiceBase, + IInjectionRequestAppService +{ + private readonly IInjectionRequestManager _injectionRequestManager; + private readonly IItemStoreRelationAppService _itemStoreRelationApp; + private readonly IAreaAppService _areaApp; + private readonly ILocationAppService _locationAppService; + private readonly IItemBasicAppService _itemBasicAppService; + private readonly IProductionLineAppService _productionLineAppService; + private readonly IInjectionJobAppService _issueJobAppService; + public InjectionRequestAppService( + IInjectionRequestRepository repository, + IInjectionRequestManager injectionRequestManager, + IPreparationPlanManager preparationPlanManager, + IItemStoreRelationAppService itemStoreRelationApp, + IAreaAppService areaApp, + ILocationAppService locationAppService, + IItemBasicAppService itemBasicAppService, + IProductionLineAppService productionLineAppService, + IInjectionJobAppService issueJobAppService) + : base(repository, injectionRequestManager) + { + _injectionRequestManager = injectionRequestManager; + _itemStoreRelationApp = itemStoreRelationApp; + _areaApp = areaApp; + _locationAppService = locationAppService; + _itemBasicAppService = itemBasicAppService; + _productionLineAppService = productionLineAppService; + _issueJobAppService = issueJobAppService; + } + + + #region 东阳V2 + + public override async Task HandleAsync(Guid id) + { + var entity = await _repository.GetAsync(id).ConfigureAwait(false); + await LocalEventBus.PublishAsync(new SfsHandledEntityEventData(entity), false).ConfigureAwait(false); + return ObjectMapper.Map(entity); + } + + [HttpPost("")] + //[Authorize(InjectionRequestPermissions.Create)] + public override async Task CreateAsync(InjectionRequestEditInput input) + { + foreach (var item in input.Details) + { + if (item.Qty <= 0) + { + throw new UserFriendlyException($"{item.ItemCode} 物料的需求量必须大于0"); + } + } + + foreach (var detailInput in input.Details) //赋值生产线 + { + var toLocationDto = await _locationAppService.GetByCodeAsync(detailInput.ToLocationCode).ConfigureAwait(false); + CheckLocation(toLocationDto, detailInput.ToLocationCode); + var itemBasicDto = await _itemBasicAppService.GetByCodeAsync(detailInput.ItemCode).ConfigureAwait(false); + CheckItemBasic(itemBasicDto, detailInput.ItemCode); + + detailInput.ProdLine = detailInput.ToLocationCode; + detailInput.ToLocationErpCode = toLocationDto.ErpLocationCode; + } + + input.AutoSubmit = true; + input.AutoAgree = true; + input.AutoHandle = true; + input.AutoCompleteJob = false; + input.DirectCreateNote = false; + + var entity = ObjectMapper.Map(input); + + var result = await _injectionRequestManager.CreateAsync(entity).ConfigureAwait(false); + + var dto = ObjectMapper.Map(result); + + return dto; + } + + //[Authorize(InjectionRequestPermissions.Create)] + [HttpPost("create-and-handle")] + public async Task CreateAndHandleAsync(InjectionRequestEditInput input) + { + var injectionRequestDto = await CreateAsync(input).ConfigureAwait(false); + + await HandleAsync(injectionRequestDto.Id).ConfigureAwait(false); + + return injectionRequestDto; + } + + #endregion + + /// + /// 根据类型 获取叫料申请 + /// + /// + /// + [HttpGet("list/by-type/{type}")] + public virtual async Task> GetListByTypeAsync(string type) + { + var entities = await _repository.GetListAsync(c => c.Type == type).ConfigureAwait(false); + + var dtos = ObjectMapper.Map, List>(entities); + + return dtos; + } + + #region 导入 + + /// + /// 用来重写 导入数据时可以加工数据 + /// + /// + /// + protected override async Task> ImportProcessingEntityAsync( + Dictionary dictionary) + { + var addList = dictionary.Where(p => p.Value == EntityState.Added).Select(p => p.Key); + + foreach (var injectionRequest in addList) + { + injectionRequest.Worker = CurrentUser.GetUserName(); + injectionRequest.CreatorId = CurrentUser.Id; + if (injectionRequest.Type == EnumTransSubType.Issue_Manual.GetDisplayName()) + { + injectionRequest.Type = EnumTransSubType.Issue_Manual.ToString(); + } + + foreach (var detail in injectionRequest.Details) + { + var locationDto = await _locationAppService.GetByCodeAsync(detail.ToLocationCode).ConfigureAwait(false); + CheckLocation(locationDto, detail.ToLocationCode); + + var itemBasicDto = await _itemBasicAppService.GetByCodeAsync(detail.ItemCode).ConfigureAwait(false); + CheckItemBasic(itemBasicDto, detail.ItemCode); + + detail.ToLocationArea = locationDto.AreaCode; + detail.ToLocationErpCode = locationDto.ErpLocationCode; + detail.ToLocationGroup = locationDto.LocationGroupCode; + detail.ToWarehouseCode = locationDto.WarehouseCode; + detail.ItemDesc1 = itemBasicDto.Desc1; + detail.ItemDesc2 = itemBasicDto.Desc2; + detail.ItemName = itemBasicDto.Name; + detail.Uom = itemBasicDto.BasicUom; + } + } + + return dictionary; + } + + /// + /// 导入验证 + /// + /// + /// + /// + protected override async Task ValidateImportModelAsync(InjectionRequestImportInput model, + List validationRresult) + { + _ = new Dictionary(); + _ = await CheckItemBasicAsync(model, validationRresult).ConfigureAwait(false); + _ = await CheckLocationAsync(model, validationRresult).ConfigureAwait(false); + await CheckAreaAsync(model, validationRresult).ConfigureAwait(false); + await CheckStoreRelationAsync(model, validationRresult).ConfigureAwait(false); + } + + #region 校验 + + protected override async Task ValidateImportEntities(Dictionary dict) + { + foreach (var entity in dict.Keys) + { + var tranType = await TransactionTypeAclService + .GetByTransTypeAsync(EnumTransType.Issue, EnumTransSubType.None).ConfigureAwait(false); + + Check.NotNull(tranType, "事务类型", "事务类型不存在"); + + entity.AutoCompleteJob = tranType.AutoCompleteJob; + entity.AutoSubmit = tranType.AutoSubmitRequest; + entity.AutoAgree = tranType.AutoAgreeRequest; + entity.AutoHandle = tranType.AutoHandleRequest; + entity.DirectCreateNote = tranType.DirectCreateNote; + } + + return await base.ValidateImportEntities(dict).ConfigureAwait(false); + } + + protected async Task CheckItemBasicAsync(InjectionRequestImportInput importInput, + List validationRresult) + { + var item = await _itemBasicAppService.GetByCodeAsync(importInput.ItemCode).ConfigureAwait(false); + if (item == null) + { + validationRresult.Add(new ValidationResult($"物品代码{importInput.ItemCode}不存在", new[] { "物品代码" })); + } + else if (item.StdPackQty == 0) + { + validationRresult.Add( + new ValidationResult($"物品代码{importInput.ItemCode}的物品信息中标准包装等于0或不存在", new[] { "标准包装" })); + } + + return item; + } + + protected async Task CheckLocationAsync(InjectionRequestImportInput importInput, + List validationRresult) + { + var location = await _locationAppService.GetByCodeAsync(importInput.ToLocationCode).ConfigureAwait(false); + if (location == null) + { + validationRresult.Add(new ValidationResult($"目标库位{importInput.ToLocationCode}不存在", new[] { "目标库位" })); + } + + return location; + } + + protected async Task CheckAreaAsync(InjectionRequestImportInput importInput, + List validationRresult) + { + var area = await _areaApp.GetByCodeAsync(importInput.FromLocationArea).ConfigureAwait(false); + if (area == null) + { + validationRresult.Add(new ValidationResult($"调出库区{importInput.FromLocationArea}不存在", new[] { "调出库区" })); + } + } + + protected async Task CheckStoreRelationAsync(InjectionRequestImportInput importInput, + List validationRresult) + { + var itemStoreRelation = await _itemStoreRelationApp + .GetFirstAsync(importInput.ItemCode, importInput.ToLocationCode).ConfigureAwait(false); + if (itemStoreRelation == null) + { + validationRresult.Add(new ValidationResult( + $"物品代码{importInput.ItemCode}与目标库位{importInput.ToLocationCode}不存在对应关", new[] { "物品库位对应关系" })); + } + } + + #endregion + + #endregion + + #region 校验 + + private void CheckItemBasic(ItemBasicDTO ItemBasicDto, string itemCode) + { + if (ItemBasicDto == null) + { + throw new UserFriendlyException($"物品代码为【{itemCode}】不存在"); + } + } + + private void CheckLocation(LocationDTO LocationDto, string LocationCode) + { + if (LocationDto == null) + { + throw new UserFriendlyException($"库位代码为【{LocationCode}】不存在"); + } + + if (LocationDto.Type != EnumLocationType.WIP) + { + throw new UserFriendlyException($"库位代码【{LocationCode}】不是【{EnumLocationType.WIP.GetDisplayName()}】类型"); + } + } + + + #endregion +} diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/MaterialRequests/InjectionRequests/InjectionRequestAutoMapperProfile.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/MaterialRequests/InjectionRequests/InjectionRequestAutoMapperProfile.cs new file mode 100644 index 000000000..455767440 --- /dev/null +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/MaterialRequests/InjectionRequests/InjectionRequestAutoMapperProfile.cs @@ -0,0 +1,72 @@ +using AutoMapper; +using Volo.Abp.AutoMapper; +using Win_in.Sfs.Shared.Domain.Shared; +using Win_in.Sfs.Wms.Store.Application.Contracts; +using Win_in.Sfs.Wms.Store.Domain; + +namespace Win_in.Sfs.Wms.Store.Application; + +public partial class StoreApplicationAutoMapperProfile : Profile +{ + private void InjectionRequestAutoMapperProfile() + { + CreateMap() + .ReverseMap(); + + CreateMap() + .ReverseMap(); + + CreateMap() + .IgnoreAuditedObjectProperties() + .Ignore(x => x.ToLocationArea) + .Ignore(x => x.ToLocationGroup) + .Ignore(x => x.ToWarehouseCode) + .Ignore(x => x.MasterID) + .Ignore(x => x.TenantId) + .Ignore(x => x.Number) + .Ignore(x => x.Id); + + CreateMap() + .IgnoreAuditedObjectProperties() + .ForMember(x => x.Type, y => y.MapFrom(t => t.Type.ToString())) + .Ignore(x => x.ProdLine) + .Ignore(x => x.UseOnTheWayLocation) + .Ignore(x => x.Details) + .Ignore(x => x.Remark) + .Ignore(x => x.TenantId) + .Ignore(x => x.Number) + .Ignore(x => x.RequestStatus) + .Ignore(x => x.ConcurrencyStamp) + .Ignore(x => x.ExtraProperties) + .Ignore(x => x.ActiveDate) + .Ignore(x => x.Remark); + + CreateMap() + .IgnoreAuditedObjectProperties() + .ForMember(x => x.Status, y => y.MapFrom(t => EnumStatus.Open)) + .Ignore(x => x.ToLocationErpCode) + .Ignore(x => x.ToWarehouseCode) + .Ignore(x => x.ToLocationArea) + .Ignore(x => x.ToLocationGroup) + .Ignore(x => x.ItemName).Ignore(x => x.ItemDesc1).Ignore(x => x.ItemDesc2) + .Ignore(x => x.ProdLine) + .Ignore(x => x.WorkStation) + .Ignore(x => x.ExpiredTime) + .Ignore(x => x.IssuedQty) + .Ignore(x => x.ReceivedQty) + .Ignore(x => x.ToBeIssuedQty) + .Ignore(x => x.ToBeReceivedQty) + .Ignore(x => x.NotFinishQty) + .Ignore(x => x.StdPackQty) + .Ignore(x => x.Uom) + .Ignore(x => x.TenantId) + .Ignore(x => x.MasterID) + .Ignore(x => x.Number) + .Ignore(x => x.Id) + .Ignore(x => x.Remark); + CreateMap() + .IgnoreAuditedObjectProperties() + .Ignore(x => x.RequestStatus) + .Ignore(x => x.ConcurrencyStamp).Ignore(x => x.Id); + } +} diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/MaterialRequests/MaterialRequestAppService.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/MaterialRequests/MaterialRequestAppService.cs index 64d689dbc..ec28cb71a 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/MaterialRequests/MaterialRequestAppService.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/MaterialRequests/MaterialRequestAppService.cs @@ -231,20 +231,20 @@ public class MaterialRequestAppService : SfsStoreRequestAppServiceBase(input); foreach (var detail in entity.Details) { var toLocationDto = await _locationAppService.GetByCodeAsync(detail.ToLocationCode).ConfigureAwait(false); - var productionLineDto = await _productionLineAppService.GetByLocationGroupCodeAsync(toLocationDto.LocationGroupCode).ConfigureAwait(false); + //var productionLineDto = await _productionLineAppService.GetByLocationGroupCodeAsync(toLocationDto.LocationGroupCode).ConfigureAwait(false); detail.ToLocationArea= toLocationDto.AreaCode; detail.ToLocationErpCode = toLocationDto.ErpLocationCode; diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/TransferLibRequests/TransferLibRequestAppService.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/TransferLibRequests/TransferLibRequestAppService.cs new file mode 100644 index 000000000..1f30e5791 --- /dev/null +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/TransferLibRequests/TransferLibRequestAppService.cs @@ -0,0 +1,384 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; +using System.Linq; +using System.Threading; +using System.Threading.Tasks; +using Microsoft.AspNetCore.Authorization; +using Microsoft.AspNetCore.Mvc; +using Microsoft.EntityFrameworkCore; +using Volo.Abp; +using Volo.Abp.Application.Dtos; +using Win_in.Sfs.Basedata.Application.Contracts; +using Win_in.Sfs.Shared.Application.Contracts; +using Win_in.Sfs.Shared.Domain; +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.Shared; + +namespace Win_in.Sfs.Wms.Store.Application; + +/// +/// 调拨转移记录 +/// +[Authorize] +[Route($"{StoreConsts.RootPath}transferlib-request")] +public class TransferLibRequestAppService : SfsStoreRequestAppServiceBase + , + ITransferLibRequestAppService +{ + private readonly ITransferLibRequestManager _transferLibRequestManager; + private readonly IBalanceAppService _balanceAppService; + private readonly ILocationAppService _locationAppService; + + public TransferLibRequestAppService( + ITransferLibRequestRepository repository, + ITransferLibRequestManager transferLibRequestManager, + IBalanceAppService balanceAppService, + ILocationAppService locationAppService) : base(repository, transferLibRequestManager) + { + _transferLibRequestManager = transferLibRequestManager; + _balanceAppService = balanceAppService; + _locationAppService = locationAppService; + } + + #region 东阳使用 + + /// + /// 用来重写 导入数据时可以加工数据 + /// + /// + /// + protected override async Task> ImportProcessingEntityAsync( + Dictionary dictionary) + { + var addList = dictionary.Where(p => p.Value == EntityState.Added).Select(p => p.Key); + + foreach (var transferLibRequest in addList) + { + EnumTransSubType enumTransSubType = EnumTransSubType.None; + + //储位 + if (transferLibRequest.Type == EnumTransSubType.Transfer_Area.GetDisplayName()) + { + transferLibRequest.Type = EnumTransSubType.Transfer_Area.ToString(); //重点 需要转换 + enumTransSubType = EnumTransSubType.Transfer_Area; + transferLibRequest.UseOnTheWayLocation = false; + } + //储位内 + if (transferLibRequest.Type == EnumTransSubType.Transfer_Inside.GetDisplayName()) + { + transferLibRequest.Type = EnumTransSubType.Transfer_Inside.ToString(); //重点 需要转换 + enumTransSubType = EnumTransSubType.Transfer_Inside; + transferLibRequest.UseOnTheWayLocation = false; + } + + //库间 + if (transferLibRequest.Type == EnumTransSubType.Transfer_Warehouse.GetDisplayName()) + { + transferLibRequest.Type = EnumTransSubType.Transfer_Warehouse.ToString(); //重点 需要转换 + enumTransSubType = EnumTransSubType.Transfer_Warehouse; + transferLibRequest.UseOnTheWayLocation = true; + } + //客户储位 + if (transferLibRequest.Type == EnumTransSubType.Transfer_Customer.GetDisplayName()) + { + transferLibRequest.Type = EnumTransSubType.Transfer_Customer.ToString(); //重点 需要转换 + enumTransSubType = EnumTransSubType.Transfer_Customer; + transferLibRequest.UseOnTheWayLocation = true; + } + //线边调拨 + if (transferLibRequest.Type == EnumTransSubType.Transfer_WIP.GetDisplayName()) + { + transferLibRequest.Type = EnumTransSubType.Transfer_WIP.ToString(); //重点 需要转换 + enumTransSubType = EnumTransSubType.Transfer_WIP; + transferLibRequest.UseOnTheWayLocation = true; + } + + foreach (var detail in transferLibRequest.Details) + { + var balanceDto = await _balanceAppService.GetByItemLocationAndPackingAsync(detail.FromPackingCode, + detail.ItemCode, detail.FromLocationCode).ConfigureAwait(false); + var toLocationDto = await _locationAppService.GetByCodeAsync(detail.ToLocationCode) + .ConfigureAwait(false); + var fromLocationDto = await _locationAppService.GetByCodeAsync(detail.FromLocationCode) + .ConfigureAwait(false); + + CheckLocation(toLocationDto, detail.ToLocationCode); + CheckLocation(fromLocationDto, detail.FromLocationCode); + if (toLocationDto.Type != fromLocationDto.Type) + { + throw new UserFriendlyException($"来源库位与目标库位类型不一致"); + } + + detail.ItemCode = balanceDto.ItemCode; + detail.ArriveDate = balanceDto.ArriveDate; + detail.ItemDesc1 = balanceDto.ItemDesc1; + detail.ItemDesc2 = balanceDto.ItemDesc2; + detail.ItemName = balanceDto.ItemName; + detail.ProduceDate = balanceDto.ProduceDate; + detail.Qty = detail.Qty; + detail.Uom = balanceDto.Uom; + detail.ExpireDate = balanceDto.ExpireDate; + detail.StdPackQty = balanceDto.StdPackQty; + detail.SupplierBatch = balanceDto.SupplierBatch; + + detail.FromLocationArea = balanceDto.LocationArea; + detail.FromContainerCode = balanceDto.ContainerCode; + detail.FromLocationErpCode = balanceDto.LocationErpCode; + detail.FromLocationGroup = balanceDto.LocationGroup; + detail.FromPackingCode = balanceDto.PackingCode; + detail.FromLocationArea = balanceDto.LocationArea; + detail.FromStatus = balanceDto.Status; + detail.FromWarehouseCode = balanceDto.WarehouseCode; + detail.FromLot = balanceDto.Lot; + + detail.ToLocationArea = toLocationDto.AreaCode; + detail.ToLocationErpCode = toLocationDto.ErpLocationCode; + detail.ToLocationGroup = toLocationDto.LocationGroupCode; + detail.ToWarehouseCode = toLocationDto.WarehouseCode; + detail.ToContainerCode = balanceDto.ContainerCode; + detail.ToPackingCode = balanceDto.PackingCode; + detail.ToLocationArea = balanceDto.LocationArea; + detail.ToStatus = balanceDto.Status; + detail.ToLot = balanceDto.Lot; + } + + await SetEntityPropertiesAsync(transferLibRequest, enumTransSubType) + .ConfigureAwait(false); + } + + return dictionary; + } + + #region 校验 + private void CheckLocation(LocationDTO locationDTO, string locationCode) + { + if (locationDTO == null) + { + throw new UserFriendlyException($"库位代码为【{locationCode}】不存在"); + } + } + #endregion + + private async Task SetEntityPropertiesAsync(TransferLibRequest entity, EnumTransSubType subType) + { + var tranType = await TransactionTypeAclService.GetByTransTypeAsync(EnumTransType.TransferLib, subType) + .ConfigureAwait(false); + Check.NotNull(tranType, "事务类型", "事务类型不存在"); + entity.Worker = CurrentUser.GetUserName(); + + entity.AutoCompleteJob = tranType.AutoCompleteJob; + entity.AutoSubmit = tranType.AutoSubmitRequest; + entity.AutoAgree = tranType.AutoAgreeRequest; + entity.AutoHandle = tranType.AutoHandleRequest; + entity.DirectCreateNote = tranType.DirectCreateNote; + } + + #region 查询相关 + + /// + /// 按条件获取【客户储位间调拨】的分页列表 + /// request sample + /// { + /// "maxResultCount": 1000, + /// "skipCount": 0, + /// "sorting": "", + /// "condition": { "filters": []} + /// } + /// + /// + /// + /// + /// + [HttpPost("get-custom-loc-list")] + public virtual async Task> GetListForCustomAsync( + SfsStoreRequestInputBase sfsRequestDTO, bool includeDetails = false, + CancellationToken cancellationToken = default) + { + return await GetListForOtherBaseAsync(sfsRequestDTO, EnumTransSubType.Transfer_Customer, includeDetails, + cancellationToken).ConfigureAwait(false); + } + + /// + /// 按条件获取【储位间调拨】的分页列表 + /// request sample + /// { + /// "maxResultCount": 1000, + /// "skipCount": 0, + /// "sorting": "", + /// "condition": { "filters": []} + /// } + /// + /// + /// + /// + /// + [HttpPost("get-erp-loc-list")] + public virtual async Task> GetListForERPLocAsync( + SfsStoreRequestInputBase sfsRequestDTO, bool includeDetails = false, + CancellationToken cancellationToken = default) + { + return await GetListForOtherBaseAsync(sfsRequestDTO, EnumTransSubType.Transfer_Area, includeDetails, + cancellationToken).ConfigureAwait(false); + } + + /// + /// 按条件获取【储位内移库】的分页列表 + /// request sample + /// { + /// "maxResultCount": 1000, + /// "skipCount": 0, + /// "sorting": "", + /// "condition": { "filters": []} + /// } + /// + /// + /// + /// + /// + [HttpPost("get-custom-inside-list")] + public virtual async Task> GetListForInsideAsync( + SfsStoreRequestInputBase sfsRequestDTO, bool includeDetails = false, + CancellationToken cancellationToken = default) + { + return await GetListForOtherBaseAsync(sfsRequestDTO, EnumTransSubType.Transfer_Inside, includeDetails, + cancellationToken).ConfigureAwait(false); + } + + /// + /// 按条件获取【线边调拨】的分页列表 + /// request sample + /// { + /// "maxResultCount": 1000, + /// "skipCount": 0, + /// "sorting": "", + /// "condition": { "filters": []} + /// } + /// + /// + /// + /// + /// + [HttpPost("get-wip-list")] + public virtual async Task> GetListForWipAsync( + SfsStoreRequestInputBase sfsRequestDTO, bool includeDetails = false, + CancellationToken cancellationToken = default) + { + return await GetListForOtherBaseAsync(sfsRequestDTO, EnumTransSubType.Transfer_WIP, includeDetails, + cancellationToken).ConfigureAwait(false); + } + + /// + /// 按条件获取分页列表 + /// + /// + /// + /// + /// + /// + private async Task> GetListForOtherBaseAsync( + SfsStoreRequestInputBase sfsRequestDTO, EnumTransSubType type, bool includeDetails = false, + CancellationToken cancellationToken = default) + { + sfsRequestDTO.Condition.Filters.Add(new Filter + { + Action = "==", Column = "Type", Logic = EnumFilterLogic.And.ToString(), Value = type.ToString() + }); + + var expression = sfsRequestDTO.Condition.Filters?.Count > 0 + ? sfsRequestDTO.Condition.Filters.ToLambda() + : p => true; + + return await GetPagedListAsync(expression, sfsRequestDTO.SkipCount, sfsRequestDTO.MaxResultCount, + sfsRequestDTO.Sorting, includeDetails, cancellationToken).ConfigureAwait(false); + } + + #endregion + + #endregion + + + /// + /// 【创建】库移请求 + /// + /// + /// + [HttpPost("")] + public override async Task CreateAsync(TransferLibRequestEditInput input) + { + var entity = ObjectMapper.Map(input); + + var subType = Enum.Parse(input.Type); + var tranType = await TransactionTypeAclService.GetByTransTypeAsync(EnumTransType.TransferLib, subType) + .ConfigureAwait(false); + entity.Type = ((int)subType).ToString(); + entity.AutoCompleteJob = tranType.AutoCompleteJob; + entity.AutoSubmit = tranType.AutoSubmitRequest; + entity.AutoAgree = tranType.AutoAgreeRequest; + entity.AutoHandle = tranType.AutoHandleRequest; + entity.DirectCreateNote = tranType.DirectCreateNote; + + await _transferLibRequestManager.CreateAsync(entity).ConfigureAwait(false); + + var dto = ObjectMapper.Map(entity); + + return dto; + } + + protected async Task CheckFromLocationAsync(string locationCode, List validationRresult) + { + var location = await LocationAclService.GetByCodeAsync(locationCode).ConfigureAwait(false); + if (location == null) + { + validationRresult.Add("来源库位代码", $"来源库位代码{locationCode}不存在"); + } + } + + protected virtual async Task CheckImportInputBusinessAsync(TransferLibRequestImportInput importInput, + EnumImportMethod importMethod, List validationRresult) + { + ChecktQty(importInput, validationRresult); + await CheckItemBasicAsync(importInput, validationRresult).ConfigureAwait(false); + + await CheckFromLocationAsync(importInput.FromLocationCode, validationRresult).ConfigureAwait(false); + await CheckToLocationAsync(importInput.ToLocationCode, validationRresult).ConfigureAwait(false); + } + + protected async Task CheckItemBasicAsync(TransferLibRequestImportInput importInput, + List validationRresult) + { + var item = await ItemBasicAclService.GetByCodeAsync(importInput.ItemCode).ConfigureAwait(false); + if (item == null) + { + validationRresult.Add("物品代码", $"物品代码{importInput.ItemCode}不存在"); + } + + if (importInput.Qty <= 0) + { + validationRresult.Add("调整数量", $"调整数量{importInput.Qty}必须大于0"); + } + } + + protected async Task CheckToLocationAsync(string locationCode, List validationRresult) + { + var location = await LocationAclService.GetByCodeAsync(locationCode).ConfigureAwait(false); + if (location == null) + { + validationRresult.Add("目标库位代码", $"目标库位代码{locationCode}不存在"); + } + } + + protected void ChecktQty(TransferLibRequestImportInput importInput, List validationRresult) + { + } +} diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/TransferLibRequests/TransferLibRequestMapperProfile.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/TransferLibRequests/TransferLibRequestMapperProfile.cs new file mode 100644 index 000000000..562796986 --- /dev/null +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/TransferLibRequests/TransferLibRequestMapperProfile.cs @@ -0,0 +1,82 @@ +using AutoMapper; +using Volo.Abp.AutoMapper; +using Win_in.Sfs.Wms.Store.Application.Contracts; +using Win_in.Sfs.Wms.Store.Domain; + +namespace Win_in.Sfs.Wms.Store.Application; + +public partial class StoreApplicationAutoMapperProfile : Profile +{ + private void TransferLibRequestMapperProfile() + { + CreateMap() + .ReverseMap(); + + CreateMap(); + + CreateMap(); + + CreateMap() + .IgnoreAuditedObjectProperties() + .Ignore(x => x.MasterID) + .Ignore(x => x.TenantId) + .Ignore(x => x.Number) + .Ignore(x => x.Id) + .IgnoreAuditedObjectProperties(); + + CreateMap() + .IgnoreAuditedObjectProperties() + .Ignore(x => x.ActiveDate) + .Ignore(x => x.Remark) + .Ignore(x => x.ExtraProperties) + .Ignore(x => x.ConcurrencyStamp) + .Ignore(x => x.RequestStatus) + .Ignore(x => x.TenantId) + .Ignore(x => x.Number) + .Ignore(x => x.Id) + .IgnoreAuditedObjectProperties(); + + CreateMap() + .IgnoreAuditedObjectProperties() + .Ignore(x => x.ActiveDate) + .Ignore(x => x.Remark) + .Ignore(x => x.ExtraProperties) + .Ignore(x => x.ConcurrencyStamp) + .Ignore(x => x.RequestStatus) + .Ignore(x => x.Details) + .Ignore(x => x.TenantId) + .Ignore(x => x.Number) + .Ignore(x => x.Id); + + CreateMap() + .IgnoreAuditedObjectProperties() + .ForMember(x => x.ToPackingCode, y => y.MapFrom(d => d.PackingCode ?? string.Empty)) + .ForMember(x => x.FromPackingCode, y => y.MapFrom(d => d.PackingCode ?? string.Empty)) + .ForMember(x => x.FromStatus, y => y.MapFrom(d => d.Status)) + .ForMember(x => x.ToStatus, y => y.MapFrom(d => d.Status)) + .Ignore(x => x.FromLocationGroup) + .Ignore(x => x.FromLocationArea) + .Ignore(x => x.FromLocationErpCode) + .Ignore(x => x.FromWarehouseCode) + .Ignore(x => x.ToLocationArea) + .Ignore(x => x.ToLocationGroup) + .Ignore(x => x.ToLocationErpCode) + .Ignore(x => x.ToWarehouseCode) + .Ignore(x => x.Reason) + .Ignore(x => x.SupplierBatch).Ignore(x => x.ArriveDate).Ignore(x => x.ProduceDate).Ignore(x => x.ExpireDate) + .Ignore(x => x.Remark) + .Ignore(x => x.ItemName) + .Ignore(x => x.ItemDesc1) + .Ignore(x => x.ItemDesc2) + .Ignore(x => x.FromContainerCode) + .Ignore(x => x.ToContainerCode) + .Ignore(x => x.FromLot) + .Ignore(x => x.ToLot) + .Ignore(x => x.StdPackQty) + .Ignore(x => x.Uom) + .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/StoreApplicationAutoMapperProfile.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/StoreApplicationAutoMapperProfile.cs index 7fa33e59e..8c64426d3 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/StoreApplicationAutoMapperProfile.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/StoreApplicationAutoMapperProfile.cs @@ -14,17 +14,23 @@ public partial class StoreApplicationAutoMapperProfile : Profile InspectRequestAutoMapperProfile(); ItemTransformRequestAutoMapperProfile(); MaterialRequestAutoMapperProfile(); + InjectionRequestAutoMapperProfile(); + AssembleRequestAutoMapperProfile(); ProductionReturnRequestAutoMapperProfile(); ProductReceiptRequestAutoMapperProfile(); UnplannedIssueRequestAutoMapperProfile(); UnplannedReceiptRequestAutoMapperProfile(); TransferRequestMapperProfile(); + TransferLibRequestMapperProfile(); PurchaseReturnRequestAutoMapperProfile(); ProductRecycleRequestAutoMapperProfile(); PutawayRequestAutoMapperProfile(); CountAdjustRequestAutoMapperProfile(); ScrapRequestAutoMapperProfile(); WipWarehouseAdjustRequestMapperProfile(); + CoatingIssueJobAutoMapperProfile(); + CoatingIssueNoteAutoMapperProfile(); + CoatingMaterialRequestAutoMapperProfile(); #endregion @@ -60,6 +66,8 @@ public partial class StoreApplicationAutoMapperProfile : Profile InventoryTransferNoteMapperProfile(); IsolationNoteAutoMapperProfile(); IssueNoteAutoMapperProfile(); + InjectionNoteAutoMapperProfile(); + AssembleNoteAutoMapperProfile(); ContainerNoteAutoMapperProfile(); ItemTransformNoteAutoMapperProfile(); JisDeliverNoteAutoMapperProfile(); @@ -79,6 +87,7 @@ public partial class StoreApplicationAutoMapperProfile : Profile UnplannedReceiptNoteAutoMapperProfile(); WarehouseTransferNoteMapperProfile(); TransferNoteMapperProfile(); + TransferLibNoteMapperProfile(); NoOkConvertOkNoteAutoMapperProfile(); InventoryInitialNoteAutoMapperProfile(); WipWarehouseAdjustNoteMapperProfile(); @@ -92,6 +101,8 @@ public partial class StoreApplicationAutoMapperProfile : Profile DeliverJobAutoMapperProfile(); InspectJobAutoMapperProfile(); IssueJobAutoMapperProfile(); + InjectionJobAutoMapperProfile(); + AssembleJobAutoMapperProfile(); ContainerJobAutoMapperProfile(); JisDeliverJobAutoMapperProfile(); ProductReceiveJobAutoMapperProfile(); @@ -104,11 +115,10 @@ public partial class StoreApplicationAutoMapperProfile : Profile UnplannedReceiptJobAutoMapperProfile(); ProductionReturnJobAutoMapperProfile(); - + TransferLibJobAutoMapperProfile(); #endregion ExchangeDataAutoMapperProfile(); EquipmentRecordAutoMapperProfile(); - } } diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain.Shared/Settings/StoreSettings.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain.Shared/Settings/StoreSettings.cs index bcf1e32b1..729511a4b 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain.Shared/Settings/StoreSettings.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain.Shared/Settings/StoreSettings.cs @@ -112,6 +112,12 @@ public static class StoreSettings public const string EnableMultipleCreateIssueJob = $"{Default}.{nameof(EnableMultipleCreateIssueJob)}"; } + public static class InjectionRequest + { + private const string Default = $"{GroupName}.{nameof(InjectionRequest)}"; + public const string EnableMultipleCreateInjectionJob = $"{Default}.{nameof(EnableMultipleCreateInjectionJob)}"; + } + public static class Cache { diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Jobs/IssueJobs/AssembleJobs/AssembleJob.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Jobs/IssueJobs/AssembleJobs/AssembleJob.cs new file mode 100644 index 000000000..74b1b7e0d --- /dev/null +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Jobs/IssueJobs/AssembleJobs/AssembleJob.cs @@ -0,0 +1,84 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; +using System.Threading.Tasks; +using Win_in.Sfs.Shared.Domain.Entities; + +namespace Win_in.Sfs.Wms.Store.Domain; + +/// +/// 装配发料任务 +/// +[Display(Name = "装配发料任务")] +public class AssembleJob : SfsJobAggregateRootBase +{ + /// + /// 叫料请求类型 + /// + [IgnoreUpdate] + public string RequestType { get; set; } + + /// + /// 生产线 + /// + [IgnoreUpdate] + public string ProdLine { get; set; } + + /// + /// 要货单号 + /// + [IgnoreUpdate] + public string AssembleRequestNumber { get; set; } + + /// + /// 车间 + /// + [IgnoreUpdate] + public string Workshop { get; set; } + + /// + /// 使用在途库 + /// + [Display(Name = "使用在途库")] + [IgnoreUpdate] + public bool UseOnTheWayLocation { get; set; } + + /// + /// 任务明细 + /// + [IgnoreUpdate] + public override List Details { get; set; } = new List(); + + /// + /// 设置任务明细的实际库位和实际数量 + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + public virtual async Task BuildDetail(Guid id, string handledLocationCode, string handledLocationErpCode, + string handledWarehouseCode, decimal handledQty, string handledSupplierBatch, DateTime handledArriveDate, DateTime handledProduceDate, DateTime handledExpireDate, + string handledContainerCode, string handledLot, string handledPackingCode) + { + var detail = GetDetail(id); + detail.HandledFromLocationCode = handledLocationCode; + detail.HandledFromLocationErpCode = handledLocationErpCode; + detail.HandledFromWarehouseCode = handledWarehouseCode; + detail.HandledQty = handledQty; + detail.HandledSupplierBatch = handledSupplierBatch; + detail.HandledArriveDate = handledArriveDate; + detail.HandledProduceDate = handledProduceDate; + detail.HandledExpireDate = handledExpireDate; + detail.HandledContainerCode = handledContainerCode; + detail.HandledLot = handledLot; + detail.HandledPackingCode = handledPackingCode; + await Task.CompletedTask.ConfigureAwait(false); + } + +} diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Jobs/IssueJobs/AssembleJobs/AssembleJobDetail.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Jobs/IssueJobs/AssembleJobs/AssembleJobDetail.cs new file mode 100644 index 000000000..02d48d84f --- /dev/null +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Jobs/IssueJobs/AssembleJobs/AssembleJobDetail.cs @@ -0,0 +1,108 @@ +using System; +using Win_in.Sfs.Shared.Domain; +using Win_in.Sfs.Shared.Domain.Shared; + +namespace Win_in.Sfs.Wms.Store.Domain; + +public class AssembleJobDetail : SfsJobRecommendFromDetailEntityBase, IHasToLocation +{ + /// + /// 请求库位 + /// + public string RequestLocationCode { get; set; } + + /// + /// 到库位 + /// + public string ToLocationCode { get; set; } + + /// + /// 到库区 + /// + public string ToLocationArea { get; set; } + + /// + /// 到库位组 + /// + public string ToLocationGroup { get; set; } + + /// + /// 到ERP库位 + /// + public string ToLocationErpCode { get; set; } + + /// + /// 到仓库 + /// + public string ToWarehouseCode { get; set; } + + /// + /// 在途库库位 + /// + public string OnTheWayLocationCode { get; set; } + + /// + /// 生产线 + /// + public string ProdLine { get; set; } + + /// + /// 工作中心 + /// + public string WorkStation { get; set; } + + /// + /// 过期时间 + /// + public DateTime ExpiredTime { get; set; } + + /// + /// 工序 + /// + public string Operation { get; set; } + + /// + /// 配送方式 + /// + public EnumDistributionType DistributionType { get; set; } + + /// + /// 取整方式 + /// + public EnumTruncType TruncType { get; set; } + + /// + /// 取整后数量 + /// + public decimal RoundedQty { get; set; } + + /// + /// 计划拆分规则 + /// + public EnumPlannedSplitRule PlannedSplitRule { get; set; } + + /// + /// 计划开始时间 + /// + public DateTime PlanBeginTime { get; set; } + + /// + /// 每次配送数量 + /// + public decimal DeliveryQty { get; set; } + + /// + /// 位置码 + /// + public string PositionCode { get; set; } + + /// + /// 推荐类型 + /// + public EnumRecommendType RecommendType { get; set; } + + public void SetId(Guid id) + { + this.Id = id; + } +} diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Jobs/IssueJobs/AssembleJobs/AssembleJobManager.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Jobs/IssueJobs/AssembleJobs/AssembleJobManager.cs new file mode 100644 index 000000000..cd421f475 --- /dev/null +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Jobs/IssueJobs/AssembleJobs/AssembleJobManager.cs @@ -0,0 +1,82 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; +using System.Linq; +using System.Linq.Expressions; +using System.Threading.Tasks; +using Volo.Abp.Users; +using Volo.Abp.Validation; +using Win_in.Sfs.Shared.Domain.Shared; + +namespace Win_in.Sfs.Wms.Store.Domain; + +public class AssembleJobManager : SfsJobManagerBase, IAssembleJobManager +{ + + public AssembleJobManager( + IAssembleJobRepository repository + ) : base(repository) + { + } + + /// + /// 执行任务 发料任务 + /// + /// + /// + /// + /// + public override async Task CompleteAsync(AssembleJob input, ICurrentUser user) + { + var entity = await Repository.FindAsync(input.Id).ConfigureAwait(false); + + foreach (var detail in input.Details) + { + //发料子任务 赋值实际转移 + await entity.BuildDetail(detail.Id, + detail.HandledFromLocationCode, + detail.HandledFromLocationErpCode, + detail.HandledFromWarehouseCode, + detail.HandledQty, + detail.HandledSupplierBatch, + detail.HandledArriveDate, + detail.HandledProduceDate, + detail.HandledExpireDate, + detail.HandledContainerCode, + detail.HandledLot, + detail.HandledPackingCode).ConfigureAwait(false); + } + + return await base.CompleteAsync(entity, user).ConfigureAwait(false); + } + + public override void CheckDetails(AssembleJob entity, AbpValidationResult result) + { + var details = entity.Details; + foreach (var detail in details) + { + if (detail.HandledFromLocationCode == null) + { + result.Errors.Add(new ValidationResult($"{detail.HandledFromLocationCode} 不能为空")); + } + + } + } + + public override async Task> GetWorkingListByPackingAsync(string packingCode) + { + return await Repository.GetListAsync(c => c.Details.Any(p => p.RecommendPackingCode == packingCode) && c.JobStatus != EnumJobStatus.Closed && c.JobStatus != EnumJobStatus.Cancelled, true).ConfigureAwait(false); + + } + + public override async Task> GetWorkingListByContainerAsync(string containerCode) + { + return await Repository.GetListAsync(c => c.Details.Any(p => p.RecommendContainerCode == containerCode) && c.JobStatus != EnumJobStatus.Closed && c.JobStatus != EnumJobStatus.Cancelled, true).ConfigureAwait(false); + + } + + public async Task GetAsync(Expression> expression) + { + return await Repository.FindAsync(expression).ConfigureAwait(false); + } +} diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Jobs/IssueJobs/AssembleJobs/IAssembleJobManager.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Jobs/IssueJobs/AssembleJobs/IAssembleJobManager.cs new file mode 100644 index 000000000..480cf0cfd --- /dev/null +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Jobs/IssueJobs/AssembleJobs/IAssembleJobManager.cs @@ -0,0 +1,10 @@ +using System; +using System.Linq.Expressions; +using System.Threading.Tasks; + +namespace Win_in.Sfs.Wms.Store.Domain; + +public interface IAssembleJobManager : IJobManager +{ + Task GetAsync(Expression> expression); +} diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Jobs/IssueJobs/AssembleJobs/IAssembleJobRepository.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Jobs/IssueJobs/AssembleJobs/IAssembleJobRepository.cs new file mode 100644 index 000000000..568570c1e --- /dev/null +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Jobs/IssueJobs/AssembleJobs/IAssembleJobRepository.cs @@ -0,0 +1,6 @@ +namespace Win_in.Sfs.Wms.Store.Domain; + +public interface IAssembleJobRepository : ISfsJobRepositoryBase +{ + +} diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Jobs/IssueJobs/CoatingIssueJobs/CoatingIssueJob.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Jobs/IssueJobs/CoatingIssueJobs/CoatingIssueJob.cs new file mode 100644 index 000000000..38ff594ed --- /dev/null +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Jobs/IssueJobs/CoatingIssueJobs/CoatingIssueJob.cs @@ -0,0 +1,85 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; +using System.Threading.Tasks; +using Win_in.Sfs.Shared.Domain.Entities; +using Win_in.Sfs.Wms.Store.Domain; + +namespace Win_in.Sfs.Wms.Store.Jobs.IssueJobs; + +/// +/// 发料任务 +/// +[Display(Name = "发料任务")] +public class CoatingIssueJob : SfsJobAggregateRootBase +{ + /// + /// 叫料请求类型 + /// + [IgnoreUpdate] + public string RequestType { get; set; } + + /// + /// 生产线 + /// + [IgnoreUpdate] + public string ProdLine { get; set; } + + /// + /// 要货单号 + /// + [IgnoreUpdate] + public string MaterialRequestNumber { get; set; } + + /// + /// 车间 + /// + [IgnoreUpdate] + public string Workshop { get; set; } + + /// + /// 使用在途库 + /// + [Display(Name = "使用在途库")] + [IgnoreUpdate] + public bool UseOnTheWayLocation { get; set; } + + /// + /// 任务明细 + /// + [IgnoreUpdate] + public override List Details { get; set; } = new List(); + + /// + /// 设置任务明细的实际库位和实际数量 + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + public virtual async Task BuildDetail(Guid id, string handledLocationCode, string handledLocationErpCode, + string handledWarehouseCode, decimal handledQty, string handledSupplierBatch, DateTime handledArriveDate, DateTime handledProduceDate, DateTime handledExpireDate, + string handledContainerCode, string handledLot, string handledPackingCode) + { + var detail = GetDetail(id); + detail.HandledFromLocationCode = handledLocationCode; + detail.HandledFromLocationErpCode = handledLocationErpCode; + detail.HandledFromWarehouseCode = handledWarehouseCode; + detail.HandledQty = handledQty; + detail.HandledSupplierBatch = handledSupplierBatch; + detail.HandledArriveDate = handledArriveDate; + detail.HandledProduceDate = handledProduceDate; + detail.HandledExpireDate = handledExpireDate; + detail.HandledContainerCode = handledContainerCode; + detail.HandledLot = handledLot; + detail.HandledPackingCode = handledPackingCode; + await Task.CompletedTask.ConfigureAwait(false); + } + +} diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Jobs/IssueJobs/CoatingIssueJobs/CoatingIssueJobDetail.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Jobs/IssueJobs/CoatingIssueJobs/CoatingIssueJobDetail.cs new file mode 100644 index 000000000..4b2c9c832 --- /dev/null +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Jobs/IssueJobs/CoatingIssueJobs/CoatingIssueJobDetail.cs @@ -0,0 +1,109 @@ +using System; +using Win_in.Sfs.Shared.Domain; +using Win_in.Sfs.Shared.Domain.Shared; +using Win_in.Sfs.Wms.Store.Domain; + +namespace Win_in.Sfs.Wms.Store.Jobs.IssueJobs; + +public class CoatingIssueJobDetail : SfsJobRecommendFromDetailEntityBase, IHasToLocation +{ + /// + /// 请求库位 + /// + public string RequestLocationCode { get; set; } + + /// + /// 到库位 + /// + public string ToLocationCode { get; set; } + + /// + /// 到库区 + /// + public string ToLocationArea { get; set; } + + /// + /// 到库位组 + /// + public string ToLocationGroup { get; set; } + + /// + /// 到ERP库位 + /// + public string ToLocationErpCode { get; set; } + + /// + /// 到仓库 + /// + public string ToWarehouseCode { get; set; } + + /// + /// 在途库库位 + /// + public string OnTheWayLocationCode { get; set; } + + /// + /// 生产线 + /// + public string ProdLine { get; set; } + + /// + /// 工作中心 + /// + public string WorkStation { get; set; } + + /// + /// 过期时间 + /// + public DateTime ExpiredTime { get; set; } + + /// + /// 工序 + /// + public string Operation { get; set; } + + /// + /// 配送方式 + /// + public EnumDistributionType DistributionType { get; set; } + + /// + /// 取整方式 + /// + public EnumTruncType TruncType { get; set; } + + /// + /// 取整后数量 + /// + public decimal RoundedQty { get; set; } + + /// + /// 计划拆分规则 + /// + public EnumPlannedSplitRule PlannedSplitRule { get; set; } + + /// + /// 计划开始时间 + /// + public DateTime PlanBeginTime { get; set; } + + /// + /// 每次配送数量 + /// + public decimal DeliveryQty { get; set; } + + /// + /// 位置码 + /// + public string PositionCode { get; set; } + + /// + /// 推荐类型 + /// + public EnumRecommendType RecommendType { get; set; } + + public void SetId(Guid id) + { + Id = id; + } +} diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Jobs/IssueJobs/CoatingIssueJobs/CoatingIssueJobManager.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Jobs/IssueJobs/CoatingIssueJobs/CoatingIssueJobManager.cs new file mode 100644 index 000000000..2e3f2e681 --- /dev/null +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Jobs/IssueJobs/CoatingIssueJobs/CoatingIssueJobManager.cs @@ -0,0 +1,104 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; +using System.Linq; +using System.Linq.Expressions; +using System.Threading.Tasks; +using Volo.Abp.Users; +using Volo.Abp.Validation; +using Win_in.Sfs.Shared.Domain.Shared; +using Win_in.Sfs.Wms.Store.Domain; + +namespace Win_in.Sfs.Wms.Store.Jobs.IssueJobs; + +public class CoatingIssueJobManager : SfsJobManagerBase, ICoatingIssueJobManager +{ + + public CoatingIssueJobManager( + ICoatingIssueJobRepository repository + ) : base(repository) + { + } + + /// + /// 执行任务 发料任务 + /// + /// + /// + /// + /// + public override async Task CompleteAsync(CoatingIssueJob input, ICurrentUser user) + { + var entity = await Repository.FindAsync(input.Id).ConfigureAwait(false); + + foreach (var detail in input.Details) + { + //发料子任务 赋值实际转移 + await entity.BuildDetail(detail.Id, + detail.HandledFromLocationCode, + detail.HandledFromLocationErpCode, + detail.HandledFromWarehouseCode, + detail.HandledQty, + detail.HandledSupplierBatch, + detail.HandledArriveDate, + detail.HandledProduceDate, + detail.HandledExpireDate, + detail.HandledContainerCode, + detail.HandledLot, + detail.HandledPackingCode).ConfigureAwait(false); + } + + return await base.CompleteAsync(entity, user).ConfigureAwait(false); + } + + public override void CheckDetails(CoatingIssueJob entity, AbpValidationResult result) + { + var details = entity.Details; + foreach (var detail in details) + { + if (detail.HandledFromLocationCode == null) + { + result.Errors.Add(new ValidationResult($"{detail.HandledFromLocationCode} 不能为空")); + } + + } + } + + public override async Task> GetWorkingListByPackingAsync(string packingCode) + { + return await Repository.GetListAsync(c => c.Details.Any(p => p.RecommendPackingCode == packingCode) && c.JobStatus != EnumJobStatus.Closed && c.JobStatus != EnumJobStatus.Cancelled, true).ConfigureAwait(false); + + } + + public override async Task> GetWorkingListByContainerAsync(string containerCode) + { + return await Repository.GetListAsync(c => c.Details.Any(p => p.RecommendContainerCode == containerCode) && c.JobStatus != EnumJobStatus.Closed && c.JobStatus != EnumJobStatus.Cancelled, true).ConfigureAwait(false); + + } + + ///// + ///// 临时修改 解决补料无法拿到订阅错误 + ///// + ///// + ///// + //public virtual async Task> AddByEtoAsync(MaterialRequestHandledETO eventData) + //{ + // var CoatingIssueJobs = await BuildCoatingIssueJobByMaterialRequestAsync(eventData); + + // await Repository.InsertManyAsync(CoatingIssueJobs); + + // var expectIns = await BuildExpectInAsync(CoatingIssueJobs); + // await _expectInAppService.AddManyAndCalculationAvailableCapacityAsync(expectIns); + + // return CoatingIssueJobs; + //} + + //public virtual async Task TestError() + //{ + // throw new UserFriendlyException("我是测试的异常"); + //} + public async Task GetAsync(Expression> expression) + { + return await Repository.FindAsync(expression).ConfigureAwait(false); + } +} diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Jobs/IssueJobs/CoatingIssueJobs/ICoatingIssueJobManager.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Jobs/IssueJobs/CoatingIssueJobs/ICoatingIssueJobManager.cs new file mode 100644 index 000000000..7142a5482 --- /dev/null +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Jobs/IssueJobs/CoatingIssueJobs/ICoatingIssueJobManager.cs @@ -0,0 +1,11 @@ +using System; +using System.Linq.Expressions; +using System.Threading.Tasks; +using Win_in.Sfs.Wms.Store.Domain; + +namespace Win_in.Sfs.Wms.Store.Jobs.IssueJobs; + +public interface ICoatingIssueJobManager : IJobManager +{ + Task GetAsync(Expression> expression); +} diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Jobs/IssueJobs/CoatingIssueJobs/ICoatingIssueJobRepository.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Jobs/IssueJobs/CoatingIssueJobs/ICoatingIssueJobRepository.cs new file mode 100644 index 000000000..fb7c9e112 --- /dev/null +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Jobs/IssueJobs/CoatingIssueJobs/ICoatingIssueJobRepository.cs @@ -0,0 +1,8 @@ +using Win_in.Sfs.Wms.Store.Domain; + +namespace Win_in.Sfs.Wms.Store.Jobs.IssueJobs; + +public interface ICoatingIssueJobRepository : ISfsJobRepositoryBase +{ + +} diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Jobs/IssueJobs/CoatingIssueJobs/ICoatingssueExtension.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Jobs/IssueJobs/CoatingIssueJobs/ICoatingssueExtension.cs new file mode 100644 index 000000000..f31192512 --- /dev/null +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Jobs/IssueJobs/CoatingIssueJobs/ICoatingssueExtension.cs @@ -0,0 +1,55 @@ +using Volo.Abp.Timing; +using Win_in.Sfs.Shared.Domain.Shared; +using Win_in.Sfs.Wms.Store.Domain; + +namespace Win_in.Sfs.Wms.Store.Jobs.IssueJobs; + +public static class CoatingIssueExtension +{ + // public static IssueJob SetDetails(this IssueJob job,IGuidGenerator guidGenerator, LocationDTO location) + // { + // foreach (var detail in job.Details) + // { + // detail.SetIdAndNumber(guidGenerator,job.Id,job.Number); + // detail.RecommendLocationCode = location.Code; + // detail.SetBatch(detail.RecommendBatch); + // } + // return job; + // } + + public static IssueJob Init(this IssueJob job) + { + job.JobType = EnumJobType.IssueJob; + job.JobStatus = EnumJobStatus.Open; + return job; + } + + public static IssueJob SetWorkGroup(this IssueJob job, string warehouseCode, string workGroupCode, string groupCode) + { + job.WorkGroupCode = workGroupCode; + job.WarehouseCode = warehouseCode; + job.ProdLine = groupCode; + return job; + } + + public static IssueJob SetWorker(this IssueJob job, string worker) + { + job.Worker = worker; + return job; + } + + public static IssueJob SetPriority(this IssueJob job, IClock clock) + { + job.Priority = PriorityHelper.GetPriority(clock); + job.PriorityIncrement = 1; + return job; + } + + // public static IssueJob SetIdAndNumber(this IssueJob job,IGuidGenerator guidGenerator, ISnowflakeIdGenerator numberGenerator) + // { + // var number = (numberGenerator.CreateAsync().GetAwaiter().GetResult()).ToString(); + // job.SetIdAndNumber(guidGenerator, number); + // return job; + // } + +} diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Jobs/IssueJobs/IIssueJobRepository.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Jobs/IssueJobs/IIssueJobRepository.cs index aeeac0878..f507ca852 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Jobs/IssueJobs/IIssueJobRepository.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Jobs/IssueJobs/IIssueJobRepository.cs @@ -1,6 +1,6 @@ namespace Win_in.Sfs.Wms.Store.Domain; -public interface IIssueJobRepository : ISfsJobRepositoryBase +public interface IInjectionJobRepository : ISfsJobRepositoryBase { } diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Jobs/IssueJobs/InjectionJobs/IInjectionJobManager.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Jobs/IssueJobs/InjectionJobs/IInjectionJobManager.cs new file mode 100644 index 000000000..7be96ee4a --- /dev/null +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Jobs/IssueJobs/InjectionJobs/IInjectionJobManager.cs @@ -0,0 +1,10 @@ +using System; +using System.Linq.Expressions; +using System.Threading.Tasks; + +namespace Win_in.Sfs.Wms.Store.Domain; + +public interface IInjectionJobManager : IJobManager +{ + Task GetAsync(Expression> expression); +} diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Jobs/IssueJobs/InjectionJobs/IInjectionJobRepository.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Jobs/IssueJobs/InjectionJobs/IInjectionJobRepository.cs new file mode 100644 index 000000000..aeeac0878 --- /dev/null +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Jobs/IssueJobs/InjectionJobs/IInjectionJobRepository.cs @@ -0,0 +1,6 @@ +namespace Win_in.Sfs.Wms.Store.Domain; + +public interface IIssueJobRepository : ISfsJobRepositoryBase +{ + +} diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Jobs/IssueJobs/InjectionJobs/InjectionJob.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Jobs/IssueJobs/InjectionJobs/InjectionJob.cs new file mode 100644 index 000000000..8f22c73b2 --- /dev/null +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Jobs/IssueJobs/InjectionJobs/InjectionJob.cs @@ -0,0 +1,84 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; +using System.Threading.Tasks; +using Win_in.Sfs.Shared.Domain.Entities; + +namespace Win_in.Sfs.Wms.Store.Domain; + +/// +/// 注塑发料任务 +/// +[Display(Name = "注塑发料任务")] +public class InjectionJob : SfsJobAggregateRootBase +{ + /// + /// 叫料请求类型 + /// + [IgnoreUpdate] + public string RequestType { get; set; } + + /// + /// 生产线 + /// + [IgnoreUpdate] + public string ProdLine { get; set; } + + /// + /// 要货单号 + /// + [IgnoreUpdate] + public string InjectionRequestNumber { get; set; } + + /// + /// 车间 + /// + [IgnoreUpdate] + public string Workshop { get; set; } + + /// + /// 使用在途库 + /// + [Display(Name = "使用在途库")] + [IgnoreUpdate] + public bool UseOnTheWayLocation { get; set; } + + /// + /// 任务明细 + /// + [IgnoreUpdate] + public override List Details { get; set; } = new List(); + + /// + /// 设置任务明细的实际库位和实际数量 + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + public virtual async Task BuildDetail(Guid id, string handledLocationCode, string handledLocationErpCode, + string handledWarehouseCode, decimal handledQty, string handledSupplierBatch, DateTime handledArriveDate, DateTime handledProduceDate, DateTime handledExpireDate, + string handledContainerCode, string handledLot, string handledPackingCode) + { + var detail = GetDetail(id); + detail.HandledFromLocationCode = handledLocationCode; + detail.HandledFromLocationErpCode = handledLocationErpCode; + detail.HandledFromWarehouseCode = handledWarehouseCode; + detail.HandledQty = handledQty; + detail.HandledSupplierBatch = handledSupplierBatch; + detail.HandledArriveDate = handledArriveDate; + detail.HandledProduceDate = handledProduceDate; + detail.HandledExpireDate = handledExpireDate; + detail.HandledContainerCode = handledContainerCode; + detail.HandledLot = handledLot; + detail.HandledPackingCode = handledPackingCode; + await Task.CompletedTask.ConfigureAwait(false); + } + +} diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Jobs/IssueJobs/InjectionJobs/InjectionJobDetail.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Jobs/IssueJobs/InjectionJobs/InjectionJobDetail.cs new file mode 100644 index 000000000..5d37078d1 --- /dev/null +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Jobs/IssueJobs/InjectionJobs/InjectionJobDetail.cs @@ -0,0 +1,108 @@ +using System; +using Win_in.Sfs.Shared.Domain; +using Win_in.Sfs.Shared.Domain.Shared; + +namespace Win_in.Sfs.Wms.Store.Domain; + +public class InjectionJobDetail : SfsJobRecommendFromDetailEntityBase, IHasToLocation +{ + /// + /// 请求库位 + /// + public string RequestLocationCode { get; set; } + + /// + /// 到库位 + /// + public string ToLocationCode { get; set; } + + /// + /// 到库区 + /// + public string ToLocationArea { get; set; } + + /// + /// 到库位组 + /// + public string ToLocationGroup { get; set; } + + /// + /// 到ERP库位 + /// + public string ToLocationErpCode { get; set; } + + /// + /// 到仓库 + /// + public string ToWarehouseCode { get; set; } + + /// + /// 在途库库位 + /// + public string OnTheWayLocationCode { get; set; } + + /// + /// 生产线 + /// + public string ProdLine { get; set; } + + /// + /// 工作中心 + /// + public string WorkStation { get; set; } + + /// + /// 过期时间 + /// + public DateTime ExpiredTime { get; set; } + + /// + /// 工序 + /// + public string Operation { get; set; } + + /// + /// 配送方式 + /// + public EnumDistributionType DistributionType { get; set; } + + /// + /// 取整方式 + /// + public EnumTruncType TruncType { get; set; } + + /// + /// 取整后数量 + /// + public decimal RoundedQty { get; set; } + + /// + /// 计划拆分规则 + /// + public EnumPlannedSplitRule PlannedSplitRule { get; set; } + + /// + /// 计划开始时间 + /// + public DateTime PlanBeginTime { get; set; } + + /// + /// 每次配送数量 + /// + public decimal DeliveryQty { get; set; } + + /// + /// 位置码 + /// + public string PositionCode { get; set; } + + /// + /// 推荐类型 + /// + public EnumRecommendType RecommendType { get; set; } + + public void SetId(Guid id) + { + this.Id = id; + } +} diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Jobs/IssueJobs/InjectionJobs/InjectionJobManager.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Jobs/IssueJobs/InjectionJobs/InjectionJobManager.cs new file mode 100644 index 000000000..a88e5c213 --- /dev/null +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Jobs/IssueJobs/InjectionJobs/InjectionJobManager.cs @@ -0,0 +1,82 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; +using System.Linq; +using System.Linq.Expressions; +using System.Threading.Tasks; +using Volo.Abp.Users; +using Volo.Abp.Validation; +using Win_in.Sfs.Shared.Domain.Shared; + +namespace Win_in.Sfs.Wms.Store.Domain; + +public class InjectionJobManager : SfsJobManagerBase, IInjectionJobManager +{ + + public InjectionJobManager( + IInjectionJobRepository repository + ) : base(repository) + { + } + + /// + /// 执行任务 发料任务 + /// + /// + /// + /// + /// + public override async Task CompleteAsync(InjectionJob input, ICurrentUser user) + { + var entity = await Repository.FindAsync(input.Id).ConfigureAwait(false); + + foreach (var detail in input.Details) + { + //发料子任务 赋值实际转移 + await entity.BuildDetail(detail.Id, + detail.HandledFromLocationCode, + detail.HandledFromLocationErpCode, + detail.HandledFromWarehouseCode, + detail.HandledQty, + detail.HandledSupplierBatch, + detail.HandledArriveDate, + detail.HandledProduceDate, + detail.HandledExpireDate, + detail.HandledContainerCode, + detail.HandledLot, + detail.HandledPackingCode).ConfigureAwait(false); + } + + return await base.CompleteAsync(entity, user).ConfigureAwait(false); + } + + public override void CheckDetails(InjectionJob entity, AbpValidationResult result) + { + var details = entity.Details; + foreach (var detail in details) + { + if (detail.HandledFromLocationCode == null) + { + result.Errors.Add(new ValidationResult($"{detail.HandledFromLocationCode} 不能为空")); + } + + } + } + + public override async Task> GetWorkingListByPackingAsync(string packingCode) + { + return await Repository.GetListAsync(c => c.Details.Any(p => p.RecommendPackingCode == packingCode) && c.JobStatus != EnumJobStatus.Closed && c.JobStatus != EnumJobStatus.Cancelled, true).ConfigureAwait(false); + + } + + public override async Task> GetWorkingListByContainerAsync(string containerCode) + { + return await Repository.GetListAsync(c => c.Details.Any(p => p.RecommendContainerCode == containerCode) && c.JobStatus != EnumJobStatus.Closed && c.JobStatus != EnumJobStatus.Cancelled, true).ConfigureAwait(false); + + } + + public async Task GetAsync(Expression> expression) + { + return await Repository.FindAsync(expression).ConfigureAwait(false); + } +} diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Jobs/TransferLibJobs/ITransferLibJobManager.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Jobs/TransferLibJobs/ITransferLibJobManager.cs new file mode 100644 index 000000000..dbb6d6d62 --- /dev/null +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Jobs/TransferLibJobs/ITransferLibJobManager.cs @@ -0,0 +1,11 @@ +using System; +using System.Linq.Expressions; +using System.Threading.Tasks; + +namespace Win_in.Sfs.Wms.Store.Domain; + +public interface ITransferLibJobManager : IJobManager +{ + Task GetAsync(Expression> expression); + Task UpdateAsync(TransferLibJob issueJob); +} diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Jobs/TransferLibJobs/ITransferLibJobRepository.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Jobs/TransferLibJobs/ITransferLibJobRepository.cs new file mode 100644 index 000000000..71cdc8aa7 --- /dev/null +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Jobs/TransferLibJobs/ITransferLibJobRepository.cs @@ -0,0 +1,6 @@ +namespace Win_in.Sfs.Wms.Store.Domain; + +public interface ITransferLibJobRepository : ISfsJobRepositoryBase +{ + +} diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Jobs/TransferLibJobs/TransferLibJob.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Jobs/TransferLibJobs/TransferLibJob.cs new file mode 100644 index 000000000..fa4dc9919 --- /dev/null +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Jobs/TransferLibJobs/TransferLibJob.cs @@ -0,0 +1,61 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; +using System.Threading.Tasks; +using Volo.Abp.Data; +using Win_in.Sfs.Shared.Domain.Entities; +using Win_in.Sfs.Shared.Domain.Shared.Enums.Store; + +namespace Win_in.Sfs.Wms.Store.Domain; + +/// +/// 计划外出库任务 +/// +[Display(Name = "计划外出库任务")] +public class TransferLibJob : SfsJobAggregateRootBase +{ + /// + /// 申请单号 + /// + [IgnoreUpdate] + public string RequestNumber { get; set; } + + /// + /// 任务单号 + /// + [IgnoreUpdate] + public string JobNumber { get; set; } + + /// + /// 调拨类型 + /// + [Display(Name = "调拨类型")] + [Required(ErrorMessage = "调拨类型不能为空")] + public string Type { get; set; } + + /// + /// 使用中间库 + /// + [Display(Name = "使用中间库")] + public bool UseOnTheWayLocation { get; set; } + + /// + /// 确认时间 + /// + [Display(Name = "确认时间")] + [IgnoreUpdate] + public DateTime? ConfirmTime { get; set; } + + /// + /// 已确认 + /// + [Display(Name = "已确认")] + public bool Confirmed { get; set; } + + /// + /// 任务明细 + /// + [IgnoreUpdate] + public override List Details { get; set; } = new List(); + +} diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Jobs/TransferLibJobs/TransferLibJobDetail.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Jobs/TransferLibJobs/TransferLibJobDetail.cs new file mode 100644 index 000000000..287480739 --- /dev/null +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Jobs/TransferLibJobs/TransferLibJobDetail.cs @@ -0,0 +1,25 @@ +using System.ComponentModel.DataAnnotations; +using Volo.Abp.Data; +using Win_in.Sfs.Shared.Domain.Shared; +using Win_in.Sfs.Shared.Domain.Shared.Enums.Store; + +namespace Win_in.Sfs.Wms.Store.Domain; + +public class TransferLibJobDetail : SfsStoreDetailWithFromToEntityBase +{ + /// + /// 中间库地址 + /// + public string OnTheWayLocationCode { get; set; } + + /// + /// 原因 + /// + public string Reason { get; set; } + + /// + /// 执行任务状态 + /// + public EnumJobStatus JobStatus { get; set; } + +} diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Jobs/TransferLibJobs/TransferLibJobManager.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Jobs/TransferLibJobs/TransferLibJobManager.cs new file mode 100644 index 000000000..c9a5ae4fb --- /dev/null +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Jobs/TransferLibJobs/TransferLibJobManager.cs @@ -0,0 +1,46 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; +using System.Linq; +using System.Linq.Expressions; +using System.Threading.Tasks; +using Volo.Abp.Users; +using Volo.Abp.Validation; +using Win_in.Sfs.Shared.Domain.Shared; + +namespace Win_in.Sfs.Wms.Store.Domain; + +public class TransferLibJobManager : SfsJobManagerBase, ITransferLibJobManager +{ + + public TransferLibJobManager( + ITransferLibJobRepository repository + ) : base(repository) + { + } + + public override void CheckDetails(TransferLibJob entity, AbpValidationResult result) + { + throw new NotImplementedException(); + } + + public async Task GetAsync(Expression> expression) + { + return await Repository.FindAsync(expression).ConfigureAwait(false); + } + + public override Task> GetWorkingListByContainerAsync(string containerCode) + { + throw new NotImplementedException(); + } + + public override Task> GetWorkingListByPackingAsync(string packingCode) + { + throw new NotImplementedException(); + } + + public async Task UpdateAsync(TransferLibJob TransferLibJob) + { + await Repository.UpdateAsync(TransferLibJob).ConfigureAwait(false); + } +} diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Notes/IssueNotes/AssembleNotes/AssembleNote.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Notes/IssueNotes/AssembleNotes/AssembleNote.cs new file mode 100644 index 000000000..6dd11ef37 --- /dev/null +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Notes/IssueNotes/AssembleNotes/AssembleNote.cs @@ -0,0 +1,77 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; +using Volo.Abp; +using Win_in.Sfs.Shared.Domain.Entities; + +namespace Win_in.Sfs.Wms.Store.Domain; + +/// +/// 装配发料记录 +/// +public class AssembleNote : SfsStoreAggregateRootBase, IHasJobNumber, IHasRequestNumber +{ + /// + /// 任务ID + /// + [IgnoreUpdate] + public string JobNumber { get; set; } + + /// + /// 车间 + /// + [IgnoreUpdate] + public string Workshop { get; set; } + + /// + /// 明细列表 + /// + [IgnoreUpdate] + public override List Details { get; set; } = new List(); + + [IgnoreUpdate] + public string RequestNumber { get; set; } + + /// + /// 叫料请求类型 + /// + [IgnoreUpdate] + public string RequestType { get; set; } + + /// + /// 使用在途库 + /// + [IgnoreUpdate] + public bool UseOnTheWayLocation { get; set; } + + /// + /// 确认时间 + /// + [Display(Name = "确认时间")] + [IgnoreUpdate] + public DateTime? ConfirmTime { get; set; } + + /// + /// 已确认 + /// + [Display(Name = "已确认")] + public bool Confirmed { get; set; } + + public void Confirm(DateTime confirmTime) + { + + CheckStatus(Confirmed); + Confirmed = true; + ConfirmTime = confirmTime; + } + + private static void CheckStatus(bool confirmed) + { + if (confirmed) + { + throw new UserFriendlyException($"当前状态为 【已确认】 ,无法再次确认!"); + } + + } + +} diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Notes/IssueNotes/AssembleNotes/AssembleNoteDetail.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Notes/IssueNotes/AssembleNotes/AssembleNoteDetail.cs new file mode 100644 index 000000000..ee2f8a389 --- /dev/null +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Notes/IssueNotes/AssembleNotes/AssembleNoteDetail.cs @@ -0,0 +1,43 @@ +using System; +using Win_in.Sfs.Shared.Domain.Shared; + +namespace Win_in.Sfs.Wms.Store.Domain; + +public class AssembleNoteDetail : SfsStoreRecommendFromDetailWithFromToEntityBase +{ + + /// + /// 发料时间 + /// + public DateTime IssueTime { get; set; } + + /// + /// 过期时间 + /// + public DateTime ExpiredTime { get; set; } + + /// + /// 生产线 + /// + public string ProdLine { get; set; } + + /// + /// 工作中心 + /// + public string WorkStation { get; set; } + + /// + /// 在途库库位 + /// + public string OnTheWayLocationCode { get; set; } + + /// + /// 位置码 + /// + public string PositionCode { get; set; } + + /// + /// 推荐类型 + /// + public EnumRecommendType RecommendType { get; set; } +} diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Notes/IssueNotes/AssembleNotes/AssembleNoteManager.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Notes/IssueNotes/AssembleNotes/AssembleNoteManager.cs new file mode 100644 index 000000000..1f658983e --- /dev/null +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Notes/IssueNotes/AssembleNotes/AssembleNoteManager.cs @@ -0,0 +1,42 @@ +using System; +using System.Threading.Tasks; +using Microsoft.Extensions.Logging; +using Volo.Abp; +using Volo.Abp.Uow; +using Win_in.Sfs.Shared.Event; + +namespace Win_in.Sfs.Wms.Store.Domain; + +public class AssembleNoteManager : SfsStoreManagerBase, IAssembleNoteManager +{ + + public AssembleNoteManager( + IAssembleNoteRepository repository + ) : base(repository) + { + } + + [UnitOfWork] + public virtual async Task ConfirmAsync(Guid id) + { + var entity = await Repository.FindAsync(id).ConfigureAwait(false); + Check.NotNull(entity, EntityClassName); + entity.Confirm(Clock.Now); + await PublishConfirmedAsync(entity).ConfigureAwait(false); + return await Repository.UpdateAsync(entity).ConfigureAwait(false); + } + private async Task PublishConfirmedAsync(AssembleNote entity) + { + try + { + await LocalEventBus.PublishAsync(new SfsConfirmedEntityEventData(entity), false).ConfigureAwait(false); + } + catch (Exception ex) + { + Logger.LogDebug($"{nameof(AssembleNote)} Confirmed Event:{ex.Message}", null); + Console.WriteLine(ex.Source); + throw; + } + } + +} diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Notes/IssueNotes/AssembleNotes/IAssembleNoteManager.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Notes/IssueNotes/AssembleNotes/IAssembleNoteManager.cs new file mode 100644 index 000000000..9a9ad6da1 --- /dev/null +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Notes/IssueNotes/AssembleNotes/IAssembleNoteManager.cs @@ -0,0 +1,10 @@ +using System; +using System.Threading.Tasks; + +namespace Win_in.Sfs.Wms.Store.Domain; + +public interface IAssembleNoteManager : ISfsStoreManager +{ + Task ConfirmAsync(Guid id); + +} diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Notes/IssueNotes/AssembleNotes/IAssembleNoteRepository.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Notes/IssueNotes/AssembleNotes/IAssembleNoteRepository.cs new file mode 100644 index 000000000..280ab1dfd --- /dev/null +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Notes/IssueNotes/AssembleNotes/IAssembleNoteRepository.cs @@ -0,0 +1,6 @@ +namespace Win_in.Sfs.Wms.Store.Domain; + +public interface IAssembleNoteRepository : ISfsStoreRepositoryBase +{ + +} diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Notes/IssueNotes/CoatingIssueNotes/CoatingIssueNote.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Notes/IssueNotes/CoatingIssueNotes/CoatingIssueNote.cs new file mode 100644 index 000000000..566be6629 --- /dev/null +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Notes/IssueNotes/CoatingIssueNotes/CoatingIssueNote.cs @@ -0,0 +1,78 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; +using Volo.Abp; +using Win_in.Sfs.Shared.Domain.Entities; +using Win_in.Sfs.Wms.Store.Domain; + +namespace Win_in.Sfs.Wms.Store.Notes.IssueNotes; + +/// +/// 喷涂叫料申请 +/// +public class CoatingIssueNote : SfsStoreAggregateRootBase, IHasJobNumber, IHasRequestNumber +{ + /// + /// 任务ID + /// + [IgnoreUpdate] + public string JobNumber { get; set; } + + /// + /// 车间 + /// + [IgnoreUpdate] + public string Workshop { get; set; } + + /// + /// 明细列表 + /// + [IgnoreUpdate] + public override List Details { get; set; } = new List(); + + [IgnoreUpdate] + public string RequestNumber { get; set; } + + /// + /// 叫料请求类型 + /// + [IgnoreUpdate] + public string RequestType { get; set; } + + /// + /// 使用在途库 + /// + [IgnoreUpdate] + public bool UseOnTheWayLocation { get; set; } + + /// + /// 确认时间 + /// + [Display(Name = "确认时间")] + [IgnoreUpdate] + public DateTime? ConfirmTime { get; set; } + + /// + /// 已确认 + /// + [Display(Name = "已确认")] + public bool Confirmed { get; set; } + + public void Confirm(DateTime confirmTime) + { + + CheckStatus(Confirmed); + Confirmed = true; + ConfirmTime = confirmTime; + } + + private static void CheckStatus(bool confirmed) + { + if (confirmed) + { + throw new UserFriendlyException($"当前状态为 【已确认】 ,无法再次确认!"); + } + + } + +} diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Notes/IssueNotes/CoatingIssueNotes/CoatingIssueNoteDetail.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Notes/IssueNotes/CoatingIssueNotes/CoatingIssueNoteDetail.cs new file mode 100644 index 000000000..93ba9e706 --- /dev/null +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Notes/IssueNotes/CoatingIssueNotes/CoatingIssueNoteDetail.cs @@ -0,0 +1,44 @@ +using System; +using Win_in.Sfs.Shared.Domain.Shared; +using Win_in.Sfs.Wms.Store.Domain; + +namespace Win_in.Sfs.Wms.Store.Notes.IssueNotes; + +public class CoatingIssueNoteDetail : SfsStoreRecommendFromDetailWithFromToEntityBase +{ + + /// + /// 发料时间 + /// + public DateTime IssueTime { get; set; } + + /// + /// 过期时间 + /// + public DateTime ExpiredTime { get; set; } + + /// + /// 生产线 + /// + public string ProdLine { get; set; } + + /// + /// 工作中心 + /// + public string WorkStation { get; set; } + + /// + /// 在途库库位 + /// + public string OnTheWayLocationCode { get; set; } + + /// + /// 位置码 + /// + public string PositionCode { get; set; } + + /// + /// 推荐类型 + /// + public EnumRecommendType RecommendType { get; set; } +} diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Notes/IssueNotes/CoatingIssueNotes/CoatingIssueNoteManager.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Notes/IssueNotes/CoatingIssueNotes/CoatingIssueNoteManager.cs new file mode 100644 index 000000000..817f7b192 --- /dev/null +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Notes/IssueNotes/CoatingIssueNotes/CoatingIssueNoteManager.cs @@ -0,0 +1,43 @@ +using System; +using System.Threading.Tasks; +using Microsoft.Extensions.Logging; +using Volo.Abp; +using Volo.Abp.Uow; +using Win_in.Sfs.Shared.Event; +using Win_in.Sfs.Wms.Store.Domain; + +namespace Win_in.Sfs.Wms.Store.Notes.IssueNotes; + +public class CoatingIssueNoteManager : SfsStoreManagerBase, ICoatingIssueNoteManager +{ + + public CoatingIssueNoteManager( + ICoatingIssueNoteRepository repository + ) : base(repository) + { + } + + [UnitOfWork] + public virtual async Task ConfirmAsync(Guid id) + { + var entity = await Repository.FindAsync(id).ConfigureAwait(false); + Check.NotNull(entity, EntityClassName); + entity.Confirm(Clock.Now); + await PublishConfirmedAsync(entity).ConfigureAwait(false); + return await Repository.UpdateAsync(entity).ConfigureAwait(false); + } + private async Task PublishConfirmedAsync(CoatingIssueNote entity) + { + try + { + await LocalEventBus.PublishAsync(new SfsConfirmedEntityEventData(entity), false).ConfigureAwait(false); + } + catch (Exception ex) + { + Logger.LogDebug($"{nameof(CoatingIssueNote)} Confirmed Event:{ex.Message}", null); + Console.WriteLine(ex.Source); + throw; + } + } + +} diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Notes/IssueNotes/CoatingIssueNotes/CoatingIssueNoteRepository.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Notes/IssueNotes/CoatingIssueNotes/CoatingIssueNoteRepository.cs new file mode 100644 index 000000000..267b6b1f8 --- /dev/null +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Notes/IssueNotes/CoatingIssueNotes/CoatingIssueNoteRepository.cs @@ -0,0 +1,8 @@ +using Win_in.Sfs.Wms.Store.Domain; + +namespace Win_in.Sfs.Wms.Store.Notes.IssueNotes; + +public interface ICoatingIssueNoteRepository : ISfsStoreRepositoryBase +{ + +} diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Notes/IssueNotes/CoatingIssueNotes/ICoatingIssueNoteManager.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Notes/IssueNotes/CoatingIssueNotes/ICoatingIssueNoteManager.cs new file mode 100644 index 000000000..35fbcd208 --- /dev/null +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Notes/IssueNotes/CoatingIssueNotes/ICoatingIssueNoteManager.cs @@ -0,0 +1,11 @@ +using System; +using System.Threading.Tasks; +using Win_in.Sfs.Wms.Store.Domain; + +namespace Win_in.Sfs.Wms.Store.Notes.IssueNotes; + +public interface ICoatingIssueNoteManager : ISfsStoreManager +{ + Task ConfirmAsync(Guid id); + +} diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Notes/IssueNotes/InjectionNotes/IInjectionNoteManager.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Notes/IssueNotes/InjectionNotes/IInjectionNoteManager.cs new file mode 100644 index 000000000..281cc8cba --- /dev/null +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Notes/IssueNotes/InjectionNotes/IInjectionNoteManager.cs @@ -0,0 +1,10 @@ +using System; +using System.Threading.Tasks; + +namespace Win_in.Sfs.Wms.Store.Domain; + +public interface IInjectionNoteManager : ISfsStoreManager +{ + Task ConfirmAsync(Guid id); + +} diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Notes/IssueNotes/InjectionNotes/IInjectionNoteRepository.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Notes/IssueNotes/InjectionNotes/IInjectionNoteRepository.cs new file mode 100644 index 000000000..fb894c737 --- /dev/null +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Notes/IssueNotes/InjectionNotes/IInjectionNoteRepository.cs @@ -0,0 +1,6 @@ +namespace Win_in.Sfs.Wms.Store.Domain; + +public interface IInjectionNoteRepository : ISfsStoreRepositoryBase +{ + +} diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Notes/IssueNotes/InjectionNotes/InjectionNote.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Notes/IssueNotes/InjectionNotes/InjectionNote.cs new file mode 100644 index 000000000..582852d31 --- /dev/null +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Notes/IssueNotes/InjectionNotes/InjectionNote.cs @@ -0,0 +1,77 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; +using Volo.Abp; +using Win_in.Sfs.Shared.Domain.Entities; + +namespace Win_in.Sfs.Wms.Store.Domain; + +/// +/// 注塑发料记录 +/// +public class InjectionNote : SfsStoreAggregateRootBase, IHasJobNumber, IHasRequestNumber +{ + /// + /// 任务ID + /// + [IgnoreUpdate] + public string JobNumber { get; set; } + + /// + /// 车间 + /// + [IgnoreUpdate] + public string Workshop { get; set; } + + /// + /// 明细列表 + /// + [IgnoreUpdate] + public override List Details { get; set; } = new List(); + + [IgnoreUpdate] + public string RequestNumber { get; set; } + + /// + /// 叫料请求类型 + /// + [IgnoreUpdate] + public string RequestType { get; set; } + + /// + /// 使用在途库 + /// + [IgnoreUpdate] + public bool UseOnTheWayLocation { get; set; } + + /// + /// 确认时间 + /// + [Display(Name = "确认时间")] + [IgnoreUpdate] + public DateTime? ConfirmTime { get; set; } + + /// + /// 已确认 + /// + [Display(Name = "已确认")] + public bool Confirmed { get; set; } + + public void Confirm(DateTime confirmTime) + { + + CheckStatus(Confirmed); + Confirmed = true; + ConfirmTime = confirmTime; + } + + private static void CheckStatus(bool confirmed) + { + if (confirmed) + { + throw new UserFriendlyException($"当前状态为 【已确认】 ,无法再次确认!"); + } + + } + +} diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Notes/IssueNotes/InjectionNotes/InjectionNoteDetail.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Notes/IssueNotes/InjectionNotes/InjectionNoteDetail.cs new file mode 100644 index 000000000..9e9d44882 --- /dev/null +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Notes/IssueNotes/InjectionNotes/InjectionNoteDetail.cs @@ -0,0 +1,43 @@ +using System; +using Win_in.Sfs.Shared.Domain.Shared; + +namespace Win_in.Sfs.Wms.Store.Domain; + +public class InjectionNoteDetail : SfsStoreRecommendFromDetailWithFromToEntityBase +{ + + /// + /// 发料时间 + /// + public DateTime IssueTime { get; set; } + + /// + /// 过期时间 + /// + public DateTime ExpiredTime { get; set; } + + /// + /// 生产线 + /// + public string ProdLine { get; set; } + + /// + /// 工作中心 + /// + public string WorkStation { get; set; } + + /// + /// 在途库库位 + /// + public string OnTheWayLocationCode { get; set; } + + /// + /// 位置码 + /// + public string PositionCode { get; set; } + + /// + /// 推荐类型 + /// + public EnumRecommendType RecommendType { get; set; } +} diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Notes/IssueNotes/InjectionNotes/InjectionNoteManager.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Notes/IssueNotes/InjectionNotes/InjectionNoteManager.cs new file mode 100644 index 000000000..c75194264 --- /dev/null +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Notes/IssueNotes/InjectionNotes/InjectionNoteManager.cs @@ -0,0 +1,42 @@ +using System; +using System.Threading.Tasks; +using Microsoft.Extensions.Logging; +using Volo.Abp; +using Volo.Abp.Uow; +using Win_in.Sfs.Shared.Event; + +namespace Win_in.Sfs.Wms.Store.Domain; + +public class InjectionNoteManager : SfsStoreManagerBase, IInjectionNoteManager +{ + + public InjectionNoteManager( + IInjectionNoteRepository repository + ) : base(repository) + { + } + + [UnitOfWork] + public virtual async Task ConfirmAsync(Guid id) + { + var entity = await Repository.FindAsync(id).ConfigureAwait(false); + Check.NotNull(entity, EntityClassName); + entity.Confirm(Clock.Now); + await PublishConfirmedAsync(entity).ConfigureAwait(false); + return await Repository.UpdateAsync(entity).ConfigureAwait(false); + } + private async Task PublishConfirmedAsync(InjectionNote entity) + { + try + { + await LocalEventBus.PublishAsync(new SfsConfirmedEntityEventData(entity), false).ConfigureAwait(false); + } + catch (Exception ex) + { + Logger.LogDebug($"{nameof(InjectionNote)} Confirmed Event:{ex.Message}", null); + Console.WriteLine(ex.Source); + throw; + } + } + +} diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Notes/TransferLibNotes/ITransferLibNoteManager.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Notes/TransferLibNotes/ITransferLibNoteManager.cs new file mode 100644 index 000000000..e7d39056d --- /dev/null +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Notes/TransferLibNotes/ITransferLibNoteManager.cs @@ -0,0 +1,10 @@ +using System; +using System.Threading.Tasks; +using Win_in.Sfs.Shared.Domain; + +namespace Win_in.Sfs.Wms.Store.Domain; + +public interface ITransferLibNoteManager : ISfsStoreManager, IBulkImportService +{ + Task ConfirmAsync(Guid id); +} diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Notes/TransferLibNotes/ITransferLibNoteRepository.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Notes/TransferLibNotes/ITransferLibNoteRepository.cs new file mode 100644 index 000000000..3b912a83d --- /dev/null +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Notes/TransferLibNotes/ITransferLibNoteRepository.cs @@ -0,0 +1,8 @@ +using Win_in.Sfs.Shared.Domain; + +namespace Win_in.Sfs.Wms.Store.Domain; + +public interface ITransferLibNoteRepository : ISfsStoreRepositoryBase, ISfsBulkRepositoryBase +{ + +} diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Notes/TransferLibNotes/TransferLibNote.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Notes/TransferLibNotes/TransferLibNote.cs new file mode 100644 index 000000000..9776cc17a --- /dev/null +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Notes/TransferLibNotes/TransferLibNote.cs @@ -0,0 +1,75 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; +using Volo.Abp; +using Win_in.Sfs.Shared.Domain.Entities; + +namespace Win_in.Sfs.Wms.Store.Domain; + +/// +/// 调拨转移记录 +/// +public class TransferLibNote : SfsStoreAggregateRootBase, IHasJobNumber +{ + + /// + /// 申请单号 + /// + [IgnoreUpdate] + public string RequestNumber { get; set; } + + /// + /// 任务单号 + /// + [IgnoreUpdate] + public string JobNumber { get; set; } + + /// + /// 调拨类型 + /// + [Display(Name = "调拨类型")] + [Required(ErrorMessage = "调拨类型不能为空")] + public string Type { get; set; } + + /// + /// 使用中间库 + /// + [Display(Name = "使用中间库")] + public bool UseOnTheWayLocation { get; set; } + + /// + /// 确认时间 + /// + [Display(Name = "确认时间")] + [IgnoreUpdate] + public DateTime? ConfirmTime { get; set; } + + /// + /// 明细列表 + /// + [IgnoreUpdate] + public override List Details { get; set; } = new List(); + + /// + /// 已确认 + /// + [Display(Name = "已确认")] + public bool Confirmed { get; set; } + + public void Confirm(DateTime confirmTime) + { + + CheckStatus(Confirmed); + Confirmed = true; + ConfirmTime = confirmTime; + } + + private static void CheckStatus(bool confirmed) + { + if (confirmed) + { + throw new UserFriendlyException($"当前状态为 【已确认】 ,无法再次确认!"); + } + + } +} diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Notes/TransferLibNotes/TransferLibNoteDetail.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Notes/TransferLibNotes/TransferLibNoteDetail.cs new file mode 100644 index 000000000..12c31ba6f --- /dev/null +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Notes/TransferLibNotes/TransferLibNoteDetail.cs @@ -0,0 +1,26 @@ +using Win_in.Sfs.Shared.Domain.Shared; + +namespace Win_in.Sfs.Wms.Store.Domain; + +/// +/// 库存转移记录-明细表 +/// +public class TransferLibNoteDetail : SfsStoreDetailWithFromToEntityBase +{ + + /// + /// 中间库地址 + /// + public string OnTheWayLocationCode { get; set; } + + /// + /// 原因 + /// + public string Reason { get; set; } + + /// + /// 执行任务状态 + /// + public EnumJobStatus JobStatus { get; set; } + +} diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Notes/TransferLibNotes/TransferLibNoteManager.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Notes/TransferLibNotes/TransferLibNoteManager.cs new file mode 100644 index 000000000..20a70d244 --- /dev/null +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Notes/TransferLibNotes/TransferLibNoteManager.cs @@ -0,0 +1,115 @@ +using System; +using System.Collections.Generic; +using System.Threading.Tasks; +using Microsoft.Extensions.Logging; +using Volo.Abp; +using Volo.Abp.Uow; +using Win_in.Sfs.Shared.Event; + +namespace Win_in.Sfs.Wms.Store.Domain; + +public class TransferLibNoteManager : SfsStoreManagerBase, ITransferLibNoteManager +{ + + private readonly ITransferLibNoteRepository _repository; + + public TransferLibNoteManager( + ITransferLibNoteRepository repository + ) : base(repository) + { + _repository = repository; + } + + [UnitOfWork] + public virtual async Task ConfirmAsync(Guid id) + { + var entity = await Repository.FindAsync(id).ConfigureAwait(false); + Check.NotNull(entity, EntityClassName); + entity.Confirm(Clock.Now); + await PublishConfirmedAsync(entity).ConfigureAwait(false); + return await Repository.UpdateAsync(entity).ConfigureAwait(false); + } + + private async Task PublishConfirmedAsync(TransferLibNote entity) + { + try + { + await LocalEventBus.PublishAsync(new SfsConfirmedEntityEventData(entity), false).ConfigureAwait(false); + } + catch (Exception ex) + { + Logger.LogDebug($"{nameof(TransferLibNote)} Confirmed Event:{ex.Message}", null); + Console.WriteLine(ex.Source); + throw; + } + } + + /// + /// 执行导入 + /// + public virtual async Task ImportDataAsync(List mergeEntities, List deleteEntities = null) + { + if (deleteEntities != null && deleteEntities.Count > 0) + { + await _repository.BulkDeleteAsync(deleteEntities).ConfigureAwait(false); + } + + foreach (var entity in mergeEntities) + { + entity.SetIdAndNumberWithDetails(GuidGenerator, await GenerateNumberAsync(nameof(TransferLibNote), Clock.Now).ConfigureAwait(false)); + } + + await _repository.BulkMergeAsync(mergeEntities).ConfigureAwait(false); + + var insertDetails = new List(); + + foreach (var item in mergeEntities) + { + await SetDetailAsync(item.Details).ConfigureAwait(false); + + insertDetails.AddRange(item.Details); + } + + await _repository.BulkInsertAsync(insertDetails).ConfigureAwait(false); + } + + private async Task SetDetailAsync(List details) + { + foreach (var detail in details) + { + var item = await ItemBasicAppService.GetByCodeAsync(detail.ItemCode).ConfigureAwait(false); + Check.NotNull(item, "物品代码", $"物品 {detail.ItemCode} 不存在"); + + if (item != null) + { + detail.ItemName = item.Name; + detail.ItemDesc1 = item.Desc1; + detail.ItemDesc2 = item.Desc2; + } + + var balance = await BalanceAppService.GetByItemLocationPackingAndStatusAsync(detail.FromPackingCode, detail.ItemCode, detail.FromLocationCode, detail.FromStatus).ConfigureAwait(false); + + Check.NotNull(balance, "库存", $"不存在箱码为{detail.FromPackingCode},零件编码为{detail.ItemCode},库位为{detail.FromLocationCode},状态为{detail.FromStatus}的库存!"); + + detail.SupplierBatch = balance.SupplierBatch; + detail.ArriveDate = balance.ArriveDate; + detail.ProduceDate = balance.ProduceDate; + detail.ExpireDate = balance.ExpireDate; + + //通过箱码和库位获取库存信息 + detail.FromStatus = balance.Status; + + detail.FromLot = balance.Lot; + detail.FromWarehouseCode = balance.WarehouseCode; + detail.FromContainerCode = balance.ContainerCode; + + detail.ToLot = balance.Lot; + detail.ToWarehouseCode = balance.WarehouseCode; + detail.ToContainerCode = balance.ContainerCode; + + detail.ToStatus = balance.Status; + + } + } + +} diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Plans/PreparationPlans/PreparationPlanManager.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Plans/PreparationPlans/PreparationPlanManager.cs index 5b105482d..d271fa0b5 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Plans/PreparationPlans/PreparationPlanManager.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Plans/PreparationPlans/PreparationPlanManager.cs @@ -31,78 +31,78 @@ public class PreparationPlanManager : SfsStoreManagerBase CreateFromProductionPlanAsync(ProductionPlan productionPlan) { - //判断 - Check.NotNull(productionPlan, nameof(productionPlan)); - var prodLine = productionPlan.ProdLine; - - //开始生产计划时,生成备料计划,开关控制 - - //①根据BOM拆分备料记录:备料计划的数量 = bom的用量 * 生产计划的计划数量 - //②bom的父物料号 = 生产计划的Item_code - var preparationPlan = BuildPreparationPlan(productionPlan); - - var boms = new List(); - //根据生产计划明细获取一层BOM信息,如果子零件为虚零件则下穿一层 - foreach (var productionPlanDetail in productionPlan.Details.Where(productionPlanDetail => - productionPlanDetail.PlanQty > 0)) - { - //获得BOM信息 - var productBoms = await _bomAppService.GetPlanListAsync(productionPlanDetail.ItemCode, prodLine).ConfigureAwait(false); - if (productBoms.Count == 0) - { - throw new UserFriendlyException( - $"生成备料计划失败:{productionPlanDetail.ItemCode} 在 {prodLine} 缺少对应的Bom信息!"); - } - productBoms.ForEach(p => p.Product = productionPlanDetail.ItemCode); - boms.AddRange(productBoms); - - } - - var productionLine = await _productionLineAppService.GetByCodeAsync(prodLine).ConfigureAwait(false); - Check.NotNull(productionLine, "生产线代码", $"生产线 {prodLine} 不存在"); - - var rawLocationCodeOfProductionLine = productionLine.RawLocationCode; - - //将BOM按子零件分组 - var bomGroupByItemCode = boms.GroupBy(p => p.Component); - - foreach (var bomGroup in bomGroupByItemCode) - { - var itemCode = bomGroup.Key; - var item = await ItemBasicAppService.GetByCodeAsync(itemCode).ConfigureAwait(false); - Check.NotNull(item, "物品代码", $"物品 {itemCode} 不存在"); - //成品零件号 - var productItemCode = bomGroup.First().Product; - //取整方式 - var trunkType = bomGroup.First().TruncType; - //计量单位 - var uom = bomGroup.First().ComponentUom; - //子零件的BOM用量为各个BOM用量的汇总 - var bomGroupQty = bomGroup.Sum(p => p.ComponentQty); - //从生产计划明细中获得 - var planQty = productionPlan.Details.First(p => p.ItemCode == productItemCode).PlanQty; - //实际需求量为成品计划生产量 * 汇总BOM用量 - var sumQty = planQty * bomGroupQty; - //获取标包数量,计算备料数量 - var (stdPackQty, detailQty) = await CalcDetailQtyAsync(sumQty, item.StdPackQty, trunkType).ConfigureAwait(false); - - //TODO 从物料存储关系中根据 库位组 = 生产线代码 查找是一个预定假设,需要改成可配置的 - //从物料存储关系中查找 库位组 = 生产线代码 的库位 - var locationCodeFromItemStoreRelation = - await GetFirstLocationFromItemStoreRelationAsync(prodLine, itemCode).ConfigureAwait(false); - //备料的物料没有物料存储关系,则目标库位取生产线的原料库位 - var locationCode = string.IsNullOrEmpty(locationCodeFromItemStoreRelation) - ? rawLocationCodeOfProductionLine - : locationCodeFromItemStoreRelation; - //构造备料计划明细 - var detail = BuildPreparationPlanDetail(item, detailQty, stdPackQty, locationCode); - - preparationPlan.Details.Add(detail); - } - - await CreateAsync(preparationPlan).ConfigureAwait(false); - - return preparationPlan; + ////判断 + //Check.NotNull(productionPlan, nameof(productionPlan)); + //var prodLine = productionPlan.ProdLine; + + ////开始生产计划时,生成备料计划,开关控制 + + ////①根据BOM拆分备料记录:备料计划的数量 = bom的用量 * 生产计划的计划数量 + ////②bom的父物料号 = 生产计划的Item_code + //var preparationPlan = BuildPreparationPlan(productionPlan); + + //var boms = new List(); + ////根据生产计划明细获取一层BOM信息,如果子零件为虚零件则下穿一层 + //foreach (var productionPlanDetail in productionPlan.Details.Where(productionPlanDetail => + // productionPlanDetail.PlanQty > 0)) + //{ + // //获得BOM信息 + // var productBoms = await _bomAppService.GetPlanListAsync(productionPlanDetail.ItemCode, prodLine).ConfigureAwait(false); + // if (productBoms.Count == 0) + // { + // throw new UserFriendlyException( + // $"生成备料计划失败:{productionPlanDetail.ItemCode} 在 {prodLine} 缺少对应的Bom信息!"); + // } + // productBoms.ForEach(p => p.Product = productionPlanDetail.ItemCode); + // boms.AddRange(productBoms); + + //} + + //var productionLine = await _productionLineAppService.GetByCodeAsync(prodLine).ConfigureAwait(false); + //Check.NotNull(productionLine, "生产线代码", $"生产线 {prodLine} 不存在"); + + ////将BOM按子零件分组 + //var bomGroupByItemCode = boms.GroupBy(p => p.Component); + + //foreach (var bomGroup in bomGroupByItemCode) + //{ + // var itemCode = bomGroup.Key; + // var item = await ItemBasicAppService.GetByCodeAsync(itemCode).ConfigureAwait(false); + // Check.NotNull(item, "物品代码", $"物品 {itemCode} 不存在"); + // //成品零件号 + // var productItemCode = bomGroup.First().Product; + // //取整方式 + // var trunkType = bomGroup.First().TruncType; + // //计量单位 + // var uom = bomGroup.First().ComponentUom; + // //子零件的BOM用量为各个BOM用量的汇总 + // var bomGroupQty = bomGroup.Sum(p => p.ComponentQty); + // //从生产计划明细中获得 + // var planQty = productionPlan.Details.First(p => p.ItemCode == productItemCode).PlanQty; + // //实际需求量为成品计划生产量 * 汇总BOM用量 + // var sumQty = planQty * bomGroupQty; + // //获取标包数量,计算备料数量 + // var (stdPackQty, detailQty) = await CalcDetailQtyAsync(sumQty, item.StdPackQty, trunkType).ConfigureAwait(false); + + // //TODO 从物料存储关系中根据 库位组 = 生产线代码 查找是一个预定假设,需要改成可配置的 + // //从物料存储关系中查找 库位组 = 生产线代码 的库位 + // var locationCodeFromItemStoreRelation = + // await GetFirstLocationFromItemStoreRelationAsync(prodLine, itemCode).ConfigureAwait(false); + // //备料的物料没有物料存储关系,则目标库位取生产线的原料库位 + // var locationCode = string.IsNullOrEmpty(locationCodeFromItemStoreRelation) + // ? rawLocationCodeOfProductionLine + // : locationCodeFromItemStoreRelation; + // //构造备料计划明细 + // var detail = BuildPreparationPlanDetail(item, detailQty, stdPackQty, locationCode); + + // preparationPlan.Details.Add(detail); + //} + + //await CreateAsync(preparationPlan).ConfigureAwait(false); + + //return preparationPlan; + + return null; } private async Task GetFirstLocationFromItemStoreRelationAsync(string prodLine, string itemCode) diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Requests/MaterialRequests/AssembleRequests/AssembleRequest.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Requests/MaterialRequests/AssembleRequests/AssembleRequest.cs new file mode 100644 index 000000000..579e97ee1 --- /dev/null +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Requests/MaterialRequests/AssembleRequests/AssembleRequest.cs @@ -0,0 +1,35 @@ +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; +using Win_in.Sfs.Shared.Domain.Entities; + +namespace Win_in.Sfs.Wms.Store.Domain; + +/// +/// 装配申请 +/// +public class AssembleRequest : SfsStoreRequestAggregateRootBase +{ + /// + /// 叫料类型 + /// + [Display(Name = "叫料类型")] + [IgnoreUpdate] + public string Type { get; set; } + + /// + /// 生产线 + /// + [IgnoreUpdate] + public string ProdLine { get; set; } + + /// + /// 使用在途库 + /// + public bool UseOnTheWayLocation { get; set; } + + /// + /// 明细列表 + /// + [IgnoreUpdate] + public override List Details { get; set; } = new List(); +} diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Requests/MaterialRequests/AssembleRequests/AssembleRequestDetail.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Requests/MaterialRequests/AssembleRequests/AssembleRequestDetail.cs new file mode 100644 index 000000000..97c0a711d --- /dev/null +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Requests/MaterialRequests/AssembleRequests/AssembleRequestDetail.cs @@ -0,0 +1,105 @@ +using System; +using System.ComponentModel.DataAnnotations.Schema; +using Win_in.Sfs.Shared.Domain; +using Win_in.Sfs.Shared.Domain.Shared; + +namespace Win_in.Sfs.Wms.Store.Domain; + +/// +/// 装配申请明细 +/// +public class AssembleRequestDetail : SfsStoreDetailWithQtyEntityBase, IHasToLocation +{ + /// + /// 到库位 + /// + public string ToLocationCode { get; set; } + + /// + /// 到库区 + /// + public string ToLocationArea { get; set; } + + /// + /// 到库位组 + /// + public string ToLocationGroup { get; set; } + + /// + /// 到ERP库位 + /// + public string ToLocationErpCode { get; set; } + + /// + /// 到仓库 + /// + public string ToWarehouseCode { get; set; } + + /// + /// 来源库区 + /// + public string FromLocationArea { get; set; } + + // /// + // /// 在途库库位 + // /// + // public string OnTheWayLocationCode { get; set; } + + /// + /// 生产线 + /// + public string ProdLine { get; set; } + + /// + /// 工作中心 + /// + public string WorkStation { get; set; } + + /// + /// 过期时间 + /// + public DateTime ExpiredTime { get; set; } + + /// + /// 已发数量 + /// + public decimal IssuedQty { get; set; } + + /// + /// 已收数量 + /// + public decimal ReceivedQty { get; set; } + + /// + /// 明细状态 + /// + public EnumStatus Status { get; set; } + + /// + /// 请求未发 还未发送的数量 + /// + [NotMapped] + public decimal ToBeIssuedQty => Qty - IssuedQty; + + /// + /// 已发未收 + /// + [NotMapped] + public decimal ToBeReceivedQty => IssuedQty - ReceivedQty; + + /// + /// 请求未收 + /// + [NotMapped] + public decimal NotFinishQty => Qty - ReceivedQty; + + /// + /// 位置码 + /// + public string PositionCode { get; set; } + + /// + /// 推荐类型 + /// + public EnumRecommendType RecommendType { get; set; } +} diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Requests/MaterialRequests/AssembleRequests/AssembleRequestManager.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Requests/MaterialRequests/AssembleRequests/AssembleRequestManager.cs new file mode 100644 index 000000000..94040930d --- /dev/null +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Requests/MaterialRequests/AssembleRequests/AssembleRequestManager.cs @@ -0,0 +1,147 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; +using DocumentFormat.OpenXml.Math; +using Win_in.Sfs.Shared.Domain.Shared; +using Win_in.Sfs.Shared.Event; +using static Win_in.Sfs.Wms.Store.Domain.Shared.StoreSettings; + +namespace Win_in.Sfs.Wms.Store.Domain; + +public class AssembleRequestManager + : SfsStoreRequestManagerBase + , IAssembleRequestManager +{ + private readonly IAssembleRequestRepository _repository; + private readonly IIssueJobRepository _issueJobRepository; + + public AssembleRequestManager( + IAssembleRequestRepository repository + , IIssueJobRepository issueJobRepository + ) : base(repository) + { + _repository = repository; + _issueJobRepository = issueJobRepository; + } + + + #region 东阳V2 + + #endregion + + + /// + /// 创建 + /// + /// + /// + public virtual async Task CreateBynNumberAsync(AssembleRequest entity) + { + var number = string.IsNullOrEmpty(entity.Number) ? await GenerateNumberAsync(nameof(AssembleRequest), entity.ActiveDate).ConfigureAwait(false) : entity.Number; + entity.SetIdAndNumberWithDetails(GuidGenerator, number); + entity.Submit(); + entity.Agree(); + entity.RequestStatus = EnumRequestStatus.Partial; + await LocalEventBus.PublishAsync(new SfsHandledEntityEventData(entity), false) + .ConfigureAwait(false); + await _repository.InsertAsync(entity).ConfigureAwait(false); + return entity; + } + + public virtual async Task UpdateDetailsAsync(AssembleRequest newEntity) + { + var oldEntity = await Repository.FindAsync(newEntity.Id, true).ConfigureAwait(false); + if(oldEntity!=null) + { + foreach (var newDetail in newEntity.Details) + { + oldEntity.ReplaceDetail(newDetail.Id, newDetail); + } + + foreach (var detail in oldEntity.Details) + { + SetMaterialRequestDetailStatus(detail); + } + + await SetMaterialRequestStatusAsync(oldEntity).ConfigureAwait(false); + + await Repository.UpdateAsync(oldEntity).ConfigureAwait(false); + } + + } + + private void SetMaterialRequestDetailStatus(AssembleRequestDetail detail) + { + if (detail.ReceivedQty >= detail.Qty)//执行的时候 实际收料 多余 要料数 + { + detail.Status = EnumStatus.Close; + } + else + { + detail.Status = EnumStatus.Open; + } + } + + private async Task SetMaterialRequestStatusAsync(AssembleRequest materialRequest) + { + if (materialRequest.Details.All(p => p.Status == EnumStatus.Close)) + { + materialRequest.RequestStatus = EnumRequestStatus.Completed; + } + else + { + var issueJobs = await _issueJobRepository.GetListAsync(t => t.MaterialRequestNumber == materialRequest.Number).ConfigureAwait(false); + if (issueJobs.Count > 0) + { + if (issueJobs.All(t => t.JobStatus is EnumJobStatus.Done or EnumJobStatus.Closed or EnumJobStatus.Cancelled)) + { + if (materialRequest.Details.All(p => p.ReceivedQty >= p.Qty)) + { + materialRequest.RequestStatus = EnumRequestStatus.Completed; + } + else + { + materialRequest.RequestStatus = EnumRequestStatus.Partial; + } + } + else + { + materialRequest.RequestStatus = EnumRequestStatus.Partial; + } + } + else + { + materialRequest.RequestStatus = EnumRequestStatus.Partial; + } + } + } + + public virtual async Task CompleteAsync(string number) + { + var entity = await GetByNumberAsync(number).ConfigureAwait(false); + if (entity != null && !entity.Details.Any(p => p.ToBeIssuedQty > 0)) + { + await CompleteAsync(entity).ConfigureAwait(false); + } + } + + + #region 导入 + + /// + /// 执行导入 + /// + public virtual async Task ImportDataAsync(List mergeEntities, List deleteEntities = null) + { + if (deleteEntities != null && deleteEntities.Count > 0) + { + await _repository.BulkDeleteAsync(deleteEntities).ConfigureAwait(false); + } + + await CreateManyAsync(mergeEntities).ConfigureAwait(false); + } + + #endregion + +} diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Requests/MaterialRequests/AssembleRequests/IAssembleRequestManager.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Requests/MaterialRequests/AssembleRequests/IAssembleRequestManager.cs new file mode 100644 index 000000000..653efecd3 --- /dev/null +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Requests/MaterialRequests/AssembleRequests/IAssembleRequestManager.cs @@ -0,0 +1,16 @@ +using System.Threading.Tasks; + +namespace Win_in.Sfs.Wms.Store.Domain; + +using Win_in.Sfs.Shared.Domain; + +public interface IAssembleRequestManager : ISfsStoreRequestManager, + IBulkImportService +{ + + Task UpdateDetailsAsync(AssembleRequest entity); + + Task CompleteAsync(string number); + + Task CreateBynNumberAsync(AssembleRequest entity); +} diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Requests/MaterialRequests/AssembleRequests/IAssembleRequestRepository.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Requests/MaterialRequests/AssembleRequests/IAssembleRequestRepository.cs new file mode 100644 index 000000000..a661ff0f8 --- /dev/null +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Requests/MaterialRequests/AssembleRequests/IAssembleRequestRepository.cs @@ -0,0 +1,9 @@ +using Win_in.Sfs.Shared.Domain; + +namespace Win_in.Sfs.Wms.Store.Domain; + +public interface IAssembleRequestRepository : ISfsStoreRepositoryBase, + ISfsBulkRepositoryBase +{ + +} diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Requests/MaterialRequests/CoatingMaterialRequests/CoatingMaterialRequest.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Requests/MaterialRequests/CoatingMaterialRequests/CoatingMaterialRequest.cs new file mode 100644 index 000000000..cd89d4c7a --- /dev/null +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Requests/MaterialRequests/CoatingMaterialRequests/CoatingMaterialRequest.cs @@ -0,0 +1,49 @@ +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; +using Win_in.Sfs.Shared.Domain.Entities; +using Win_in.Sfs.Wms.Store.Domain; + +namespace Win_in.Sfs.Wms.Store.Requests.MaterialRequests; + +/// +/// 喷涂要料申请 +/// +public class CoatingMaterialRequest : SfsStoreRequestAggregateRootBase +{ + /// + /// 叫料类型 + /// + [Display(Name = "叫料类型")] + [IgnoreUpdate] + public string Type { get; set; } + + /// + /// 喷涂要料计划单号 + /// + [IgnoreUpdate] + public string PreparationPlanNumber { get; set; } + + /// + /// 生产线 + /// + [IgnoreUpdate] + public string ProdLine { get; set; } + + /// + /// 车间 + /// + [IgnoreUpdate] + public string Workshop { get; set; } + + /// + /// 使用在途库 + /// + public bool UseOnTheWayLocation { get; set; } + + /// + /// 明细列表 + /// + [IgnoreUpdate] + public override List Details { get; set; } = new List(); + +} diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Requests/MaterialRequests/CoatingMaterialRequests/CoatingMaterialRequestDetail.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Requests/MaterialRequests/CoatingMaterialRequests/CoatingMaterialRequestDetail.cs new file mode 100644 index 000000000..2b197b158 --- /dev/null +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Requests/MaterialRequests/CoatingMaterialRequests/CoatingMaterialRequestDetail.cs @@ -0,0 +1,105 @@ +using System; +using System.ComponentModel.DataAnnotations.Schema; +using Win_in.Sfs.Shared.Domain; +using Win_in.Sfs.Shared.Domain.Shared; +using Win_in.Sfs.Wms.Store.Domain; + +namespace Win_in.Sfs.Wms.Store.Requests.MaterialRequests; + +public class CoatingMaterialRequestDetail : SfsStoreDetailWithQtyEntityBase, IHasToLocation +{ + + /// + /// 到库位 + /// + public string ToLocationCode { get; set; } + + /// + /// 到库区 + /// + public string ToLocationArea { get; set; } + + /// + /// 到库位组 + /// + public string ToLocationGroup { get; set; } + + /// + /// 到ERP库位 + /// + public string ToLocationErpCode { get; set; } + + /// + /// 到仓库 + /// + public string ToWarehouseCode { get; set; } + + /// + /// 来源库区 + /// + public string FromLocationArea { get; set; } + + // /// + // /// 在途库库位 + // /// + // public string OnTheWayLocationCode { get; set; } + + /// + /// 生产线 + /// + public string ProdLine { get; set; } + + /// + /// 工作中心 + /// + public string WorkStation { get; set; } + + /// + /// 过期时间 + /// + public DateTime ExpiredTime { get; set; } + + /// + /// 已发数量 + /// + public decimal IssuedQty { get; set; } + + /// + /// 已收数量 + /// + public decimal ReceivedQty { get; set; } + + /// + /// 明细状态 + /// + public EnumStatus Status { get; set; } + + /// + /// 请求未发 还未发送的数量 + /// + [NotMapped] + public decimal ToBeIssuedQty => Qty - IssuedQty; + + /// + /// 已发未收 + /// + [NotMapped] + public decimal ToBeReceivedQty => IssuedQty - ReceivedQty; + + /// + /// 请求未收 + /// + [NotMapped] + public decimal NotFinishQty => Qty - ReceivedQty; + + /// + /// 位置码 + /// + public string PositionCode { get; set; } + + /// + /// 推荐类型 + /// + public EnumRecommendType RecommendType { get; set; } + +} diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Requests/MaterialRequests/CoatingMaterialRequests/CoatingMaterialRequestManager.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Requests/MaterialRequests/CoatingMaterialRequests/CoatingMaterialRequestManager.cs new file mode 100644 index 000000000..894d94c18 --- /dev/null +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Requests/MaterialRequests/CoatingMaterialRequests/CoatingMaterialRequestManager.cs @@ -0,0 +1,309 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; +using DocumentFormat.OpenXml.Math; +using Win_in.Sfs.Shared.Domain.Shared; +using Win_in.Sfs.Shared.Event; +using Win_in.Sfs.Wms.Store.Domain; +using Win_in.Sfs.Wms.Store.Jobs.IssueJobs; +using static Win_in.Sfs.Wms.Store.Domain.Shared.StoreSettings; + +namespace Win_in.Sfs.Wms.Store.Requests.MaterialRequests; + +public class CoatingMaterialRequestManager + : SfsStoreRequestManagerBase + , ICoatingMaterialRequestManager +{ + private readonly ICoatingMaterialRequestRepository _repository; + private readonly ICoatingIssueJobRepository _issueJobRepository; + + public CoatingMaterialRequestManager( + ICoatingMaterialRequestRepository repository + , ICoatingIssueJobRepository issueJobRepository + ) : base(repository) + { + _repository = repository; + _issueJobRepository = issueJobRepository; + } + + /// + /// 创建 + /// + /// + /// + public virtual async Task CreateBynNumberAsync(CoatingMaterialRequest entity) + { + var number = string.IsNullOrEmpty(entity.Number) ? await GenerateNumberAsync(nameof(CoatingMaterialRequest), entity.ActiveDate).ConfigureAwait(false) : entity.Number; + entity.SetIdAndNumberWithDetails(GuidGenerator, number); + entity.Submit(); + entity.Agree(); + entity.RequestStatus = EnumRequestStatus.Partial; + await LocalEventBus.PublishAsync(new SfsHandledEntityEventData(entity), false) + .ConfigureAwait(false); + await _repository.InsertAsync(entity).ConfigureAwait(false); + return entity; + } + + public virtual async Task UpdateDetailsAsync(CoatingMaterialRequest newEntity) + { + var oldEntity = await Repository.FindAsync(newEntity.Id, true).ConfigureAwait(false); + if (oldEntity != null) + { + foreach (var newDetail in newEntity.Details) + { + oldEntity.ReplaceDetail(newDetail.Id, newDetail); + } + + foreach (var detail in oldEntity.Details) + { + SetMaterialRequestDetailStatus(detail); + } + + await SetMaterialRequestStatus(oldEntity).ConfigureAwait(false); + + await Repository.UpdateAsync(oldEntity).ConfigureAwait(false); + } + + } + + private void SetMaterialRequestDetailStatus(CoatingMaterialRequestDetail detail) + { + if (detail.ReceivedQty >= detail.Qty)//执行的时候 实际收料 多余 要料数 + { + detail.Status = EnumStatus.Close; + } + else + { + detail.Status = EnumStatus.Open; + } + } + + private async Task SetMaterialRequestStatus(CoatingMaterialRequest materialRequest) + { + if (materialRequest.Details.All(p => p.Status == EnumStatus.Close)) + { + materialRequest.RequestStatus = EnumRequestStatus.Completed; + } + else + { + var issueJobs = await _issueJobRepository.GetListAsync(t => t.MaterialRequestNumber == materialRequest.Number).ConfigureAwait(false); + if (issueJobs.Count > 0) + { + if (issueJobs.All(t => t.JobStatus is EnumJobStatus.Done or EnumJobStatus.Closed or EnumJobStatus.Cancelled)) + { + if (materialRequest.Details.All(p => p.ReceivedQty >= p.Qty)) + { + materialRequest.RequestStatus = EnumRequestStatus.Completed; + } + else + { + materialRequest.RequestStatus = EnumRequestStatus.Partial; + } + } + else + { + materialRequest.RequestStatus = EnumRequestStatus.Partial; + } + } + else + { + materialRequest.RequestStatus = EnumRequestStatus.Partial; + } + } + } + + public virtual async Task CompleteAsync(string number) + { + var entity = await GetByNumberAsync(number).ConfigureAwait(false); + if (entity != null && !entity.Details.Any(p => p.ToBeIssuedQty > 0)) + { + await CompleteAsync(entity).ConfigureAwait(false); + } + } + + #region 公有 + + /* + // /// + // /// 处理 + // /// + // /// + // public virtual async Task Handle(Guid id) + // { + // var entity =await Repository.GetAsync(id); + // if (entity == null) + // { + // return false; + // } + // entity.Handle(); + // await Repository.UpdateAsync(entity); + // + // await HandledPublishAsync(entity); + // return true; + // } + // + // private async Task HandledPublishAsync(MaterialRequest entity) + // { + // //发布,以生成发料任务 + // var eto = BuildMaterialRequestHandledETO(entity); + // await DistributedEventBus.PublishAsync(eto); + // } + // + // /// + // /// 关闭 + // /// + // /// + // public virtual async Task Close(Guid id) + // { + // var entity = await Repository.GetAsync(id); + // if (entity == null) + // { + // return false; + // } + // entity.Close(); + // await Repository.UpdateAsync(entity); + // + // //发布,以关闭发料任务 + // var eto = BuildMaterialRequestClosedETO(entity); + // await DistributedEventBus.PublishAsync(eto); + // return true; + // } + // + // /// + // /// 打开 + // /// + // /// + // public virtual async Task Open(Guid id) + // { + // var entity = await Repository.GetAsync(id); + // if (entity == null) + // { + // return false; + // } + // entity.Open(); + // + // await Repository.UpdateAsync(entity); + // + // //发布,以打开发料任务 + // var eto = BuildMaterialRequestOpenedETO(entity); + // await DistributedEventBus.PublishAsync(eto); + // return true; + // } + + public virtual async Task CreateAndHandleAsync(MaterialRequest entity) + { + + await base.CreateAsync(entity); + + await base.HandleAsync(entity.Id); + + return entity; + } + */ + + + #endregion + + #region Import + + /// + /// 执行导入 + /// + public virtual async Task ImportDataAsync(List mergeEntities, List deleteEntities = null) + { + if (deleteEntities != null && deleteEntities.Count > 0) + { + await _repository.BulkDeleteAsync(deleteEntities).ConfigureAwait(false); + } + + await CreateManyAsync(mergeEntities).ConfigureAwait(false); + } + + #endregion + + /* + #region 私有 + + private MaterialRequestOpenedETO BuildMaterialRequestOpenedETO(MaterialRequest materialRequest) + { + var materialRequestETO = new MaterialRequestOpenedETO() + { + Number = materialRequest.Number, + Workshop = materialRequest.Workshop, + Status = materialRequest.Status, + Details = BuildMaterialRequestDetailETO(materialRequest.Details) + }; + return materialRequestETO; + } + + private MaterialRequestClosedETO BuildMaterialRequestClosedETO(MaterialRequest materialRequest) + { + var materialRequestETO = new MaterialRequestClosedETO() + { + Company = materialRequest.Company, + Number = materialRequest.Number + }; + return materialRequestETO; + } + + private MaterialRequestHandledETO BuildMaterialRequestHandledETO(MaterialRequest materialRequest) + { + var materialRequestETO = new MaterialRequestHandledETO() + { + Company = materialRequest.Company, + Number = materialRequest.Number, + Workshop = materialRequest.Workshop, + Status = materialRequest.Status, + Details = BuildMaterialRequestDetailETO(materialRequest.Details) + }; + return materialRequestETO; + } + + private List BuildMaterialRequestDetailETO(List materialRequestDetail) + { + var list = new List(); + foreach (var detail in materialRequestDetail) + { + var materialRequestDetailETO = new MaterialRequestDetailETO() + { + Number = detail.Number, + Item = detail.Item, + ItemCode = detail.ItemCode, + Qty = detail.Qty, + ToLocationCode = detail.ToLocationCode, + ProdLine = detail.ProdLine, + WorkStation = detail.WorkStation, + ExpiredTime = detail.ExpiredTime, + Status = detail.Status + }; + list.Add(materialRequestDetailETO); + } + return list; + } + + #endregion + */ +} + +///// +///// 为了解决补料时 无法拿到订阅错误信息 +///// +///// +///// +///// +//public virtual async Task CreateAndHandleAsync(MaterialRequest entity, bool flag) +//{ +// await entity.Handle(); +// foreach (var detail in entity.Details) +// { +// detail.Status = EnumStoreStatus.Handle; +// } +// await base.CreateAsync(entity); + +// //发布,以打开发料任务?? +// //var eto = BuildMaterialRequestHandledETO(entity); +// //await DistributedEventBus.PublishAsync(eto); + +// return entity; +//} diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Requests/MaterialRequests/CoatingMaterialRequests/ICoatingMaterialRequestManager.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Requests/MaterialRequests/CoatingMaterialRequests/ICoatingMaterialRequestManager.cs new file mode 100644 index 000000000..5a0606363 --- /dev/null +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Requests/MaterialRequests/CoatingMaterialRequests/ICoatingMaterialRequestManager.cs @@ -0,0 +1,17 @@ +using System.Threading.Tasks; +using Win_in.Sfs.Wms.Store.Domain; + +namespace Win_in.Sfs.Wms.Store.Requests.MaterialRequests; + +using Win_in.Sfs.Shared.Domain; + +public interface ICoatingMaterialRequestManager : ISfsStoreRequestManager, + IBulkImportService +{ + // Task CreateAndHandleAsync(MaterialRequest entity); + Task UpdateDetailsAsync(CoatingMaterialRequest entity); + + Task CompleteAsync(string number); + + Task CreateBynNumberAsync(CoatingMaterialRequest entity); +} diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Requests/MaterialRequests/CoatingMaterialRequests/ICoatingMaterialRequestRepository.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Requests/MaterialRequests/CoatingMaterialRequests/ICoatingMaterialRequestRepository.cs new file mode 100644 index 000000000..b9f449b9a --- /dev/null +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Requests/MaterialRequests/CoatingMaterialRequests/ICoatingMaterialRequestRepository.cs @@ -0,0 +1,10 @@ +using Win_in.Sfs.Shared.Domain; +using Win_in.Sfs.Wms.Store.Domain; + +namespace Win_in.Sfs.Wms.Store.Requests.MaterialRequests; + +public interface ICoatingMaterialRequestRepository : ISfsStoreRepositoryBase, + ISfsBulkRepositoryBase +{ + +} diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Requests/MaterialRequests/InjectionRequests/IInjectionRequestManager.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Requests/MaterialRequests/InjectionRequests/IInjectionRequestManager.cs new file mode 100644 index 000000000..bf4efb85c --- /dev/null +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Requests/MaterialRequests/InjectionRequests/IInjectionRequestManager.cs @@ -0,0 +1,16 @@ +using System.Threading.Tasks; + +namespace Win_in.Sfs.Wms.Store.Domain; + +using Win_in.Sfs.Shared.Domain; + +public interface IInjectionRequestManager : ISfsStoreRequestManager, + IBulkImportService +{ + + Task UpdateDetailsAsync(InjectionRequest entity); + + Task CompleteAsync(string number); + + Task CreateBynNumberAsync(InjectionRequest entity); +} diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Requests/MaterialRequests/InjectionRequests/IInjectionRequestRepository.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Requests/MaterialRequests/InjectionRequests/IInjectionRequestRepository.cs new file mode 100644 index 000000000..ce92572ec --- /dev/null +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Requests/MaterialRequests/InjectionRequests/IInjectionRequestRepository.cs @@ -0,0 +1,9 @@ +using Win_in.Sfs.Shared.Domain; + +namespace Win_in.Sfs.Wms.Store.Domain; + +public interface IInjectionRequestRepository : ISfsStoreRepositoryBase, + ISfsBulkRepositoryBase +{ + +} diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Requests/MaterialRequests/InjectionRequests/InjectionRequest.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Requests/MaterialRequests/InjectionRequests/InjectionRequest.cs new file mode 100644 index 000000000..cbd538565 --- /dev/null +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Requests/MaterialRequests/InjectionRequests/InjectionRequest.cs @@ -0,0 +1,35 @@ +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; +using Win_in.Sfs.Shared.Domain.Entities; + +namespace Win_in.Sfs.Wms.Store.Domain; + +/// +/// 注塑申请 +/// +public class InjectionRequest : SfsStoreRequestAggregateRootBase +{ + /// + /// 叫料类型 + /// + [Display(Name = "叫料类型")] + [IgnoreUpdate] + public string Type { get; set; } + + /// + /// 生产线 + /// + [IgnoreUpdate] + public string ProdLine { get; set; } + + /// + /// 使用在途库 + /// + public bool UseOnTheWayLocation { get; set; } + + /// + /// 明细列表 + /// + [IgnoreUpdate] + public override List Details { get; set; } = new List(); +} diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Requests/MaterialRequests/InjectionRequests/InjectionRequestDetail.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Requests/MaterialRequests/InjectionRequests/InjectionRequestDetail.cs new file mode 100644 index 000000000..7fab50d6e --- /dev/null +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Requests/MaterialRequests/InjectionRequests/InjectionRequestDetail.cs @@ -0,0 +1,105 @@ +using System; +using System.ComponentModel.DataAnnotations.Schema; +using Win_in.Sfs.Shared.Domain; +using Win_in.Sfs.Shared.Domain.Shared; + +namespace Win_in.Sfs.Wms.Store.Domain; + +/// +/// 注塑申请明细 +/// +public class InjectionRequestDetail : SfsStoreDetailWithQtyEntityBase, IHasToLocation +{ + /// + /// 到库位 + /// + public string ToLocationCode { get; set; } + + /// + /// 到库区 + /// + public string ToLocationArea { get; set; } + + /// + /// 到库位组 + /// + public string ToLocationGroup { get; set; } + + /// + /// 到ERP库位 + /// + public string ToLocationErpCode { get; set; } + + /// + /// 到仓库 + /// + public string ToWarehouseCode { get; set; } + + /// + /// 来源库区 + /// + public string FromLocationArea { get; set; } + + // /// + // /// 在途库库位 + // /// + // public string OnTheWayLocationCode { get; set; } + + /// + /// 生产线 + /// + public string ProdLine { get; set; } + + /// + /// 工作中心 + /// + public string WorkStation { get; set; } + + /// + /// 过期时间 + /// + public DateTime ExpiredTime { get; set; } + + /// + /// 已发数量 + /// + public decimal IssuedQty { get; set; } + + /// + /// 已收数量 + /// + public decimal ReceivedQty { get; set; } + + /// + /// 明细状态 + /// + public EnumStatus Status { get; set; } + + /// + /// 请求未发 还未发送的数量 + /// + [NotMapped] + public decimal ToBeIssuedQty => Qty - IssuedQty; + + /// + /// 已发未收 + /// + [NotMapped] + public decimal ToBeReceivedQty => IssuedQty - ReceivedQty; + + /// + /// 请求未收 + /// + [NotMapped] + public decimal NotFinishQty => Qty - ReceivedQty; + + /// + /// 位置码 + /// + public string PositionCode { get; set; } + + /// + /// 推荐类型 + /// + public EnumRecommendType RecommendType { get; set; } +} diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Requests/MaterialRequests/InjectionRequests/InjectionRequestManager.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Requests/MaterialRequests/InjectionRequests/InjectionRequestManager.cs new file mode 100644 index 000000000..b00a4833e --- /dev/null +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Requests/MaterialRequests/InjectionRequests/InjectionRequestManager.cs @@ -0,0 +1,147 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; +using DocumentFormat.OpenXml.Math; +using Win_in.Sfs.Shared.Domain.Shared; +using Win_in.Sfs.Shared.Event; +using static Win_in.Sfs.Wms.Store.Domain.Shared.StoreSettings; + +namespace Win_in.Sfs.Wms.Store.Domain; + +public class InjectionRequestManager + : SfsStoreRequestManagerBase + , IInjectionRequestManager +{ + private readonly IInjectionRequestRepository _repository; + private readonly IIssueJobRepository _issueJobRepository; + + public InjectionRequestManager( + IInjectionRequestRepository repository + , IIssueJobRepository issueJobRepository + ) : base(repository) + { + _repository = repository; + _issueJobRepository = issueJobRepository; + } + + + #region 东阳V2 + + #endregion + + + /// + /// 创建 + /// + /// + /// + public virtual async Task CreateBynNumberAsync(InjectionRequest entity) + { + var number = string.IsNullOrEmpty(entity.Number) ? await GenerateNumberAsync(nameof(InjectionRequest), entity.ActiveDate).ConfigureAwait(false) : entity.Number; + entity.SetIdAndNumberWithDetails(GuidGenerator, number); + entity.Submit(); + entity.Agree(); + entity.RequestStatus = EnumRequestStatus.Partial; + await LocalEventBus.PublishAsync(new SfsHandledEntityEventData(entity), false) + .ConfigureAwait(false); + await _repository.InsertAsync(entity).ConfigureAwait(false); + return entity; + } + + public virtual async Task UpdateDetailsAsync(InjectionRequest newEntity) + { + var oldEntity = await Repository.FindAsync(newEntity.Id, true).ConfigureAwait(false); + if(oldEntity!=null) + { + foreach (var newDetail in newEntity.Details) + { + oldEntity.ReplaceDetail(newDetail.Id, newDetail); + } + + foreach (var detail in oldEntity.Details) + { + SetMaterialRequestDetailStatus(detail); + } + + await SetMaterialRequestStatusAsync(oldEntity).ConfigureAwait(false); + + await Repository.UpdateAsync(oldEntity).ConfigureAwait(false); + } + + } + + private void SetMaterialRequestDetailStatus(InjectionRequestDetail detail) + { + if (detail.ReceivedQty >= detail.Qty)//执行的时候 实际收料 多余 要料数 + { + detail.Status = EnumStatus.Close; + } + else + { + detail.Status = EnumStatus.Open; + } + } + + private async Task SetMaterialRequestStatusAsync(InjectionRequest materialRequest) + { + if (materialRequest.Details.All(p => p.Status == EnumStatus.Close)) + { + materialRequest.RequestStatus = EnumRequestStatus.Completed; + } + else + { + var issueJobs = await _issueJobRepository.GetListAsync(t => t.MaterialRequestNumber == materialRequest.Number).ConfigureAwait(false); + if (issueJobs.Count > 0) + { + if (issueJobs.All(t => t.JobStatus is EnumJobStatus.Done or EnumJobStatus.Closed or EnumJobStatus.Cancelled)) + { + if (materialRequest.Details.All(p => p.ReceivedQty >= p.Qty)) + { + materialRequest.RequestStatus = EnumRequestStatus.Completed; + } + else + { + materialRequest.RequestStatus = EnumRequestStatus.Partial; + } + } + else + { + materialRequest.RequestStatus = EnumRequestStatus.Partial; + } + } + else + { + materialRequest.RequestStatus = EnumRequestStatus.Partial; + } + } + } + + public virtual async Task CompleteAsync(string number) + { + var entity = await GetByNumberAsync(number).ConfigureAwait(false); + if (entity != null && !entity.Details.Any(p => p.ToBeIssuedQty > 0)) + { + await CompleteAsync(entity).ConfigureAwait(false); + } + } + + + #region 导入 + + /// + /// 执行导入 + /// + public virtual async Task ImportDataAsync(List mergeEntities, List deleteEntities = null) + { + if (deleteEntities != null && deleteEntities.Count > 0) + { + await _repository.BulkDeleteAsync(deleteEntities).ConfigureAwait(false); + } + + await CreateManyAsync(mergeEntities).ConfigureAwait(false); + } + + #endregion + +} diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Requests/TransferLibRequests/ITransferLibRequestManager.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Requests/TransferLibRequests/ITransferLibRequestManager.cs new file mode 100644 index 000000000..ec499a59e --- /dev/null +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Requests/TransferLibRequests/ITransferLibRequestManager.cs @@ -0,0 +1,8 @@ +using Win_in.Sfs.Shared.Domain; + +namespace Win_in.Sfs.Wms.Store.Domain; + +public interface ITransferLibRequestManager : ISfsStoreRequestManager, IBulkImportService +{ + +} diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Requests/TransferLibRequests/ITransferLibRequestRepository.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Requests/TransferLibRequests/ITransferLibRequestRepository.cs new file mode 100644 index 000000000..fe570bdf5 --- /dev/null +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Requests/TransferLibRequests/ITransferLibRequestRepository.cs @@ -0,0 +1,8 @@ +using Win_in.Sfs.Shared.Domain; + +namespace Win_in.Sfs.Wms.Store.Domain; + +public interface ITransferLibRequestRepository : ISfsStoreRepositoryBase, ISfsBulkRepositoryBase +{ + +} diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Requests/TransferLibRequests/TransferLibRequest.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Requests/TransferLibRequests/TransferLibRequest.cs new file mode 100644 index 000000000..18b1eabe3 --- /dev/null +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Requests/TransferLibRequests/TransferLibRequest.cs @@ -0,0 +1,31 @@ +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; +using Win_in.Sfs.Shared.Domain.Entities; + +namespace Win_in.Sfs.Wms.Store.Domain; + +/// +/// 调拨申请 +/// +public class TransferLibRequest : SfsStoreRequestAggregateRootBase +{ + + /// + /// 调拨类型 + /// + [Display(Name = "调拨类型")] + public string Type { get; set; } + + /// + /// 使用中间库 + /// + [Display(Name = "使用中间库")] + public bool UseOnTheWayLocation { get; set; } + + /// + /// 明细列表 + /// + [IgnoreUpdate] + public override List Details { get; set; } = new List(); + +} diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Requests/TransferLibRequests/TransferLibRequestDetail.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Requests/TransferLibRequests/TransferLibRequestDetail.cs new file mode 100644 index 000000000..16637ceaa --- /dev/null +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Requests/TransferLibRequests/TransferLibRequestDetail.cs @@ -0,0 +1,24 @@ +using System.Text.Json; +using Win_in.Sfs.Shared.Domain.Shared; + +namespace Win_in.Sfs.Wms.Store.Domain; + +public class TransferLibRequestDetail : SfsStoreDetailWithFromToEntityBase +{ + + /// + /// 原因代码 + /// + public string Reason { get; set; } + + /// + /// 执行任务状态 + /// + public EnumJobStatus JobStatus { get; set; } + + public override string ToString() + { + return JsonSerializer.Serialize(this); + } + +} diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Requests/TransferLibRequests/TransferLibRequestManager.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Requests/TransferLibRequests/TransferLibRequestManager.cs new file mode 100644 index 000000000..31d512142 --- /dev/null +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Requests/TransferLibRequests/TransferLibRequestManager.cs @@ -0,0 +1,75 @@ +using System.Collections.Generic; +using System.Threading.Tasks; +using Volo.Abp; + +namespace Win_in.Sfs.Wms.Store.Domain; + +public class TransferLibRequestManager : SfsStoreRequestManagerBase, ITransferLibRequestManager +{ + private readonly ITransferLibRequestRepository _repository; + + public TransferLibRequestManager( + ITransferLibRequestRepository repository + ) : base(repository) + { + _repository = repository; + } + + /// + /// 执行导入 + /// + public virtual async Task ImportDataAsync(List transferLibRequests, List deleteEntities = null) + { + if (deleteEntities != null && deleteEntities.Count > 0) + { + await _repository.BulkDeleteAsync(deleteEntities).ConfigureAwait(false); + } + + _ = new List(); + + foreach (var item in transferLibRequests) + { + await BuildDetailAsync(item.Details).ConfigureAwait(false); + } + + await CreateManyAsync(transferLibRequests).ConfigureAwait(false); + } + + private async Task BuildDetailAsync(List details) + { + foreach (var detail in details) + { + var item = await ItemBasicAppService.GetByCodeAsync(detail.ItemCode).ConfigureAwait(false); + Check.NotNull(item, "物品代码", $"物品 {detail.ItemCode} 不存在"); + + if (item != null) + { + detail.ItemName = item.Name; + detail.ItemDesc1 = item.Desc1; + detail.ItemDesc2 = item.Desc2; + } + + var balance = await BalanceAppService.GetByItemLocationPackingAndStatusAsync(detail.FromPackingCode, detail.ItemCode, detail.FromLocationCode, detail.FromStatus).ConfigureAwait(false); + + Check.NotNull(balance, "库存", $"不存在箱码为{detail.FromPackingCode},零件编码为{detail.ItemCode},库位为{detail.FromLocationCode},状态为{detail.FromStatus}的库存!"); + + detail.SupplierBatch = balance.SupplierBatch; + detail.ArriveDate = balance.ArriveDate; + detail.ProduceDate = balance.ProduceDate; + detail.ExpireDate = balance.ExpireDate; + + //通过箱码和库位获取库存信息 + detail.FromStatus = balance.Status; + + detail.FromLot = balance.Lot; + detail.FromWarehouseCode = balance.WarehouseCode; + detail.FromContainerCode = balance.ContainerCode; + + detail.ToLot = balance.Lot; + detail.ToWarehouseCode = balance.WarehouseCode; + detail.ToContainerCode = balance.ContainerCode; + + detail.ToStatus = balance.Status; + } + } +} diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/IStoreDbContext.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/IStoreDbContext.cs index 6ce3b9881..9f178d167 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/IStoreDbContext.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/IStoreDbContext.cs @@ -16,8 +16,13 @@ public interface IStoreDbContext : IEfCoreDbContext public DbSet ItemTransformRequests { get; } public DbSet TransferRequests { get; } + + public DbSet TransferLibRequests { get; } + public DbSet ProductReceiptRequests { get; } public DbSet MaterialRequests { get; } + public DbSet InjectionRequests { get; } + public DbSet AssembleRequests { get; } public DbSet ContainerRequests { get; } public DbSet DeliverRequests { get; } public DbSet InspectRequests { get; } @@ -57,6 +62,9 @@ public interface IStoreDbContext : IEfCoreDbContext public DbSet ItemTransformNotes { get; } public DbSet RecycledMaterialReceiptNotes { get; } public DbSet TransferNotes { get; } + + public DbSet TransferLibNotes { get; } + public DbSet JisProductReceiptNotes { get; } public DbSet ProductReceiptNotes { get; } public DbSet OfflineSettlementNotes { get; } @@ -69,6 +77,8 @@ public interface IStoreDbContext : IEfCoreDbContext public DbSet InventoryTransferNotes { get; } public DbSet WarehouseTransferNotes { get; } public DbSet IssueNotes { get; } + public DbSet InjectionNotes { get; } + public DbSet AssembleNotes { get; } public DbSet ContainerNotes { get; } public DbSet UnplannedReceiptNotes { get; } public DbSet UnplannedIssueNotes { get; } @@ -94,6 +104,8 @@ public interface IStoreDbContext : IEfCoreDbContext public DbSet InspectJobs { get; } public DbSet PutawayJobs { get; } public DbSet IssueJobs { get; } + public DbSet InjectionJobs { get; } + public DbSet AssembleJobs { get; } public DbSet ContainerJobs { get; } public DbSet DeliverJobs { get; } public DbSet JisDeliverJobs { get; } @@ -106,6 +118,8 @@ public interface IStoreDbContext : IEfCoreDbContext public DbSet UnplannedReceiptJobs { get; } public DbSet ProductionReturnJobs { get; } + public DbSet TransferLibJobs { get; } + #endregion public DbSet ExchangeDatas { get; } diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/Jobs/IssueJobs/AssembleJobs/AssembleJobDbContextModelCreatingExtensions.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/Jobs/IssueJobs/AssembleJobs/AssembleJobDbContextModelCreatingExtensions.cs new file mode 100644 index 000000000..3945e66f1 --- /dev/null +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/Jobs/IssueJobs/AssembleJobs/AssembleJobDbContextModelCreatingExtensions.cs @@ -0,0 +1,69 @@ +using Microsoft.EntityFrameworkCore; +using Volo.Abp.EntityFrameworkCore.Modeling; +using Win_in.Sfs.Shared.Domain.Shared; +using Win_in.Sfs.Shared.EntityFrameworkCore; +using Win_in.Sfs.Wms.Store.Domain; + +namespace Win_in.Sfs.Wms.Store.EntityFrameworkCore; + +public static class AssembleJobDbContextModelCreatingExtensions +{ + public static void ConfigureAssembleJob(this ModelBuilder builder, StoreModelBuilderConfigurationOptions options) + { + builder.Entity(b => + { + //Configure table & schema name + b.ToTable(StoreDbProperties.JobDbTablePrefix + nameof(AssembleJob), options.Schema); + //Configure ABP properties + b.ConfigureByConvention(); + //Configure Sfs base properties + b.ConfigureSfsBase(); + //Configure Job base properties + b.ConfigureJob(); + //Properties + b.Property(q => q.RequestType).HasMaxLength(SfsPropertyConst.CodeLength); + b.Property(q => q.AssembleRequestNumber).HasMaxLength(SfsPropertyConst.CodeLength); + b.Property(q => q.Workshop).HasMaxLength(SfsPropertyConst.CodeLength); + b.Property(q => q.ProdLine).HasMaxLength(SfsPropertyConst.CodeLength); + //Relations + b.HasMany(q => q.Details).WithOne().HasForeignKey(d => d.MasterID).IsRequired(); + //Indexes + b.HasIndex(q => new { q.Number }).IsUnique(); + }); + + builder.Entity(b => + { + //Configure table & schema name + b.ToTable(StoreDbProperties.JobDbTablePrefix + nameof(AssembleJobDetail), options.Schema); + //Configure ABP properties + b.ConfigureByConvention(); + //Configure Sfs base properties + b.ConfigureSfsBase(); + //Configure Job base properties + b.ConfigureJobRecommendFromDetail(); + //Properties + b.Property(q => q.ExpiredTime).IsRequired(); + b.Property(q => q.ToLocationCode).HasMaxLength(SfsPropertyConst.CodeLength); + b.Property(q => q.ToLocationErpCode).HasMaxLength(SfsPropertyConst.CodeLength); + b.Property(q => q.ToWarehouseCode).HasMaxLength(SfsPropertyConst.CodeLength); + b.Property(q => q.ToLocationArea).HasMaxLength(SfsPropertyConst.CodeLength); + b.Property(q => q.ToLocationGroup).HasMaxLength(SfsPropertyConst.CodeLength); + b.Property(q => q.RequestLocationCode).HasMaxLength(SfsPropertyConst.CodeLength); + b.Property(q => q.ProdLine).HasMaxLength(SfsPropertyConst.CodeLength); + b.Property(q => q.WorkStation).HasMaxLength(SfsPropertyConst.CodeLength); + b.Property(q => q.Operation).HasMaxLength(SfsPropertyConst.CodeLength); + b.Property(q => q.DistributionType).HasMaxLength(SfsPropertyConst.NameLength).HasConversion(); + b.Property(q => q.TruncType).HasMaxLength(SfsPropertyConst.NameLength).HasConversion(); + b.Property(q => q.PlannedSplitRule).HasMaxLength(SfsPropertyConst.NameLength).HasConversion(); + b.Property(q => q.OnTheWayLocationCode).HasMaxLength(SfsPropertyConst.CodeLength); + b.Property(q => q.PositionCode).HasMaxLength(SfsPropertyConst.CodeLength); + b.Property(q => q.RecommendType).HasMaxLength(SfsPropertyConst.CodeLength).HasConversion(); + + //Relations + //None + + //Indexes + //b.HasIndex(q => new { q.PackingCode }).IsUnique(); + }); + } +} diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/Jobs/IssueJobs/AssembleJobs/AssembleJobEfCoreRepository.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/Jobs/IssueJobs/AssembleJobs/AssembleJobEfCoreRepository.cs new file mode 100644 index 000000000..6430424b9 --- /dev/null +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/Jobs/IssueJobs/AssembleJobs/AssembleJobEfCoreRepository.cs @@ -0,0 +1,11 @@ +using Volo.Abp.EntityFrameworkCore; +using Win_in.Sfs.Wms.Store.Domain; + +namespace Win_in.Sfs.Wms.Store.EntityFrameworkCore; + +public class AssembleJobEfCoreRepository : SfsJobEfCoreRepositoryBase, IAssembleJobRepository +{ + public AssembleJobEfCoreRepository(IDbContextProvider dbContextProvider) : base(dbContextProvider) + { + } +} diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/Jobs/IssueJobs/CoatingIssueJob/CoatingIssueJobDbContextModelCreatingExtensions.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/Jobs/IssueJobs/CoatingIssueJob/CoatingIssueJobDbContextModelCreatingExtensions.cs new file mode 100644 index 000000000..492703d20 --- /dev/null +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/Jobs/IssueJobs/CoatingIssueJob/CoatingIssueJobDbContextModelCreatingExtensions.cs @@ -0,0 +1,70 @@ +using Microsoft.EntityFrameworkCore; +using Volo.Abp.EntityFrameworkCore.Modeling; +using Win_in.Sfs.Shared.Domain.Shared; +using Win_in.Sfs.Shared.EntityFrameworkCore; +using Win_in.Sfs.Wms.Store.Domain; +using Win_in.Sfs.Wms.Store.Jobs.IssueJobs; + +namespace Win_in.Sfs.Wms.Store.EntityFrameworkCore; + +public static class CoatingIssueJobDbContextModelCreatingExtensions +{ + public static void ConfigureCoatingIssueJob(this ModelBuilder builder, StoreModelBuilderConfigurationOptions options) + { + builder.Entity(b => + { + //Configure table & schema name + b.ToTable(StoreDbProperties.JobDbTablePrefix + nameof(CoatingIssueJob), options.Schema); + //Configure ABP properties + b.ConfigureByConvention(); + //Configure Sfs base properties + b.ConfigureSfsBase(); + //Configure Job base properties + b.ConfigureJob(); + //Properties + b.Property(q => q.RequestType).HasMaxLength(SfsPropertyConst.CodeLength); + b.Property(q => q.MaterialRequestNumber).HasMaxLength(SfsPropertyConst.CodeLength); + b.Property(q => q.Workshop).HasMaxLength(SfsPropertyConst.CodeLength); + b.Property(q => q.ProdLine).HasMaxLength(SfsPropertyConst.CodeLength); + //Relations + b.HasMany(q => q.Details).WithOne().HasForeignKey(d => d.MasterID).IsRequired(); + //Indexes + b.HasIndex(q => new { q.Number }).IsUnique(); + }); + + builder.Entity(b => + { + //Configure table & schema name + b.ToTable(StoreDbProperties.JobDbTablePrefix + nameof(CoatingIssueJobDetail), options.Schema); + //Configure ABP properties + b.ConfigureByConvention(); + //Configure Sfs base properties + b.ConfigureSfsBase(); + //Configure Job base properties + b.ConfigureJobRecommendFromDetail(); + //Properties + b.Property(q => q.ExpiredTime).IsRequired(); + b.Property(q => q.ToLocationCode).HasMaxLength(SfsPropertyConst.CodeLength); + b.Property(q => q.ToLocationErpCode).HasMaxLength(SfsPropertyConst.CodeLength); + b.Property(q => q.ToWarehouseCode).HasMaxLength(SfsPropertyConst.CodeLength); + b.Property(q => q.ToLocationArea).HasMaxLength(SfsPropertyConst.CodeLength); + b.Property(q => q.ToLocationGroup).HasMaxLength(SfsPropertyConst.CodeLength); + b.Property(q => q.RequestLocationCode).HasMaxLength(SfsPropertyConst.CodeLength); + b.Property(q => q.ProdLine).HasMaxLength(SfsPropertyConst.CodeLength); + b.Property(q => q.WorkStation).HasMaxLength(SfsPropertyConst.CodeLength); + b.Property(q => q.Operation).HasMaxLength(SfsPropertyConst.CodeLength); + b.Property(q => q.DistributionType).HasMaxLength(SfsPropertyConst.NameLength).HasConversion(); + b.Property(q => q.TruncType).HasMaxLength(SfsPropertyConst.NameLength).HasConversion(); + b.Property(q => q.PlannedSplitRule).HasMaxLength(SfsPropertyConst.NameLength).HasConversion(); + b.Property(q => q.OnTheWayLocationCode).HasMaxLength(SfsPropertyConst.CodeLength); + b.Property(q => q.PositionCode).HasMaxLength(SfsPropertyConst.CodeLength).IsRequired(false); + b.Property(q => q.RecommendType).HasMaxLength(SfsPropertyConst.CodeLength).HasConversion(); + + //Relations + //None + + //Indexes + //b.HasIndex(q => new { q.PackingCode }).IsUnique(); + }); + } +} diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/Jobs/IssueJobs/CoatingIssueJob/CoatingIssueJobEfCoreRepository.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/Jobs/IssueJobs/CoatingIssueJob/CoatingIssueJobEfCoreRepository.cs new file mode 100644 index 000000000..c8239166a --- /dev/null +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/Jobs/IssueJobs/CoatingIssueJob/CoatingIssueJobEfCoreRepository.cs @@ -0,0 +1,11 @@ +using Volo.Abp.EntityFrameworkCore; +using Win_in.Sfs.Wms.Store.Jobs.IssueJobs; + +namespace Win_in.Sfs.Wms.Store.EntityFrameworkCore; + +public class CoatingIssueJobEfCoreRepository : SfsJobEfCoreRepositoryBase, ICoatingIssueJobRepository +{ + public CoatingIssueJobEfCoreRepository(IDbContextProvider dbContextProvider) : base(dbContextProvider) + { + } +} diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/Jobs/IssueJobs/InjectionJobs/InjectionJobDbContextModelCreatingExtensions.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/Jobs/IssueJobs/InjectionJobs/InjectionJobDbContextModelCreatingExtensions.cs new file mode 100644 index 000000000..49690e16a --- /dev/null +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/Jobs/IssueJobs/InjectionJobs/InjectionJobDbContextModelCreatingExtensions.cs @@ -0,0 +1,69 @@ +using Microsoft.EntityFrameworkCore; +using Volo.Abp.EntityFrameworkCore.Modeling; +using Win_in.Sfs.Shared.Domain.Shared; +using Win_in.Sfs.Shared.EntityFrameworkCore; +using Win_in.Sfs.Wms.Store.Domain; + +namespace Win_in.Sfs.Wms.Store.EntityFrameworkCore; + +public static class InjectionJobDbContextModelCreatingExtensions +{ + public static void ConfigureInjectionJob(this ModelBuilder builder, StoreModelBuilderConfigurationOptions options) + { + builder.Entity(b => + { + //Configure table & schema name + b.ToTable(StoreDbProperties.JobDbTablePrefix + nameof(InjectionJob), options.Schema); + //Configure ABP properties + b.ConfigureByConvention(); + //Configure Sfs base properties + b.ConfigureSfsBase(); + //Configure Job base properties + b.ConfigureJob(); + //Properties + b.Property(q => q.RequestType).HasMaxLength(SfsPropertyConst.CodeLength); + b.Property(q => q.InjectionRequestNumber).HasMaxLength(SfsPropertyConst.CodeLength); + b.Property(q => q.Workshop).HasMaxLength(SfsPropertyConst.CodeLength); + b.Property(q => q.ProdLine).HasMaxLength(SfsPropertyConst.CodeLength); + //Relations + b.HasMany(q => q.Details).WithOne().HasForeignKey(d => d.MasterID).IsRequired(); + //Indexes + b.HasIndex(q => new { q.Number }).IsUnique(); + }); + + builder.Entity(b => + { + //Configure table & schema name + b.ToTable(StoreDbProperties.JobDbTablePrefix + nameof(InjectionJobDetail), options.Schema); + //Configure ABP properties + b.ConfigureByConvention(); + //Configure Sfs base properties + b.ConfigureSfsBase(); + //Configure Job base properties + b.ConfigureJobRecommendFromDetail(); + //Properties + b.Property(q => q.ExpiredTime).IsRequired(); + b.Property(q => q.ToLocationCode).HasMaxLength(SfsPropertyConst.CodeLength); + b.Property(q => q.ToLocationErpCode).HasMaxLength(SfsPropertyConst.CodeLength); + b.Property(q => q.ToWarehouseCode).HasMaxLength(SfsPropertyConst.CodeLength); + b.Property(q => q.ToLocationArea).HasMaxLength(SfsPropertyConst.CodeLength); + b.Property(q => q.ToLocationGroup).HasMaxLength(SfsPropertyConst.CodeLength); + b.Property(q => q.RequestLocationCode).HasMaxLength(SfsPropertyConst.CodeLength); + b.Property(q => q.ProdLine).HasMaxLength(SfsPropertyConst.CodeLength); + b.Property(q => q.WorkStation).HasMaxLength(SfsPropertyConst.CodeLength); + b.Property(q => q.Operation).HasMaxLength(SfsPropertyConst.CodeLength); + b.Property(q => q.DistributionType).HasMaxLength(SfsPropertyConst.NameLength).HasConversion(); + b.Property(q => q.TruncType).HasMaxLength(SfsPropertyConst.NameLength).HasConversion(); + b.Property(q => q.PlannedSplitRule).HasMaxLength(SfsPropertyConst.NameLength).HasConversion(); + b.Property(q => q.OnTheWayLocationCode).HasMaxLength(SfsPropertyConst.CodeLength); + b.Property(q => q.PositionCode).HasMaxLength(SfsPropertyConst.CodeLength); + b.Property(q => q.RecommendType).HasMaxLength(SfsPropertyConst.CodeLength).HasConversion(); + + //Relations + //None + + //Indexes + //b.HasIndex(q => new { q.PackingCode }).IsUnique(); + }); + } +} diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/Jobs/IssueJobs/InjectionJobs/InjectionJobEfCoreRepository.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/Jobs/IssueJobs/InjectionJobs/InjectionJobEfCoreRepository.cs new file mode 100644 index 000000000..3f08eb44e --- /dev/null +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/Jobs/IssueJobs/InjectionJobs/InjectionJobEfCoreRepository.cs @@ -0,0 +1,11 @@ +using Volo.Abp.EntityFrameworkCore; +using Win_in.Sfs.Wms.Store.Domain; + +namespace Win_in.Sfs.Wms.Store.EntityFrameworkCore; + +public class InjectionJobEfCoreRepository : SfsJobEfCoreRepositoryBase, IInjectionJobRepository +{ + public InjectionJobEfCoreRepository(IDbContextProvider dbContextProvider) : base(dbContextProvider) + { + } +} diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/Jobs/TransferLibJobs/TransferLibJobDbContextModelCreatingExtensions.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/Jobs/TransferLibJobs/TransferLibJobDbContextModelCreatingExtensions.cs new file mode 100644 index 000000000..2597e8524 --- /dev/null +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/Jobs/TransferLibJobs/TransferLibJobDbContextModelCreatingExtensions.cs @@ -0,0 +1,52 @@ +using Microsoft.EntityFrameworkCore; +using Volo.Abp.EntityFrameworkCore.Modeling; +using Win_in.Sfs.Shared.Domain.Shared; +using Win_in.Sfs.Shared.EntityFrameworkCore; +using Win_in.Sfs.Wms.Store.Domain; + +namespace Win_in.Sfs.Wms.Store.EntityFrameworkCore; + +public static class TransferLibJobDbContextModelCreatingExtensions +{ + public static void ConfigureTransferLibJob(this ModelBuilder builder, StoreModelBuilderConfigurationOptions options) + { + builder.Entity(b => + { + //Configure table & schema name + b.ToTable(StoreDbProperties.JobDbTablePrefix + nameof(TransferLibJob), options.Schema); + //Configure ABP properties + b.ConfigureByConvention(); + //Configure Sfs base properties + b.ConfigureSfsBase(); + //Configure Job base properties + b.ConfigureJob(); + //Properties + //b.Property(q => q.DeptCode).HasMaxLength(SfsPropertyConst.CodeLength); + //b.Property(q => q.DeptName).HasMaxLength(SfsPropertyConst.NameLength); + //b.Property(q => q.TransferLibRequestNumber).HasMaxLength(SfsPropertyConst.CodeLength); + //Relations + b.HasMany(q => q.Details).WithOne().HasForeignKey(d => d.MasterID).IsRequired(); + //Indexes + b.HasIndex(q => new { q.Number }).IsUnique(); + }); + + builder.Entity(b => + { + //Configure table & schema name + b.ToTable(StoreDbProperties.JobDbTablePrefix + nameof(TransferLibJobDetail), options.Schema); + //Configure ABP properties + b.ConfigureByConvention(); + //Configure Sfs base properties + b.ConfigureSfsBase(); + //Configure Job base properties + //b.ConfigureJobRecommendFromDetail(); + //Properties + + //Relations + //None + + //Indexes + //b.HasIndex(q => new { q.PackingCode }).IsUnique(); + }); + } +} diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/Jobs/TransferLibJobs/TransferLibJobEfCoreRepository.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/Jobs/TransferLibJobs/TransferLibJobEfCoreRepository.cs new file mode 100644 index 000000000..7a12c870e --- /dev/null +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/Jobs/TransferLibJobs/TransferLibJobEfCoreRepository.cs @@ -0,0 +1,11 @@ +using Volo.Abp.EntityFrameworkCore; +using Win_in.Sfs.Wms.Store.Domain; + +namespace Win_in.Sfs.Wms.Store.EntityFrameworkCore; + +public class TransferLibJobEfCoreRepository : SfsJobEfCoreRepositoryBase, ITransferLibJobRepository +{ + public TransferLibJobEfCoreRepository(IDbContextProvider dbContextProvider) : base(dbContextProvider) + { + } +} diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/Migrations/20240223055707_temp.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/Migrations/20240223055707_temp.cs deleted file mode 100644 index 058326ded..000000000 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/Migrations/20240223055707_temp.cs +++ /dev/null @@ -1,8075 +0,0 @@ -using System; -using Microsoft.EntityFrameworkCore.Migrations; - -#nullable disable - -namespace Win_in.Sfs.Wms.Store.Migrations -{ - public partial class temp : Migration - { - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.CreateTable( - name: "Job_CheckJob", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - DeliverNoteNumber = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true), - ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: true), - CreationTime = table.Column(type: "datetime2", nullable: false), - CreatorId = table.Column(type: "uniqueidentifier", nullable: true), - LastModificationTime = table.Column(type: "datetime2", nullable: true), - LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), - TenantId = table.Column(type: "uniqueidentifier", nullable: true), - Remark = table.Column(type: "nvarchar(3072)", maxLength: 3072, nullable: true), - Worker = table.Column(type: "nvarchar(max)", nullable: true), - Number = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - UpStreamJobNumber = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - JobDescription = table.Column(type: "nvarchar(1024)", maxLength: 1024, nullable: true), - JobType = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - JobStatus = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - Priority = table.Column(type: "int", nullable: false, defaultValue: 0), - PriorityIncrement = table.Column(type: "int", nullable: false, defaultValue: 0), - WorkGroupCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - IsAutoComplete = table.Column(type: "bit", nullable: false, defaultValue: false), - AcceptUserId = table.Column(type: "uniqueidentifier", nullable: true), - AcceptUserName = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - AcceptTime = table.Column(type: "datetime2", nullable: true), - CompleteUserId = table.Column(type: "uniqueidentifier", nullable: true), - CompleteUserName = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - CompleteTime = table.Column(type: "datetime2", nullable: true), - WarehouseCode = table.Column(type: "nvarchar(max)", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_Job_CheckJob", x => x.Id); - }); - - migrationBuilder.CreateTable( - name: "Job_CountJob", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - CountPlanNumber = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - CountStage = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - CountMethod = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - Type = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - Description = table.Column(type: "nvarchar(max)", nullable: true), - ItemCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - LocationCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true), - ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: true), - CreationTime = table.Column(type: "datetime2", nullable: false), - CreatorId = table.Column(type: "uniqueidentifier", nullable: true), - LastModificationTime = table.Column(type: "datetime2", nullable: true), - LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), - TenantId = table.Column(type: "uniqueidentifier", nullable: true), - Remark = table.Column(type: "nvarchar(3072)", maxLength: 3072, nullable: true), - Worker = table.Column(type: "nvarchar(max)", nullable: true), - Number = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - UpStreamJobNumber = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - JobDescription = table.Column(type: "nvarchar(1024)", maxLength: 1024, nullable: true), - JobType = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - JobStatus = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - Priority = table.Column(type: "int", nullable: false, defaultValue: 0), - PriorityIncrement = table.Column(type: "int", nullable: false, defaultValue: 0), - WorkGroupCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - IsAutoComplete = table.Column(type: "bit", nullable: false, defaultValue: false), - AcceptUserId = table.Column(type: "uniqueidentifier", nullable: true), - AcceptUserName = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - AcceptTime = table.Column(type: "datetime2", nullable: true), - CompleteUserId = table.Column(type: "uniqueidentifier", nullable: true), - CompleteUserName = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - CompleteTime = table.Column(type: "datetime2", nullable: true), - WarehouseCode = table.Column(type: "nvarchar(max)", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_Job_CountJob", x => x.Id); - }); - - migrationBuilder.CreateTable( - name: "Job_DeliverJob", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - DeliverRequestNumber = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - CustomerCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - CustomerAddressCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - DeliverTime = table.Column(type: "datetime2", nullable: false), - DeliverPlanNumber = table.Column(type: "nvarchar(max)", nullable: true), - ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true), - ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: true), - CreationTime = table.Column(type: "datetime2", nullable: false), - CreatorId = table.Column(type: "uniqueidentifier", nullable: true), - LastModificationTime = table.Column(type: "datetime2", nullable: true), - LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), - TenantId = table.Column(type: "uniqueidentifier", nullable: true), - Remark = table.Column(type: "nvarchar(3072)", maxLength: 3072, nullable: true), - Worker = table.Column(type: "nvarchar(max)", nullable: true), - Number = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - UpStreamJobNumber = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - JobDescription = table.Column(type: "nvarchar(1024)", maxLength: 1024, nullable: true), - JobType = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - JobStatus = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - Priority = table.Column(type: "int", nullable: false, defaultValue: 0), - PriorityIncrement = table.Column(type: "int", nullable: false, defaultValue: 0), - WorkGroupCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - IsAutoComplete = table.Column(type: "bit", nullable: false, defaultValue: false), - AcceptUserId = table.Column(type: "uniqueidentifier", nullable: true), - AcceptUserName = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - AcceptTime = table.Column(type: "datetime2", nullable: true), - CompleteUserId = table.Column(type: "uniqueidentifier", nullable: true), - CompleteUserName = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - CompleteTime = table.Column(type: "datetime2", nullable: true), - WarehouseCode = table.Column(type: "nvarchar(max)", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_Job_DeliverJob", x => x.Id); - }); - - migrationBuilder.CreateTable( - name: "Job_InspectJob", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - InspectNumber = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ReceiptNumber = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - PurchaseReceiptRequestNumber = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - AsnNumber = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - RpNumber = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - PoNumber = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - SupplierCode = table.Column(type: "nvarchar(max)", nullable: true), - NextAction = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true), - ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: true), - CreationTime = table.Column(type: "datetime2", nullable: false), - CreatorId = table.Column(type: "uniqueidentifier", nullable: true), - LastModificationTime = table.Column(type: "datetime2", nullable: true), - LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), - TenantId = table.Column(type: "uniqueidentifier", nullable: true), - Remark = table.Column(type: "nvarchar(3072)", maxLength: 3072, nullable: true), - Worker = table.Column(type: "nvarchar(max)", nullable: true), - Number = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - UpStreamJobNumber = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - JobDescription = table.Column(type: "nvarchar(1024)", maxLength: 1024, nullable: true), - JobType = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - JobStatus = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - Priority = table.Column(type: "int", nullable: false, defaultValue: 0), - PriorityIncrement = table.Column(type: "int", nullable: false, defaultValue: 0), - WorkGroupCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - IsAutoComplete = table.Column(type: "bit", nullable: false, defaultValue: false), - AcceptUserId = table.Column(type: "uniqueidentifier", nullable: true), - AcceptUserName = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - AcceptTime = table.Column(type: "datetime2", nullable: true), - CompleteUserId = table.Column(type: "uniqueidentifier", nullable: true), - CompleteUserName = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - CompleteTime = table.Column(type: "datetime2", nullable: true), - WarehouseCode = table.Column(type: "nvarchar(max)", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_Job_InspectJob", x => x.Id); - }); - - migrationBuilder.CreateTable( - name: "Job_IssueJob", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - RequestType = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ProdLine = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - MaterialRequestNumber = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - Workshop = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - UseOnTheWayLocation = table.Column(type: "bit", nullable: false), - ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true), - ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: true), - CreationTime = table.Column(type: "datetime2", nullable: false), - CreatorId = table.Column(type: "uniqueidentifier", nullable: true), - LastModificationTime = table.Column(type: "datetime2", nullable: true), - LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), - TenantId = table.Column(type: "uniqueidentifier", nullable: true), - Remark = table.Column(type: "nvarchar(3072)", maxLength: 3072, nullable: true), - Worker = table.Column(type: "nvarchar(max)", nullable: true), - Number = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - UpStreamJobNumber = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - JobDescription = table.Column(type: "nvarchar(1024)", maxLength: 1024, nullable: true), - JobType = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - JobStatus = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - Priority = table.Column(type: "int", nullable: false, defaultValue: 0), - PriorityIncrement = table.Column(type: "int", nullable: false, defaultValue: 0), - WorkGroupCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - IsAutoComplete = table.Column(type: "bit", nullable: false, defaultValue: false), - AcceptUserId = table.Column(type: "uniqueidentifier", nullable: true), - AcceptUserName = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - AcceptTime = table.Column(type: "datetime2", nullable: true), - CompleteUserId = table.Column(type: "uniqueidentifier", nullable: true), - CompleteUserName = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - CompleteTime = table.Column(type: "datetime2", nullable: true), - WarehouseCode = table.Column(type: "nvarchar(max)", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_Job_IssueJob", x => x.Id); - }); - - migrationBuilder.CreateTable( - name: "Job_JisDeliverJob", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - Customer = table.Column(type: "nvarchar(max)", nullable: true), - CustomerAddressCode = table.Column(type: "nvarchar(max)", nullable: true), - CustomerLocationCode = table.Column(type: "nvarchar(max)", nullable: true), - CustomerWarehouseCode = table.Column(type: "nvarchar(max)", nullable: true), - ProjectCode = table.Column(type: "nvarchar(max)", nullable: true), - Position = table.Column(type: "nvarchar(max)", nullable: true), - PlanTime = table.Column(type: "datetime2", nullable: false), - ContainerQty = table.Column(type: "decimal(18,6)", nullable: false), - ItemQty = table.Column(type: "decimal(18,6)", nullable: false), - ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true), - ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: true), - CreationTime = table.Column(type: "datetime2", nullable: false), - CreatorId = table.Column(type: "uniqueidentifier", nullable: true), - LastModificationTime = table.Column(type: "datetime2", nullable: true), - LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), - TenantId = table.Column(type: "uniqueidentifier", nullable: true), - Remark = table.Column(type: "nvarchar(3072)", maxLength: 3072, nullable: true), - Worker = table.Column(type: "nvarchar(max)", nullable: true), - Number = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - UpStreamJobNumber = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - JobDescription = table.Column(type: "nvarchar(1024)", maxLength: 1024, nullable: true), - JobType = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - JobStatus = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - Priority = table.Column(type: "int", nullable: false, defaultValue: 0), - PriorityIncrement = table.Column(type: "int", nullable: false, defaultValue: 0), - WorkGroupCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - IsAutoComplete = table.Column(type: "bit", nullable: false, defaultValue: false), - AcceptUserId = table.Column(type: "uniqueidentifier", nullable: true), - AcceptUserName = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - AcceptTime = table.Column(type: "datetime2", nullable: true), - CompleteUserId = table.Column(type: "uniqueidentifier", nullable: true), - CompleteUserName = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - CompleteTime = table.Column(type: "datetime2", nullable: true), - WarehouseCode = table.Column(type: "nvarchar(max)", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_Job_JisDeliverJob", x => x.Id); - }); - - migrationBuilder.CreateTable( - name: "Job_ProductionReturnJob", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - ProductionReturnRequestNumber = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true), - ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: true), - CreationTime = table.Column(type: "datetime2", nullable: false), - CreatorId = table.Column(type: "uniqueidentifier", nullable: true), - LastModificationTime = table.Column(type: "datetime2", nullable: true), - LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), - TenantId = table.Column(type: "uniqueidentifier", nullable: true), - Remark = table.Column(type: "nvarchar(3072)", maxLength: 3072, nullable: true), - Worker = table.Column(type: "nvarchar(max)", nullable: true), - Number = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - UpStreamJobNumber = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - JobDescription = table.Column(type: "nvarchar(1024)", maxLength: 1024, nullable: true), - JobType = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - JobStatus = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - Priority = table.Column(type: "int", nullable: false, defaultValue: 0), - PriorityIncrement = table.Column(type: "int", nullable: false, defaultValue: 0), - WorkGroupCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - IsAutoComplete = table.Column(type: "bit", nullable: false, defaultValue: false), - AcceptUserId = table.Column(type: "uniqueidentifier", nullable: true), - AcceptUserName = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - AcceptTime = table.Column(type: "datetime2", nullable: true), - CompleteUserId = table.Column(type: "uniqueidentifier", nullable: true), - CompleteUserName = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - CompleteTime = table.Column(type: "datetime2", nullable: true), - WarehouseCode = table.Column(type: "nvarchar(max)", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_Job_ProductionReturnJob", x => x.Id); - }); - - migrationBuilder.CreateTable( - name: "Job_ProductReceiveJob", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - ProductionPlanNumber = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - Workshop = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - Shift = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true), - ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: true), - CreationTime = table.Column(type: "datetime2", nullable: false), - CreatorId = table.Column(type: "uniqueidentifier", nullable: true), - LastModificationTime = table.Column(type: "datetime2", nullable: true), - LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), - TenantId = table.Column(type: "uniqueidentifier", nullable: true), - Remark = table.Column(type: "nvarchar(3072)", maxLength: 3072, nullable: true), - Worker = table.Column(type: "nvarchar(max)", nullable: true), - Number = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - UpStreamJobNumber = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - JobDescription = table.Column(type: "nvarchar(1024)", maxLength: 1024, nullable: true), - JobType = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - JobStatus = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - Priority = table.Column(type: "int", nullable: false, defaultValue: 0), - PriorityIncrement = table.Column(type: "int", nullable: false, defaultValue: 0), - WorkGroupCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - IsAutoComplete = table.Column(type: "bit", nullable: false, defaultValue: false), - AcceptUserId = table.Column(type: "uniqueidentifier", nullable: true), - AcceptUserName = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - AcceptTime = table.Column(type: "datetime2", nullable: true), - CompleteUserId = table.Column(type: "uniqueidentifier", nullable: true), - CompleteUserName = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - CompleteTime = table.Column(type: "datetime2", nullable: true), - WarehouseCode = table.Column(type: "nvarchar(max)", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_Job_ProductReceiveJob", x => x.Id); - }); - - migrationBuilder.CreateTable( - name: "Job_PurchaseReceiptJob", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - PurchaseReceiptRequestNumber = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - AsnNumber = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - RpNumber = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - PoNumber = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - SupplierCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - SupplierName = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - SupplierAddress = table.Column(type: "nvarchar(max)", nullable: true), - Type = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - TimeWindow = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - PlanArriveDate = table.Column(type: "datetime2", nullable: false), - ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true), - ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: true), - CreationTime = table.Column(type: "datetime2", nullable: false), - CreatorId = table.Column(type: "uniqueidentifier", nullable: true), - LastModificationTime = table.Column(type: "datetime2", nullable: true), - LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), - TenantId = table.Column(type: "uniqueidentifier", nullable: true), - Remark = table.Column(type: "nvarchar(3072)", maxLength: 3072, nullable: true), - Worker = table.Column(type: "nvarchar(max)", nullable: true), - Number = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - UpStreamJobNumber = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - JobDescription = table.Column(type: "nvarchar(1024)", maxLength: 1024, nullable: true), - JobType = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - JobStatus = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - Priority = table.Column(type: "int", nullable: false, defaultValue: 0), - PriorityIncrement = table.Column(type: "int", nullable: false, defaultValue: 0), - WorkGroupCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - IsAutoComplete = table.Column(type: "bit", nullable: false, defaultValue: false), - AcceptUserId = table.Column(type: "uniqueidentifier", nullable: true), - AcceptUserName = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - AcceptTime = table.Column(type: "datetime2", nullable: true), - CompleteUserId = table.Column(type: "uniqueidentifier", nullable: true), - CompleteUserName = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - CompleteTime = table.Column(type: "datetime2", nullable: true), - WarehouseCode = table.Column(type: "nvarchar(max)", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_Job_PurchaseReceiptJob", x => x.Id); - }); - - migrationBuilder.CreateTable( - name: "Job_PurchaseReturnJob", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - RpNumber = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - AsnNumber = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - PoNumber = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - PurchaseReturnRequestNumber = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - SupplierCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ReturnReason = table.Column(type: "nvarchar(max)", nullable: true), - ReturnTime = table.Column(type: "datetime2", nullable: false), - ReturnType = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true), - ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: true), - CreationTime = table.Column(type: "datetime2", nullable: false), - CreatorId = table.Column(type: "uniqueidentifier", nullable: true), - LastModificationTime = table.Column(type: "datetime2", nullable: true), - LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), - TenantId = table.Column(type: "uniqueidentifier", nullable: true), - Remark = table.Column(type: "nvarchar(3072)", maxLength: 3072, nullable: true), - Worker = table.Column(type: "nvarchar(max)", nullable: true), - Number = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - UpStreamJobNumber = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - JobDescription = table.Column(type: "nvarchar(1024)", maxLength: 1024, nullable: true), - JobType = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - JobStatus = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - Priority = table.Column(type: "int", nullable: false, defaultValue: 0), - PriorityIncrement = table.Column(type: "int", nullable: false, defaultValue: 0), - WorkGroupCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - IsAutoComplete = table.Column(type: "bit", nullable: false, defaultValue: false), - AcceptUserId = table.Column(type: "uniqueidentifier", nullable: true), - AcceptUserName = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - AcceptTime = table.Column(type: "datetime2", nullable: true), - CompleteUserId = table.Column(type: "uniqueidentifier", nullable: true), - CompleteUserName = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - CompleteTime = table.Column(type: "datetime2", nullable: true), - WarehouseCode = table.Column(type: "nvarchar(max)", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_Job_PurchaseReturnJob", x => x.Id); - }); - - migrationBuilder.CreateTable( - name: "Job_PutawayJob", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - PutawayMode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - SupplierCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - InspectNumber = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ReceiptNumber = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - PurchaseReceiptRequestNumber = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - AsnNumber = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - RpNumber = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - PoNumber = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ProductReceiptNumber = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - Type = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true), - ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: true), - CreationTime = table.Column(type: "datetime2", nullable: false), - CreatorId = table.Column(type: "uniqueidentifier", nullable: true), - LastModificationTime = table.Column(type: "datetime2", nullable: true), - LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), - TenantId = table.Column(type: "uniqueidentifier", nullable: true), - Remark = table.Column(type: "nvarchar(3072)", maxLength: 3072, nullable: true), - Worker = table.Column(type: "nvarchar(max)", nullable: true), - Number = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - UpStreamJobNumber = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - JobDescription = table.Column(type: "nvarchar(1024)", maxLength: 1024, nullable: true), - JobType = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - JobStatus = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - Priority = table.Column(type: "int", nullable: false, defaultValue: 0), - PriorityIncrement = table.Column(type: "int", nullable: false, defaultValue: 0), - WorkGroupCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - IsAutoComplete = table.Column(type: "bit", nullable: false, defaultValue: false), - AcceptUserId = table.Column(type: "uniqueidentifier", nullable: true), - AcceptUserName = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - AcceptTime = table.Column(type: "datetime2", nullable: true), - CompleteUserId = table.Column(type: "uniqueidentifier", nullable: true), - CompleteUserName = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - CompleteTime = table.Column(type: "datetime2", nullable: true), - WarehouseCode = table.Column(type: "nvarchar(max)", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_Job_PutawayJob", x => x.Id); - }); - - migrationBuilder.CreateTable( - name: "Job_UnplannedIssueJob", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - UnplannedIssueRequestNumber = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - DeptCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - DeptName = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - BuildDate = table.Column(type: "datetime2", nullable: false), - UnplannedIssueType = table.Column(type: "int", nullable: false), - OANumber = table.Column(type: "nvarchar(max)", nullable: true), - ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true), - ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: true), - CreationTime = table.Column(type: "datetime2", nullable: false), - CreatorId = table.Column(type: "uniqueidentifier", nullable: true), - LastModificationTime = table.Column(type: "datetime2", nullable: true), - LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), - TenantId = table.Column(type: "uniqueidentifier", nullable: true), - Remark = table.Column(type: "nvarchar(3072)", maxLength: 3072, nullable: true), - Worker = table.Column(type: "nvarchar(max)", nullable: true), - Number = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - UpStreamJobNumber = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - JobDescription = table.Column(type: "nvarchar(1024)", maxLength: 1024, nullable: true), - JobType = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - JobStatus = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - Priority = table.Column(type: "int", nullable: false, defaultValue: 0), - PriorityIncrement = table.Column(type: "int", nullable: false, defaultValue: 0), - WorkGroupCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - IsAutoComplete = table.Column(type: "bit", nullable: false, defaultValue: false), - AcceptUserId = table.Column(type: "uniqueidentifier", nullable: true), - AcceptUserName = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - AcceptTime = table.Column(type: "datetime2", nullable: true), - CompleteUserId = table.Column(type: "uniqueidentifier", nullable: true), - CompleteUserName = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - CompleteTime = table.Column(type: "datetime2", nullable: true), - WarehouseCode = table.Column(type: "nvarchar(max)", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_Job_UnplannedIssueJob", x => x.Id); - }); - - migrationBuilder.CreateTable( - name: "Job_UnplannedReceiptJob", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - UnplannedReceiptRequestNumber = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - DeptCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - DeptName = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - BuildDate = table.Column(type: "datetime2", nullable: false), - UnplannedReceiptType = table.Column(type: "int", nullable: false), - OANumber = table.Column(type: "nvarchar(max)", nullable: true), - ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true), - ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: true), - CreationTime = table.Column(type: "datetime2", nullable: false), - CreatorId = table.Column(type: "uniqueidentifier", nullable: true), - LastModificationTime = table.Column(type: "datetime2", nullable: true), - LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), - TenantId = table.Column(type: "uniqueidentifier", nullable: true), - Remark = table.Column(type: "nvarchar(3072)", maxLength: 3072, nullable: true), - Worker = table.Column(type: "nvarchar(max)", nullable: true), - Number = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - UpStreamJobNumber = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - JobDescription = table.Column(type: "nvarchar(1024)", maxLength: 1024, nullable: true), - JobType = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - JobStatus = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - Priority = table.Column(type: "int", nullable: false, defaultValue: 0), - PriorityIncrement = table.Column(type: "int", nullable: false, defaultValue: 0), - WorkGroupCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - IsAutoComplete = table.Column(type: "bit", nullable: false, defaultValue: false), - AcceptUserId = table.Column(type: "uniqueidentifier", nullable: true), - AcceptUserName = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - AcceptTime = table.Column(type: "datetime2", nullable: true), - CompleteUserId = table.Column(type: "uniqueidentifier", nullable: true), - CompleteUserName = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - CompleteTime = table.Column(type: "datetime2", nullable: true), - WarehouseCode = table.Column(type: "nvarchar(max)", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_Job_UnplannedReceiptJob", x => x.Id); - }); - - migrationBuilder.CreateTable( - name: "Store_BackFlushNote", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - PackingCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ItemName = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ItemDesc1 = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ItemDesc2 = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ItemCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - SupplierBatch = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ArriveDate = table.Column(type: "datetime2", nullable: false), - ProduceDate = table.Column(type: "datetime2", nullable: false), - ExpireDate = table.Column(type: "datetime2", nullable: false), - Lot = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - Uom = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - Qty = table.Column(type: "decimal(18,6)", precision: 18, scale: 6, nullable: false), - LocationCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - LocationArea = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - LocationGroup = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - LocationErpCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - WarehouseCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - CompleteTime = table.Column(type: "datetime2", nullable: false), - Workshop = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - ProdLine = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - Shift = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ProductionPlanNumber = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - ProductReceiptNumber = table.Column(type: "nvarchar(max)", nullable: true), - ProductRecycleNumber = table.Column(type: "nvarchar(max)", nullable: true), - JobNumber = table.Column(type: "nvarchar(max)", nullable: true), - ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true), - ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: true), - CreationTime = table.Column(type: "datetime2", nullable: false), - CreatorId = table.Column(type: "uniqueidentifier", nullable: true), - LastModificationTime = table.Column(type: "datetime2", nullable: true), - LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), - TenantId = table.Column(type: "uniqueidentifier", nullable: true), - Remark = table.Column(type: "nvarchar(3072)", maxLength: 3072, nullable: true), - Worker = table.Column(type: "nvarchar(max)", nullable: true), - Number = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - ActiveDate = table.Column(type: "datetime2", nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_Store_BackFlushNote", x => x.Id); - }); - - migrationBuilder.CreateTable( - name: "Store_ContainerBindNote", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - ContainerCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - LocationCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - BindType = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - BindTime = table.Column(type: "datetime2", nullable: false), - ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true), - ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: true), - CreationTime = table.Column(type: "datetime2", nullable: false), - CreatorId = table.Column(type: "uniqueidentifier", nullable: true), - LastModificationTime = table.Column(type: "datetime2", nullable: true), - LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), - TenantId = table.Column(type: "uniqueidentifier", nullable: true), - Remark = table.Column(type: "nvarchar(3072)", maxLength: 3072, nullable: true), - Worker = table.Column(type: "nvarchar(max)", nullable: true), - Number = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - ActiveDate = table.Column(type: "datetime2", nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_Store_ContainerBindNote", x => x.Id); - }); - - migrationBuilder.CreateTable( - name: "Store_CountAdjustNote", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - CountNoteNumber = table.Column(type: "nvarchar(max)", nullable: true), - CountPlanNumber = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - Type = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - CountAdjustRequestNumber = table.Column(type: "nvarchar(max)", nullable: true), - JobNumber = table.Column(type: "nvarchar(max)", nullable: true), - IsAdjusted = table.Column(type: "bit", nullable: false), - ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true), - ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: true), - CreationTime = table.Column(type: "datetime2", nullable: false), - CreatorId = table.Column(type: "uniqueidentifier", nullable: true), - LastModificationTime = table.Column(type: "datetime2", nullable: true), - LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), - TenantId = table.Column(type: "uniqueidentifier", nullable: true), - Remark = table.Column(type: "nvarchar(3072)", maxLength: 3072, nullable: true), - Worker = table.Column(type: "nvarchar(max)", nullable: true), - Number = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - ActiveDate = table.Column(type: "datetime2", nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_Store_CountAdjustNote", x => x.Id); - }); - - migrationBuilder.CreateTable( - name: "Store_CountAdjustRequest", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - CountNoteNumber = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - CountPlanNumber = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true), - ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: true), - CreationTime = table.Column(type: "datetime2", nullable: false), - CreatorId = table.Column(type: "uniqueidentifier", nullable: true), - LastModificationTime = table.Column(type: "datetime2", nullable: true), - LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), - TenantId = table.Column(type: "uniqueidentifier", nullable: true), - Remark = table.Column(type: "nvarchar(3072)", maxLength: 3072, nullable: true), - Worker = table.Column(type: "nvarchar(max)", nullable: true), - Number = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - ActiveDate = table.Column(type: "datetime2", nullable: false), - AutoSubmit = table.Column(type: "bit", nullable: false), - AutoAgree = table.Column(type: "bit", nullable: false), - AutoHandle = table.Column(type: "bit", nullable: false), - AutoCompleteJob = table.Column(type: "bit", nullable: false), - DirectCreateNote = table.Column(type: "bit", nullable: false), - RequestStatus = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_Store_CountAdjustRequest", x => x.Id); - }); - - migrationBuilder.CreateTable( - name: "Store_CountNote", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - CountPlanNumber = table.Column(type: "nvarchar(max)", nullable: true), - Type = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - Stage = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - Description = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - BeginTime = table.Column(type: "datetime2", nullable: false), - EndTime = table.Column(type: "datetime2", nullable: false), - Adjusted = table.Column(type: "bit", nullable: false), - ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true), - ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: true), - CreationTime = table.Column(type: "datetime2", nullable: false), - CreatorId = table.Column(type: "uniqueidentifier", nullable: true), - LastModificationTime = table.Column(type: "datetime2", nullable: true), - LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), - TenantId = table.Column(type: "uniqueidentifier", nullable: true), - Remark = table.Column(type: "nvarchar(3072)", maxLength: 3072, nullable: true), - Worker = table.Column(type: "nvarchar(max)", nullable: true), - Number = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - ActiveDate = table.Column(type: "datetime2", nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_Store_CountNote", x => x.Id); - }); - - migrationBuilder.CreateTable( - name: "Store_CountPlan", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - Type = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - Stage = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - RequestType = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - CountMethod = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - Description = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - BeginTime = table.Column(type: "datetime2", nullable: true), - EndTime = table.Column(type: "datetime2", nullable: true), - PlanTime = table.Column(type: "datetime2", nullable: false), - JsonItemCodes = table.Column(type: "nvarchar(max)", nullable: true), - JsonLocationCodes = table.Column(type: "nvarchar(max)", nullable: true), - JsonInventoryStatus = table.Column(type: "nvarchar(max)", nullable: true), - ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true), - ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: true), - CreationTime = table.Column(type: "datetime2", nullable: false), - CreatorId = table.Column(type: "uniqueidentifier", nullable: true), - LastModificationTime = table.Column(type: "datetime2", nullable: true), - LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), - TenantId = table.Column(type: "uniqueidentifier", nullable: true), - Remark = table.Column(type: "nvarchar(3072)", maxLength: 3072, nullable: true), - Worker = table.Column(type: "nvarchar(max)", nullable: true), - Number = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - ActiveDate = table.Column(type: "datetime2", nullable: false), - AutoSubmit = table.Column(type: "bit", nullable: false), - AutoAgree = table.Column(type: "bit", nullable: false), - AutoHandle = table.Column(type: "bit", nullable: false), - AutoCompleteJob = table.Column(type: "bit", nullable: false), - DirectCreateNote = table.Column(type: "bit", nullable: false), - RequestStatus = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_Store_CountPlan", x => x.Id); - }); - - migrationBuilder.CreateTable( - name: "Store_CustomerAsn", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - SoNumber = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - CustomerCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - Status = table.Column(type: "int", nullable: false), - ContactName = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ContactPhone = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ContactEmail = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - DockCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - BeginTime = table.Column(type: "datetime2", nullable: true), - EndTime = table.Column(type: "datetime2", nullable: true), - ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true), - ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: true), - CreationTime = table.Column(type: "datetime2", nullable: false), - CreatorId = table.Column(type: "uniqueidentifier", nullable: true), - LastModificationTime = table.Column(type: "datetime2", nullable: true), - LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), - TenantId = table.Column(type: "uniqueidentifier", nullable: true), - Remark = table.Column(type: "nvarchar(3072)", maxLength: 3072, nullable: true), - Worker = table.Column(type: "nvarchar(max)", nullable: true), - Number = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - ActiveDate = table.Column(type: "datetime2", nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_Store_CustomerAsn", x => x.Id); - }); - - migrationBuilder.CreateTable( - name: "Store_CustomerReturnNote", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - JobNumber = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ReturnTime = table.Column(type: "datetime2", nullable: false), - Customer = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true), - ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: true), - CreationTime = table.Column(type: "datetime2", nullable: false), - CreatorId = table.Column(type: "uniqueidentifier", nullable: true), - LastModificationTime = table.Column(type: "datetime2", nullable: true), - LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), - TenantId = table.Column(type: "uniqueidentifier", nullable: true), - Remark = table.Column(type: "nvarchar(3072)", maxLength: 3072, nullable: true), - Worker = table.Column(type: "nvarchar(max)", nullable: true), - Number = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - ActiveDate = table.Column(type: "datetime2", nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_Store_CustomerReturnNote", x => x.Id); - }); - - migrationBuilder.CreateTable( - name: "Store_DeliverNote", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - JobNumber = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - CustomerCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - CustomerAddressCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - DeliverPlanNumber = table.Column(type: "nvarchar(max)", nullable: true), - DeliverTime = table.Column(type: "datetime2", nullable: false), - DeliverRequestNumber = table.Column(type: "nvarchar(max)", nullable: true), - DeliverRequestType = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - CountPrint = table.Column(type: "int", nullable: false), - ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true), - ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: true), - CreationTime = table.Column(type: "datetime2", nullable: false), - CreatorId = table.Column(type: "uniqueidentifier", nullable: true), - LastModificationTime = table.Column(type: "datetime2", nullable: true), - LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), - TenantId = table.Column(type: "uniqueidentifier", nullable: true), - Remark = table.Column(type: "nvarchar(3072)", maxLength: 3072, nullable: true), - Worker = table.Column(type: "nvarchar(max)", nullable: true), - Number = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - ActiveDate = table.Column(type: "datetime2", nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_Store_DeliverNote", x => x.Id); - }); - - migrationBuilder.CreateTable( - name: "Store_DeliverPlan", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - PlanDate = table.Column(type: "datetime2", nullable: false), - PlanTime = table.Column(type: "datetime2", nullable: false), - CustomerCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - CustomerAddressCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - Project = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - SoNumber = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true), - ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: true), - CreationTime = table.Column(type: "datetime2", nullable: false), - CreatorId = table.Column(type: "uniqueidentifier", nullable: true), - LastModificationTime = table.Column(type: "datetime2", nullable: true), - LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), - TenantId = table.Column(type: "uniqueidentifier", nullable: true), - Remark = table.Column(type: "nvarchar(3072)", maxLength: 3072, nullable: true), - Worker = table.Column(type: "nvarchar(max)", nullable: true), - Number = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - ActiveDate = table.Column(type: "datetime2", nullable: false), - AutoSubmit = table.Column(type: "bit", nullable: false), - AutoAgree = table.Column(type: "bit", nullable: false), - AutoHandle = table.Column(type: "bit", nullable: false), - AutoCompleteJob = table.Column(type: "bit", nullable: false), - DirectCreateNote = table.Column(type: "bit", nullable: false), - RequestStatus = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_Store_DeliverPlan", x => x.Id); - }); - - migrationBuilder.CreateTable( - name: "Store_DeliverRequest", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - DeliverTime = table.Column(type: "datetime2", nullable: false), - DeliverPlanNumber = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - CustomerCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - CustomerAddressCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - DeliverRequestType = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true), - ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: true), - CreationTime = table.Column(type: "datetime2", nullable: false), - CreatorId = table.Column(type: "uniqueidentifier", nullable: true), - LastModificationTime = table.Column(type: "datetime2", nullable: true), - LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), - TenantId = table.Column(type: "uniqueidentifier", nullable: true), - Remark = table.Column(type: "nvarchar(3072)", maxLength: 3072, nullable: true), - Worker = table.Column(type: "nvarchar(max)", nullable: true), - Number = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - ActiveDate = table.Column(type: "datetime2", nullable: false), - AutoSubmit = table.Column(type: "bit", nullable: false), - AutoAgree = table.Column(type: "bit", nullable: false), - AutoHandle = table.Column(type: "bit", nullable: false), - AutoCompleteJob = table.Column(type: "bit", nullable: false), - DirectCreateNote = table.Column(type: "bit", nullable: false), - RequestStatus = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_Store_DeliverRequest", x => x.Id); - }); - - migrationBuilder.CreateTable( - name: "Store_ExchangeData", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - Number = table.Column(type: "bigint", nullable: false), - DataType = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - DataAction = table.Column(type: "int", nullable: false), - EffectiveDate = table.Column(type: "datetime2", nullable: false), - Status = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - DataIdentityCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - DataContent = table.Column(type: "nvarchar(max)", nullable: true), - DestinationSystem = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - ReadTime = table.Column(type: "datetime2", nullable: true), - Reader = table.Column(type: "nvarchar(max)", nullable: true), - SourceSystem = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - WriteTime = table.Column(type: "datetime2", nullable: false), - Writer = table.Column(type: "nvarchar(max)", nullable: true), - ErrorCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - ErrorMessage = table.Column(type: "nvarchar(3072)", maxLength: 3072, nullable: true), - RetryTimes = table.Column(type: "int", nullable: false), - TyrpNumber = table.Column(type: "nvarchar(max)", nullable: false), - ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true), - ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: true), - CreationTime = table.Column(type: "datetime2", nullable: false), - CreatorId = table.Column(type: "uniqueidentifier", nullable: true), - LastModificationTime = table.Column(type: "datetime2", nullable: true), - LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), - TenantId = table.Column(type: "uniqueidentifier", nullable: true), - Remark = table.Column(type: "nvarchar(3072)", maxLength: 3072, nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_Store_ExchangeData", x => x.Id); - }); - - migrationBuilder.CreateTable( - name: "Store_InspectAbnormalNote", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - InspectNumber = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ReceiptNumber = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - SupplierCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true), - ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: true), - CreationTime = table.Column(type: "datetime2", nullable: false), - CreatorId = table.Column(type: "uniqueidentifier", nullable: true), - LastModificationTime = table.Column(type: "datetime2", nullable: true), - LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), - TenantId = table.Column(type: "uniqueidentifier", nullable: true), - Remark = table.Column(type: "nvarchar(3072)", maxLength: 3072, nullable: true), - Worker = table.Column(type: "nvarchar(max)", nullable: true), - Number = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - ActiveDate = table.Column(type: "datetime2", nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_Store_InspectAbnormalNote", x => x.Id); - }); - - migrationBuilder.CreateTable( - name: "Store_InspectNote", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - InspectNumber = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ReceiptNumber = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - PurchaseReceiptRequestNumber = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - AsnNumber = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - RpNumber = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - PoNumber = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - SupplierCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - NextAction = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - JobNumber = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true), - ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: true), - CreationTime = table.Column(type: "datetime2", nullable: false), - CreatorId = table.Column(type: "uniqueidentifier", nullable: true), - LastModificationTime = table.Column(type: "datetime2", nullable: true), - LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), - TenantId = table.Column(type: "uniqueidentifier", nullable: true), - Remark = table.Column(type: "nvarchar(3072)", maxLength: 3072, nullable: true), - Worker = table.Column(type: "nvarchar(max)", nullable: true), - Number = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - ActiveDate = table.Column(type: "datetime2", nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_Store_InspectNote", x => x.Id); - }); - - migrationBuilder.CreateTable( - name: "Store_InspectRequest", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - ReceiptNumber = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - PurchaseReceiptRequestNumber = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - AsnNumber = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - RpNumber = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - PoNumber = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - SupplierCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - WarehouseCode = table.Column(type: "nvarchar(max)", nullable: true), - ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true), - ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: true), - CreationTime = table.Column(type: "datetime2", nullable: false), - CreatorId = table.Column(type: "uniqueidentifier", nullable: true), - LastModificationTime = table.Column(type: "datetime2", nullable: true), - LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), - TenantId = table.Column(type: "uniqueidentifier", nullable: true), - Remark = table.Column(type: "nvarchar(3072)", maxLength: 3072, nullable: true), - Worker = table.Column(type: "nvarchar(max)", nullable: true), - Number = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - ActiveDate = table.Column(type: "datetime2", nullable: false), - AutoSubmit = table.Column(type: "bit", nullable: false), - AutoAgree = table.Column(type: "bit", nullable: false), - AutoHandle = table.Column(type: "bit", nullable: false), - AutoCompleteJob = table.Column(type: "bit", nullable: false), - DirectCreateNote = table.Column(type: "bit", nullable: false), - RequestStatus = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_Store_InspectRequest", x => x.Id); - }); - - migrationBuilder.CreateTable( - name: "Store_InventoryInitialNote", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - RequestNumber = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true), - ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: true), - CreationTime = table.Column(type: "datetime2", nullable: false), - CreatorId = table.Column(type: "uniqueidentifier", nullable: true), - LastModificationTime = table.Column(type: "datetime2", nullable: true), - LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), - TenantId = table.Column(type: "uniqueidentifier", nullable: true), - Remark = table.Column(type: "nvarchar(3072)", maxLength: 3072, nullable: true), - Worker = table.Column(type: "nvarchar(max)", nullable: true), - Number = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - ActiveDate = table.Column(type: "datetime2", nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_Store_InventoryInitialNote", x => x.Id); - }); - - migrationBuilder.CreateTable( - name: "Store_InventoryTransferNote", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - TransferType = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - JobNumber = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - SupplierCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true), - ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: true), - CreationTime = table.Column(type: "datetime2", nullable: false), - CreatorId = table.Column(type: "uniqueidentifier", nullable: true), - LastModificationTime = table.Column(type: "datetime2", nullable: true), - LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), - TenantId = table.Column(type: "uniqueidentifier", nullable: true), - Remark = table.Column(type: "nvarchar(3072)", maxLength: 3072, nullable: true), - Worker = table.Column(type: "nvarchar(max)", nullable: true), - Number = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - ActiveDate = table.Column(type: "datetime2", nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_Store_InventoryTransferNote", x => x.Id); - }); - - migrationBuilder.CreateTable( - name: "Store_IsolationNote", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - JobNumber = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true), - ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: true), - CreationTime = table.Column(type: "datetime2", nullable: false), - CreatorId = table.Column(type: "uniqueidentifier", nullable: true), - LastModificationTime = table.Column(type: "datetime2", nullable: true), - LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), - TenantId = table.Column(type: "uniqueidentifier", nullable: true), - Remark = table.Column(type: "nvarchar(3072)", maxLength: 3072, nullable: true), - Worker = table.Column(type: "nvarchar(max)", nullable: true), - Number = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - ActiveDate = table.Column(type: "datetime2", nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_Store_IsolationNote", x => x.Id); - }); - - migrationBuilder.CreateTable( - name: "Store_IssueNote", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - JobNumber = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - Workshop = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - RequestNumber = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - RequestType = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - UseOnTheWayLocation = table.Column(type: "bit", nullable: false), - ConfirmTime = table.Column(type: "datetime2", nullable: true), - Confirmed = table.Column(type: "bit", nullable: false), - ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true), - ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: true), - CreationTime = table.Column(type: "datetime2", nullable: false), - CreatorId = table.Column(type: "uniqueidentifier", nullable: true), - LastModificationTime = table.Column(type: "datetime2", nullable: true), - LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), - TenantId = table.Column(type: "uniqueidentifier", nullable: true), - Remark = table.Column(type: "nvarchar(3072)", maxLength: 3072, nullable: true), - Worker = table.Column(type: "nvarchar(max)", nullable: true), - Number = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - ActiveDate = table.Column(type: "datetime2", nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_Store_IssueNote", x => x.Id); - }); - - migrationBuilder.CreateTable( - name: "Store_ItemTransformNote", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - RequestNumber = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - JobNumber = table.Column(type: "nvarchar(max)", nullable: true), - ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true), - ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: true), - CreationTime = table.Column(type: "datetime2", nullable: false), - CreatorId = table.Column(type: "uniqueidentifier", nullable: true), - LastModificationTime = table.Column(type: "datetime2", nullable: true), - LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), - TenantId = table.Column(type: "uniqueidentifier", nullable: true), - Remark = table.Column(type: "nvarchar(3072)", maxLength: 3072, nullable: true), - Worker = table.Column(type: "nvarchar(max)", nullable: true), - Number = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - ActiveDate = table.Column(type: "datetime2", nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_Store_ItemTransformNote", x => x.Id); - }); - - migrationBuilder.CreateTable( - name: "Store_ItemTransformRequest", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true), - ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: true), - CreationTime = table.Column(type: "datetime2", nullable: false), - CreatorId = table.Column(type: "uniqueidentifier", nullable: true), - LastModificationTime = table.Column(type: "datetime2", nullable: true), - LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), - TenantId = table.Column(type: "uniqueidentifier", nullable: true), - Remark = table.Column(type: "nvarchar(3072)", maxLength: 3072, nullable: true), - Worker = table.Column(type: "nvarchar(max)", nullable: true), - Number = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - ActiveDate = table.Column(type: "datetime2", nullable: false), - AutoSubmit = table.Column(type: "bit", nullable: false), - AutoAgree = table.Column(type: "bit", nullable: false), - AutoHandle = table.Column(type: "bit", nullable: false), - AutoCompleteJob = table.Column(type: "bit", nullable: false), - DirectCreateNote = table.Column(type: "bit", nullable: false), - RequestStatus = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_Store_ItemTransformRequest", x => x.Id); - }); - - migrationBuilder.CreateTable( - name: "Store_JisDeliverNote", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - JobNumber = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - Customer = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - CustomerAddressCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - ProjectCode = table.Column(type: "nvarchar(max)", nullable: true), - DeliverTime = table.Column(type: "datetime2", nullable: false), - ContainerQty = table.Column(type: "decimal(18,6)", nullable: false), - ItemQty = table.Column(type: "decimal(18,6)", nullable: false), - TotalPackCapacity = table.Column(type: "nvarchar(max)", nullable: true), - ArrivalTime = table.Column(type: "datetime2", nullable: false), - ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true), - ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: true), - CreationTime = table.Column(type: "datetime2", nullable: false), - CreatorId = table.Column(type: "uniqueidentifier", nullable: true), - LastModificationTime = table.Column(type: "datetime2", nullable: true), - LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), - TenantId = table.Column(type: "uniqueidentifier", nullable: true), - Remark = table.Column(type: "nvarchar(3072)", maxLength: 3072, nullable: true), - Worker = table.Column(type: "nvarchar(max)", nullable: true), - Number = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - ActiveDate = table.Column(type: "datetime2", nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_Store_JisDeliverNote", x => x.Id); - }); - - migrationBuilder.CreateTable( - name: "Store_JisProductReceiptNote", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - ReceiptType = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - SourceNumber = table.Column(type: "nvarchar(max)", nullable: true), - JobNumber = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ProductionPlanNumber = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - LocationCode = table.Column(type: "nvarchar(max)", nullable: true), - RawLocationCode = table.Column(type: "nvarchar(max)", nullable: true), - ProdLine = table.Column(type: "nvarchar(max)", nullable: true), - WorkShop = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - Shift = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - CompleteTime = table.Column(type: "datetime2", nullable: false), - ContainerQty = table.Column(type: "decimal(18,6)", nullable: false), - ItemQty = table.Column(type: "decimal(18,6)", nullable: false), - WarehouseCode = table.Column(type: "nvarchar(max)", nullable: true), - ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true), - ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: true), - CreationTime = table.Column(type: "datetime2", nullable: false), - CreatorId = table.Column(type: "uniqueidentifier", nullable: true), - LastModificationTime = table.Column(type: "datetime2", nullable: true), - LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), - TenantId = table.Column(type: "uniqueidentifier", nullable: true), - Remark = table.Column(type: "nvarchar(3072)", maxLength: 3072, nullable: true), - Worker = table.Column(type: "nvarchar(max)", nullable: true), - Number = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - ActiveDate = table.Column(type: "datetime2", nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_Store_JisProductReceiptNote", x => x.Id); - }); - - migrationBuilder.CreateTable( - name: "Store_MaterialRequest", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - Type = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - PreparationPlanNumber = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ProdLine = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - Workshop = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - UseOnTheWayLocation = table.Column(type: "bit", nullable: false), - ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true), - ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: true), - CreationTime = table.Column(type: "datetime2", nullable: false), - CreatorId = table.Column(type: "uniqueidentifier", nullable: true), - LastModificationTime = table.Column(type: "datetime2", nullable: true), - LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), - TenantId = table.Column(type: "uniqueidentifier", nullable: true), - Remark = table.Column(type: "nvarchar(3072)", maxLength: 3072, nullable: true), - Worker = table.Column(type: "nvarchar(max)", nullable: true), - Number = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - ActiveDate = table.Column(type: "datetime2", nullable: false), - AutoSubmit = table.Column(type: "bit", nullable: false), - AutoAgree = table.Column(type: "bit", nullable: false), - AutoHandle = table.Column(type: "bit", nullable: false), - AutoCompleteJob = table.Column(type: "bit", nullable: false), - DirectCreateNote = table.Column(type: "bit", nullable: false), - RequestStatus = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_Store_MaterialRequest", x => x.Id); - }); - - migrationBuilder.CreateTable( - name: "Store_NoOkConvertOkNote", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true), - ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: true), - CreationTime = table.Column(type: "datetime2", nullable: false), - CreatorId = table.Column(type: "uniqueidentifier", nullable: true), - LastModificationTime = table.Column(type: "datetime2", nullable: true), - LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), - TenantId = table.Column(type: "uniqueidentifier", nullable: true), - Remark = table.Column(type: "nvarchar(3072)", maxLength: 3072, nullable: true), - Worker = table.Column(type: "nvarchar(max)", nullable: true), - Number = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - ActiveDate = table.Column(type: "datetime2", nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_Store_NoOkConvertOkNote", x => x.Id); - }); - - migrationBuilder.CreateTable( - name: "Store_OfflineSettlementNote", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - JobNumber = table.Column(type: "nvarchar(max)", nullable: true), - ProductReceiptNumber = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true), - ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: true), - CreationTime = table.Column(type: "datetime2", nullable: false), - CreatorId = table.Column(type: "uniqueidentifier", nullable: true), - LastModificationTime = table.Column(type: "datetime2", nullable: true), - LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), - TenantId = table.Column(type: "uniqueidentifier", nullable: true), - Remark = table.Column(type: "nvarchar(3072)", maxLength: 3072, nullable: true), - Worker = table.Column(type: "nvarchar(max)", nullable: true), - Number = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - ActiveDate = table.Column(type: "datetime2", nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_Store_OfflineSettlementNote", x => x.Id); - }); - - migrationBuilder.CreateTable( - name: "Store_PreparationPlan", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - ProductionPlanNumber = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - Workshop = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ProdLine = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - Shift = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - Team = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - PlanDate = table.Column(type: "datetime2", nullable: false), - PlanTime = table.Column(type: "datetime2", nullable: false), - Status = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true), - ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: true), - CreationTime = table.Column(type: "datetime2", nullable: false), - CreatorId = table.Column(type: "uniqueidentifier", nullable: true), - LastModificationTime = table.Column(type: "datetime2", nullable: true), - LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), - TenantId = table.Column(type: "uniqueidentifier", nullable: true), - Remark = table.Column(type: "nvarchar(3072)", maxLength: 3072, nullable: true), - Worker = table.Column(type: "nvarchar(max)", nullable: true), - Number = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - ActiveDate = table.Column(type: "datetime2", nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_Store_PreparationPlan", x => x.Id); - }); - - migrationBuilder.CreateTable( - name: "Store_ProductionPlan", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - Workshop = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - ProdLine = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - Shift = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - Team = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - PlanDate = table.Column(type: "datetime2", nullable: false), - PlanTime = table.Column(type: "datetime2", nullable: false), - ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true), - ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: true), - CreationTime = table.Column(type: "datetime2", nullable: false), - CreatorId = table.Column(type: "uniqueidentifier", nullable: true), - LastModificationTime = table.Column(type: "datetime2", nullable: true), - LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), - TenantId = table.Column(type: "uniqueidentifier", nullable: true), - Remark = table.Column(type: "nvarchar(3072)", maxLength: 3072, nullable: true), - Worker = table.Column(type: "nvarchar(max)", nullable: true), - Number = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - ActiveDate = table.Column(type: "datetime2", nullable: false), - AutoSubmit = table.Column(type: "bit", nullable: false), - AutoAgree = table.Column(type: "bit", nullable: false), - AutoHandle = table.Column(type: "bit", nullable: false), - AutoCompleteJob = table.Column(type: "bit", nullable: false), - DirectCreateNote = table.Column(type: "bit", nullable: false), - RequestStatus = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_Store_ProductionPlan", x => x.Id); - }); - - migrationBuilder.CreateTable( - name: "Store_ProductionReturnNote", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - JobNumber = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ProductionReturnRequestNumber = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ReturnTime = table.Column(type: "datetime2", nullable: false), - ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true), - ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: true), - CreationTime = table.Column(type: "datetime2", nullable: false), - CreatorId = table.Column(type: "uniqueidentifier", nullable: true), - LastModificationTime = table.Column(type: "datetime2", nullable: true), - LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), - TenantId = table.Column(type: "uniqueidentifier", nullable: true), - Remark = table.Column(type: "nvarchar(3072)", maxLength: 3072, nullable: true), - Worker = table.Column(type: "nvarchar(max)", nullable: true), - Number = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - ActiveDate = table.Column(type: "datetime2", nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_Store_ProductionReturnNote", x => x.Id); - }); - - migrationBuilder.CreateTable( - name: "Store_ProductionReturnRequest", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true), - ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: true), - CreationTime = table.Column(type: "datetime2", nullable: false), - CreatorId = table.Column(type: "uniqueidentifier", nullable: true), - LastModificationTime = table.Column(type: "datetime2", nullable: true), - LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), - TenantId = table.Column(type: "uniqueidentifier", nullable: true), - Remark = table.Column(type: "nvarchar(3072)", maxLength: 3072, nullable: true), - Worker = table.Column(type: "nvarchar(max)", nullable: true), - Number = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - ActiveDate = table.Column(type: "datetime2", nullable: false), - AutoSubmit = table.Column(type: "bit", nullable: false), - AutoAgree = table.Column(type: "bit", nullable: false), - AutoHandle = table.Column(type: "bit", nullable: false), - AutoCompleteJob = table.Column(type: "bit", nullable: false), - DirectCreateNote = table.Column(type: "bit", nullable: false), - RequestStatus = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_Store_ProductionReturnRequest", x => x.Id); - }); - - migrationBuilder.CreateTable( - name: "Store_ProductL7PartsNote", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - Year = table.Column(type: "nvarchar(max)", nullable: true), - ProductNo = table.Column(type: "nvarchar(max)", nullable: true), - Program = table.Column(type: "nvarchar(max)", nullable: true), - Position = table.Column(type: "nvarchar(max)", nullable: true), - FATA = table.Column(type: "nvarchar(max)", nullable: true), - Configuration = table.Column(type: "nvarchar(max)", nullable: true), - ContainerCode = table.Column(type: "nvarchar(max)", nullable: true), - State = table.Column(type: "int", nullable: false), - CreateDate = table.Column(type: "datetime2", nullable: false), - Status = table.Column(type: "int", nullable: false), - ReceiptNumber = table.Column(type: "nvarchar(max)", nullable: true), - ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true), - ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: true), - CreationTime = table.Column(type: "datetime2", nullable: false), - CreatorId = table.Column(type: "uniqueidentifier", nullable: true), - LastModificationTime = table.Column(type: "datetime2", nullable: true), - LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), - TenantId = table.Column(type: "uniqueidentifier", nullable: true), - Remark = table.Column(type: "nvarchar(3072)", maxLength: 3072, nullable: true), - Worker = table.Column(type: "nvarchar(max)", nullable: true), - Number = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - ActiveDate = table.Column(type: "datetime2", nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_Store_ProductL7PartsNote", x => x.Id); - }); - - migrationBuilder.CreateTable( - name: "Store_ProductReceiptNote", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - ReceiptType = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - SourceNumber = table.Column(type: "nvarchar(max)", nullable: true), - JobNumber = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ProductionPlanNumber = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ProductReceiptRequestNumber = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - WorkShop = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - Shift = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - CompleteTime = table.Column(type: "datetime2", nullable: false), - Type = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - WarehouseCode = table.Column(type: "nvarchar(max)", nullable: true), - ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true), - ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: true), - CreationTime = table.Column(type: "datetime2", nullable: false), - CreatorId = table.Column(type: "uniqueidentifier", nullable: true), - LastModificationTime = table.Column(type: "datetime2", nullable: true), - LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), - TenantId = table.Column(type: "uniqueidentifier", nullable: true), - Remark = table.Column(type: "nvarchar(3072)", maxLength: 3072, nullable: true), - Worker = table.Column(type: "nvarchar(max)", nullable: true), - Number = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - ActiveDate = table.Column(type: "datetime2", nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_Store_ProductReceiptNote", x => x.Id); - }); - - migrationBuilder.CreateTable( - name: "Store_ProductReceiptRequest", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - ProductionPlanNumber = table.Column(type: "nvarchar(max)", nullable: true), - Workshop = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ProdLine = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - Shift = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - Team = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - PlanDate = table.Column(type: "datetime2", nullable: false), - Type = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true), - ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: true), - CreationTime = table.Column(type: "datetime2", nullable: false), - CreatorId = table.Column(type: "uniqueidentifier", nullable: true), - LastModificationTime = table.Column(type: "datetime2", nullable: true), - LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), - TenantId = table.Column(type: "uniqueidentifier", nullable: true), - Remark = table.Column(type: "nvarchar(3072)", maxLength: 3072, nullable: true), - Worker = table.Column(type: "nvarchar(max)", nullable: true), - Number = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - ActiveDate = table.Column(type: "datetime2", nullable: false), - AutoSubmit = table.Column(type: "bit", nullable: false), - AutoAgree = table.Column(type: "bit", nullable: false), - AutoHandle = table.Column(type: "bit", nullable: false), - AutoCompleteJob = table.Column(type: "bit", nullable: false), - DirectCreateNote = table.Column(type: "bit", nullable: false), - RequestStatus = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_Store_ProductReceiptRequest", x => x.Id); - }); - - migrationBuilder.CreateTable( - name: "Store_ProductRecycleNote", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - RequestNumber = table.Column(type: "nvarchar(max)", nullable: true), - RecycleTime = table.Column(type: "datetime2", nullable: false), - Workshop = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - Shift = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true), - ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: true), - CreationTime = table.Column(type: "datetime2", nullable: false), - CreatorId = table.Column(type: "uniqueidentifier", nullable: true), - LastModificationTime = table.Column(type: "datetime2", nullable: true), - LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), - TenantId = table.Column(type: "uniqueidentifier", nullable: true), - Remark = table.Column(type: "nvarchar(3072)", maxLength: 3072, nullable: true), - Worker = table.Column(type: "nvarchar(max)", nullable: true), - Number = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - ActiveDate = table.Column(type: "datetime2", nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_Store_ProductRecycleNote", x => x.Id); - }); - - migrationBuilder.CreateTable( - name: "Store_ProductRecycleRequest", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - Workshop = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - Shift = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true), - ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: true), - CreationTime = table.Column(type: "datetime2", nullable: false), - CreatorId = table.Column(type: "uniqueidentifier", nullable: true), - LastModificationTime = table.Column(type: "datetime2", nullable: true), - LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), - TenantId = table.Column(type: "uniqueidentifier", nullable: true), - Remark = table.Column(type: "nvarchar(3072)", maxLength: 3072, nullable: true), - Worker = table.Column(type: "nvarchar(max)", nullable: true), - Number = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - ActiveDate = table.Column(type: "datetime2", nullable: false), - AutoSubmit = table.Column(type: "bit", nullable: false), - AutoAgree = table.Column(type: "bit", nullable: false), - AutoHandle = table.Column(type: "bit", nullable: false), - AutoCompleteJob = table.Column(type: "bit", nullable: false), - DirectCreateNote = table.Column(type: "bit", nullable: false), - RequestStatus = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_Store_ProductRecycleRequest", x => x.Id); - }); - - migrationBuilder.CreateTable( - name: "Store_PurchaseOrder", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - SupplierCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - SupplierName = table.Column(type: "nvarchar(max)", nullable: true), - SupplierAddress = table.Column(type: "nvarchar(max)", nullable: true), - PoType = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - OrderStatus = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - IsConsignment = table.Column(type: "bit", nullable: false, defaultValue: false), - OrderDate = table.Column(type: "datetime2", nullable: false), - DueDate = table.Column(type: "datetime2", nullable: false), - Version = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - TaxRate = table.Column(type: "decimal(18,6)", nullable: false, defaultValue: 0m), - ContactName = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ContactPhone = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ContactEmail = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true), - ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: true), - CreationTime = table.Column(type: "datetime2", nullable: false), - CreatorId = table.Column(type: "uniqueidentifier", nullable: true), - LastModificationTime = table.Column(type: "datetime2", nullable: true), - LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), - TenantId = table.Column(type: "uniqueidentifier", nullable: true), - Remark = table.Column(type: "nvarchar(3072)", maxLength: 3072, nullable: true), - Worker = table.Column(type: "nvarchar(max)", nullable: true), - Number = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - ActiveDate = table.Column(type: "datetime2", nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_Store_PurchaseOrder", x => x.Id); - }); - - migrationBuilder.CreateTable( - name: "Store_PurchaseReceiptNote", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - PurchaseReceiptRequestNumber = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - AsnNumber = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - RpNumber = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - PoNumber = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - SupplierCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - SupplierName = table.Column(type: "nvarchar(max)", nullable: true), - SupplierAddress = table.Column(type: "nvarchar(max)", nullable: true), - ReceiveTime = table.Column(type: "datetime2", nullable: false), - JobNumber = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - WarehouseCode = table.Column(type: "nvarchar(max)", nullable: true), - Type = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - Status = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true), - ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: true), - CreationTime = table.Column(type: "datetime2", nullable: false), - CreatorId = table.Column(type: "uniqueidentifier", nullable: true), - LastModificationTime = table.Column(type: "datetime2", nullable: true), - LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), - TenantId = table.Column(type: "uniqueidentifier", nullable: true), - Remark = table.Column(type: "nvarchar(3072)", maxLength: 3072, nullable: true), - Worker = table.Column(type: "nvarchar(max)", nullable: true), - Number = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - ActiveDate = table.Column(type: "datetime2", nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_Store_PurchaseReceiptNote", x => x.Id); - }); - - migrationBuilder.CreateTable( - name: "Store_PurchaseReceiptRequest", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - AsnNumber = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - RpNumber = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - PoNumber = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - SupplierCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - SupplierName = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - SupplierAddress = table.Column(type: "nvarchar(max)", nullable: true), - TruckNumber = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - DockCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - TimeWindow = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - PlanArriveDate = table.Column(type: "datetime2", nullable: false), - ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true), - ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: true), - CreationTime = table.Column(type: "datetime2", nullable: false), - CreatorId = table.Column(type: "uniqueidentifier", nullable: true), - LastModificationTime = table.Column(type: "datetime2", nullable: true), - LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), - TenantId = table.Column(type: "uniqueidentifier", nullable: true), - Remark = table.Column(type: "nvarchar(3072)", maxLength: 3072, nullable: true), - Worker = table.Column(type: "nvarchar(max)", nullable: true), - Number = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - ActiveDate = table.Column(type: "datetime2", nullable: false), - AutoSubmit = table.Column(type: "bit", nullable: false), - AutoAgree = table.Column(type: "bit", nullable: false), - AutoHandle = table.Column(type: "bit", nullable: false), - AutoCompleteJob = table.Column(type: "bit", nullable: false), - DirectCreateNote = table.Column(type: "bit", nullable: false), - RequestStatus = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_Store_PurchaseReceiptRequest", x => x.Id); - }); - - migrationBuilder.CreateTable( - name: "Store_PurchaseReturnNote", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - JobNumber = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - RpNumber = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - AsnNumber = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - PoNumber = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - PurchaseReturnRequestNumber = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - SupplierCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ReturnReason = table.Column(type: "nvarchar(max)", nullable: true), - ReturnTime = table.Column(type: "datetime2", nullable: false), - ReturnType = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - Status = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true), - ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: true), - CreationTime = table.Column(type: "datetime2", nullable: false), - CreatorId = table.Column(type: "uniqueidentifier", nullable: true), - LastModificationTime = table.Column(type: "datetime2", nullable: true), - LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), - TenantId = table.Column(type: "uniqueidentifier", nullable: true), - Remark = table.Column(type: "nvarchar(3072)", maxLength: 3072, nullable: true), - Worker = table.Column(type: "nvarchar(max)", nullable: true), - Number = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - ActiveDate = table.Column(type: "datetime2", nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_Store_PurchaseReturnNote", x => x.Id); - }); - - migrationBuilder.CreateTable( - name: "Store_PurchaseReturnRequest", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - RpNumber = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - AsnNumber = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - PoNumber = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - SupplierCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ReturnTime = table.Column(type: "datetime2", nullable: false), - ReturnType = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true), - ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: true), - CreationTime = table.Column(type: "datetime2", nullable: false), - CreatorId = table.Column(type: "uniqueidentifier", nullable: true), - LastModificationTime = table.Column(type: "datetime2", nullable: true), - LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), - TenantId = table.Column(type: "uniqueidentifier", nullable: true), - Remark = table.Column(type: "nvarchar(3072)", maxLength: 3072, nullable: true), - Worker = table.Column(type: "nvarchar(max)", nullable: true), - Number = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - ActiveDate = table.Column(type: "datetime2", nullable: false), - AutoSubmit = table.Column(type: "bit", nullable: false), - AutoAgree = table.Column(type: "bit", nullable: false), - AutoHandle = table.Column(type: "bit", nullable: false), - AutoCompleteJob = table.Column(type: "bit", nullable: false), - DirectCreateNote = table.Column(type: "bit", nullable: false), - RequestStatus = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_Store_PurchaseReturnRequest", x => x.Id); - }); - - migrationBuilder.CreateTable( - name: "Store_PutawayNote", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - JobNumber = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - SupplierCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - InspectNumber = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ReceiptNumber = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - PurchaseReceiptRequestNumber = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - AsnNumber = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - RpNumber = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ProductReceiptNumber = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - Type = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true), - ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: true), - CreationTime = table.Column(type: "datetime2", nullable: false), - CreatorId = table.Column(type: "uniqueidentifier", nullable: true), - LastModificationTime = table.Column(type: "datetime2", nullable: true), - LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), - TenantId = table.Column(type: "uniqueidentifier", nullable: true), - Remark = table.Column(type: "nvarchar(3072)", maxLength: 3072, nullable: true), - Worker = table.Column(type: "nvarchar(max)", nullable: true), - Number = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - ActiveDate = table.Column(type: "datetime2", nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_Store_PutawayNote", x => x.Id); - }); - - migrationBuilder.CreateTable( - name: "Store_PutawayRequest", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - PutawayMode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - SupplierCode = table.Column(type: "nvarchar(max)", nullable: true), - InspectNumber = table.Column(type: "nvarchar(max)", nullable: true), - ReceiptNumber = table.Column(type: "nvarchar(max)", nullable: true), - PurchaseReceiptRequestNumber = table.Column(type: "nvarchar(max)", nullable: true), - AsnNumber = table.Column(type: "nvarchar(max)", nullable: true), - RpNumber = table.Column(type: "nvarchar(max)", nullable: true), - PoNumber = table.Column(type: "nvarchar(max)", nullable: true), - ProductReceiptNumber = table.Column(type: "nvarchar(max)", nullable: true), - Type = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - RequestNumber = table.Column(type: "nvarchar(max)", nullable: true), - ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true), - ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: true), - CreationTime = table.Column(type: "datetime2", nullable: false), - CreatorId = table.Column(type: "uniqueidentifier", nullable: true), - LastModificationTime = table.Column(type: "datetime2", nullable: true), - LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), - TenantId = table.Column(type: "uniqueidentifier", nullable: true), - Remark = table.Column(type: "nvarchar(3072)", maxLength: 3072, nullable: true), - Worker = table.Column(type: "nvarchar(max)", nullable: true), - Number = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - ActiveDate = table.Column(type: "datetime2", nullable: false), - AutoSubmit = table.Column(type: "bit", nullable: false), - AutoAgree = table.Column(type: "bit", nullable: false), - AutoHandle = table.Column(type: "bit", nullable: false), - AutoCompleteJob = table.Column(type: "bit", nullable: false), - DirectCreateNote = table.Column(type: "bit", nullable: false), - RequestStatus = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_Store_PutawayRequest", x => x.Id); - }); - - migrationBuilder.CreateTable( - name: "Store_ReceiptAbnormalNote", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - ReceiptNumber = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - AsnNumber = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - SupplierCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true), - ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: true), - CreationTime = table.Column(type: "datetime2", nullable: false), - CreatorId = table.Column(type: "uniqueidentifier", nullable: true), - LastModificationTime = table.Column(type: "datetime2", nullable: true), - LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), - TenantId = table.Column(type: "uniqueidentifier", nullable: true), - Remark = table.Column(type: "nvarchar(3072)", maxLength: 3072, nullable: true), - Worker = table.Column(type: "nvarchar(max)", nullable: true), - Number = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - ActiveDate = table.Column(type: "datetime2", nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_Store_ReceiptAbnormalNote", x => x.Id); - }); - - migrationBuilder.CreateTable( - name: "Store_RecycledMaterialReceiptNote", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true), - ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: true), - CreationTime = table.Column(type: "datetime2", nullable: false), - CreatorId = table.Column(type: "uniqueidentifier", nullable: true), - LastModificationTime = table.Column(type: "datetime2", nullable: true), - LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), - TenantId = table.Column(type: "uniqueidentifier", nullable: true), - Remark = table.Column(type: "nvarchar(3072)", maxLength: 3072, nullable: true), - Worker = table.Column(type: "nvarchar(max)", nullable: true), - Number = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - ActiveDate = table.Column(type: "datetime2", nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_Store_RecycledMaterialReceiptNote", x => x.Id); - }); - - migrationBuilder.CreateTable( - name: "Store_SaleOrder", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - CustomerCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - SoType = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - SoStatus = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - OrderDate = table.Column(type: "datetime2", nullable: false), - DueDate = table.Column(type: "datetime2", nullable: false), - Version = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - TaxRate = table.Column(type: "decimal(18,6)", nullable: false, defaultValue: 0m), - ContactName = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ContactPhone = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ContactEmail = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true), - ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: true), - CreationTime = table.Column(type: "datetime2", nullable: false), - CreatorId = table.Column(type: "uniqueidentifier", nullable: true), - LastModificationTime = table.Column(type: "datetime2", nullable: true), - LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), - TenantId = table.Column(type: "uniqueidentifier", nullable: true), - Remark = table.Column(type: "nvarchar(3072)", maxLength: 3072, nullable: true), - Worker = table.Column(type: "nvarchar(max)", nullable: true), - Number = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - ActiveDate = table.Column(type: "datetime2", nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_Store_SaleOrder", x => x.Id); - }); - - migrationBuilder.CreateTable( - name: "Store_ScrapNote", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - JobNumber = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ScrapRequestNumber = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - Type = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true), - ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: true), - CreationTime = table.Column(type: "datetime2", nullable: false), - CreatorId = table.Column(type: "uniqueidentifier", nullable: true), - LastModificationTime = table.Column(type: "datetime2", nullable: true), - LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), - TenantId = table.Column(type: "uniqueidentifier", nullable: true), - Remark = table.Column(type: "nvarchar(3072)", maxLength: 3072, nullable: true), - Worker = table.Column(type: "nvarchar(max)", nullable: true), - Number = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - ActiveDate = table.Column(type: "datetime2", nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_Store_ScrapNote", x => x.Id); - }); - - migrationBuilder.CreateTable( - name: "Store_ScrapRequest", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - Type = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true), - ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: true), - CreationTime = table.Column(type: "datetime2", nullable: false), - CreatorId = table.Column(type: "uniqueidentifier", nullable: true), - LastModificationTime = table.Column(type: "datetime2", nullable: true), - LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), - TenantId = table.Column(type: "uniqueidentifier", nullable: true), - Remark = table.Column(type: "nvarchar(3072)", maxLength: 3072, nullable: true), - Worker = table.Column(type: "nvarchar(max)", nullable: true), - Number = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - ActiveDate = table.Column(type: "datetime2", nullable: false), - AutoSubmit = table.Column(type: "bit", nullable: false), - AutoAgree = table.Column(type: "bit", nullable: false), - AutoHandle = table.Column(type: "bit", nullable: false), - AutoCompleteJob = table.Column(type: "bit", nullable: false), - DirectCreateNote = table.Column(type: "bit", nullable: false), - RequestStatus = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_Store_ScrapRequest", x => x.Id); - }); - - migrationBuilder.CreateTable( - name: "Store_SplitPackingRec", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - OprType = table.Column(type: "int", nullable: false), - FromPackingCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - FromTopPackingCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - FromStdPackQty = table.Column(type: "decimal(18,6)", nullable: false), - FromUom = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - FromQty = table.Column(type: "decimal(18,6)", precision: 18, scale: 6, nullable: false), - ToPackingCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - ToTopPackingCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - ToStdPackQty = table.Column(type: "decimal(18,6)", nullable: false), - ToUom = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - ToQty = table.Column(type: "decimal(18,6)", precision: 18, scale: 6, nullable: false), - ItemCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - ItemName = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ItemDesc1 = table.Column(type: "nvarchar(1024)", maxLength: 1024, nullable: true), - ItemDesc2 = table.Column(type: "nvarchar(1024)", maxLength: 1024, nullable: true), - FromLot = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ToLot = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - PurchaseInfo_PoNumber = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - PurchaseInfo_AsnNumber = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ArrivalNoticNumber = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - TaskOrderNumber = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ReceiptRecNumber = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - PutOnShelfNumber = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - LabelType = table.Column(type: "int", nullable: false), - ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true), - ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: true), - CreationTime = table.Column(type: "datetime2", nullable: false), - CreatorId = table.Column(type: "uniqueidentifier", nullable: true), - LastModificationTime = table.Column(type: "datetime2", nullable: true), - LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), - TenantId = table.Column(type: "uniqueidentifier", nullable: true), - Remark = table.Column(type: "nvarchar(max)", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_Store_SplitPackingRec", x => x.Id); - }); - - migrationBuilder.CreateTable( - name: "Store_SupplierAsn", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - RpNumber = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - PoNumber = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - SupplierCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - SupplierName = table.Column(type: "nvarchar(max)", nullable: true), - SupplierAddress = table.Column(type: "nvarchar(max)", nullable: true), - Status = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - ContactName = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ContactPhone = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ContactEmail = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - TruckNumber = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - DockCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - ShipDate = table.Column(type: "datetime2", nullable: false), - DueDate = table.Column(type: "datetime2", nullable: false), - TimeWindow = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - PlanArriveDate = table.Column(type: "datetime2", nullable: false), - Ctype = table.Column(type: "nvarchar(max)", nullable: true), - PlanUserCode = table.Column(type: "nvarchar(max)", nullable: true), - CreateType = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true), - ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: true), - CreationTime = table.Column(type: "datetime2", nullable: false), - CreatorId = table.Column(type: "uniqueidentifier", nullable: true), - LastModificationTime = table.Column(type: "datetime2", nullable: true), - LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), - TenantId = table.Column(type: "uniqueidentifier", nullable: true), - Remark = table.Column(type: "nvarchar(3072)", maxLength: 3072, nullable: true), - Worker = table.Column(type: "nvarchar(max)", nullable: true), - Number = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - ActiveDate = table.Column(type: "datetime2", nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_Store_SupplierAsn", x => x.Id); - }); - - migrationBuilder.CreateTable( - name: "Store_TransferNote", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - RequestNumber = table.Column(type: "nvarchar(max)", nullable: true), - JobNumber = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - Type = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - UseOnTheWayLocation = table.Column(type: "bit", nullable: false), - ConfirmTime = table.Column(type: "datetime2", nullable: true), - Confirmed = table.Column(type: "bit", nullable: false), - ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true), - ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: true), - CreationTime = table.Column(type: "datetime2", nullable: false), - CreatorId = table.Column(type: "uniqueidentifier", nullable: true), - LastModificationTime = table.Column(type: "datetime2", nullable: true), - LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), - TenantId = table.Column(type: "uniqueidentifier", nullable: true), - Remark = table.Column(type: "nvarchar(3072)", maxLength: 3072, nullable: true), - Worker = table.Column(type: "nvarchar(max)", nullable: true), - Number = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - ActiveDate = table.Column(type: "datetime2", nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_Store_TransferNote", x => x.Id); - }); - - migrationBuilder.CreateTable( - name: "Store_TransferRequest", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - Type = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - UseOnTheWayLocation = table.Column(type: "bit", nullable: false), - ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true), - ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: true), - CreationTime = table.Column(type: "datetime2", nullable: false), - CreatorId = table.Column(type: "uniqueidentifier", nullable: true), - LastModificationTime = table.Column(type: "datetime2", nullable: true), - LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), - TenantId = table.Column(type: "uniqueidentifier", nullable: true), - Remark = table.Column(type: "nvarchar(3072)", maxLength: 3072, nullable: true), - Worker = table.Column(type: "nvarchar(max)", nullable: true), - Number = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - ActiveDate = table.Column(type: "datetime2", nullable: false), - AutoSubmit = table.Column(type: "bit", nullable: false), - AutoAgree = table.Column(type: "bit", nullable: false), - AutoHandle = table.Column(type: "bit", nullable: false), - AutoCompleteJob = table.Column(type: "bit", nullable: false), - DirectCreateNote = table.Column(type: "bit", nullable: false), - RequestStatus = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_Store_TransferRequest", x => x.Id); - }); - - migrationBuilder.CreateTable( - name: "Store_UnplannedIssueNote", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - DeptCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - DeptName = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - BuildDate = table.Column(type: "datetime2", nullable: false), - UnplannedIssueRequestNumber = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - JobNumber = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - UnplannedIssueType = table.Column(type: "int", nullable: false), - OANumber = table.Column(type: "nvarchar(max)", nullable: true), - ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true), - ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: true), - CreationTime = table.Column(type: "datetime2", nullable: false), - CreatorId = table.Column(type: "uniqueidentifier", nullable: true), - LastModificationTime = table.Column(type: "datetime2", nullable: true), - LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), - TenantId = table.Column(type: "uniqueidentifier", nullable: true), - Remark = table.Column(type: "nvarchar(3072)", maxLength: 3072, nullable: true), - Worker = table.Column(type: "nvarchar(max)", nullable: true), - Number = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - ActiveDate = table.Column(type: "datetime2", nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_Store_UnplannedIssueNote", x => x.Id); - }); - - migrationBuilder.CreateTable( - name: "Store_UnplannedIssueRequest", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - DeptCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - DeptName = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - BuildDate = table.Column(type: "datetime2", nullable: false), - UnplannedIssueType = table.Column(type: "int", nullable: false), - OANumber = table.Column(type: "nvarchar(max)", nullable: true), - ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true), - ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: true), - CreationTime = table.Column(type: "datetime2", nullable: false), - CreatorId = table.Column(type: "uniqueidentifier", nullable: true), - LastModificationTime = table.Column(type: "datetime2", nullable: true), - LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), - TenantId = table.Column(type: "uniqueidentifier", nullable: true), - Remark = table.Column(type: "nvarchar(3072)", maxLength: 3072, nullable: true), - Worker = table.Column(type: "nvarchar(max)", nullable: true), - Number = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - ActiveDate = table.Column(type: "datetime2", nullable: false), - AutoSubmit = table.Column(type: "bit", nullable: false), - AutoAgree = table.Column(type: "bit", nullable: false), - AutoHandle = table.Column(type: "bit", nullable: false), - AutoCompleteJob = table.Column(type: "bit", nullable: false), - DirectCreateNote = table.Column(type: "bit", nullable: false), - RequestStatus = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_Store_UnplannedIssueRequest", x => x.Id); - }); - - migrationBuilder.CreateTable( - name: "Store_UnplannedReceiptNote", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - DeptCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - DeptName = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - BuildDate = table.Column(type: "datetime2", nullable: false), - UnplannedReceiptRequestNumber = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - JobNumber = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - UnplannedReceiptType = table.Column(type: "int", nullable: false), - OANumber = table.Column(type: "nvarchar(max)", nullable: true), - ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true), - ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: true), - CreationTime = table.Column(type: "datetime2", nullable: false), - CreatorId = table.Column(type: "uniqueidentifier", nullable: true), - LastModificationTime = table.Column(type: "datetime2", nullable: true), - LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), - TenantId = table.Column(type: "uniqueidentifier", nullable: true), - Remark = table.Column(type: "nvarchar(3072)", maxLength: 3072, nullable: true), - Worker = table.Column(type: "nvarchar(max)", nullable: true), - Number = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - ActiveDate = table.Column(type: "datetime2", nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_Store_UnplannedReceiptNote", x => x.Id); - }); - - migrationBuilder.CreateTable( - name: "Store_UnplannedReceiptRequest", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - DeptCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - DeptName = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - BuildDate = table.Column(type: "datetime2", nullable: false), - UnplannedReceiptType = table.Column(type: "int", nullable: false), - OANumber = table.Column(type: "nvarchar(max)", nullable: true), - ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true), - ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: true), - CreationTime = table.Column(type: "datetime2", nullable: false), - CreatorId = table.Column(type: "uniqueidentifier", nullable: true), - LastModificationTime = table.Column(type: "datetime2", nullable: true), - LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), - TenantId = table.Column(type: "uniqueidentifier", nullable: true), - Remark = table.Column(type: "nvarchar(3072)", maxLength: 3072, nullable: true), - Worker = table.Column(type: "nvarchar(max)", nullable: true), - Number = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - ActiveDate = table.Column(type: "datetime2", nullable: false), - AutoSubmit = table.Column(type: "bit", nullable: false), - AutoAgree = table.Column(type: "bit", nullable: false), - AutoHandle = table.Column(type: "bit", nullable: false), - AutoCompleteJob = table.Column(type: "bit", nullable: false), - DirectCreateNote = table.Column(type: "bit", nullable: false), - RequestStatus = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_Store_UnplannedReceiptRequest", x => x.Id); - }); - - migrationBuilder.CreateTable( - name: "Store_WarehouseTransferNote", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - JobNumber = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - SupplierCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true), - ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: true), - CreationTime = table.Column(type: "datetime2", nullable: false), - CreatorId = table.Column(type: "uniqueidentifier", nullable: true), - LastModificationTime = table.Column(type: "datetime2", nullable: true), - LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), - TenantId = table.Column(type: "uniqueidentifier", nullable: true), - Remark = table.Column(type: "nvarchar(3072)", maxLength: 3072, nullable: true), - Worker = table.Column(type: "nvarchar(max)", nullable: true), - Number = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - ActiveDate = table.Column(type: "datetime2", nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_Store_WarehouseTransferNote", x => x.Id); - }); - - migrationBuilder.CreateTable( - name: "Store_WipWarehouseAdjustNote", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - Type = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - RequestNumber = table.Column(type: "nvarchar(max)", nullable: true), - JobNumber = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - Confirmed = table.Column(type: "bit", nullable: false), - ConfirmTime = table.Column(type: "datetime2", nullable: true), - ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true), - ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: true), - CreationTime = table.Column(type: "datetime2", nullable: false), - CreatorId = table.Column(type: "uniqueidentifier", nullable: true), - LastModificationTime = table.Column(type: "datetime2", nullable: true), - LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), - TenantId = table.Column(type: "uniqueidentifier", nullable: true), - Remark = table.Column(type: "nvarchar(3072)", maxLength: 3072, nullable: true), - Worker = table.Column(type: "nvarchar(max)", nullable: true), - Number = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - ActiveDate = table.Column(type: "datetime2", nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_Store_WipWarehouseAdjustNote", x => x.Id); - }); - - migrationBuilder.CreateTable( - name: "Store_WipWarehouseAdjustRequest", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - Type = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true), - ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: true), - CreationTime = table.Column(type: "datetime2", nullable: false), - CreatorId = table.Column(type: "uniqueidentifier", nullable: true), - LastModificationTime = table.Column(type: "datetime2", nullable: true), - LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), - TenantId = table.Column(type: "uniqueidentifier", nullable: true), - Remark = table.Column(type: "nvarchar(3072)", maxLength: 3072, nullable: true), - Worker = table.Column(type: "nvarchar(max)", nullable: true), - Number = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - ActiveDate = table.Column(type: "datetime2", nullable: false), - AutoSubmit = table.Column(type: "bit", nullable: false), - AutoAgree = table.Column(type: "bit", nullable: false), - AutoHandle = table.Column(type: "bit", nullable: false), - AutoCompleteJob = table.Column(type: "bit", nullable: false), - DirectCreateNote = table.Column(type: "bit", nullable: false), - RequestStatus = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_Store_WipWarehouseAdjustRequest", x => x.Id); - }); - - migrationBuilder.CreateTable( - name: "Store_WorkOrder", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - WorkOrderId = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - EffectiveDate = table.Column(type: "datetime2", nullable: false), - WorkStation = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - WoStatus = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - Op = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - LocationCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - Uom = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - Qty = table.Column(type: "decimal(18,6)", precision: 18, scale: 6, nullable: false), - ItemName = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ItemDesc1 = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ItemDesc2 = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ItemCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - Type = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true), - ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: true), - CreationTime = table.Column(type: "datetime2", nullable: false), - CreatorId = table.Column(type: "uniqueidentifier", nullable: true), - LastModificationTime = table.Column(type: "datetime2", nullable: true), - LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), - TenantId = table.Column(type: "uniqueidentifier", nullable: true), - Remark = table.Column(type: "nvarchar(3072)", maxLength: 3072, nullable: true), - Worker = table.Column(type: "nvarchar(max)", nullable: true), - Number = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - ActiveDate = table.Column(type: "datetime2", nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_Store_WorkOrder", x => x.Id); - }); - - migrationBuilder.CreateTable( - name: "Job_CheckJobDetail", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - Order = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - CustomerItemCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - Uom = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - Qty = table.Column(type: "decimal(18,6)", precision: 18, scale: 6, nullable: false), - CreationTime = table.Column(type: "datetime2", nullable: false), - CreatorId = table.Column(type: "uniqueidentifier", nullable: true), - LastModificationTime = table.Column(type: "datetime2", nullable: true), - LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), - MasterID = table.Column(type: "uniqueidentifier", nullable: false), - TenantId = table.Column(type: "uniqueidentifier", nullable: true), - Number = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - Remark = table.Column(type: "nvarchar(3072)", maxLength: 3072, nullable: true), - ItemName = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ItemDesc1 = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ItemDesc2 = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ItemCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - StdPackQty = table.Column(type: "decimal(18,6)", nullable: false), - Status = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - ContainerCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - PackingCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - Lot = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - SupplierBatch = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ArriveDate = table.Column(type: "datetime2", nullable: false), - ProduceDate = table.Column(type: "datetime2", nullable: false), - ExpireDate = table.Column(type: "datetime2", nullable: false), - LocationCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - LocationArea = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - LocationGroup = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - LocationErpCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - WarehouseCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_Job_CheckJobDetail", x => x.Id); - table.ForeignKey( - name: "FK_Job_CheckJobDetail_Job_CheckJob_MasterID", - column: x => x.MasterID, - principalTable: "Job_CheckJob", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - }); - - migrationBuilder.CreateTable( - name: "Job_CountJobDetail", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - CountLabel = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - InventoryQty = table.Column(type: "decimal(18,6)", nullable: false), - Uom = table.Column(type: "nvarchar(max)", nullable: true), - InventoryLocationCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - CountQty = table.Column(type: "decimal(18,6)", nullable: false), - CountTime = table.Column(type: "datetime2", nullable: true), - CountOperator = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - CountDescription = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - CreationTime = table.Column(type: "datetime2", nullable: false), - CreatorId = table.Column(type: "uniqueidentifier", nullable: true), - LastModificationTime = table.Column(type: "datetime2", nullable: true), - LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), - MasterID = table.Column(type: "uniqueidentifier", nullable: false), - TenantId = table.Column(type: "uniqueidentifier", nullable: true), - Number = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - Remark = table.Column(type: "nvarchar(3072)", maxLength: 3072, nullable: true), - ItemName = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ItemDesc1 = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ItemDesc2 = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ItemCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - StdPackQty = table.Column(type: "decimal(18,6)", nullable: false), - Status = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - ContainerCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - PackingCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - Lot = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - SupplierBatch = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ArriveDate = table.Column(type: "datetime2", nullable: false), - ProduceDate = table.Column(type: "datetime2", nullable: false), - ExpireDate = table.Column(type: "datetime2", nullable: false), - LocationCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - LocationArea = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - LocationGroup = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - LocationErpCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - WarehouseCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_Job_CountJobDetail", x => x.Id); - table.ForeignKey( - name: "FK_Job_CountJobDetail_Job_CountJob_MasterID", - column: x => x.MasterID, - principalTable: "Job_CountJob", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - }); - - migrationBuilder.CreateTable( - name: "Job_DeliverJobDetail", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - ToLocationCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ToLocationArea = table.Column(type: "nvarchar(max)", nullable: true), - ToLocationGroup = table.Column(type: "nvarchar(max)", nullable: true), - ToLocationErpCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ToWarehouseCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - OnTheWayLocationCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - CreationTime = table.Column(type: "datetime2", nullable: false), - CreatorId = table.Column(type: "uniqueidentifier", nullable: true), - LastModificationTime = table.Column(type: "datetime2", nullable: true), - LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), - MasterID = table.Column(type: "uniqueidentifier", nullable: false), - TenantId = table.Column(type: "uniqueidentifier", nullable: true), - Number = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - Remark = table.Column(type: "nvarchar(3072)", maxLength: 3072, nullable: true), - ItemName = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ItemDesc1 = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ItemDesc2 = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ItemCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - StdPackQty = table.Column(type: "decimal(18,6)", nullable: false), - Status = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - RecommendContainerCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - RecommendPackingCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - RecommendSupplierBatch = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - RecommendArriveDate = table.Column(type: "datetime2", nullable: false), - RecommendProduceDate = table.Column(type: "datetime2", nullable: false), - RecommendExpireDate = table.Column(type: "datetime2", nullable: false), - RecommendLot = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - RecommendFromLocationCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - RecommendFromLocationArea = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - RecommendFromLocationGroup = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - RecommendFromLocationErpCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - RecommendFromWarehouseCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - Uom = table.Column(type: "nvarchar(max)", nullable: true), - RecommendQty = table.Column(type: "decimal(18,6)", nullable: false), - HandledContainerCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - HandledPackingCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - HandledSupplierBatch = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - HandledArriveDate = table.Column(type: "datetime2", nullable: false), - HandledProduceDate = table.Column(type: "datetime2", nullable: false), - HandledExpireDate = table.Column(type: "datetime2", nullable: false), - HandledLot = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - HandledFromLocationCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - HandledFromLocationArea = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - HandledFromLocationGroup = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - HandledFromLocationErpCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - HandledFromWarehouseCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - HandledQty = table.Column(type: "decimal(18,6)", nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_Job_DeliverJobDetail", x => x.Id); - table.ForeignKey( - name: "FK_Job_DeliverJobDetail_Job_DeliverJob_MasterID", - column: x => x.MasterID, - principalTable: "Job_DeliverJob", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - }); - - migrationBuilder.CreateTable( - name: "Job_InspectJobDetail", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - PoNumber = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - PoLine = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - InspectType = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - SamplePercent = table.Column(type: "decimal(18,6)", nullable: false), - Uom = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ReceiveQty = table.Column(type: "decimal(18,6)", nullable: false), - InspectQty = table.Column(type: "decimal(18,6)", nullable: false), - GoodQty = table.Column(type: "decimal(18,6)", nullable: false, defaultValue: 0m), - FailedReason = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - FailedQty = table.Column(type: "decimal(18,6)", nullable: false, defaultValue: 0m), - CrackQty = table.Column(type: "decimal(18,6)", nullable: false, defaultValue: 0m), - InspectUser = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - NotPassedQty = table.Column(type: "decimal(18,6)", nullable: false, defaultValue: 0m), - AbcClass = table.Column(type: "nvarchar(max)", nullable: true), - DetailInspectStatus = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - Appearance = table.Column(type: "nvarchar(max)", nullable: true), - Volume = table.Column(type: "nvarchar(max)", nullable: true), - Weight = table.Column(type: "nvarchar(max)", nullable: true), - OtherPropertyJson = table.Column(type: "nvarchar(max)", nullable: true), - CreationTime = table.Column(type: "datetime2", nullable: false), - CreatorId = table.Column(type: "uniqueidentifier", nullable: true), - LastModificationTime = table.Column(type: "datetime2", nullable: true), - LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), - MasterID = table.Column(type: "uniqueidentifier", nullable: false), - TenantId = table.Column(type: "uniqueidentifier", nullable: true), - Number = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - Remark = table.Column(type: "nvarchar(3072)", maxLength: 3072, nullable: true), - ItemName = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ItemDesc1 = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ItemDesc2 = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ItemCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - StdPackQty = table.Column(type: "decimal(18,6)", nullable: false), - Status = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - ContainerCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - PackingCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - Lot = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - SupplierBatch = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ArriveDate = table.Column(type: "datetime2", nullable: false), - ProduceDate = table.Column(type: "datetime2", nullable: false), - ExpireDate = table.Column(type: "datetime2", nullable: false), - LocationCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - LocationArea = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - LocationGroup = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - LocationErpCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - WarehouseCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_Job_InspectJobDetail", x => x.Id); - table.ForeignKey( - name: "FK_Job_InspectJobDetail_Job_InspectJob_MasterID", - column: x => x.MasterID, - principalTable: "Job_InspectJob", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - }); - - migrationBuilder.CreateTable( - name: "Job_InspectJobSummaryDetail", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - PoNumber = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - PoLine = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - StdPackQty = table.Column(type: "decimal(18,6)", nullable: false), - InspectType = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - SamplePercent = table.Column(type: "decimal(18,6)", nullable: false), - Uom = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ReceiveQty = table.Column(type: "decimal(18,6)", nullable: false), - InspectQty = table.Column(type: "decimal(18,6)", nullable: false), - GoodQty = table.Column(type: "decimal(18,6)", nullable: false, defaultValue: 0m), - FailedReason = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - FailedQty = table.Column(type: "decimal(18,6)", nullable: false, defaultValue: 0m), - CrackQty = table.Column(type: "decimal(18,6)", nullable: false, defaultValue: 0m), - InspectUser = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - NotPassedQty = table.Column(type: "decimal(18,6)", nullable: false, defaultValue: 0m), - SummaryInspectStatus = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - AbcClass = table.Column(type: "nvarchar(max)", nullable: true), - ItemName = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ItemDesc1 = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ItemDesc2 = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ItemCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - Lot = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - SupplierBatch = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ArriveDate = table.Column(type: "datetime2", nullable: false), - ProduceDate = table.Column(type: "datetime2", nullable: false), - ExpireDate = table.Column(type: "datetime2", nullable: false), - InspectReport = table.Column(type: "nvarchar(max)", nullable: true), - CreationTime = table.Column(type: "datetime2", nullable: false), - CreatorId = table.Column(type: "uniqueidentifier", nullable: true), - LastModificationTime = table.Column(type: "datetime2", nullable: true), - LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), - MasterID = table.Column(type: "uniqueidentifier", nullable: false), - TenantId = table.Column(type: "uniqueidentifier", nullable: true), - Number = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - Remark = table.Column(type: "nvarchar(3072)", maxLength: 3072, nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_Job_InspectJobSummaryDetail", x => x.Id); - table.ForeignKey( - name: "FK_Job_InspectJobSummaryDetail_Job_InspectJob_MasterID", - column: x => x.MasterID, - principalTable: "Job_InspectJob", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - }); - - migrationBuilder.CreateTable( - name: "Job_IssueJobDetail", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - RequestLocationCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ToLocationCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ToLocationArea = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ToLocationGroup = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ToLocationErpCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ToWarehouseCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - OnTheWayLocationCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ProdLine = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - WorkStation = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ExpiredTime = table.Column(type: "datetime2", nullable: false), - Operation = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - DistributionType = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - TruncType = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - RoundedQty = table.Column(type: "decimal(18,6)", nullable: false), - PlannedSplitRule = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - PlanBeginTime = table.Column(type: "datetime2", nullable: false), - DeliveryQty = table.Column(type: "decimal(18,6)", nullable: false), - CreationTime = table.Column(type: "datetime2", nullable: false), - CreatorId = table.Column(type: "uniqueidentifier", nullable: true), - LastModificationTime = table.Column(type: "datetime2", nullable: true), - LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), - MasterID = table.Column(type: "uniqueidentifier", nullable: false), - TenantId = table.Column(type: "uniqueidentifier", nullable: true), - Number = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - Remark = table.Column(type: "nvarchar(3072)", maxLength: 3072, nullable: true), - ItemName = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ItemDesc1 = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ItemDesc2 = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ItemCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - StdPackQty = table.Column(type: "decimal(18,6)", nullable: false), - Status = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - RecommendContainerCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - RecommendPackingCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - RecommendSupplierBatch = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - RecommendArriveDate = table.Column(type: "datetime2", nullable: false), - RecommendProduceDate = table.Column(type: "datetime2", nullable: false), - RecommendExpireDate = table.Column(type: "datetime2", nullable: false), - RecommendLot = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - RecommendFromLocationCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - RecommendFromLocationArea = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - RecommendFromLocationGroup = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - RecommendFromLocationErpCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - RecommendFromWarehouseCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - Uom = table.Column(type: "nvarchar(max)", nullable: true), - RecommendQty = table.Column(type: "decimal(18,6)", nullable: false), - HandledContainerCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - HandledPackingCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - HandledSupplierBatch = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - HandledArriveDate = table.Column(type: "datetime2", nullable: false), - HandledProduceDate = table.Column(type: "datetime2", nullable: false), - HandledExpireDate = table.Column(type: "datetime2", nullable: false), - HandledLot = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - HandledFromLocationCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - HandledFromLocationArea = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - HandledFromLocationGroup = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - HandledFromLocationErpCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - HandledFromWarehouseCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - HandledQty = table.Column(type: "decimal(18,6)", nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_Job_IssueJobDetail", x => x.Id); - table.ForeignKey( - name: "FK_Job_IssueJobDetail_Job_IssueJob_MasterID", - column: x => x.MasterID, - principalTable: "Job_IssueJob", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - }); - - migrationBuilder.CreateTable( - name: "Job_JisDeliverJobDetail", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - ContainerCode = table.Column(type: "nvarchar(max)", nullable: true), - ContainerName = table.Column(type: "nvarchar(max)", nullable: true), - ContainerDesc = table.Column(type: "nvarchar(max)", nullable: true), - ItemQty = table.Column(type: "decimal(18,6)", nullable: false), - FromLocationCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - FromLocationArea = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - FromLocationGroup = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - FromLocationErpCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - FromWarehouseCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ToLocationCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ToLocationArea = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ToLocationGroup = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ToLocationErpCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ToWarehouseCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - Status = table.Column(type: "nvarchar(max)", nullable: false), - CreationTime = table.Column(type: "datetime2", nullable: false), - CreatorId = table.Column(type: "uniqueidentifier", nullable: true), - LastModificationTime = table.Column(type: "datetime2", nullable: true), - LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), - MasterID = table.Column(type: "uniqueidentifier", nullable: false), - TenantId = table.Column(type: "uniqueidentifier", nullable: true), - Number = table.Column(type: "nvarchar(max)", nullable: true), - Remark = table.Column(type: "nvarchar(3072)", maxLength: 3072, nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_Job_JisDeliverJobDetail", x => x.Id); - table.ForeignKey( - name: "FK_Job_JisDeliverJobDetail_Job_JisDeliverJob_MasterID", - column: x => x.MasterID, - principalTable: "Job_JisDeliverJob", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - }); - - migrationBuilder.CreateTable( - name: "Job_ProductionReturnJobDetail", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - FromLocationCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - FromLocationArea = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - FromLocationGroup = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - FromLocationErpCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - FromWarehouseCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - CreationTime = table.Column(type: "datetime2", nullable: false), - CreatorId = table.Column(type: "uniqueidentifier", nullable: true), - LastModificationTime = table.Column(type: "datetime2", nullable: true), - LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), - MasterID = table.Column(type: "uniqueidentifier", nullable: false), - TenantId = table.Column(type: "uniqueidentifier", nullable: true), - Number = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - Remark = table.Column(type: "nvarchar(3072)", maxLength: 3072, nullable: true), - ItemName = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ItemDesc1 = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ItemDesc2 = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ItemCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - StdPackQty = table.Column(type: "decimal(18,6)", nullable: false), - Status = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - RecommendContainerCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - RecommendPackingCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - RecommendSupplierBatch = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - RecommendArriveDate = table.Column(type: "datetime2", nullable: false), - RecommendProduceDate = table.Column(type: "datetime2", nullable: false), - RecommendExpireDate = table.Column(type: "datetime2", nullable: false), - RecommendLot = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - RecommendToLocationCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - RecommendToLocationArea = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - RecommendToLocationGroup = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - RecommendToLocationErpCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - RecommendToWarehouseCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - Uom = table.Column(type: "nvarchar(max)", nullable: true), - RecommendQty = table.Column(type: "decimal(18,6)", nullable: false), - HandledContainerCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - HandledPackingCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - HandledSupplierBatch = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - HandledArriveDate = table.Column(type: "datetime2", nullable: false), - HandledProduceDate = table.Column(type: "datetime2", nullable: false), - HandledExpireDate = table.Column(type: "datetime2", nullable: false), - HandledLot = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - HandledToLocationCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - HandledToLocationArea = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - HandledToLocationGroup = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - HandledToLocationErpCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - HandledToWarehouseCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - HandledQty = table.Column(type: "decimal(18,6)", nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_Job_ProductionReturnJobDetail", x => x.Id); - table.ForeignKey( - name: "FK_Job_ProductionReturnJobDetail_Job_ProductionReturnJob_MasterID", - column: x => x.MasterID, - principalTable: "Job_ProductionReturnJob", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - }); - - migrationBuilder.CreateTable( - name: "Job_ProductReceiveJobDetail", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - ProdLine = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - RawLocationCode = table.Column(type: "nvarchar(max)", nullable: true), - CreationTime = table.Column(type: "datetime2", nullable: false), - CreatorId = table.Column(type: "uniqueidentifier", nullable: true), - LastModificationTime = table.Column(type: "datetime2", nullable: true), - LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), - MasterID = table.Column(type: "uniqueidentifier", nullable: false), - TenantId = table.Column(type: "uniqueidentifier", nullable: true), - Number = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - Remark = table.Column(type: "nvarchar(3072)", maxLength: 3072, nullable: true), - ItemName = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ItemDesc1 = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ItemDesc2 = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ItemCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - StdPackQty = table.Column(type: "decimal(18,6)", nullable: false), - Status = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - RecommendContainerCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - RecommendPackingCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - RecommendSupplierBatch = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - RecommendArriveDate = table.Column(type: "datetime2", nullable: false), - RecommendProduceDate = table.Column(type: "datetime2", nullable: false), - RecommendExpireDate = table.Column(type: "datetime2", nullable: false), - RecommendLot = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - RecommendToLocationCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - RecommendToLocationArea = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - RecommendToLocationGroup = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - RecommendToLocationErpCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - RecommendToWarehouseCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - Uom = table.Column(type: "nvarchar(max)", nullable: true), - RecommendQty = table.Column(type: "decimal(18,6)", nullable: false), - HandledContainerCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - HandledPackingCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - HandledSupplierBatch = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - HandledArriveDate = table.Column(type: "datetime2", nullable: false), - HandledProduceDate = table.Column(type: "datetime2", nullable: false), - HandledExpireDate = table.Column(type: "datetime2", nullable: false), - HandledLot = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - HandledToLocationCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - HandledToLocationArea = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - HandledToLocationGroup = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - HandledToLocationErpCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - HandledToWarehouseCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - HandledQty = table.Column(type: "decimal(18,6)", nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_Job_ProductReceiveJobDetail", x => x.Id); - table.ForeignKey( - name: "FK_Job_ProductReceiveJobDetail_Job_ProductReceiveJob_MasterID", - column: x => x.MasterID, - principalTable: "Job_ProductReceiveJob", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - }); - - migrationBuilder.CreateTable( - name: "Job_PurchaseReceiptJobDetail", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - PoNumber = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - PoLine = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ArriveDate = table.Column(type: "datetime2", nullable: false), - PurchaseReceiptInspectStatus = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - InspectPhotoJson = table.Column(type: "nvarchar(max)", nullable: true), - FailedReason = table.Column(type: "nvarchar(max)", nullable: true), - MassDefect = table.Column(type: "nvarchar(max)", nullable: true), - SupplierPackUom = table.Column(type: "nvarchar(max)", nullable: true), - SupplierPackQty = table.Column(type: "decimal(18,6)", nullable: false), - CreationTime = table.Column(type: "datetime2", nullable: false), - CreatorId = table.Column(type: "uniqueidentifier", nullable: true), - LastModificationTime = table.Column(type: "datetime2", nullable: true), - LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), - MasterID = table.Column(type: "uniqueidentifier", nullable: false), - TenantId = table.Column(type: "uniqueidentifier", nullable: true), - Number = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - Remark = table.Column(type: "nvarchar(3072)", maxLength: 3072, nullable: true), - ItemName = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ItemDesc1 = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ItemDesc2 = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ItemCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - StdPackQty = table.Column(type: "decimal(18,6)", nullable: false), - Status = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - RecommendContainerCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - RecommendPackingCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - RecommendSupplierBatch = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - RecommendArriveDate = table.Column(type: "datetime2", nullable: false), - RecommendProduceDate = table.Column(type: "datetime2", nullable: false), - RecommendExpireDate = table.Column(type: "datetime2", nullable: false), - RecommendLot = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - RecommendToLocationCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - RecommendToLocationArea = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - RecommendToLocationGroup = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - RecommendToLocationErpCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - RecommendToWarehouseCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - Uom = table.Column(type: "nvarchar(max)", nullable: true), - RecommendQty = table.Column(type: "decimal(18,6)", nullable: false), - HandledContainerCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - HandledPackingCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - HandledSupplierBatch = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - HandledArriveDate = table.Column(type: "datetime2", nullable: false), - HandledProduceDate = table.Column(type: "datetime2", nullable: false), - HandledExpireDate = table.Column(type: "datetime2", nullable: false), - HandledLot = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - HandledToLocationCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - HandledToLocationArea = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - HandledToLocationGroup = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - HandledToLocationErpCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - HandledToWarehouseCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - HandledQty = table.Column(type: "decimal(18,6)", nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_Job_PurchaseReceiptJobDetail", x => x.Id); - table.ForeignKey( - name: "FK_Job_PurchaseReceiptJobDetail_Job_PurchaseReceiptJob_MasterID", - column: x => x.MasterID, - principalTable: "Job_PurchaseReceiptJob", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - }); - - migrationBuilder.CreateTable( - name: "Job_PurchaseReturnJobDetail", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - PoNumber = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - PoLine = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - Reason = table.Column(type: "nvarchar(max)", nullable: true), - CreationTime = table.Column(type: "datetime2", nullable: false), - CreatorId = table.Column(type: "uniqueidentifier", nullable: true), - LastModificationTime = table.Column(type: "datetime2", nullable: true), - LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), - MasterID = table.Column(type: "uniqueidentifier", nullable: false), - TenantId = table.Column(type: "uniqueidentifier", nullable: true), - Number = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - Remark = table.Column(type: "nvarchar(3072)", maxLength: 3072, nullable: true), - ItemName = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ItemDesc1 = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ItemDesc2 = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ItemCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - StdPackQty = table.Column(type: "decimal(18,6)", nullable: false), - Status = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - RecommendContainerCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - RecommendPackingCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - RecommendSupplierBatch = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - RecommendArriveDate = table.Column(type: "datetime2", nullable: false), - RecommendProduceDate = table.Column(type: "datetime2", nullable: false), - RecommendExpireDate = table.Column(type: "datetime2", nullable: false), - RecommendLot = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - RecommendFromLocationCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - RecommendFromLocationArea = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - RecommendFromLocationGroup = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - RecommendFromLocationErpCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - RecommendFromWarehouseCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - Uom = table.Column(type: "nvarchar(max)", nullable: true), - RecommendQty = table.Column(type: "decimal(18,6)", nullable: false), - HandledContainerCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - HandledPackingCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - HandledSupplierBatch = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - HandledArriveDate = table.Column(type: "datetime2", nullable: false), - HandledProduceDate = table.Column(type: "datetime2", nullable: false), - HandledExpireDate = table.Column(type: "datetime2", nullable: false), - HandledLot = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - HandledFromLocationCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - HandledFromLocationArea = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - HandledFromLocationGroup = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - HandledFromLocationErpCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - HandledFromWarehouseCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - HandledQty = table.Column(type: "decimal(18,6)", nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_Job_PurchaseReturnJobDetail", x => x.Id); - table.ForeignKey( - name: "FK_Job_PurchaseReturnJobDetail_Job_PurchaseReturnJob_MasterID", - column: x => x.MasterID, - principalTable: "Job_PurchaseReturnJob", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - }); - - migrationBuilder.CreateTable( - name: "Job_PutawayJobDetail", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - PoNumber = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - PoLine = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - FromLocationCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - FromLocationArea = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - FromLocationGroup = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - FromLocationErpCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - FromWarehouseCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - Qty = table.Column(type: "decimal(18,6)", precision: 18, scale: 6, nullable: false), - CreationTime = table.Column(type: "datetime2", nullable: false), - CreatorId = table.Column(type: "uniqueidentifier", nullable: true), - LastModificationTime = table.Column(type: "datetime2", nullable: true), - LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), - MasterID = table.Column(type: "uniqueidentifier", nullable: false), - TenantId = table.Column(type: "uniqueidentifier", nullable: true), - Number = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - Remark = table.Column(type: "nvarchar(3072)", maxLength: 3072, nullable: true), - ItemName = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ItemDesc1 = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ItemDesc2 = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ItemCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - StdPackQty = table.Column(type: "decimal(18,6)", nullable: false), - Status = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - RecommendContainerCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - RecommendPackingCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - RecommendSupplierBatch = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - RecommendArriveDate = table.Column(type: "datetime2", nullable: false), - RecommendProduceDate = table.Column(type: "datetime2", nullable: false), - RecommendExpireDate = table.Column(type: "datetime2", nullable: false), - RecommendLot = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - RecommendToLocationCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - RecommendToLocationArea = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - RecommendToLocationGroup = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - RecommendToLocationErpCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - RecommendToWarehouseCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - Uom = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - RecommendQty = table.Column(type: "decimal(18,6)", nullable: false), - HandledContainerCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - HandledPackingCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - HandledSupplierBatch = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - HandledArriveDate = table.Column(type: "datetime2", nullable: false), - HandledProduceDate = table.Column(type: "datetime2", nullable: false), - HandledExpireDate = table.Column(type: "datetime2", nullable: false), - HandledLot = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - HandledToLocationCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - HandledToLocationArea = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - HandledToLocationGroup = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - HandledToLocationErpCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - HandledToWarehouseCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - HandledQty = table.Column(type: "decimal(18,6)", nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_Job_PutawayJobDetail", x => x.Id); - table.ForeignKey( - name: "FK_Job_PutawayJobDetail_Job_PutawayJob_MasterID", - column: x => x.MasterID, - principalTable: "Job_PutawayJob", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - }); - - migrationBuilder.CreateTable( - name: "Job_UnplannedIssueJobDetail", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - ReasonCode = table.Column(type: "nvarchar(max)", nullable: true), - CaseCode = table.Column(type: "nvarchar(max)", nullable: true), - ProjCapacityCode = table.Column(type: "nvarchar(max)", nullable: true), - OnceBusiCode = table.Column(type: "nvarchar(max)", nullable: true), - ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true), - Explain = table.Column(type: "nvarchar(max)", nullable: true), - CreationTime = table.Column(type: "datetime2", nullable: false), - CreatorId = table.Column(type: "uniqueidentifier", nullable: true), - LastModificationTime = table.Column(type: "datetime2", nullable: true), - LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), - MasterID = table.Column(type: "uniqueidentifier", nullable: false), - TenantId = table.Column(type: "uniqueidentifier", nullable: true), - Number = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - Remark = table.Column(type: "nvarchar(3072)", maxLength: 3072, nullable: true), - ItemName = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ItemDesc1 = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ItemDesc2 = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ItemCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - StdPackQty = table.Column(type: "decimal(18,6)", nullable: false), - Status = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - RecommendContainerCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - RecommendPackingCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - RecommendSupplierBatch = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - RecommendArriveDate = table.Column(type: "datetime2", nullable: false), - RecommendProduceDate = table.Column(type: "datetime2", nullable: false), - RecommendExpireDate = table.Column(type: "datetime2", nullable: false), - RecommendLot = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - RecommendFromLocationCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - RecommendFromLocationArea = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - RecommendFromLocationGroup = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - RecommendFromLocationErpCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - RecommendFromWarehouseCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - Uom = table.Column(type: "nvarchar(max)", nullable: true), - RecommendQty = table.Column(type: "decimal(18,6)", nullable: false), - HandledContainerCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - HandledPackingCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - HandledSupplierBatch = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - HandledArriveDate = table.Column(type: "datetime2", nullable: false), - HandledProduceDate = table.Column(type: "datetime2", nullable: false), - HandledExpireDate = table.Column(type: "datetime2", nullable: false), - HandledLot = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - HandledFromLocationCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - HandledFromLocationArea = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - HandledFromLocationGroup = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - HandledFromLocationErpCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - HandledFromWarehouseCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - HandledQty = table.Column(type: "decimal(18,6)", nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_Job_UnplannedIssueJobDetail", x => x.Id); - table.ForeignKey( - name: "FK_Job_UnplannedIssueJobDetail_Job_UnplannedIssueJob_MasterID", - column: x => x.MasterID, - principalTable: "Job_UnplannedIssueJob", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - }); - - migrationBuilder.CreateTable( - name: "Job_UnplannedReceiptJobDetail", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - ReasonCode = table.Column(type: "nvarchar(max)", nullable: true), - CaseCode = table.Column(type: "nvarchar(max)", nullable: true), - ProjCapacityCode = table.Column(type: "nvarchar(max)", nullable: true), - OnceBusiCode = table.Column(type: "nvarchar(max)", nullable: true), - ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true), - Explain = table.Column(type: "nvarchar(max)", nullable: true), - CreationTime = table.Column(type: "datetime2", nullable: false), - CreatorId = table.Column(type: "uniqueidentifier", nullable: true), - LastModificationTime = table.Column(type: "datetime2", nullable: true), - LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), - MasterID = table.Column(type: "uniqueidentifier", nullable: false), - TenantId = table.Column(type: "uniqueidentifier", nullable: true), - Number = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - Remark = table.Column(type: "nvarchar(3072)", maxLength: 3072, nullable: true), - ItemName = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ItemDesc1 = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ItemDesc2 = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ItemCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - StdPackQty = table.Column(type: "decimal(18,6)", nullable: false), - Status = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - RecommendContainerCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - RecommendPackingCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - RecommendSupplierBatch = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - RecommendArriveDate = table.Column(type: "datetime2", nullable: false), - RecommendProduceDate = table.Column(type: "datetime2", nullable: false), - RecommendExpireDate = table.Column(type: "datetime2", nullable: false), - RecommendLot = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - RecommendToLocationCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - RecommendToLocationArea = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - RecommendToLocationGroup = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - RecommendToLocationErpCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - RecommendToWarehouseCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - Uom = table.Column(type: "nvarchar(max)", nullable: true), - RecommendQty = table.Column(type: "decimal(18,6)", nullable: false), - HandledContainerCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - HandledPackingCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - HandledSupplierBatch = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - HandledArriveDate = table.Column(type: "datetime2", nullable: false), - HandledProduceDate = table.Column(type: "datetime2", nullable: false), - HandledExpireDate = table.Column(type: "datetime2", nullable: false), - HandledLot = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - HandledToLocationCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - HandledToLocationArea = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - HandledToLocationGroup = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - HandledToLocationErpCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - HandledToWarehouseCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - HandledQty = table.Column(type: "decimal(18,6)", nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_Job_UnplannedReceiptJobDetail", x => x.Id); - table.ForeignKey( - name: "FK_Job_UnplannedReceiptJobDetail_Job_UnplannedReceiptJob_MasterID", - column: x => x.MasterID, - principalTable: "Job_UnplannedReceiptJob", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - }); - - migrationBuilder.CreateTable( - name: "Store_BackFlushNoteDetail", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - BomVersion = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - IsOffLine = table.Column(type: "bit", nullable: false), - CreationTime = table.Column(type: "datetime2", nullable: false), - CreatorId = table.Column(type: "uniqueidentifier", nullable: true), - LastModificationTime = table.Column(type: "datetime2", nullable: true), - LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), - MasterID = table.Column(type: "uniqueidentifier", nullable: false), - TenantId = table.Column(type: "uniqueidentifier", nullable: true), - Number = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - Remark = table.Column(type: "nvarchar(3072)", maxLength: 3072, nullable: true), - ItemName = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ItemDesc1 = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ItemDesc2 = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ItemCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - Lot = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - SupplierBatch = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ArriveDate = table.Column(type: "datetime2", nullable: false), - ProduceDate = table.Column(type: "datetime2", nullable: false), - ExpireDate = table.Column(type: "datetime2", nullable: false), - PackingCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - ContainerCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - LocationCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - LocationArea = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - LocationGroup = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - LocationErpCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - WarehouseCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - Status = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - Uom = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - Qty = table.Column(type: "decimal(18,6)", precision: 18, scale: 6, nullable: false), - StdPackQty = table.Column(type: "decimal(18,6)", nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_Store_BackFlushNoteDetail", x => x.Id); - table.ForeignKey( - name: "FK_Store_BackFlushNoteDetail_Store_BackFlushNote_MasterID", - column: x => x.MasterID, - principalTable: "Store_BackFlushNote", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - }); - - migrationBuilder.CreateTable( - name: "Store_ContainerBindNoteDetail", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - CreationTime = table.Column(type: "datetime2", nullable: false), - CreatorId = table.Column(type: "uniqueidentifier", nullable: true), - LastModificationTime = table.Column(type: "datetime2", nullable: true), - LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), - MasterID = table.Column(type: "uniqueidentifier", nullable: false), - TenantId = table.Column(type: "uniqueidentifier", nullable: true), - Number = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - Remark = table.Column(type: "nvarchar(3072)", maxLength: 3072, nullable: true), - ItemName = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ItemDesc1 = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ItemDesc2 = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ItemCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - Lot = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - SupplierBatch = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ArriveDate = table.Column(type: "datetime2", nullable: false), - ProduceDate = table.Column(type: "datetime2", nullable: false), - ExpireDate = table.Column(type: "datetime2", nullable: false), - PackingCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - ContainerCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - Uom = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - Qty = table.Column(type: "decimal(18,6)", precision: 18, scale: 6, nullable: false), - StdPackQty = table.Column(type: "decimal(18,6)", nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_Store_ContainerBindNoteDetail", x => x.Id); - table.ForeignKey( - name: "FK_Store_ContainerBindNoteDetail_Store_ContainerBindNote_MasterID", - column: x => x.MasterID, - principalTable: "Store_ContainerBindNote", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - }); - - migrationBuilder.CreateTable( - name: "Store_CountAdjustNoteDetail", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - CountLabel = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - InventoryQty = table.Column(type: "decimal(18,6)", nullable: false), - TransInOut = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - ReasonCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - CountQty = table.Column(type: "decimal(18,6)", nullable: false), - AdjustQty = table.Column(type: "decimal(18,6)", nullable: false), - StdPackQty = table.Column(type: "decimal(18,6)", nullable: false), - Uom = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - CreationTime = table.Column(type: "datetime2", nullable: false), - CreatorId = table.Column(type: "uniqueidentifier", nullable: true), - LastModificationTime = table.Column(type: "datetime2", nullable: true), - LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), - MasterID = table.Column(type: "uniqueidentifier", nullable: false), - TenantId = table.Column(type: "uniqueidentifier", nullable: true), - Number = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - Remark = table.Column(type: "nvarchar(3072)", maxLength: 3072, nullable: true), - ItemName = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ItemDesc1 = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ItemDesc2 = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ItemCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - Lot = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - SupplierBatch = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ArriveDate = table.Column(type: "datetime2", nullable: false), - ProduceDate = table.Column(type: "datetime2", nullable: false), - ExpireDate = table.Column(type: "datetime2", nullable: false), - PackingCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - ContainerCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - LocationCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - LocationArea = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - LocationGroup = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - LocationErpCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - WarehouseCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - Status = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_Store_CountAdjustNoteDetail", x => x.Id); - table.ForeignKey( - name: "FK_Store_CountAdjustNoteDetail_Store_CountAdjustNote_MasterID", - column: x => x.MasterID, - principalTable: "Store_CountAdjustNote", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - }); - - migrationBuilder.CreateTable( - name: "Store_CountAdjustRequestDetail", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - ReasonCode = table.Column(type: "nvarchar(max)", nullable: true), - InventoryQty = table.Column(type: "decimal(18,6)", nullable: false), - CountQty = table.Column(type: "decimal(18,6)", nullable: false), - CreationTime = table.Column(type: "datetime2", nullable: false), - CreatorId = table.Column(type: "uniqueidentifier", nullable: true), - LastModificationTime = table.Column(type: "datetime2", nullable: true), - LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), - MasterID = table.Column(type: "uniqueidentifier", nullable: false), - TenantId = table.Column(type: "uniqueidentifier", nullable: true), - Number = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - Remark = table.Column(type: "nvarchar(3072)", maxLength: 3072, nullable: true), - ItemName = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ItemDesc1 = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ItemDesc2 = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ItemCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - Lot = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - SupplierBatch = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ArriveDate = table.Column(type: "datetime2", nullable: false), - ProduceDate = table.Column(type: "datetime2", nullable: false), - ExpireDate = table.Column(type: "datetime2", nullable: false), - PackingCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - ContainerCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - LocationCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - LocationArea = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - LocationGroup = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - LocationErpCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - WarehouseCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - Status = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - Uom = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - Qty = table.Column(type: "decimal(18,6)", precision: 18, scale: 6, nullable: false), - StdPackQty = table.Column(type: "decimal(18,6)", nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_Store_CountAdjustRequestDetail", x => x.Id); - table.ForeignKey( - name: "FK_Store_CountAdjustRequestDetail_Store_CountAdjustRequest_MasterID", - column: x => x.MasterID, - principalTable: "Store_CountAdjustRequest", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - }); - - migrationBuilder.CreateTable( - name: "Store_CountNoteDetail", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - CountPlanNumber = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - CountLabel = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - Uom = table.Column(type: "nvarchar(max)", nullable: true), - InventoryQty = table.Column(type: "decimal(18,6)", nullable: false), - FirstCountQty = table.Column(type: "decimal(18,6)", precision: 18, scale: 6, nullable: false), - FirstCountTime = table.Column(type: "datetime2", nullable: true), - FirstCountOperator = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - FirstCountDescription = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - RepeatCountQty = table.Column(type: "decimal(18,6)", precision: 18, scale: 6, nullable: false), - RepeatCountTime = table.Column(type: "datetime2", nullable: true), - RepeatCountOperator = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - RepeatCountDescription = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - AuditCountQty = table.Column(type: "decimal(18,6)", precision: 18, scale: 6, nullable: false), - AuditCountTime = table.Column(type: "datetime2", nullable: true), - AuditCountOperator = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - AuditCountDescription = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - FinalCountQty = table.Column(type: "decimal(18,6)", precision: 18, scale: 6, nullable: false), - DetailStatus = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - Stage = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - Adjusted = table.Column(type: "bit", nullable: false), - StdPackQty = table.Column(type: "decimal(18,6)", nullable: false), - CreationTime = table.Column(type: "datetime2", nullable: false), - CreatorId = table.Column(type: "uniqueidentifier", nullable: true), - LastModificationTime = table.Column(type: "datetime2", nullable: true), - LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), - MasterID = table.Column(type: "uniqueidentifier", nullable: false), - TenantId = table.Column(type: "uniqueidentifier", nullable: true), - Number = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - Remark = table.Column(type: "nvarchar(3072)", maxLength: 3072, nullable: true), - ItemName = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ItemDesc1 = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ItemDesc2 = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ItemCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - Lot = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - SupplierBatch = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ArriveDate = table.Column(type: "datetime2", nullable: false), - ProduceDate = table.Column(type: "datetime2", nullable: false), - ExpireDate = table.Column(type: "datetime2", nullable: false), - PackingCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - ContainerCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - LocationCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - LocationArea = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - LocationGroup = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - LocationErpCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - WarehouseCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - Status = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_Store_CountNoteDetail", x => x.Id); - table.ForeignKey( - name: "FK_Store_CountNoteDetail_Store_CountNote_MasterID", - column: x => x.MasterID, - principalTable: "Store_CountNote", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - }); - - migrationBuilder.CreateTable( - name: "Store_CountPlanDetail", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - CountLabel = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - Uom = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - InventoryQty = table.Column(type: "decimal(18,6)", nullable: false), - FirstCountQty = table.Column(type: "decimal(18,6)", precision: 18, scale: 6, nullable: false), - FirstCountTime = table.Column(type: "datetime2", nullable: true), - FirstCountOperator = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - FirstCountDescription = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - RepeatCountQty = table.Column(type: "decimal(18,6)", precision: 18, scale: 6, nullable: false), - RepeatCountTime = table.Column(type: "datetime2", nullable: true), - RepeatCountOperator = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - RepeatCountDescription = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - AuditCountQty = table.Column(type: "decimal(18,6)", precision: 18, scale: 6, nullable: false), - AuditCountTime = table.Column(type: "datetime2", nullable: true), - AuditCountOperator = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - AuditCountDescription = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - DetailStatus = table.Column(type: "int", nullable: false), - Stage = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - FinalCountQty = table.Column(type: "decimal(18,6)", precision: 18, scale: 6, nullable: false), - StdPackQty = table.Column(type: "decimal(18,6)", nullable: false), - CreationTime = table.Column(type: "datetime2", nullable: false), - CreatorId = table.Column(type: "uniqueidentifier", nullable: true), - LastModificationTime = table.Column(type: "datetime2", nullable: true), - LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), - MasterID = table.Column(type: "uniqueidentifier", nullable: false), - TenantId = table.Column(type: "uniqueidentifier", nullable: true), - Number = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - Remark = table.Column(type: "nvarchar(3072)", maxLength: 3072, nullable: true), - ItemName = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ItemDesc1 = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ItemDesc2 = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ItemCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - Lot = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - SupplierBatch = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ArriveDate = table.Column(type: "datetime2", nullable: false), - ProduceDate = table.Column(type: "datetime2", nullable: false), - ExpireDate = table.Column(type: "datetime2", nullable: false), - PackingCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - ContainerCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - LocationCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - LocationArea = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - LocationGroup = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - LocationErpCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - WarehouseCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - Status = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_Store_CountPlanDetail", x => x.Id); - table.ForeignKey( - name: "FK_Store_CountPlanDetail_Store_CountPlan_MasterID", - column: x => x.MasterID, - principalTable: "Store_CountPlan", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - }); - - migrationBuilder.CreateTable( - name: "Store_CustomerAsnDetail", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - SoNumber = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - SoLine = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - CreationTime = table.Column(type: "datetime2", nullable: false), - CreatorId = table.Column(type: "uniqueidentifier", nullable: true), - LastModificationTime = table.Column(type: "datetime2", nullable: true), - LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), - MasterID = table.Column(type: "uniqueidentifier", nullable: false), - TenantId = table.Column(type: "uniqueidentifier", nullable: true), - Number = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - Remark = table.Column(type: "nvarchar(3072)", maxLength: 3072, nullable: true), - ItemName = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ItemDesc1 = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ItemDesc2 = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ItemCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - Uom = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - Qty = table.Column(type: "decimal(18,6)", precision: 18, scale: 6, nullable: false), - StdPackQty = table.Column(type: "decimal(18,6)", nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_Store_CustomerAsnDetail", x => x.Id); - table.ForeignKey( - name: "FK_Store_CustomerAsnDetail_Store_CustomerAsn_MasterID", - column: x => x.MasterID, - principalTable: "Store_CustomerAsn", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - }); - - migrationBuilder.CreateTable( - name: "Store_CustomerReturnNoteDetail", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - CreationTime = table.Column(type: "datetime2", nullable: false), - CreatorId = table.Column(type: "uniqueidentifier", nullable: true), - LastModificationTime = table.Column(type: "datetime2", nullable: true), - LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), - MasterID = table.Column(type: "uniqueidentifier", nullable: false), - TenantId = table.Column(type: "uniqueidentifier", nullable: true), - Number = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - Remark = table.Column(type: "nvarchar(3072)", maxLength: 3072, nullable: true), - ItemName = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ItemDesc1 = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ItemDesc2 = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ItemCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - Uom = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - Qty = table.Column(type: "decimal(18,6)", precision: 18, scale: 6, nullable: false), - StdPackQty = table.Column(type: "decimal(18,6)", nullable: false), - FromPackingCode = table.Column(type: "nvarchar(450)", nullable: true), - ToPackingCode = table.Column(type: "nvarchar(max)", nullable: true), - FromContainerCode = table.Column(type: "nvarchar(max)", nullable: true), - ToContainerCode = table.Column(type: "nvarchar(max)", nullable: true), - FromLot = table.Column(type: "nvarchar(max)", nullable: true), - ToLot = table.Column(type: "nvarchar(max)", nullable: true), - SupplierBatch = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ArriveDate = table.Column(type: "datetime2", nullable: false), - ProduceDate = table.Column(type: "datetime2", nullable: false), - ExpireDate = table.Column(type: "datetime2", nullable: false), - FromLocationCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - FromLocationArea = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - FromLocationGroup = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - FromLocationErpCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - FromWarehouseCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - FromStatus = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - ToLocationCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - ToLocationArea = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ToLocationGroup = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ToLocationErpCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - ToWarehouseCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - ToStatus = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_Store_CustomerReturnNoteDetail", x => x.Id); - table.ForeignKey( - name: "FK_Store_CustomerReturnNoteDetail_Store_CustomerReturnNote_MasterID", - column: x => x.MasterID, - principalTable: "Store_CustomerReturnNote", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - }); - - migrationBuilder.CreateTable( - name: "Store_DeliverNoteDetail", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true), - CreationTime = table.Column(type: "datetime2", nullable: false), - CreatorId = table.Column(type: "uniqueidentifier", nullable: true), - LastModificationTime = table.Column(type: "datetime2", nullable: true), - LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), - MasterID = table.Column(type: "uniqueidentifier", nullable: false), - TenantId = table.Column(type: "uniqueidentifier", nullable: true), - Number = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - Remark = table.Column(type: "nvarchar(3072)", maxLength: 3072, nullable: true), - ItemName = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ItemDesc1 = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ItemDesc2 = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ItemCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - Uom = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - Qty = table.Column(type: "decimal(18,6)", precision: 18, scale: 6, nullable: false), - StdPackQty = table.Column(type: "decimal(18,6)", nullable: false), - FromPackingCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - ToPackingCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - FromContainerCode = table.Column(type: "nvarchar(max)", nullable: true), - ToContainerCode = table.Column(type: "nvarchar(max)", nullable: true), - FromLot = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - ToLot = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - SupplierBatch = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ArriveDate = table.Column(type: "datetime2", nullable: false), - ProduceDate = table.Column(type: "datetime2", nullable: false), - ExpireDate = table.Column(type: "datetime2", nullable: false), - FromLocationCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - FromLocationArea = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - FromLocationGroup = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - FromLocationErpCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - FromWarehouseCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - FromStatus = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - ToLocationCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - ToLocationArea = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ToLocationGroup = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ToLocationErpCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - ToWarehouseCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - ToStatus = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - RecommendContainerCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - RecommendPackingCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - RecommendSupplierBatch = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - RecommendArriveDate = table.Column(type: "datetime2", nullable: false), - RecommendProduceDate = table.Column(type: "datetime2", nullable: false), - RecommendExpireDate = table.Column(type: "datetime2", nullable: false), - RecommendLot = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - RecommendFromLocationCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - RecommendFromLocationArea = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - RecommendFromLocationGroup = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - RecommendFromLocationErpCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - RecommendFromWarehouseCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - RecommendQty = table.Column(type: "decimal(18,6)", nullable: false), - HandledContainerCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - HandledPackingCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - HandledSupplierBatch = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - HandledArriveDate = table.Column(type: "datetime2", nullable: false), - HandledProduceDate = table.Column(type: "datetime2", nullable: false), - HandledExpireDate = table.Column(type: "datetime2", nullable: false), - HandledLot = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - HandledFromLocationCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - HandledFromLocationArea = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - HandledFromLocationGroup = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - HandledFromLocationErpCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - HandledFromWarehouseCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - HandledQty = table.Column(type: "decimal(18,6)", nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_Store_DeliverNoteDetail", x => x.Id); - table.ForeignKey( - name: "FK_Store_DeliverNoteDetail_Store_DeliverNote_MasterID", - column: x => x.MasterID, - principalTable: "Store_DeliverNote", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - }); - - migrationBuilder.CreateTable( - name: "Store_DeliverPlanDetail", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - SoNumber = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - SoLine = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - CreationTime = table.Column(type: "datetime2", nullable: false), - CreatorId = table.Column(type: "uniqueidentifier", nullable: true), - LastModificationTime = table.Column(type: "datetime2", nullable: true), - LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), - MasterID = table.Column(type: "uniqueidentifier", nullable: false), - TenantId = table.Column(type: "uniqueidentifier", nullable: true), - Number = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - Remark = table.Column(type: "nvarchar(3072)", maxLength: 3072, nullable: true), - ItemName = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ItemDesc1 = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ItemDesc2 = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ItemCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - Uom = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - Qty = table.Column(type: "decimal(18,6)", precision: 18, scale: 6, nullable: false), - StdPackQty = table.Column(type: "decimal(18,6)", nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_Store_DeliverPlanDetail", x => x.Id); - table.ForeignKey( - name: "FK_Store_DeliverPlanDetail_Store_DeliverPlan_MasterID", - column: x => x.MasterID, - principalTable: "Store_DeliverPlan", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - }); - - migrationBuilder.CreateTable( - name: "Store_DeliverRequestDetail", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - AreaCode = table.Column(type: "nvarchar(max)", nullable: true), - ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true), - CreationTime = table.Column(type: "datetime2", nullable: false), - CreatorId = table.Column(type: "uniqueidentifier", nullable: true), - LastModificationTime = table.Column(type: "datetime2", nullable: true), - LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), - MasterID = table.Column(type: "uniqueidentifier", nullable: false), - TenantId = table.Column(type: "uniqueidentifier", nullable: true), - Number = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - Remark = table.Column(type: "nvarchar(3072)", maxLength: 3072, nullable: true), - ItemName = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ItemDesc1 = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ItemDesc2 = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ItemCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - Uom = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - Qty = table.Column(type: "decimal(18,6)", precision: 18, scale: 6, nullable: false), - StdPackQty = table.Column(type: "decimal(18,6)", nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_Store_DeliverRequestDetail", x => x.Id); - table.ForeignKey( - name: "FK_Store_DeliverRequestDetail_Store_DeliverRequest_MasterID", - column: x => x.MasterID, - principalTable: "Store_DeliverRequest", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - }); - - migrationBuilder.CreateTable( - name: "Store_InspectAbnormalNoteDetail", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - AbnormalType = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - Photos = table.Column(type: "nvarchar(max)", nullable: true), - CreationTime = table.Column(type: "datetime2", nullable: false), - CreatorId = table.Column(type: "uniqueidentifier", nullable: true), - LastModificationTime = table.Column(type: "datetime2", nullable: true), - LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), - MasterID = table.Column(type: "uniqueidentifier", nullable: false), - TenantId = table.Column(type: "uniqueidentifier", nullable: true), - Number = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - Remark = table.Column(type: "nvarchar(3072)", maxLength: 3072, nullable: true), - ItemName = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ItemDesc1 = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ItemDesc2 = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ItemCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - Lot = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - SupplierBatch = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ArriveDate = table.Column(type: "datetime2", nullable: false), - ProduceDate = table.Column(type: "datetime2", nullable: false), - ExpireDate = table.Column(type: "datetime2", nullable: false), - PackingCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - ContainerCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - Uom = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - Qty = table.Column(type: "decimal(18,6)", precision: 18, scale: 6, nullable: false), - StdPackQty = table.Column(type: "decimal(18,6)", nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_Store_InspectAbnormalNoteDetail", x => x.Id); - table.ForeignKey( - name: "FK_Store_InspectAbnormalNoteDetail_Store_InspectAbnormalNote_MasterID", - column: x => x.MasterID, - principalTable: "Store_InspectAbnormalNote", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - }); - - migrationBuilder.CreateTable( - name: "Store_InspectNoteDetail", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - PoNumber = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - PoLine = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - InspectType = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - SamplePercent = table.Column(type: "decimal(18,6)", nullable: false, defaultValue: 0m), - Uom = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ReceiveQty = table.Column(type: "decimal(18,6)", nullable: false), - InspectQty = table.Column(type: "decimal(18,6)", nullable: false, defaultValue: 0m), - GoodQty = table.Column(type: "decimal(18,6)", nullable: false, defaultValue: 0m), - FailedReason = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - FailedQty = table.Column(type: "decimal(18,6)", nullable: false, defaultValue: 0m), - CrackQty = table.Column(type: "decimal(18,6)", nullable: false, defaultValue: 0m), - Photos = table.Column(type: "nvarchar(max)", nullable: true), - InspectUser = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - NotPassedQty = table.Column(type: "decimal(18,6)", nullable: false), - DetailInspectStatus = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - AbcClass = table.Column(type: "nvarchar(max)", nullable: true), - Appearance = table.Column(type: "nvarchar(max)", nullable: true), - Volume = table.Column(type: "nvarchar(max)", nullable: true), - Weight = table.Column(type: "nvarchar(max)", nullable: true), - OtherPropertyJson = table.Column(type: "nvarchar(max)", nullable: true), - StdPackQty = table.Column(type: "decimal(18,6)", nullable: false), - InspectDate = table.Column(type: "datetime2", nullable: false), - CreationTime = table.Column(type: "datetime2", nullable: false), - CreatorId = table.Column(type: "uniqueidentifier", nullable: true), - LastModificationTime = table.Column(type: "datetime2", nullable: true), - LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), - MasterID = table.Column(type: "uniqueidentifier", nullable: false), - TenantId = table.Column(type: "uniqueidentifier", nullable: true), - Number = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - Remark = table.Column(type: "nvarchar(3072)", maxLength: 3072, nullable: true), - ItemName = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ItemDesc1 = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ItemDesc2 = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ItemCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - Lot = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - SupplierBatch = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ArriveDate = table.Column(type: "datetime2", nullable: false), - ProduceDate = table.Column(type: "datetime2", nullable: false), - ExpireDate = table.Column(type: "datetime2", nullable: false), - PackingCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - ContainerCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - LocationCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - LocationArea = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - LocationGroup = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - LocationErpCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - WarehouseCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - Status = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_Store_InspectNoteDetail", x => x.Id); - table.ForeignKey( - name: "FK_Store_InspectNoteDetail_Store_InspectNote_MasterID", - column: x => x.MasterID, - principalTable: "Store_InspectNote", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - }); - - migrationBuilder.CreateTable( - name: "Store_InspectNoteSummaryDetail", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - PoNumber = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - PoLine = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - StdPackQty = table.Column(type: "decimal(18,6)", nullable: false), - InspectType = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - SamplePercent = table.Column(type: "decimal(18,6)", nullable: false, defaultValue: 0m), - Uom = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ReceiveQty = table.Column(type: "decimal(18,6)", nullable: false), - InspectQty = table.Column(type: "decimal(18,6)", nullable: false, defaultValue: 0m), - GoodQty = table.Column(type: "decimal(18,6)", nullable: false, defaultValue: 0m), - FailedReason = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - FailedQty = table.Column(type: "decimal(18,6)", nullable: false, defaultValue: 0m), - CrackQty = table.Column(type: "decimal(18,6)", nullable: false, defaultValue: 0m), - InspectUser = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - NotPassedQty = table.Column(type: "decimal(18,6)", nullable: false), - SummaryInspectStatus = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - AbcClass = table.Column(type: "nvarchar(max)", nullable: true), - CreationTime = table.Column(type: "datetime2", nullable: false), - CreatorId = table.Column(type: "uniqueidentifier", nullable: true), - LastModificationTime = table.Column(type: "datetime2", nullable: true), - LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), - MasterID = table.Column(type: "uniqueidentifier", nullable: false), - TenantId = table.Column(type: "uniqueidentifier", nullable: true), - Number = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - Remark = table.Column(type: "nvarchar(3072)", maxLength: 3072, nullable: true), - ItemName = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ItemDesc1 = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ItemDesc2 = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ItemCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - Lot = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - SupplierBatch = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ArriveDate = table.Column(type: "datetime2", nullable: false), - ProduceDate = table.Column(type: "datetime2", nullable: false), - ExpireDate = table.Column(type: "datetime2", nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_Store_InspectNoteSummaryDetail", x => x.Id); - table.ForeignKey( - name: "FK_Store_InspectNoteSummaryDetail_Store_InspectNote_MasterID", - column: x => x.MasterID, - principalTable: "Store_InspectNote", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - }); - - migrationBuilder.CreateTable( - name: "Store_InspectRequestDetail", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - PoNumber = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - PoLine = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - InspectType = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - SamplePercent = table.Column(type: "decimal(18,6)", nullable: false, defaultValue: 0m), - StdPackQty = table.Column(type: "decimal(18,6)", nullable: false), - Uom = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ReceiveQty = table.Column(type: "decimal(18,6)", nullable: false), - InspectQty = table.Column(type: "decimal(18,6)", nullable: false, defaultValue: 0m), - Attributes = table.Column(type: "nvarchar(max)", nullable: true), - DetailInspectStatus = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - AbcClass = table.Column(type: "nvarchar(max)", nullable: true), - CreationTime = table.Column(type: "datetime2", nullable: false), - CreatorId = table.Column(type: "uniqueidentifier", nullable: true), - LastModificationTime = table.Column(type: "datetime2", nullable: true), - LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), - MasterID = table.Column(type: "uniqueidentifier", nullable: false), - TenantId = table.Column(type: "uniqueidentifier", nullable: true), - Number = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - Remark = table.Column(type: "nvarchar(3072)", maxLength: 3072, nullable: true), - ItemName = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ItemDesc1 = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ItemDesc2 = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ItemCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - Lot = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - SupplierBatch = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ArriveDate = table.Column(type: "datetime2", nullable: false), - ProduceDate = table.Column(type: "datetime2", nullable: false), - ExpireDate = table.Column(type: "datetime2", nullable: false), - PackingCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - ContainerCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - LocationCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - LocationArea = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - LocationGroup = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - LocationErpCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - WarehouseCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - Status = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_Store_InspectRequestDetail", x => x.Id); - table.ForeignKey( - name: "FK_Store_InspectRequestDetail_Store_InspectRequest_MasterID", - column: x => x.MasterID, - principalTable: "Store_InspectRequest", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - }); - - migrationBuilder.CreateTable( - name: "Store_InspectRequestSummaryDetail", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - PoNumber = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - PoLine = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - StdPackQty = table.Column(type: "decimal(18,6)", nullable: false), - InspectType = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - SamplePercent = table.Column(type: "decimal(18,6)", nullable: false, defaultValue: 0m), - Uom = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ReceiveQty = table.Column(type: "decimal(18,6)", nullable: false), - InspectQty = table.Column(type: "decimal(18,6)", nullable: false, defaultValue: 0m), - InspectReport = table.Column(type: "nvarchar(max)", nullable: true), - SummaryInspectStatus = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - GoodQty = table.Column(type: "decimal(18,6)", nullable: false), - FailedQty = table.Column(type: "decimal(18,6)", nullable: false), - CrackQty = table.Column(type: "decimal(18,6)", nullable: false), - NotPassedQty = table.Column(type: "decimal(18,6)", nullable: false), - AbcClass = table.Column(type: "nvarchar(max)", nullable: true), - CreationTime = table.Column(type: "datetime2", nullable: false), - CreatorId = table.Column(type: "uniqueidentifier", nullable: true), - LastModificationTime = table.Column(type: "datetime2", nullable: true), - LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), - MasterID = table.Column(type: "uniqueidentifier", nullable: false), - TenantId = table.Column(type: "uniqueidentifier", nullable: true), - Number = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - Remark = table.Column(type: "nvarchar(3072)", maxLength: 3072, nullable: true), - ItemName = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ItemDesc1 = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ItemDesc2 = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ItemCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - Lot = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - SupplierBatch = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ArriveDate = table.Column(type: "datetime2", nullable: false), - ProduceDate = table.Column(type: "datetime2", nullable: false), - ExpireDate = table.Column(type: "datetime2", nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_Store_InspectRequestSummaryDetail", x => x.Id); - table.ForeignKey( - name: "FK_Store_InspectRequestSummaryDetail_Store_InspectRequest_MasterID", - column: x => x.MasterID, - principalTable: "Store_InspectRequest", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - }); - - migrationBuilder.CreateTable( - name: "Store_InventoryInitialNoteDetail", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - CreationTime = table.Column(type: "datetime2", nullable: false), - CreatorId = table.Column(type: "uniqueidentifier", nullable: true), - LastModificationTime = table.Column(type: "datetime2", nullable: true), - LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), - MasterID = table.Column(type: "uniqueidentifier", nullable: false), - TenantId = table.Column(type: "uniqueidentifier", nullable: true), - Number = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - Remark = table.Column(type: "nvarchar(3072)", maxLength: 3072, nullable: true), - ItemName = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ItemDesc1 = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ItemDesc2 = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ItemCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - Lot = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - SupplierBatch = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ArriveDate = table.Column(type: "datetime2", nullable: false), - ProduceDate = table.Column(type: "datetime2", nullable: false), - ExpireDate = table.Column(type: "datetime2", nullable: false), - PackingCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - ContainerCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - LocationCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - LocationArea = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - LocationGroup = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - LocationErpCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - WarehouseCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - Status = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - Uom = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - Qty = table.Column(type: "decimal(18,6)", precision: 18, scale: 6, nullable: false), - StdPackQty = table.Column(type: "decimal(18,6)", nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_Store_InventoryInitialNoteDetail", x => x.Id); - table.ForeignKey( - name: "FK_Store_InventoryInitialNoteDetail_Store_InventoryInitialNote_MasterID", - column: x => x.MasterID, - principalTable: "Store_InventoryInitialNote", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - }); - - migrationBuilder.CreateTable( - name: "Store_InventoryTransferNoteDetail", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - Reason = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - CreationTime = table.Column(type: "datetime2", nullable: false), - CreatorId = table.Column(type: "uniqueidentifier", nullable: true), - LastModificationTime = table.Column(type: "datetime2", nullable: true), - LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), - MasterID = table.Column(type: "uniqueidentifier", nullable: false), - TenantId = table.Column(type: "uniqueidentifier", nullable: true), - Number = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - Remark = table.Column(type: "nvarchar(3072)", maxLength: 3072, nullable: true), - ItemName = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ItemDesc1 = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ItemDesc2 = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ItemCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - Uom = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - Qty = table.Column(type: "decimal(18,6)", precision: 18, scale: 6, nullable: false), - StdPackQty = table.Column(type: "decimal(18,6)", nullable: false), - FromPackingCode = table.Column(type: "nvarchar(450)", nullable: true), - ToPackingCode = table.Column(type: "nvarchar(max)", nullable: true), - FromContainerCode = table.Column(type: "nvarchar(max)", nullable: true), - ToContainerCode = table.Column(type: "nvarchar(max)", nullable: true), - FromLot = table.Column(type: "nvarchar(max)", nullable: true), - ToLot = table.Column(type: "nvarchar(max)", nullable: true), - SupplierBatch = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ArriveDate = table.Column(type: "datetime2", nullable: false), - ProduceDate = table.Column(type: "datetime2", nullable: false), - ExpireDate = table.Column(type: "datetime2", nullable: false), - FromLocationCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - FromLocationArea = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - FromLocationGroup = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - FromLocationErpCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - FromWarehouseCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - FromStatus = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - ToLocationCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - ToLocationArea = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ToLocationGroup = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ToLocationErpCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - ToWarehouseCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - ToStatus = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_Store_InventoryTransferNoteDetail", x => x.Id); - table.ForeignKey( - name: "FK_Store_InventoryTransferNoteDetail_Store_InventoryTransferNote_MasterID", - column: x => x.MasterID, - principalTable: "Store_InventoryTransferNote", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - }); - - migrationBuilder.CreateTable( - name: "Store_IsolationNoteDetail", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - CreationTime = table.Column(type: "datetime2", nullable: false), - CreatorId = table.Column(type: "uniqueidentifier", nullable: true), - LastModificationTime = table.Column(type: "datetime2", nullable: true), - LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), - MasterID = table.Column(type: "uniqueidentifier", nullable: false), - TenantId = table.Column(type: "uniqueidentifier", nullable: true), - Number = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - Remark = table.Column(type: "nvarchar(3072)", maxLength: 3072, nullable: true), - ItemName = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ItemDesc1 = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ItemDesc2 = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ItemCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - Uom = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - Qty = table.Column(type: "decimal(18,6)", precision: 18, scale: 6, nullable: false), - StdPackQty = table.Column(type: "decimal(18,6)", nullable: false), - FromPackingCode = table.Column(type: "nvarchar(450)", nullable: true), - ToPackingCode = table.Column(type: "nvarchar(max)", nullable: true), - FromContainerCode = table.Column(type: "nvarchar(max)", nullable: true), - ToContainerCode = table.Column(type: "nvarchar(max)", nullable: true), - FromLot = table.Column(type: "nvarchar(max)", nullable: true), - ToLot = table.Column(type: "nvarchar(max)", nullable: true), - SupplierBatch = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ArriveDate = table.Column(type: "datetime2", nullable: false), - ProduceDate = table.Column(type: "datetime2", nullable: false), - ExpireDate = table.Column(type: "datetime2", nullable: false), - FromLocationCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - FromLocationArea = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - FromLocationGroup = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - FromLocationErpCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - FromWarehouseCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - FromStatus = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - ToLocationCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - ToLocationArea = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ToLocationGroup = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ToLocationErpCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - ToWarehouseCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - ToStatus = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_Store_IsolationNoteDetail", x => x.Id); - table.ForeignKey( - name: "FK_Store_IsolationNoteDetail_Store_IsolationNote_MasterID", - column: x => x.MasterID, - principalTable: "Store_IsolationNote", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - }); - - migrationBuilder.CreateTable( - name: "Store_IssueNoteDetail", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - IssueTime = table.Column(type: "datetime2", nullable: false), - ExpiredTime = table.Column(type: "datetime2", nullable: false), - ProdLine = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - WorkStation = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - OnTheWayLocationCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - CreationTime = table.Column(type: "datetime2", nullable: false), - CreatorId = table.Column(type: "uniqueidentifier", nullable: true), - LastModificationTime = table.Column(type: "datetime2", nullable: true), - LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), - MasterID = table.Column(type: "uniqueidentifier", nullable: false), - TenantId = table.Column(type: "uniqueidentifier", nullable: true), - Number = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - Remark = table.Column(type: "nvarchar(3072)", maxLength: 3072, nullable: true), - ItemName = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ItemDesc1 = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ItemDesc2 = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ItemCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - Uom = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - Qty = table.Column(type: "decimal(18,6)", precision: 18, scale: 6, nullable: false), - StdPackQty = table.Column(type: "decimal(18,6)", nullable: false), - FromPackingCode = table.Column(type: "nvarchar(450)", nullable: true), - ToPackingCode = table.Column(type: "nvarchar(max)", nullable: true), - FromContainerCode = table.Column(type: "nvarchar(max)", nullable: true), - ToContainerCode = table.Column(type: "nvarchar(max)", nullable: true), - FromLot = table.Column(type: "nvarchar(max)", nullable: true), - ToLot = table.Column(type: "nvarchar(max)", nullable: true), - SupplierBatch = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ArriveDate = table.Column(type: "datetime2", nullable: false), - ProduceDate = table.Column(type: "datetime2", nullable: false), - ExpireDate = table.Column(type: "datetime2", nullable: false), - FromLocationCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - FromLocationArea = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - FromLocationGroup = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - FromLocationErpCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - FromWarehouseCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - FromStatus = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - ToLocationCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - ToLocationArea = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ToLocationGroup = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ToLocationErpCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - ToWarehouseCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - ToStatus = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - RecommendContainerCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - RecommendPackingCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - RecommendSupplierBatch = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - RecommendArriveDate = table.Column(type: "datetime2", nullable: false), - RecommendProduceDate = table.Column(type: "datetime2", nullable: false), - RecommendExpireDate = table.Column(type: "datetime2", nullable: false), - RecommendLot = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - RecommendFromLocationCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - RecommendFromLocationArea = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - RecommendFromLocationGroup = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - RecommendFromLocationErpCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - RecommendFromWarehouseCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - RecommendQty = table.Column(type: "decimal(18,6)", nullable: false), - HandledContainerCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - HandledPackingCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - HandledSupplierBatch = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - HandledArriveDate = table.Column(type: "datetime2", nullable: false), - HandledProduceDate = table.Column(type: "datetime2", nullable: false), - HandledExpireDate = table.Column(type: "datetime2", nullable: false), - HandledLot = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - HandledFromLocationCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - HandledFromLocationArea = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - HandledFromLocationGroup = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - HandledFromLocationErpCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - HandledFromWarehouseCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - HandledQty = table.Column(type: "decimal(18,6)", nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_Store_IssueNoteDetail", x => x.Id); - table.ForeignKey( - name: "FK_Store_IssueNoteDetail_Store_IssueNote_MasterID", - column: x => x.MasterID, - principalTable: "Store_IssueNote", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - }); - - migrationBuilder.CreateTable( - name: "Store_ItemTransformNoteDetail", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - FromPackingCode = table.Column(type: "nvarchar(450)", nullable: true), - FromQty = table.Column(type: "decimal(18,6)", nullable: false), - FromSupplierBatch = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - FromArriveDate = table.Column(type: "datetime2", nullable: false), - FromProduceDate = table.Column(type: "datetime2", nullable: false), - FromExpireDate = table.Column(type: "datetime2", nullable: false), - FromLot = table.Column(type: "nvarchar(max)", nullable: true), - FromStatus = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - FromContainerCode = table.Column(type: "nvarchar(max)", nullable: true), - ToItemCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ToItemName = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ToItemDesc1 = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ToItemDesc2 = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ToPackingCode = table.Column(type: "nvarchar(450)", nullable: true), - ToQty = table.Column(type: "decimal(18,6)", nullable: false), - ToSupplierBatch = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ToArriveDate = table.Column(type: "datetime2", nullable: false), - ToProduceDate = table.Column(type: "datetime2", nullable: false), - ToExpireDate = table.Column(type: "datetime2", nullable: false), - ToLot = table.Column(type: "nvarchar(max)", nullable: true), - ToStatus = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - ToLocationCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - ToLocationArea = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ToLocationGroup = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ToLocationErpCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - ToWarehouseCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - ToContainerCode = table.Column(type: "nvarchar(max)", nullable: true), - ReasonCode = table.Column(type: "nvarchar(max)", nullable: true), - ConcurrencyStamp = table.Column(type: "nvarchar(max)", nullable: true), - Uom = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - FromLocationCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - FromLocationArea = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - FromLocationGroup = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - FromLocationErpCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - FromWarehouseCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - CreationTime = table.Column(type: "datetime2", nullable: false), - CreatorId = table.Column(type: "uniqueidentifier", nullable: true), - LastModificationTime = table.Column(type: "datetime2", nullable: true), - LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), - MasterID = table.Column(type: "uniqueidentifier", nullable: false), - TenantId = table.Column(type: "uniqueidentifier", nullable: true), - Number = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - Remark = table.Column(type: "nvarchar(3072)", maxLength: 3072, nullable: true), - ItemName = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ItemDesc1 = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ItemDesc2 = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ItemCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_Store_ItemTransformNoteDetail", x => x.Id); - table.ForeignKey( - name: "FK_Store_ItemTransformNoteDetail_Store_ItemTransformNote_MasterID", - column: x => x.MasterID, - principalTable: "Store_ItemTransformNote", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - }); - - migrationBuilder.CreateTable( - name: "Store_ItemTransformRequestDetail", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - FromPackingCode = table.Column(type: "nvarchar(450)", nullable: true), - FromQty = table.Column(type: "decimal(18,6)", nullable: false), - FromSupplierBatch = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - FromArriveDate = table.Column(type: "datetime2", nullable: false), - FromProduceDate = table.Column(type: "datetime2", nullable: false), - FromExpireDate = table.Column(type: "datetime2", nullable: false), - FromLot = table.Column(type: "nvarchar(max)", nullable: true), - FromStatus = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - FromContainerCode = table.Column(type: "nvarchar(max)", nullable: true), - ToPackingCode = table.Column(type: "nvarchar(450)", nullable: true), - ToItemName = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ToItemDesc1 = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ToItemDesc2 = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ToItemCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ToSupplierBatch = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ToArriveDate = table.Column(type: "datetime2", nullable: false), - ToProduceDate = table.Column(type: "datetime2", nullable: false), - ToExpireDate = table.Column(type: "datetime2", nullable: false), - ToQty = table.Column(type: "decimal(18,6)", nullable: false), - ToLot = table.Column(type: "nvarchar(max)", nullable: true), - ToStatus = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - ToLocationCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - ToLocationArea = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ToLocationGroup = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ToLocationErpCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - ToWarehouseCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - ToContainerCode = table.Column(type: "nvarchar(max)", nullable: true), - ReasonCode = table.Column(type: "nvarchar(max)", nullable: true), - Uom = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - FromLocationCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - FromLocationArea = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - FromLocationGroup = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - FromLocationErpCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - FromWarehouseCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - CreationTime = table.Column(type: "datetime2", nullable: false), - CreatorId = table.Column(type: "uniqueidentifier", nullable: true), - LastModificationTime = table.Column(type: "datetime2", nullable: true), - LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), - MasterID = table.Column(type: "uniqueidentifier", nullable: false), - TenantId = table.Column(type: "uniqueidentifier", nullable: true), - Number = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - Remark = table.Column(type: "nvarchar(3072)", maxLength: 3072, nullable: true), - ItemName = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ItemDesc1 = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ItemDesc2 = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ItemCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_Store_ItemTransformRequestDetail", x => x.Id); - table.ForeignKey( - name: "FK_Store_ItemTransformRequestDetail_Store_ItemTransformRequest_MasterID", - column: x => x.MasterID, - principalTable: "Store_ItemTransformRequest", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - }); - - migrationBuilder.CreateTable( - name: "Store_JisDeliverNoteDetail", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - DeliverTime = table.Column(type: "datetime2", nullable: false), - ExpiredTime = table.Column(type: "datetime2", nullable: false), - Year = table.Column(type: "nvarchar(max)", nullable: true), - ProductNo = table.Column(type: "nvarchar(max)", nullable: true), - ProjectCode = table.Column(type: "nvarchar(max)", nullable: true), - Position = table.Column(type: "nvarchar(max)", nullable: true), - SeqNo = table.Column(type: "nvarchar(max)", nullable: true), - PackCapacity = table.Column(type: "nvarchar(max)", nullable: true), - OnlineType = table.Column(type: "nvarchar(max)", nullable: true), - Stage = table.Column(type: "nvarchar(max)", nullable: true), - UsedFor = table.Column(type: "nvarchar(max)", nullable: true), - CreationTime = table.Column(type: "datetime2", nullable: false), - CreatorId = table.Column(type: "uniqueidentifier", nullable: true), - LastModificationTime = table.Column(type: "datetime2", nullable: true), - LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), - MasterID = table.Column(type: "uniqueidentifier", nullable: false), - TenantId = table.Column(type: "uniqueidentifier", nullable: true), - Number = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - Remark = table.Column(type: "nvarchar(3072)", maxLength: 3072, nullable: true), - ItemName = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ItemDesc1 = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ItemDesc2 = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ItemCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - Uom = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - Qty = table.Column(type: "decimal(18,6)", precision: 18, scale: 6, nullable: false), - StdPackQty = table.Column(type: "decimal(18,6)", nullable: false), - FromPackingCode = table.Column(type: "nvarchar(450)", nullable: true), - ToPackingCode = table.Column(type: "nvarchar(max)", nullable: true), - FromContainerCode = table.Column(type: "nvarchar(max)", nullable: true), - ToContainerCode = table.Column(type: "nvarchar(max)", nullable: true), - FromLot = table.Column(type: "nvarchar(max)", nullable: true), - ToLot = table.Column(type: "nvarchar(max)", nullable: true), - SupplierBatch = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ArriveDate = table.Column(type: "datetime2", nullable: false), - ProduceDate = table.Column(type: "datetime2", nullable: false), - ExpireDate = table.Column(type: "datetime2", nullable: false), - FromLocationCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - FromLocationArea = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - FromLocationGroup = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - FromLocationErpCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - FromWarehouseCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - FromStatus = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - ToLocationCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - ToLocationArea = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ToLocationGroup = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ToLocationErpCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - ToWarehouseCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - ToStatus = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_Store_JisDeliverNoteDetail", x => x.Id); - table.ForeignKey( - name: "FK_Store_JisDeliverNoteDetail_Store_JisDeliverNote_MasterID", - column: x => x.MasterID, - principalTable: "Store_JisDeliverNote", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - }); - - migrationBuilder.CreateTable( - name: "Store_JisProductReceiptNoteDetail", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - RawLocationCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - ProdLine = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - BomVersion = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - Year = table.Column(type: "nvarchar(max)", nullable: true), - ProductNo = table.Column(type: "nvarchar(max)", nullable: true), - ProjectCode = table.Column(type: "nvarchar(max)", nullable: true), - Position = table.Column(type: "nvarchar(max)", nullable: true), - SeqNo = table.Column(type: "nvarchar(max)", nullable: true), - CreationTime = table.Column(type: "datetime2", nullable: false), - CreatorId = table.Column(type: "uniqueidentifier", nullable: true), - LastModificationTime = table.Column(type: "datetime2", nullable: true), - LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), - MasterID = table.Column(type: "uniqueidentifier", nullable: false), - TenantId = table.Column(type: "uniqueidentifier", nullable: true), - Number = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - Remark = table.Column(type: "nvarchar(3072)", maxLength: 3072, nullable: true), - ItemName = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ItemDesc1 = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ItemDesc2 = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ItemCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - Lot = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - SupplierBatch = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ArriveDate = table.Column(type: "datetime2", nullable: false), - ProduceDate = table.Column(type: "datetime2", nullable: false), - ExpireDate = table.Column(type: "datetime2", nullable: false), - PackingCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - ContainerCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - LocationCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - LocationArea = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - LocationGroup = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - LocationErpCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - WarehouseCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - Status = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - Uom = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - Qty = table.Column(type: "decimal(18,6)", precision: 18, scale: 6, nullable: false), - StdPackQty = table.Column(type: "decimal(18,6)", nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_Store_JisProductReceiptNoteDetail", x => x.Id); - table.ForeignKey( - name: "FK_Store_JisProductReceiptNoteDetail_Store_JisProductReceiptNote_MasterID", - column: x => x.MasterID, - principalTable: "Store_JisProductReceiptNote", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - }); - - migrationBuilder.CreateTable( - name: "Store_MaterialRequestDetail", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - ToLocationCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - ToLocationArea = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - ToLocationGroup = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - ToLocationErpCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - ToWarehouseCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - FromLocationArea = table.Column(type: "nvarchar(max)", nullable: true), - ProdLine = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - WorkStation = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ExpiredTime = table.Column(type: "datetime2", nullable: false), - IssuedQty = table.Column(type: "decimal(18,6)", precision: 18, scale: 6, nullable: false), - ReceivedQty = table.Column(type: "decimal(18,6)", precision: 18, scale: 6, nullable: false), - Status = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - CreationTime = table.Column(type: "datetime2", nullable: false), - CreatorId = table.Column(type: "uniqueidentifier", nullable: true), - LastModificationTime = table.Column(type: "datetime2", nullable: true), - LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), - MasterID = table.Column(type: "uniqueidentifier", nullable: false), - TenantId = table.Column(type: "uniqueidentifier", nullable: true), - Number = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - Remark = table.Column(type: "nvarchar(3072)", maxLength: 3072, nullable: true), - ItemName = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ItemDesc1 = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ItemDesc2 = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ItemCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - Uom = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - Qty = table.Column(type: "decimal(18,6)", precision: 18, scale: 6, nullable: false), - StdPackQty = table.Column(type: "decimal(18,6)", nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_Store_MaterialRequestDetail", x => x.Id); - table.ForeignKey( - name: "FK_Store_MaterialRequestDetail_Store_MaterialRequest_MasterID", - column: x => x.MasterID, - principalTable: "Store_MaterialRequest", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - }); - - migrationBuilder.CreateTable( - name: "Store_NoOkConvertOkNoteDetail", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - CreationTime = table.Column(type: "datetime2", nullable: false), - CreatorId = table.Column(type: "uniqueidentifier", nullable: true), - LastModificationTime = table.Column(type: "datetime2", nullable: true), - LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), - MasterID = table.Column(type: "uniqueidentifier", nullable: false), - TenantId = table.Column(type: "uniqueidentifier", nullable: true), - Number = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - Remark = table.Column(type: "nvarchar(3072)", maxLength: 3072, nullable: true), - ItemName = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ItemDesc1 = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ItemDesc2 = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ItemCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - Uom = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - Qty = table.Column(type: "decimal(18,6)", precision: 18, scale: 6, nullable: false), - StdPackQty = table.Column(type: "decimal(18,6)", nullable: false), - FromPackingCode = table.Column(type: "nvarchar(450)", nullable: true), - ToPackingCode = table.Column(type: "nvarchar(max)", nullable: true), - FromContainerCode = table.Column(type: "nvarchar(max)", nullable: true), - ToContainerCode = table.Column(type: "nvarchar(max)", nullable: true), - FromLot = table.Column(type: "nvarchar(max)", nullable: true), - ToLot = table.Column(type: "nvarchar(max)", nullable: true), - SupplierBatch = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ArriveDate = table.Column(type: "datetime2", nullable: false), - ProduceDate = table.Column(type: "datetime2", nullable: false), - ExpireDate = table.Column(type: "datetime2", nullable: false), - FromLocationCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - FromLocationArea = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - FromLocationGroup = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - FromLocationErpCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - FromWarehouseCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - FromStatus = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - ToLocationCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - ToLocationArea = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ToLocationGroup = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ToLocationErpCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - ToWarehouseCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - ToStatus = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_Store_NoOkConvertOkNoteDetail", x => x.Id); - table.ForeignKey( - name: "FK_Store_NoOkConvertOkNoteDetail_Store_NoOkConvertOkNote_MasterID", - column: x => x.MasterID, - principalTable: "Store_NoOkConvertOkNote", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - }); - - migrationBuilder.CreateTable( - name: "Store_OfflineSettlementNoteDetail", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - CreationTime = table.Column(type: "datetime2", nullable: false), - CreatorId = table.Column(type: "uniqueidentifier", nullable: true), - LastModificationTime = table.Column(type: "datetime2", nullable: true), - LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), - MasterID = table.Column(type: "uniqueidentifier", nullable: false), - TenantId = table.Column(type: "uniqueidentifier", nullable: true), - Number = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - Remark = table.Column(type: "nvarchar(3072)", maxLength: 3072, nullable: true), - ItemName = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ItemDesc1 = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ItemDesc2 = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ItemCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - Lot = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - SupplierBatch = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ArriveDate = table.Column(type: "datetime2", nullable: false), - ProduceDate = table.Column(type: "datetime2", nullable: false), - ExpireDate = table.Column(type: "datetime2", nullable: false), - PackingCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - ContainerCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - LocationCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - LocationArea = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - LocationGroup = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - LocationErpCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - WarehouseCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - Status = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - Uom = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - Qty = table.Column(type: "decimal(18,6)", precision: 18, scale: 6, nullable: false), - StdPackQty = table.Column(type: "decimal(18,6)", nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_Store_OfflineSettlementNoteDetail", x => x.Id); - table.ForeignKey( - name: "FK_Store_OfflineSettlementNoteDetail_Store_OfflineSettlementNote_MasterID", - column: x => x.MasterID, - principalTable: "Store_OfflineSettlementNote", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - }); - - migrationBuilder.CreateTable( - name: "Store_PreparationPlanDetail", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - ToLocationCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - WorkStation = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - LineStatus = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - LatestTime = table.Column(type: "datetime2", nullable: false), - CreationTime = table.Column(type: "datetime2", nullable: false), - CreatorId = table.Column(type: "uniqueidentifier", nullable: true), - LastModificationTime = table.Column(type: "datetime2", nullable: true), - LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), - MasterID = table.Column(type: "uniqueidentifier", nullable: false), - TenantId = table.Column(type: "uniqueidentifier", nullable: true), - Number = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - Remark = table.Column(type: "nvarchar(3072)", maxLength: 3072, nullable: true), - ItemName = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ItemDesc1 = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ItemDesc2 = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ItemCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - Uom = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - Qty = table.Column(type: "decimal(18,6)", precision: 18, scale: 6, nullable: false), - StdPackQty = table.Column(type: "decimal(18,6)", nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_Store_PreparationPlanDetail", x => x.Id); - table.ForeignKey( - name: "FK_Store_PreparationPlanDetail_Store_PreparationPlan_MasterID", - column: x => x.MasterID, - principalTable: "Store_PreparationPlan", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - }); - - migrationBuilder.CreateTable( - name: "Store_ProductionPlanDetail", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - PlanQty = table.Column(type: "decimal(18,6)", nullable: false), - GoodQty = table.Column(type: "decimal(18,6)", nullable: false, defaultValue: 1m), - NoGoodQty = table.Column(type: "decimal(18,6)", nullable: false, defaultValue: 1m), - BomVersion = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - LineStatus = table.Column(type: "int", nullable: false), - Uom = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - CreationTime = table.Column(type: "datetime2", nullable: false), - CreatorId = table.Column(type: "uniqueidentifier", nullable: true), - LastModificationTime = table.Column(type: "datetime2", nullable: true), - LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), - MasterID = table.Column(type: "uniqueidentifier", nullable: false), - TenantId = table.Column(type: "uniqueidentifier", nullable: true), - Number = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - Remark = table.Column(type: "nvarchar(3072)", maxLength: 3072, nullable: true), - ItemName = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ItemDesc1 = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ItemDesc2 = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ItemCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - Lot = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - SupplierBatch = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ArriveDate = table.Column(type: "datetime2", nullable: false), - ProduceDate = table.Column(type: "datetime2", nullable: false), - ExpireDate = table.Column(type: "datetime2", nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_Store_ProductionPlanDetail", x => x.Id); - table.ForeignKey( - name: "FK_Store_ProductionPlanDetail_Store_ProductionPlan_MasterID", - column: x => x.MasterID, - principalTable: "Store_ProductionPlan", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - }); - - migrationBuilder.CreateTable( - name: "Store_ProductionReturnNoteDetail", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - CreationTime = table.Column(type: "datetime2", nullable: false), - CreatorId = table.Column(type: "uniqueidentifier", nullable: true), - LastModificationTime = table.Column(type: "datetime2", nullable: true), - LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), - MasterID = table.Column(type: "uniqueidentifier", nullable: false), - TenantId = table.Column(type: "uniqueidentifier", nullable: true), - Number = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - Remark = table.Column(type: "nvarchar(3072)", maxLength: 3072, nullable: true), - ItemName = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ItemDesc1 = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ItemDesc2 = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ItemCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - Uom = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - Qty = table.Column(type: "decimal(18,6)", precision: 18, scale: 6, nullable: false), - StdPackQty = table.Column(type: "decimal(18,6)", nullable: false), - FromPackingCode = table.Column(type: "nvarchar(450)", nullable: true), - ToPackingCode = table.Column(type: "nvarchar(450)", nullable: true), - FromContainerCode = table.Column(type: "nvarchar(max)", nullable: true), - ToContainerCode = table.Column(type: "nvarchar(max)", nullable: true), - FromLot = table.Column(type: "nvarchar(max)", nullable: true), - ToLot = table.Column(type: "nvarchar(max)", nullable: true), - SupplierBatch = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ArriveDate = table.Column(type: "datetime2", nullable: false), - ProduceDate = table.Column(type: "datetime2", nullable: false), - ExpireDate = table.Column(type: "datetime2", nullable: false), - FromLocationCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - FromLocationArea = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - FromLocationGroup = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - FromLocationErpCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - FromWarehouseCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - FromStatus = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - ToLocationCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - ToLocationArea = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ToLocationGroup = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ToLocationErpCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - ToWarehouseCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - ToStatus = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - RecommendContainerCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - RecommendPackingCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - RecommendSupplierBatch = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - RecommendArriveDate = table.Column(type: "datetime2", nullable: false), - RecommendProduceDate = table.Column(type: "datetime2", nullable: false), - RecommendExpireDate = table.Column(type: "datetime2", nullable: false), - RecommendLot = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - RecommendToLocationCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - RecommendToLocationArea = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - RecommendToLocationGroup = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - RecommendToLocationErpCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - RecommendToWarehouseCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - RecommendQty = table.Column(type: "decimal(18,6)", nullable: false), - HandledContainerCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - HandledPackingCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - HandledSupplierBatch = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - HandledArriveDate = table.Column(type: "datetime2", nullable: false), - HandledProduceDate = table.Column(type: "datetime2", nullable: false), - HandledExpireDate = table.Column(type: "datetime2", nullable: false), - HandledLot = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - HandledToLocationCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - HandledToLocationArea = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - HandledToLocationGroup = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - HandledToLocationErpCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - HandledToWarehouseCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - HandledQty = table.Column(type: "decimal(18,6)", nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_Store_ProductionReturnNoteDetail", x => x.Id); - table.ForeignKey( - name: "FK_Store_ProductionReturnNoteDetail_Store_ProductionReturnNote_MasterID", - column: x => x.MasterID, - principalTable: "Store_ProductionReturnNote", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - }); - - migrationBuilder.CreateTable( - name: "Store_ProductionReturnRequestDetail", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - CreationTime = table.Column(type: "datetime2", nullable: false), - CreatorId = table.Column(type: "uniqueidentifier", nullable: true), - LastModificationTime = table.Column(type: "datetime2", nullable: true), - LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), - MasterID = table.Column(type: "uniqueidentifier", nullable: false), - TenantId = table.Column(type: "uniqueidentifier", nullable: true), - Number = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - Remark = table.Column(type: "nvarchar(3072)", maxLength: 3072, nullable: true), - ItemName = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ItemDesc1 = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ItemDesc2 = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ItemCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - Uom = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - Qty = table.Column(type: "decimal(18,6)", precision: 18, scale: 6, nullable: false), - StdPackQty = table.Column(type: "decimal(18,6)", nullable: false), - FromPackingCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ToPackingCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - FromContainerCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ToContainerCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - FromLot = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ToLot = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - SupplierBatch = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ArriveDate = table.Column(type: "datetime2", nullable: false), - ProduceDate = table.Column(type: "datetime2", nullable: false), - ExpireDate = table.Column(type: "datetime2", nullable: false), - FromLocationCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - FromLocationArea = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - FromLocationGroup = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - FromLocationErpCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - FromWarehouseCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - FromStatus = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - ToLocationCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - ToLocationArea = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ToLocationGroup = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ToLocationErpCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - ToWarehouseCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - ToStatus = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_Store_ProductionReturnRequestDetail", x => x.Id); - table.ForeignKey( - name: "FK_Store_ProductionReturnRequestDetail_Store_ProductionReturnRequest_MasterID", - column: x => x.MasterID, - principalTable: "Store_ProductionReturnRequest", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - }); - - migrationBuilder.CreateTable( - name: "Store_ProductL7PartsNoteDetail", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - RowID = table.Column(type: "int", nullable: false), - ProductNo = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - Program = table.Column(type: "nvarchar(max)", nullable: true), - Position = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - FATA = table.Column(type: "nvarchar(max)", nullable: true), - Configuration = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - L7Part = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - CanMake = table.Column(type: "bit", nullable: false), - CanBuy = table.Column(type: "bit", nullable: false), - RawLocationCode = table.Column(type: "nvarchar(max)", nullable: true), - LocationCode = table.Column(type: "nvarchar(max)", nullable: true), - ProdLine = table.Column(type: "nvarchar(max)", nullable: true), - Qty = table.Column(type: "int", nullable: false), - State = table.Column(type: "int", nullable: false), - CreateDate = table.Column(type: "datetime2", nullable: false), - CreationTime = table.Column(type: "datetime2", nullable: false), - CreatorId = table.Column(type: "uniqueidentifier", nullable: true), - LastModificationTime = table.Column(type: "datetime2", nullable: true), - LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), - MasterID = table.Column(type: "uniqueidentifier", nullable: false), - TenantId = table.Column(type: "uniqueidentifier", nullable: true), - Number = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - Remark = table.Column(type: "nvarchar(3072)", maxLength: 3072, nullable: true), - ItemName = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ItemDesc1 = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ItemDesc2 = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ItemCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_Store_ProductL7PartsNoteDetail", x => x.Id); - table.ForeignKey( - name: "FK_Store_ProductL7PartsNoteDetail_Store_ProductL7PartsNote_MasterID", - column: x => x.MasterID, - principalTable: "Store_ProductL7PartsNote", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - }); - - migrationBuilder.CreateTable( - name: "Store_ProductReceiptNoteDetail", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - RawLocationCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - RawArea = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ProdLine = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - BomVersion = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ReturnQty = table.Column(type: "decimal(18,6)", nullable: false, defaultValue: 0m), - CreationTime = table.Column(type: "datetime2", nullable: false), - CreatorId = table.Column(type: "uniqueidentifier", nullable: true), - LastModificationTime = table.Column(type: "datetime2", nullable: true), - LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), - MasterID = table.Column(type: "uniqueidentifier", nullable: false), - TenantId = table.Column(type: "uniqueidentifier", nullable: true), - Number = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - Remark = table.Column(type: "nvarchar(3072)", maxLength: 3072, nullable: true), - ItemName = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ItemDesc1 = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ItemDesc2 = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ItemCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - Lot = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - SupplierBatch = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ArriveDate = table.Column(type: "datetime2", nullable: false), - ProduceDate = table.Column(type: "datetime2", nullable: false), - ExpireDate = table.Column(type: "datetime2", nullable: false), - PackingCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - ContainerCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - LocationCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - LocationArea = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - LocationGroup = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - LocationErpCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - WarehouseCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - Status = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - Uom = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - Qty = table.Column(type: "decimal(18,6)", precision: 18, scale: 6, nullable: false), - StdPackQty = table.Column(type: "decimal(18,6)", nullable: false), - RecommendContainerCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - RecommendPackingCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - RecommendSupplierBatch = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - RecommendArriveDate = table.Column(type: "datetime2", nullable: false), - RecommendProduceDate = table.Column(type: "datetime2", nullable: false), - RecommendExpireDate = table.Column(type: "datetime2", nullable: false), - RecommendLot = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - RecommendToLocationCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - RecommendToLocationArea = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - RecommendToLocationGroup = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - RecommendToLocationErpCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - RecommendToWarehouseCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - RecommendQty = table.Column(type: "decimal(18,6)", nullable: false), - HandledContainerCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - HandledPackingCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - HandledSupplierBatch = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - HandledArriveDate = table.Column(type: "datetime2", nullable: false), - HandledProduceDate = table.Column(type: "datetime2", nullable: false), - HandledExpireDate = table.Column(type: "datetime2", nullable: false), - HandledLot = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - HandledToLocationCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - HandledToLocationArea = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - HandledToLocationGroup = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - HandledToLocationErpCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - HandledToWarehouseCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - HandledQty = table.Column(type: "decimal(18,6)", nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_Store_ProductReceiptNoteDetail", x => x.Id); - table.ForeignKey( - name: "FK_Store_ProductReceiptNoteDetail_Store_ProductReceiptNote_MasterID", - column: x => x.MasterID, - principalTable: "Store_ProductReceiptNote", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - }); - - migrationBuilder.CreateTable( - name: "Store_ProductReceiptRequestDetail", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - RawArea = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - Uom = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - Qty = table.Column(type: "decimal(18,6)", precision: 18, scale: 6, nullable: false), - StdPackQty = table.Column(type: "decimal(18,6)", nullable: false), - BomVersion = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - LocationCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - LocationArea = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - LocationGroup = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - LocationErpCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - WarehouseCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - ReturnQty = table.Column(type: "decimal(18,6)", nullable: false, defaultValue: 0m), - CreationTime = table.Column(type: "datetime2", nullable: false), - CreatorId = table.Column(type: "uniqueidentifier", nullable: true), - LastModificationTime = table.Column(type: "datetime2", nullable: true), - LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), - MasterID = table.Column(type: "uniqueidentifier", nullable: false), - TenantId = table.Column(type: "uniqueidentifier", nullable: true), - Number = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - Remark = table.Column(type: "nvarchar(3072)", maxLength: 3072, nullable: true), - ItemName = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ItemDesc1 = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ItemDesc2 = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ItemCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - Lot = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - SupplierBatch = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ArriveDate = table.Column(type: "datetime2", nullable: false), - ProduceDate = table.Column(type: "datetime2", nullable: false), - ExpireDate = table.Column(type: "datetime2", nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_Store_ProductReceiptRequestDetail", x => x.Id); - table.ForeignKey( - name: "FK_Store_ProductReceiptRequestDetail_Store_ProductReceiptRequest_MasterID", - column: x => x.MasterID, - principalTable: "Store_ProductReceiptRequest", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - }); - - migrationBuilder.CreateTable( - name: "Store_ProductRecycleMaterialDetail", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - BomVersion = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ProductPackingCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ProductItemCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ProductItemName = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ProductItemDesc1 = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ProductItemDesc2 = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ProductLot = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - CreationTime = table.Column(type: "datetime2", nullable: false), - CreatorId = table.Column(type: "uniqueidentifier", nullable: true), - LastModificationTime = table.Column(type: "datetime2", nullable: true), - LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), - MasterID = table.Column(type: "uniqueidentifier", nullable: false), - TenantId = table.Column(type: "uniqueidentifier", nullable: true), - Number = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - Remark = table.Column(type: "nvarchar(3072)", maxLength: 3072, nullable: true), - ItemName = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ItemDesc1 = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ItemDesc2 = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ItemCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - Lot = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - SupplierBatch = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ArriveDate = table.Column(type: "datetime2", nullable: false), - ProduceDate = table.Column(type: "datetime2", nullable: false), - ExpireDate = table.Column(type: "datetime2", nullable: false), - PackingCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - ContainerCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - LocationCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - LocationArea = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - LocationGroup = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - LocationErpCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - WarehouseCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - Status = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - Uom = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - Qty = table.Column(type: "decimal(18,6)", precision: 18, scale: 6, nullable: false), - StdPackQty = table.Column(type: "decimal(18,6)", nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_Store_ProductRecycleMaterialDetail", x => x.Id); - table.ForeignKey( - name: "FK_Store_ProductRecycleMaterialDetail_Store_ProductRecycleNote_MasterID", - column: x => x.MasterID, - principalTable: "Store_ProductRecycleNote", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - }); - - migrationBuilder.CreateTable( - name: "Store_ProductRecycleNoteDetail", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - ReasonCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true), - CreationTime = table.Column(type: "datetime2", nullable: false), - CreatorId = table.Column(type: "uniqueidentifier", nullable: true), - LastModificationTime = table.Column(type: "datetime2", nullable: true), - LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), - MasterID = table.Column(type: "uniqueidentifier", nullable: false), - TenantId = table.Column(type: "uniqueidentifier", nullable: true), - Number = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - Remark = table.Column(type: "nvarchar(3072)", maxLength: 3072, nullable: true), - ItemName = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ItemDesc1 = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ItemDesc2 = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ItemCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - Lot = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - SupplierBatch = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ArriveDate = table.Column(type: "datetime2", nullable: false), - ProduceDate = table.Column(type: "datetime2", nullable: false), - ExpireDate = table.Column(type: "datetime2", nullable: false), - PackingCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - ContainerCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - LocationCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - LocationArea = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - LocationGroup = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - LocationErpCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - WarehouseCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - Status = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - Uom = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - Qty = table.Column(type: "decimal(18,6)", precision: 18, scale: 6, nullable: false), - StdPackQty = table.Column(type: "decimal(18,6)", nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_Store_ProductRecycleNoteDetail", x => x.Id); - table.ForeignKey( - name: "FK_Store_ProductRecycleNoteDetail_Store_ProductRecycleNote_MasterID", - column: x => x.MasterID, - principalTable: "Store_ProductRecycleNote", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - }); - - migrationBuilder.CreateTable( - name: "Store_ProductRecycleRequestDetail", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - BomVersion = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - LocationCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - LocationArea = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - LocationGroup = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - LocationErpCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - RawLocationCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - RawLocationArea = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - RawLocationGroup = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - RawLocationErpCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - RawWarehouseCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - Uom = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - Qty = table.Column(type: "decimal(18,6)", precision: 18, scale: 6, nullable: false), - ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true), - Status = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - WarehouseCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - CreationTime = table.Column(type: "datetime2", nullable: false), - CreatorId = table.Column(type: "uniqueidentifier", nullable: true), - LastModificationTime = table.Column(type: "datetime2", nullable: true), - LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), - MasterID = table.Column(type: "uniqueidentifier", nullable: false), - TenantId = table.Column(type: "uniqueidentifier", nullable: true), - Number = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - Remark = table.Column(type: "nvarchar(3072)", maxLength: 3072, nullable: true), - ItemName = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ItemDesc1 = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ItemDesc2 = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ItemCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_Store_ProductRecycleRequestDetail", x => x.Id); - table.ForeignKey( - name: "FK_Store_ProductRecycleRequestDetail_Store_ProductRecycleRequest_MasterID", - column: x => x.MasterID, - principalTable: "Store_ProductRecycleRequest", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - }); - - migrationBuilder.CreateTable( - name: "Store_PurchaseOrderDetail", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - PoLine = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - SupplierPackUom = table.Column(type: "nvarchar(max)", nullable: true), - SupplierPackQty = table.Column(type: "decimal(18,6)", nullable: false), - ConvertRate = table.Column(type: "decimal(18,6)", nullable: false, defaultValue: 1m), - IsConsignment = table.Column(type: "bit", nullable: false, defaultValue: false), - LineStatus = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - LocationErpCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ProjectCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ShippedQty = table.Column(type: "decimal(18,6)", nullable: false), - ReceivedQty = table.Column(type: "decimal(18,6)", nullable: false), - ReturnedQty = table.Column(type: "decimal(18,6)", nullable: false), - PutAwayQty = table.Column(type: "decimal(18,6)", nullable: false), - PlanUserCode = table.Column(type: "nvarchar(max)", nullable: true), - Lot = table.Column(type: "nvarchar(max)", nullable: true), - PlanArriveDate = table.Column(type: "datetime2", nullable: false), - Ctype = table.Column(type: "nvarchar(max)", nullable: true), - ProduceDate = table.Column(type: "datetime2", nullable: false), - ExpireDate = table.Column(type: "datetime2", nullable: false), - OrderRemark = table.Column(type: "nvarchar(max)", nullable: true), - CreationTime = table.Column(type: "datetime2", nullable: false), - CreatorId = table.Column(type: "uniqueidentifier", nullable: true), - LastModificationTime = table.Column(type: "datetime2", nullable: true), - LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), - MasterID = table.Column(type: "uniqueidentifier", nullable: false), - TenantId = table.Column(type: "uniqueidentifier", nullable: true), - Number = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - Remark = table.Column(type: "nvarchar(3072)", maxLength: 3072, nullable: true), - ItemName = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ItemDesc1 = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ItemDesc2 = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ItemCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - Uom = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - Qty = table.Column(type: "decimal(18,6)", precision: 18, scale: 6, nullable: false), - StdPackQty = table.Column(type: "decimal(18,6)", nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_Store_PurchaseOrderDetail", x => x.Id); - table.ForeignKey( - name: "FK_Store_PurchaseOrderDetail_Store_PurchaseOrder_MasterID", - column: x => x.MasterID, - principalTable: "Store_PurchaseOrder", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - }); - - migrationBuilder.CreateTable( - name: "Store_PurchaseReceiptNoteDetail", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - PoNumber = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - PoLine = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - PurchaseReceiptInspectStatus = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - InspectPhotoJson = table.Column(type: "nvarchar(max)", nullable: true), - FailedReason = table.Column(type: "nvarchar(max)", nullable: true), - MassDefect = table.Column(type: "nvarchar(max)", nullable: true), - SupplierPackUom = table.Column(type: "nvarchar(max)", nullable: true), - SupplierPackQty = table.Column(type: "decimal(18,6)", nullable: false), - CreationTime = table.Column(type: "datetime2", nullable: false), - CreatorId = table.Column(type: "uniqueidentifier", nullable: true), - LastModificationTime = table.Column(type: "datetime2", nullable: true), - LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), - MasterID = table.Column(type: "uniqueidentifier", nullable: false), - TenantId = table.Column(type: "uniqueidentifier", nullable: true), - Number = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - Remark = table.Column(type: "nvarchar(3072)", maxLength: 3072, nullable: true), - ItemName = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ItemDesc1 = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ItemDesc2 = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ItemCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - Lot = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - SupplierBatch = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ArriveDate = table.Column(type: "datetime2", nullable: false), - ProduceDate = table.Column(type: "datetime2", nullable: false), - ExpireDate = table.Column(type: "datetime2", nullable: false), - PackingCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - ContainerCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - LocationCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - LocationArea = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - LocationGroup = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - LocationErpCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - WarehouseCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - Status = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - Uom = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - Qty = table.Column(type: "decimal(18,6)", precision: 18, scale: 6, nullable: false), - StdPackQty = table.Column(type: "decimal(18,6)", nullable: false), - RecommendContainerCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - RecommendPackingCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - RecommendSupplierBatch = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - RecommendArriveDate = table.Column(type: "datetime2", nullable: false), - RecommendProduceDate = table.Column(type: "datetime2", nullable: false), - RecommendExpireDate = table.Column(type: "datetime2", nullable: false), - RecommendLot = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - RecommendToLocationCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - RecommendToLocationArea = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - RecommendToLocationGroup = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - RecommendToLocationErpCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - RecommendToWarehouseCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - RecommendQty = table.Column(type: "decimal(18,6)", nullable: false), - HandledContainerCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - HandledPackingCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - HandledSupplierBatch = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - HandledArriveDate = table.Column(type: "datetime2", nullable: false), - HandledProduceDate = table.Column(type: "datetime2", nullable: false), - HandledExpireDate = table.Column(type: "datetime2", nullable: false), - HandledLot = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - HandledToLocationCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - HandledToLocationArea = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - HandledToLocationGroup = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - HandledToLocationErpCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - HandledToWarehouseCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - HandledQty = table.Column(type: "decimal(18,6)", nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_Store_PurchaseReceiptNoteDetail", x => x.Id); - table.ForeignKey( - name: "FK_Store_PurchaseReceiptNoteDetail_Store_PurchaseReceiptNote_MasterID", - column: x => x.MasterID, - principalTable: "Store_PurchaseReceiptNote", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - }); - - migrationBuilder.CreateTable( - name: "Store_PurchaseReceiptRequestDetail", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - PoNumber = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - PoLine = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - SupplierPackUom = table.Column(type: "nvarchar(max)", nullable: true), - SupplierPackQty = table.Column(type: "decimal(18,6)", nullable: false), - ConvertRate = table.Column(type: "decimal(18,6)", nullable: false), - RecommendErpCode = table.Column(type: "nvarchar(max)", nullable: true), - CreationTime = table.Column(type: "datetime2", nullable: false), - CreatorId = table.Column(type: "uniqueidentifier", nullable: true), - LastModificationTime = table.Column(type: "datetime2", nullable: true), - LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), - MasterID = table.Column(type: "uniqueidentifier", nullable: false), - TenantId = table.Column(type: "uniqueidentifier", nullable: true), - Number = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - Remark = table.Column(type: "nvarchar(3072)", maxLength: 3072, nullable: true), - ItemName = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ItemDesc1 = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ItemDesc2 = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ItemCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - Lot = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - SupplierBatch = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ArriveDate = table.Column(type: "datetime2", nullable: false), - ProduceDate = table.Column(type: "datetime2", nullable: false), - ExpireDate = table.Column(type: "datetime2", nullable: false), - PackingCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - ContainerCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - Uom = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - Qty = table.Column(type: "decimal(18,6)", precision: 18, scale: 6, nullable: false), - StdPackQty = table.Column(type: "decimal(18,6)", nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_Store_PurchaseReceiptRequestDetail", x => x.Id); - table.ForeignKey( - name: "FK_Store_PurchaseReceiptRequestDetail_Store_PurchaseReceiptRequest_MasterID", - column: x => x.MasterID, - principalTable: "Store_PurchaseReceiptRequest", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - }); - - migrationBuilder.CreateTable( - name: "Store_PurchaseReturnNoteDetail", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - PoNumber = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - PoLine = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - Reason = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - CreationTime = table.Column(type: "datetime2", nullable: false), - CreatorId = table.Column(type: "uniqueidentifier", nullable: true), - LastModificationTime = table.Column(type: "datetime2", nullable: true), - LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), - MasterID = table.Column(type: "uniqueidentifier", nullable: false), - TenantId = table.Column(type: "uniqueidentifier", nullable: true), - Number = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - Remark = table.Column(type: "nvarchar(3072)", maxLength: 3072, nullable: true), - ItemName = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ItemDesc1 = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ItemDesc2 = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ItemCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - Lot = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - SupplierBatch = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ArriveDate = table.Column(type: "datetime2", nullable: false), - ProduceDate = table.Column(type: "datetime2", nullable: false), - ExpireDate = table.Column(type: "datetime2", nullable: false), - PackingCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - ContainerCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - LocationCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - LocationArea = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - LocationGroup = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - LocationErpCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - WarehouseCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - Status = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - Uom = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - Qty = table.Column(type: "decimal(18,6)", precision: 18, scale: 6, nullable: false), - StdPackQty = table.Column(type: "decimal(18,6)", nullable: false), - RecommendContainerCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - RecommendPackingCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - RecommendSupplierBatch = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - RecommendArriveDate = table.Column(type: "datetime2", nullable: false), - RecommendProduceDate = table.Column(type: "datetime2", nullable: false), - RecommendExpireDate = table.Column(type: "datetime2", nullable: false), - RecommendLot = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - RecommendFromLocationCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - RecommendFromLocationArea = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - RecommendFromLocationGroup = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - RecommendFromLocationErpCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - RecommendFromWarehouseCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - RecommendQty = table.Column(type: "decimal(18,6)", nullable: false), - HandledContainerCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - HandledPackingCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - HandledSupplierBatch = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - HandledArriveDate = table.Column(type: "datetime2", nullable: false), - HandledProduceDate = table.Column(type: "datetime2", nullable: false), - HandledExpireDate = table.Column(type: "datetime2", nullable: false), - HandledLot = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - HandledFromLocationCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - HandledFromLocationArea = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - HandledFromLocationGroup = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - HandledFromLocationErpCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - HandledFromWarehouseCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - HandledQty = table.Column(type: "decimal(18,6)", nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_Store_PurchaseReturnNoteDetail", x => x.Id); - table.ForeignKey( - name: "FK_Store_PurchaseReturnNoteDetail_Store_PurchaseReturnNote_MasterID", - column: x => x.MasterID, - principalTable: "Store_PurchaseReturnNote", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - }); - - migrationBuilder.CreateTable( - name: "Store_PurchaseReturnRequestDetail", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - PoNumber = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - PoLine = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - CreationTime = table.Column(type: "datetime2", nullable: false), - CreatorId = table.Column(type: "uniqueidentifier", nullable: true), - LastModificationTime = table.Column(type: "datetime2", nullable: true), - LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), - MasterID = table.Column(type: "uniqueidentifier", nullable: false), - TenantId = table.Column(type: "uniqueidentifier", nullable: true), - Number = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - Remark = table.Column(type: "nvarchar(3072)", maxLength: 3072, nullable: true), - ItemName = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ItemDesc1 = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ItemDesc2 = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ItemCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - Lot = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - SupplierBatch = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ArriveDate = table.Column(type: "datetime2", nullable: false), - ProduceDate = table.Column(type: "datetime2", nullable: false), - ExpireDate = table.Column(type: "datetime2", nullable: false), - PackingCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - ContainerCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - LocationCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - LocationArea = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - LocationGroup = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - LocationErpCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - WarehouseCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - Status = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - Uom = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - Qty = table.Column(type: "decimal(18,6)", precision: 18, scale: 6, nullable: false), - StdPackQty = table.Column(type: "decimal(18,6)", nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_Store_PurchaseReturnRequestDetail", x => x.Id); - table.ForeignKey( - name: "FK_Store_PurchaseReturnRequestDetail_Store_PurchaseReturnRequest_MasterID", - column: x => x.MasterID, - principalTable: "Store_PurchaseReturnRequest", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - }); - - migrationBuilder.CreateTable( - name: "Store_PutawayNoteDetail", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - PoNumber = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - PoLine = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - JobNumber = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - CreationTime = table.Column(type: "datetime2", nullable: false), - CreatorId = table.Column(type: "uniqueidentifier", nullable: true), - LastModificationTime = table.Column(type: "datetime2", nullable: true), - LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), - MasterID = table.Column(type: "uniqueidentifier", nullable: false), - TenantId = table.Column(type: "uniqueidentifier", nullable: true), - Number = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - Remark = table.Column(type: "nvarchar(3072)", maxLength: 3072, nullable: true), - ItemName = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ItemDesc1 = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ItemDesc2 = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ItemCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - Uom = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - Qty = table.Column(type: "decimal(18,6)", precision: 18, scale: 6, nullable: false), - StdPackQty = table.Column(type: "decimal(18,6)", nullable: false), - FromPackingCode = table.Column(type: "nvarchar(450)", nullable: true), - ToPackingCode = table.Column(type: "nvarchar(450)", nullable: true), - FromContainerCode = table.Column(type: "nvarchar(max)", nullable: true), - ToContainerCode = table.Column(type: "nvarchar(max)", nullable: true), - FromLot = table.Column(type: "nvarchar(max)", nullable: true), - ToLot = table.Column(type: "nvarchar(max)", nullable: true), - SupplierBatch = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ArriveDate = table.Column(type: "datetime2", nullable: false), - ProduceDate = table.Column(type: "datetime2", nullable: false), - ExpireDate = table.Column(type: "datetime2", nullable: false), - FromLocationCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - FromLocationArea = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - FromLocationGroup = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - FromLocationErpCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - FromWarehouseCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - FromStatus = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - ToLocationCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - ToLocationArea = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ToLocationGroup = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ToLocationErpCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - ToWarehouseCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - ToStatus = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - RecommendContainerCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - RecommendPackingCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - RecommendSupplierBatch = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - RecommendArriveDate = table.Column(type: "datetime2", nullable: false), - RecommendProduceDate = table.Column(type: "datetime2", nullable: false), - RecommendExpireDate = table.Column(type: "datetime2", nullable: false), - RecommendLot = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - RecommendToLocationCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - RecommendToLocationArea = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - RecommendToLocationGroup = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - RecommendToLocationErpCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - RecommendToWarehouseCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - RecommendQty = table.Column(type: "decimal(18,6)", nullable: false), - HandledContainerCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - HandledPackingCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - HandledSupplierBatch = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - HandledArriveDate = table.Column(type: "datetime2", nullable: false), - HandledProduceDate = table.Column(type: "datetime2", nullable: false), - HandledExpireDate = table.Column(type: "datetime2", nullable: false), - HandledLot = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - HandledToLocationCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - HandledToLocationArea = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - HandledToLocationGroup = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - HandledToLocationErpCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - HandledToWarehouseCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - HandledQty = table.Column(type: "decimal(18,6)", nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_Store_PutawayNoteDetail", x => x.Id); - table.ForeignKey( - name: "FK_Store_PutawayNoteDetail_Store_PutawayNote_MasterID", - column: x => x.MasterID, - principalTable: "Store_PutawayNote", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - }); - - migrationBuilder.CreateTable( - name: "Store_PutawayRequestDetail", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - InventoryQty = table.Column(type: "decimal(18,6)", nullable: false), - PoNumber = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - PoLine = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - CreationTime = table.Column(type: "datetime2", nullable: false), - CreatorId = table.Column(type: "uniqueidentifier", nullable: true), - LastModificationTime = table.Column(type: "datetime2", nullable: true), - LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), - MasterID = table.Column(type: "uniqueidentifier", nullable: false), - TenantId = table.Column(type: "uniqueidentifier", nullable: true), - Number = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - Remark = table.Column(type: "nvarchar(3072)", maxLength: 3072, nullable: true), - ItemName = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ItemDesc1 = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ItemDesc2 = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ItemCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - Uom = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - Qty = table.Column(type: "decimal(18,6)", precision: 18, scale: 6, nullable: false), - StdPackQty = table.Column(type: "decimal(18,6)", nullable: false), - FromPackingCode = table.Column(type: "nvarchar(max)", nullable: true), - ToPackingCode = table.Column(type: "nvarchar(max)", nullable: true), - FromContainerCode = table.Column(type: "nvarchar(max)", nullable: true), - ToContainerCode = table.Column(type: "nvarchar(max)", nullable: true), - FromLot = table.Column(type: "nvarchar(max)", nullable: true), - ToLot = table.Column(type: "nvarchar(max)", nullable: true), - SupplierBatch = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ArriveDate = table.Column(type: "datetime2", nullable: false), - ProduceDate = table.Column(type: "datetime2", nullable: false), - ExpireDate = table.Column(type: "datetime2", nullable: false), - FromLocationCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - FromLocationArea = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - FromLocationGroup = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - FromLocationErpCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - FromWarehouseCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - FromStatus = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - ToLocationCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - ToLocationArea = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ToLocationGroup = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ToLocationErpCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - ToWarehouseCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - ToStatus = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_Store_PutawayRequestDetail", x => x.Id); - table.ForeignKey( - name: "FK_Store_PutawayRequestDetail_Store_PutawayRequest_MasterID", - column: x => x.MasterID, - principalTable: "Store_PutawayRequest", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - }); - - migrationBuilder.CreateTable( - name: "Store_ReceiptAbnormalNoteDetail", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - ReceiptNumber = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - AbnormalType = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - Photos = table.Column(type: "nvarchar(max)", nullable: true), - CreationTime = table.Column(type: "datetime2", nullable: false), - CreatorId = table.Column(type: "uniqueidentifier", nullable: true), - LastModificationTime = table.Column(type: "datetime2", nullable: true), - LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), - MasterID = table.Column(type: "uniqueidentifier", nullable: false), - TenantId = table.Column(type: "uniqueidentifier", nullable: true), - Number = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - Remark = table.Column(type: "nvarchar(3072)", maxLength: 3072, nullable: true), - ItemName = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ItemDesc1 = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ItemDesc2 = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ItemCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - Lot = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - SupplierBatch = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ArriveDate = table.Column(type: "datetime2", nullable: false), - ProduceDate = table.Column(type: "datetime2", nullable: false), - ExpireDate = table.Column(type: "datetime2", nullable: false), - PackingCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - ContainerCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - LocationCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - LocationArea = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - LocationGroup = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - LocationErpCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - WarehouseCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - Status = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - Uom = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - Qty = table.Column(type: "decimal(18,6)", precision: 18, scale: 6, nullable: false), - StdPackQty = table.Column(type: "decimal(18,6)", nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_Store_ReceiptAbnormalNoteDetail", x => x.Id); - table.ForeignKey( - name: "FK_Store_ReceiptAbnormalNoteDetail_Store_ReceiptAbnormalNote_MasterID", - column: x => x.MasterID, - principalTable: "Store_ReceiptAbnormalNote", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - }); - - migrationBuilder.CreateTable( - name: "Store_RecycledMaterialReceiptNoteDetail", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - ReasonCode = table.Column(type: "nvarchar(max)", nullable: true), - CreationTime = table.Column(type: "datetime2", nullable: false), - CreatorId = table.Column(type: "uniqueidentifier", nullable: true), - LastModificationTime = table.Column(type: "datetime2", nullable: true), - LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), - MasterID = table.Column(type: "uniqueidentifier", nullable: false), - TenantId = table.Column(type: "uniqueidentifier", nullable: true), - Number = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - Remark = table.Column(type: "nvarchar(3072)", maxLength: 3072, nullable: true), - ItemName = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ItemDesc1 = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ItemDesc2 = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ItemCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - Lot = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - SupplierBatch = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ArriveDate = table.Column(type: "datetime2", nullable: false), - ProduceDate = table.Column(type: "datetime2", nullable: false), - ExpireDate = table.Column(type: "datetime2", nullable: false), - PackingCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - ContainerCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - LocationCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - LocationArea = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - LocationGroup = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - LocationErpCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - WarehouseCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - Status = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - Uom = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - Qty = table.Column(type: "decimal(18,6)", precision: 18, scale: 6, nullable: false), - StdPackQty = table.Column(type: "decimal(18,6)", nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_Store_RecycledMaterialReceiptNoteDetail", x => x.Id); - table.ForeignKey( - name: "FK_Store_RecycledMaterialReceiptNoteDetail_Store_RecycledMaterialReceiptNote_MasterID", - column: x => x.MasterID, - principalTable: "Store_RecycledMaterialReceiptNote", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - }); - - migrationBuilder.CreateTable( - name: "Store_SaleOrderDetail", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - SoLine = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - CustomerPackUom = table.Column(type: "nvarchar(max)", nullable: true), - CustomerPackQty = table.Column(type: "decimal(18,6)", nullable: false), - ConvertRate = table.Column(type: "decimal(18,6)", nullable: false, defaultValue: 1m), - LineStatus = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - CreationTime = table.Column(type: "datetime2", nullable: false), - CreatorId = table.Column(type: "uniqueidentifier", nullable: true), - LastModificationTime = table.Column(type: "datetime2", nullable: true), - LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), - MasterID = table.Column(type: "uniqueidentifier", nullable: false), - TenantId = table.Column(type: "uniqueidentifier", nullable: true), - Number = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - Remark = table.Column(type: "nvarchar(3072)", maxLength: 3072, nullable: true), - ItemName = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ItemDesc1 = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ItemDesc2 = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ItemCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - Uom = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - Qty = table.Column(type: "decimal(18,6)", precision: 18, scale: 6, nullable: false), - StdPackQty = table.Column(type: "decimal(18,6)", nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_Store_SaleOrderDetail", x => x.Id); - table.ForeignKey( - name: "FK_Store_SaleOrderDetail_Store_SaleOrder_MasterID", - column: x => x.MasterID, - principalTable: "Store_SaleOrder", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - }); - - migrationBuilder.CreateTable( - name: "Store_ScrapNoteDetail", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - ReasonCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - CreationTime = table.Column(type: "datetime2", nullable: false), - CreatorId = table.Column(type: "uniqueidentifier", nullable: true), - LastModificationTime = table.Column(type: "datetime2", nullable: true), - LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), - MasterID = table.Column(type: "uniqueidentifier", nullable: false), - TenantId = table.Column(type: "uniqueidentifier", nullable: true), - Number = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - Remark = table.Column(type: "nvarchar(3072)", maxLength: 3072, nullable: true), - ItemName = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ItemDesc1 = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ItemDesc2 = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ItemCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - Uom = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - Qty = table.Column(type: "decimal(18,6)", precision: 18, scale: 6, nullable: false), - StdPackQty = table.Column(type: "decimal(18,6)", nullable: false), - FromPackingCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ToPackingCode = table.Column(type: "nvarchar(max)", nullable: true), - FromContainerCode = table.Column(type: "nvarchar(max)", nullable: true), - ToContainerCode = table.Column(type: "nvarchar(max)", nullable: true), - FromLot = table.Column(type: "nvarchar(450)", nullable: true), - ToLot = table.Column(type: "nvarchar(max)", nullable: true), - SupplierBatch = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ArriveDate = table.Column(type: "datetime2", nullable: false), - ProduceDate = table.Column(type: "datetime2", nullable: false), - ExpireDate = table.Column(type: "datetime2", nullable: false), - FromLocationCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - FromLocationArea = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - FromLocationGroup = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - FromLocationErpCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - FromWarehouseCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - FromStatus = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - ToLocationCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - ToLocationArea = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ToLocationGroup = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ToLocationErpCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - ToWarehouseCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - ToStatus = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_Store_ScrapNoteDetail", x => x.Id); - table.ForeignKey( - name: "FK_Store_ScrapNoteDetail_Store_ScrapNote_MasterID", - column: x => x.MasterID, - principalTable: "Store_ScrapNote", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - }); - - migrationBuilder.CreateTable( - name: "Store_ScrapRequestDetail", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - ReasonCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - LocationCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - LocationArea = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - LocationGroup = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - LocationErpCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - WarehouseCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - CreationTime = table.Column(type: "datetime2", nullable: false), - CreatorId = table.Column(type: "uniqueidentifier", nullable: true), - LastModificationTime = table.Column(type: "datetime2", nullable: true), - LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), - MasterID = table.Column(type: "uniqueidentifier", nullable: false), - TenantId = table.Column(type: "uniqueidentifier", nullable: true), - Number = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - Remark = table.Column(type: "nvarchar(3072)", maxLength: 3072, nullable: true), - ItemName = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ItemDesc1 = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ItemDesc2 = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ItemCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - Uom = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - Qty = table.Column(type: "decimal(18,6)", precision: 18, scale: 6, nullable: false), - StdPackQty = table.Column(type: "decimal(18,6)", nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_Store_ScrapRequestDetail", x => x.Id); - table.ForeignKey( - name: "FK_Store_ScrapRequestDetail_Store_ScrapRequest_MasterID", - column: x => x.MasterID, - principalTable: "Store_ScrapRequest", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - }); - - migrationBuilder.CreateTable( - name: "Store_SupplierAsnDetail", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - PoNumber = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - PoLine = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - SupplierPackUom = table.Column(type: "nvarchar(max)", nullable: true), - SupplierPackQty = table.Column(type: "decimal(18,6)", nullable: false), - ConvertRate = table.Column(type: "decimal(18,6)", nullable: false), - ProjectCode = table.Column(type: "nvarchar(max)", nullable: true), - Ctype = table.Column(type: "nvarchar(max)", nullable: true), - RecommendErpCode = table.Column(type: "nvarchar(max)", nullable: true), - PlanUserCode = table.Column(type: "nvarchar(max)", nullable: true), - CreationTime = table.Column(type: "datetime2", nullable: false), - CreatorId = table.Column(type: "uniqueidentifier", nullable: true), - LastModificationTime = table.Column(type: "datetime2", nullable: true), - LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), - MasterID = table.Column(type: "uniqueidentifier", nullable: false), - TenantId = table.Column(type: "uniqueidentifier", nullable: true), - Number = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - Remark = table.Column(type: "nvarchar(3072)", maxLength: 3072, nullable: true), - ItemName = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ItemDesc1 = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ItemDesc2 = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ItemCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - Lot = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - SupplierBatch = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ArriveDate = table.Column(type: "datetime2", nullable: false), - ProduceDate = table.Column(type: "datetime2", nullable: false), - ExpireDate = table.Column(type: "datetime2", nullable: false), - PackingCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - ContainerCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - Uom = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - Qty = table.Column(type: "decimal(18,6)", precision: 18, scale: 6, nullable: false), - StdPackQty = table.Column(type: "decimal(18,6)", nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_Store_SupplierAsnDetail", x => x.Id); - table.ForeignKey( - name: "FK_Store_SupplierAsnDetail_Store_SupplierAsn_MasterID", - column: x => x.MasterID, - principalTable: "Store_SupplierAsn", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - }); - - migrationBuilder.CreateTable( - name: "Store_TransferNoteDetail", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - OnTheWayLocationCode = table.Column(type: "nvarchar(max)", nullable: true), - Reason = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - CreationTime = table.Column(type: "datetime2", nullable: false), - CreatorId = table.Column(type: "uniqueidentifier", nullable: true), - LastModificationTime = table.Column(type: "datetime2", nullable: true), - LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), - MasterID = table.Column(type: "uniqueidentifier", nullable: false), - TenantId = table.Column(type: "uniqueidentifier", nullable: true), - Number = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - Remark = table.Column(type: "nvarchar(3072)", maxLength: 3072, nullable: true), - ItemName = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ItemDesc1 = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ItemDesc2 = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ItemCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - Uom = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - Qty = table.Column(type: "decimal(18,6)", precision: 18, scale: 6, nullable: false), - StdPackQty = table.Column(type: "decimal(18,6)", nullable: false), - FromPackingCode = table.Column(type: "nvarchar(450)", nullable: true), - ToPackingCode = table.Column(type: "nvarchar(max)", nullable: true), - FromContainerCode = table.Column(type: "nvarchar(max)", nullable: true), - ToContainerCode = table.Column(type: "nvarchar(max)", nullable: true), - FromLot = table.Column(type: "nvarchar(max)", nullable: true), - ToLot = table.Column(type: "nvarchar(max)", nullable: true), - SupplierBatch = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ArriveDate = table.Column(type: "datetime2", nullable: false), - ProduceDate = table.Column(type: "datetime2", nullable: false), - ExpireDate = table.Column(type: "datetime2", nullable: false), - FromLocationCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - FromLocationArea = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - FromLocationGroup = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - FromLocationErpCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - FromWarehouseCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - FromStatus = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - ToLocationCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - ToLocationArea = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ToLocationGroup = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ToLocationErpCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - ToWarehouseCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - ToStatus = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_Store_TransferNoteDetail", x => x.Id); - table.ForeignKey( - name: "FK_Store_TransferNoteDetail_Store_TransferNote_MasterID", - column: x => x.MasterID, - principalTable: "Store_TransferNote", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - }); - - migrationBuilder.CreateTable( - name: "Store_TransferRequestDetail", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - Reason = table.Column(type: "nvarchar(max)", nullable: true), - CreationTime = table.Column(type: "datetime2", nullable: false), - CreatorId = table.Column(type: "uniqueidentifier", nullable: true), - LastModificationTime = table.Column(type: "datetime2", nullable: true), - LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), - MasterID = table.Column(type: "uniqueidentifier", nullable: false), - TenantId = table.Column(type: "uniqueidentifier", nullable: true), - Number = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - Remark = table.Column(type: "nvarchar(3072)", maxLength: 3072, nullable: true), - ItemName = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ItemDesc1 = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ItemDesc2 = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ItemCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - Uom = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - Qty = table.Column(type: "decimal(18,6)", precision: 18, scale: 6, nullable: false), - StdPackQty = table.Column(type: "decimal(18,6)", nullable: false), - FromPackingCode = table.Column(type: "nvarchar(max)", nullable: true), - ToPackingCode = table.Column(type: "nvarchar(max)", nullable: true), - FromContainerCode = table.Column(type: "nvarchar(max)", nullable: true), - ToContainerCode = table.Column(type: "nvarchar(max)", nullable: true), - FromLot = table.Column(type: "nvarchar(max)", nullable: true), - ToLot = table.Column(type: "nvarchar(max)", nullable: true), - SupplierBatch = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ArriveDate = table.Column(type: "datetime2", nullable: false), - ProduceDate = table.Column(type: "datetime2", nullable: false), - ExpireDate = table.Column(type: "datetime2", nullable: false), - FromLocationCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - FromLocationArea = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - FromLocationGroup = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - FromLocationErpCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - FromWarehouseCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - FromStatus = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - ToLocationCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - ToLocationArea = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ToLocationGroup = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ToLocationErpCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - ToWarehouseCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - ToStatus = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_Store_TransferRequestDetail", x => x.Id); - table.ForeignKey( - name: "FK_Store_TransferRequestDetail_Store_TransferRequest_MasterID", - column: x => x.MasterID, - principalTable: "Store_TransferRequest", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - }); - - migrationBuilder.CreateTable( - name: "Store_UnplannedIssueNoteDetail", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - ReasonCode = table.Column(type: "nvarchar(max)", nullable: true), - CaseCode = table.Column(type: "nvarchar(max)", nullable: true), - ProjCapacityCode = table.Column(type: "nvarchar(max)", nullable: true), - OnceBusiCode = table.Column(type: "nvarchar(max)", nullable: true), - ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true), - Explain = table.Column(type: "nvarchar(max)", nullable: true), - CreationTime = table.Column(type: "datetime2", nullable: false), - CreatorId = table.Column(type: "uniqueidentifier", nullable: true), - LastModificationTime = table.Column(type: "datetime2", nullable: true), - LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), - MasterID = table.Column(type: "uniqueidentifier", nullable: false), - TenantId = table.Column(type: "uniqueidentifier", nullable: true), - Number = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - Remark = table.Column(type: "nvarchar(3072)", maxLength: 3072, nullable: true), - ItemName = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ItemDesc1 = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ItemDesc2 = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ItemCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - Lot = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - SupplierBatch = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ArriveDate = table.Column(type: "datetime2", nullable: false), - ProduceDate = table.Column(type: "datetime2", nullable: false), - ExpireDate = table.Column(type: "datetime2", nullable: false), - PackingCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - ContainerCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - LocationCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - LocationArea = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - LocationGroup = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - LocationErpCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - WarehouseCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - Status = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - Uom = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - Qty = table.Column(type: "decimal(18,6)", precision: 18, scale: 6, nullable: false), - StdPackQty = table.Column(type: "decimal(18,6)", nullable: false), - RecommendContainerCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - RecommendPackingCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - RecommendSupplierBatch = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - RecommendArriveDate = table.Column(type: "datetime2", nullable: false), - RecommendProduceDate = table.Column(type: "datetime2", nullable: false), - RecommendExpireDate = table.Column(type: "datetime2", nullable: false), - RecommendLot = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - RecommendFromLocationCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - RecommendFromLocationArea = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - RecommendFromLocationGroup = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - RecommendFromLocationErpCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - RecommendFromWarehouseCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - RecommendQty = table.Column(type: "decimal(18,6)", nullable: false), - HandledContainerCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - HandledPackingCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - HandledSupplierBatch = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - HandledArriveDate = table.Column(type: "datetime2", nullable: false), - HandledProduceDate = table.Column(type: "datetime2", nullable: false), - HandledExpireDate = table.Column(type: "datetime2", nullable: false), - HandledLot = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - HandledFromLocationCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - HandledFromLocationArea = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - HandledFromLocationGroup = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - HandledFromLocationErpCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - HandledFromWarehouseCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - HandledQty = table.Column(type: "decimal(18,6)", nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_Store_UnplannedIssueNoteDetail", x => x.Id); - table.ForeignKey( - name: "FK_Store_UnplannedIssueNoteDetail_Store_UnplannedIssueNote_MasterID", - column: x => x.MasterID, - principalTable: "Store_UnplannedIssueNote", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - }); - - migrationBuilder.CreateTable( - name: "Store_UnplannedIssueRequestDetail", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - CaseCode = table.Column(type: "nvarchar(max)", nullable: true), - ProjCapacityCode = table.Column(type: "nvarchar(max)", nullable: true), - OnceBusiCode = table.Column(type: "nvarchar(max)", nullable: true), - ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true), - Explain = table.Column(type: "nvarchar(max)", nullable: true), - CreationTime = table.Column(type: "datetime2", nullable: false), - CreatorId = table.Column(type: "uniqueidentifier", nullable: true), - LastModificationTime = table.Column(type: "datetime2", nullable: true), - LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), - MasterID = table.Column(type: "uniqueidentifier", nullable: false), - TenantId = table.Column(type: "uniqueidentifier", nullable: true), - Number = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - Remark = table.Column(type: "nvarchar(3072)", maxLength: 3072, nullable: true), - ItemName = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ItemDesc1 = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ItemDesc2 = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ItemCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - Lot = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - SupplierBatch = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ArriveDate = table.Column(type: "datetime2", nullable: false), - ProduceDate = table.Column(type: "datetime2", nullable: false), - ExpireDate = table.Column(type: "datetime2", nullable: false), - PackingCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - ContainerCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - LocationCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - LocationArea = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - LocationGroup = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - LocationErpCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - WarehouseCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - Status = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - Uom = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - Qty = table.Column(type: "decimal(18,6)", precision: 18, scale: 6, nullable: false), - StdPackQty = table.Column(type: "decimal(18,6)", nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_Store_UnplannedIssueRequestDetail", x => x.Id); - table.ForeignKey( - name: "FK_Store_UnplannedIssueRequestDetail_Store_UnplannedIssueRequest_MasterID", - column: x => x.MasterID, - principalTable: "Store_UnplannedIssueRequest", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - }); - - migrationBuilder.CreateTable( - name: "Store_UnplannedReceiptNoteDetail", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - ReasonCode = table.Column(type: "nvarchar(max)", nullable: true), - CaseCode = table.Column(type: "nvarchar(max)", nullable: true), - ProjCapacityCode = table.Column(type: "nvarchar(max)", nullable: true), - OnceBusiCode = table.Column(type: "nvarchar(max)", nullable: true), - ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true), - Explain = table.Column(type: "nvarchar(max)", nullable: true), - CreationTime = table.Column(type: "datetime2", nullable: false), - CreatorId = table.Column(type: "uniqueidentifier", nullable: true), - LastModificationTime = table.Column(type: "datetime2", nullable: true), - LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), - MasterID = table.Column(type: "uniqueidentifier", nullable: false), - TenantId = table.Column(type: "uniqueidentifier", nullable: true), - Number = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - Remark = table.Column(type: "nvarchar(3072)", maxLength: 3072, nullable: true), - ItemName = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ItemDesc1 = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ItemDesc2 = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ItemCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - Lot = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - SupplierBatch = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ArriveDate = table.Column(type: "datetime2", nullable: false), - ProduceDate = table.Column(type: "datetime2", nullable: false), - ExpireDate = table.Column(type: "datetime2", nullable: false), - PackingCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - ContainerCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - LocationCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - LocationArea = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - LocationGroup = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - LocationErpCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - WarehouseCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - Status = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - Uom = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - Qty = table.Column(type: "decimal(18,6)", precision: 18, scale: 6, nullable: false), - StdPackQty = table.Column(type: "decimal(18,6)", nullable: false), - RecommendContainerCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - RecommendPackingCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - RecommendSupplierBatch = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - RecommendArriveDate = table.Column(type: "datetime2", nullable: false), - RecommendProduceDate = table.Column(type: "datetime2", nullable: false), - RecommendExpireDate = table.Column(type: "datetime2", nullable: false), - RecommendLot = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - RecommendToLocationCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - RecommendToLocationArea = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - RecommendToLocationGroup = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - RecommendToLocationErpCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - RecommendToWarehouseCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - RecommendQty = table.Column(type: "decimal(18,6)", nullable: false), - HandledContainerCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - HandledPackingCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - HandledSupplierBatch = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - HandledArriveDate = table.Column(type: "datetime2", nullable: false), - HandledProduceDate = table.Column(type: "datetime2", nullable: false), - HandledExpireDate = table.Column(type: "datetime2", nullable: false), - HandledLot = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - HandledToLocationCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - HandledToLocationArea = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - HandledToLocationGroup = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - HandledToLocationErpCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - HandledToWarehouseCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - HandledQty = table.Column(type: "decimal(18,6)", nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_Store_UnplannedReceiptNoteDetail", x => x.Id); - table.ForeignKey( - name: "FK_Store_UnplannedReceiptNoteDetail_Store_UnplannedReceiptNote_MasterID", - column: x => x.MasterID, - principalTable: "Store_UnplannedReceiptNote", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - }); - - migrationBuilder.CreateTable( - name: "Store_UnplannedReceiptRequestDetail", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - ReasonCode = table.Column(type: "nvarchar(max)", nullable: true), - CaseCode = table.Column(type: "nvarchar(max)", nullable: true), - ProjCapacityCode = table.Column(type: "nvarchar(max)", nullable: true), - OnceBusiCode = table.Column(type: "nvarchar(max)", nullable: true), - ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true), - Explain = table.Column(type: "nvarchar(max)", nullable: true), - CreationTime = table.Column(type: "datetime2", nullable: false), - CreatorId = table.Column(type: "uniqueidentifier", nullable: true), - LastModificationTime = table.Column(type: "datetime2", nullable: true), - LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), - MasterID = table.Column(type: "uniqueidentifier", nullable: false), - TenantId = table.Column(type: "uniqueidentifier", nullable: true), - Number = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - Remark = table.Column(type: "nvarchar(3072)", maxLength: 3072, nullable: true), - ItemName = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ItemDesc1 = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ItemDesc2 = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ItemCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - Lot = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - SupplierBatch = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ArriveDate = table.Column(type: "datetime2", nullable: false), - ProduceDate = table.Column(type: "datetime2", nullable: false), - ExpireDate = table.Column(type: "datetime2", nullable: false), - PackingCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - ContainerCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - LocationCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - LocationArea = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - LocationGroup = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - LocationErpCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - WarehouseCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - Status = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - Uom = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - Qty = table.Column(type: "decimal(18,6)", precision: 18, scale: 6, nullable: false), - StdPackQty = table.Column(type: "decimal(18,6)", nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_Store_UnplannedReceiptRequestDetail", x => x.Id); - table.ForeignKey( - name: "FK_Store_UnplannedReceiptRequestDetail_Store_UnplannedReceiptRequest_MasterID", - column: x => x.MasterID, - principalTable: "Store_UnplannedReceiptRequest", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - }); - - migrationBuilder.CreateTable( - name: "Store_WarehouseTransferNoteDetail", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - Reason = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - CreationTime = table.Column(type: "datetime2", nullable: false), - CreatorId = table.Column(type: "uniqueidentifier", nullable: true), - LastModificationTime = table.Column(type: "datetime2", nullable: true), - LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), - MasterID = table.Column(type: "uniqueidentifier", nullable: false), - TenantId = table.Column(type: "uniqueidentifier", nullable: true), - Number = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - Remark = table.Column(type: "nvarchar(3072)", maxLength: 3072, nullable: true), - ItemName = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ItemDesc1 = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ItemDesc2 = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ItemCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - Uom = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - Qty = table.Column(type: "decimal(18,6)", precision: 18, scale: 6, nullable: false), - StdPackQty = table.Column(type: "decimal(18,6)", nullable: false), - FromPackingCode = table.Column(type: "nvarchar(450)", nullable: true), - ToPackingCode = table.Column(type: "nvarchar(max)", nullable: true), - FromContainerCode = table.Column(type: "nvarchar(max)", nullable: true), - ToContainerCode = table.Column(type: "nvarchar(max)", nullable: true), - FromLot = table.Column(type: "nvarchar(max)", nullable: true), - ToLot = table.Column(type: "nvarchar(max)", nullable: true), - SupplierBatch = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ArriveDate = table.Column(type: "datetime2", nullable: false), - ProduceDate = table.Column(type: "datetime2", nullable: false), - ExpireDate = table.Column(type: "datetime2", nullable: false), - FromLocationCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - FromLocationArea = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - FromLocationGroup = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - FromLocationErpCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - FromWarehouseCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - FromStatus = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - ToLocationCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - ToLocationArea = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ToLocationGroup = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ToLocationErpCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - ToWarehouseCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - ToStatus = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_Store_WarehouseTransferNoteDetail", x => x.Id); - table.ForeignKey( - name: "FK_Store_WarehouseTransferNoteDetail_Store_WarehouseTransferNote_MasterID", - column: x => x.MasterID, - principalTable: "Store_WarehouseTransferNote", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - }); - - migrationBuilder.CreateTable( - name: "Store_WipWarehouseAdjustNoteDetail", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - Reason = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ReasonCode = table.Column(type: "nvarchar(max)", maxLength: 4096, nullable: true), - CreationTime = table.Column(type: "datetime2", nullable: false), - CreatorId = table.Column(type: "uniqueidentifier", nullable: true), - LastModificationTime = table.Column(type: "datetime2", nullable: true), - LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), - MasterID = table.Column(type: "uniqueidentifier", nullable: false), - TenantId = table.Column(type: "uniqueidentifier", nullable: true), - Number = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - Remark = table.Column(type: "nvarchar(3072)", maxLength: 3072, nullable: true), - ItemName = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ItemDesc1 = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ItemDesc2 = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ItemCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - Uom = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - Qty = table.Column(type: "decimal(18,6)", precision: 18, scale: 6, nullable: false), - StdPackQty = table.Column(type: "decimal(18,6)", nullable: false), - FromPackingCode = table.Column(type: "nvarchar(450)", nullable: true), - ToPackingCode = table.Column(type: "nvarchar(max)", nullable: true), - FromContainerCode = table.Column(type: "nvarchar(max)", nullable: true), - ToContainerCode = table.Column(type: "nvarchar(max)", nullable: true), - FromLot = table.Column(type: "nvarchar(max)", nullable: true), - ToLot = table.Column(type: "nvarchar(max)", nullable: true), - SupplierBatch = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ArriveDate = table.Column(type: "datetime2", nullable: false), - ProduceDate = table.Column(type: "datetime2", nullable: false), - ExpireDate = table.Column(type: "datetime2", nullable: false), - FromLocationCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - FromLocationArea = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - FromLocationGroup = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - FromLocationErpCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - FromWarehouseCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - FromStatus = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - ToLocationCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - ToLocationArea = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ToLocationGroup = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ToLocationErpCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - ToWarehouseCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - ToStatus = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_Store_WipWarehouseAdjustNoteDetail", x => x.Id); - table.ForeignKey( - name: "FK_Store_WipWarehouseAdjustNoteDetail_Store_WipWarehouseAdjustNote_MasterID", - column: x => x.MasterID, - principalTable: "Store_WipWarehouseAdjustNote", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - }); - - migrationBuilder.CreateTable( - name: "Store_WipWarehouseAdjustRequestDetail", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - Reason = table.Column(type: "nvarchar(max)", maxLength: 4096, nullable: true), - ReasonCode = table.Column(type: "nvarchar(max)", maxLength: 4096, nullable: true), - CreationTime = table.Column(type: "datetime2", nullable: false), - CreatorId = table.Column(type: "uniqueidentifier", nullable: true), - LastModificationTime = table.Column(type: "datetime2", nullable: true), - LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), - MasterID = table.Column(type: "uniqueidentifier", nullable: false), - TenantId = table.Column(type: "uniqueidentifier", nullable: true), - Number = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - Remark = table.Column(type: "nvarchar(3072)", maxLength: 3072, nullable: true), - ItemName = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ItemDesc1 = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ItemDesc2 = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ItemCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - Uom = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - Qty = table.Column(type: "decimal(18,6)", precision: 18, scale: 6, nullable: false), - StdPackQty = table.Column(type: "decimal(18,6)", nullable: false), - FromPackingCode = table.Column(type: "nvarchar(max)", nullable: true), - ToPackingCode = table.Column(type: "nvarchar(max)", nullable: true), - FromContainerCode = table.Column(type: "nvarchar(max)", nullable: true), - ToContainerCode = table.Column(type: "nvarchar(max)", nullable: true), - FromLot = table.Column(type: "nvarchar(max)", nullable: true), - ToLot = table.Column(type: "nvarchar(max)", nullable: true), - SupplierBatch = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ArriveDate = table.Column(type: "datetime2", nullable: false), - ProduceDate = table.Column(type: "datetime2", nullable: false), - ExpireDate = table.Column(type: "datetime2", nullable: false), - FromLocationCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - FromLocationArea = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - FromLocationGroup = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - FromLocationErpCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - FromWarehouseCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - FromStatus = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - ToLocationCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - ToLocationArea = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ToLocationGroup = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ToLocationErpCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - ToWarehouseCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - ToStatus = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_Store_WipWarehouseAdjustRequestDetail", x => x.Id); - table.ForeignKey( - name: "FK_Store_WipWarehouseAdjustRequestDetail_Store_WipWarehouseAdjustRequest_MasterID", - column: x => x.MasterID, - principalTable: "Store_WipWarehouseAdjustRequest", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - }); - - migrationBuilder.CreateTable( - name: "Store_WorkOrderDetail", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - EffectiveDate = table.Column(type: "datetime2", nullable: false), - Op = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - RawUom = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - RawQty = table.Column(type: "decimal(18,6)", nullable: false), - RawLocationCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - CreationTime = table.Column(type: "datetime2", nullable: false), - CreatorId = table.Column(type: "uniqueidentifier", nullable: true), - LastModificationTime = table.Column(type: "datetime2", nullable: true), - LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), - MasterID = table.Column(type: "uniqueidentifier", nullable: false), - TenantId = table.Column(type: "uniqueidentifier", nullable: true), - Number = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - Remark = table.Column(type: "nvarchar(3072)", maxLength: 3072, nullable: true), - ItemName = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ItemDesc1 = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ItemDesc2 = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ItemCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_Store_WorkOrderDetail", x => x.Id); - table.ForeignKey( - name: "FK_Store_WorkOrderDetail_Store_WorkOrder_MasterID", - column: x => x.MasterID, - principalTable: "Store_WorkOrder", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - }); - - migrationBuilder.CreateIndex( - name: "IX_Job_CheckJob_Number", - table: "Job_CheckJob", - column: "Number", - unique: true); - - migrationBuilder.CreateIndex( - name: "IX_Job_CheckJobDetail_MasterID", - table: "Job_CheckJobDetail", - column: "MasterID"); - - migrationBuilder.CreateIndex( - name: "IX_Job_CountJob_Number", - table: "Job_CountJob", - column: "Number", - unique: true); - - migrationBuilder.CreateIndex( - name: "IX_Job_CountJobDetail_MasterID", - table: "Job_CountJobDetail", - column: "MasterID"); - - migrationBuilder.CreateIndex( - name: "IX_Job_DeliverJob_Number", - table: "Job_DeliverJob", - column: "Number", - unique: true); - - migrationBuilder.CreateIndex( - name: "IX_Job_DeliverJobDetail_MasterID", - table: "Job_DeliverJobDetail", - column: "MasterID"); - - migrationBuilder.CreateIndex( - name: "IX_Job_InspectJob_Number", - table: "Job_InspectJob", - column: "Number", - unique: true); - - migrationBuilder.CreateIndex( - name: "IX_Job_InspectJobDetail_MasterID", - table: "Job_InspectJobDetail", - column: "MasterID"); - - migrationBuilder.CreateIndex( - name: "IX_Job_InspectJobSummaryDetail_MasterID", - table: "Job_InspectJobSummaryDetail", - column: "MasterID"); - - migrationBuilder.CreateIndex( - name: "IX_Job_IssueJob_Number", - table: "Job_IssueJob", - column: "Number", - unique: true); - - migrationBuilder.CreateIndex( - name: "IX_Job_IssueJobDetail_MasterID", - table: "Job_IssueJobDetail", - column: "MasterID"); - - migrationBuilder.CreateIndex( - name: "IX_Job_JisDeliverJob_Number", - table: "Job_JisDeliverJob", - column: "Number", - unique: true); - - migrationBuilder.CreateIndex( - name: "IX_Job_JisDeliverJobDetail_MasterID", - table: "Job_JisDeliverJobDetail", - column: "MasterID"); - - migrationBuilder.CreateIndex( - name: "IX_Job_ProductionReturnJob_Number", - table: "Job_ProductionReturnJob", - column: "Number", - unique: true); - - migrationBuilder.CreateIndex( - name: "IX_Job_ProductionReturnJobDetail_MasterID", - table: "Job_ProductionReturnJobDetail", - column: "MasterID"); - - migrationBuilder.CreateIndex( - name: "IX_Job_ProductReceiveJob_Number", - table: "Job_ProductReceiveJob", - column: "Number", - unique: true); - - migrationBuilder.CreateIndex( - name: "IX_Job_ProductReceiveJobDetail_MasterID", - table: "Job_ProductReceiveJobDetail", - column: "MasterID"); - - migrationBuilder.CreateIndex( - name: "IX_Job_PurchaseReceiptJob_Number", - table: "Job_PurchaseReceiptJob", - column: "Number", - unique: true); - - migrationBuilder.CreateIndex( - name: "IX_Job_PurchaseReceiptJobDetail_MasterID", - table: "Job_PurchaseReceiptJobDetail", - column: "MasterID"); - - migrationBuilder.CreateIndex( - name: "IX_Job_PurchaseReturnJob_Number", - table: "Job_PurchaseReturnJob", - column: "Number", - unique: true); - - migrationBuilder.CreateIndex( - name: "IX_Job_PurchaseReturnJobDetail_MasterID", - table: "Job_PurchaseReturnJobDetail", - column: "MasterID"); - - migrationBuilder.CreateIndex( - name: "IX_Job_PutawayJob_Number", - table: "Job_PutawayJob", - column: "Number", - unique: true); - - migrationBuilder.CreateIndex( - name: "IX_Job_PutawayJobDetail_MasterID", - table: "Job_PutawayJobDetail", - column: "MasterID"); - - migrationBuilder.CreateIndex( - name: "IX_Job_UnplannedIssueJob_Number", - table: "Job_UnplannedIssueJob", - column: "Number", - unique: true); - - migrationBuilder.CreateIndex( - name: "IX_Job_UnplannedIssueJobDetail_MasterID", - table: "Job_UnplannedIssueJobDetail", - column: "MasterID"); - - migrationBuilder.CreateIndex( - name: "IX_Job_UnplannedReceiptJob_Number", - table: "Job_UnplannedReceiptJob", - column: "Number", - unique: true); - - migrationBuilder.CreateIndex( - name: "IX_Job_UnplannedReceiptJobDetail_MasterID", - table: "Job_UnplannedReceiptJobDetail", - column: "MasterID"); - - migrationBuilder.CreateIndex( - name: "IX_Store_BackFlushNote_Number", - table: "Store_BackFlushNote", - column: "Number", - unique: true); - - migrationBuilder.CreateIndex( - name: "IX_Store_BackFlushNoteDetail_MasterID", - table: "Store_BackFlushNoteDetail", - column: "MasterID"); - - migrationBuilder.CreateIndex( - name: "IX_Store_BackFlushNoteDetail_Number_ItemCode_Lot", - table: "Store_BackFlushNoteDetail", - columns: new[] { "Number", "ItemCode", "Lot" }, - unique: true, - filter: "[Lot] IS NOT NULL"); - - migrationBuilder.CreateIndex( - name: "IX_Store_ContainerBindNote_Number", - table: "Store_ContainerBindNote", - column: "Number", - unique: true); - - migrationBuilder.CreateIndex( - name: "IX_Store_ContainerBindNoteDetail_MasterID", - table: "Store_ContainerBindNoteDetail", - column: "MasterID"); - - migrationBuilder.CreateIndex( - name: "IX_Store_ContainerBindNoteDetail_Number_PackingCode", - table: "Store_ContainerBindNoteDetail", - columns: new[] { "Number", "PackingCode" }, - unique: true); - - migrationBuilder.CreateIndex( - name: "IX_Store_CountAdjustNote_Number", - table: "Store_CountAdjustNote", - column: "Number", - unique: true); - - migrationBuilder.CreateIndex( - name: "IX_Store_CountAdjustNoteDetail_MasterID", - table: "Store_CountAdjustNoteDetail", - column: "MasterID"); - - migrationBuilder.CreateIndex( - name: "IX_Store_CountAdjustNoteDetail_Number_CountLabel_ItemCode_LocationCode_Lot_Status_PackingCode", - table: "Store_CountAdjustNoteDetail", - columns: new[] { "Number", "CountLabel", "ItemCode", "LocationCode", "Lot", "Status", "PackingCode" }, - unique: true, - filter: "[Lot] IS NOT NULL"); - - migrationBuilder.CreateIndex( - name: "IX_Store_CountAdjustRequest_Number", - table: "Store_CountAdjustRequest", - column: "Number", - unique: true); - - migrationBuilder.CreateIndex( - name: "IX_Store_CountAdjustRequestDetail_MasterID", - table: "Store_CountAdjustRequestDetail", - column: "MasterID"); - - migrationBuilder.CreateIndex( - name: "IX_Store_CountAdjustRequestDetail_Number_ItemCode_LocationCode_Lot_Status_PackingCode", - table: "Store_CountAdjustRequestDetail", - columns: new[] { "Number", "ItemCode", "LocationCode", "Lot", "Status", "PackingCode" }, - unique: true, - filter: "[Lot] IS NOT NULL"); - - migrationBuilder.CreateIndex( - name: "IX_Store_CountNote_Number", - table: "Store_CountNote", - column: "Number", - unique: true); - - migrationBuilder.CreateIndex( - name: "IX_Store_CountNoteDetail_MasterID", - table: "Store_CountNoteDetail", - column: "MasterID"); - - migrationBuilder.CreateIndex( - name: "IX_Store_CountNoteDetail_Number_CountLabel", - table: "Store_CountNoteDetail", - columns: new[] { "Number", "CountLabel" }, - unique: true); - - migrationBuilder.CreateIndex( - name: "IX_Store_CountPlan_Number", - table: "Store_CountPlan", - column: "Number", - unique: true); - - migrationBuilder.CreateIndex( - name: "IX_Store_CountPlanDetail_MasterID", - table: "Store_CountPlanDetail", - column: "MasterID"); - - migrationBuilder.CreateIndex( - name: "IX_Store_CountPlanDetail_Number_CountLabel", - table: "Store_CountPlanDetail", - columns: new[] { "Number", "CountLabel" }, - unique: true); - - migrationBuilder.CreateIndex( - name: "IX_Store_CustomerAsn_CustomerCode", - table: "Store_CustomerAsn", - column: "CustomerCode"); - - migrationBuilder.CreateIndex( - name: "IX_Store_CustomerAsn_Number", - table: "Store_CustomerAsn", - column: "Number", - unique: true); - - migrationBuilder.CreateIndex( - name: "IX_Store_CustomerAsnDetail_MasterID", - table: "Store_CustomerAsnDetail", - column: "MasterID"); - - migrationBuilder.CreateIndex( - name: "IX_Store_CustomerAsnDetail_Number_ItemCode", - table: "Store_CustomerAsnDetail", - columns: new[] { "Number", "ItemCode" }, - unique: true); - - migrationBuilder.CreateIndex( - name: "IX_Store_CustomerReturnNote_Number", - table: "Store_CustomerReturnNote", - column: "Number", - unique: true); - - migrationBuilder.CreateIndex( - name: "IX_Store_CustomerReturnNoteDetail_MasterID", - table: "Store_CustomerReturnNoteDetail", - column: "MasterID"); - - migrationBuilder.CreateIndex( - name: "IX_Store_CustomerReturnNoteDetail_Number_FromPackingCode_FromLocationCode_ToLocationCode", - table: "Store_CustomerReturnNoteDetail", - columns: new[] { "Number", "FromPackingCode", "FromLocationCode", "ToLocationCode" }, - unique: true, - filter: "[FromPackingCode] IS NOT NULL"); - - migrationBuilder.CreateIndex( - name: "IX_Store_DeliverNote_Number", - table: "Store_DeliverNote", - column: "Number", - unique: true); - - migrationBuilder.CreateIndex( - name: "IX_Store_DeliverNoteDetail_MasterID", - table: "Store_DeliverNoteDetail", - column: "MasterID"); - - migrationBuilder.CreateIndex( - name: "IX_Store_DeliverNoteDetail_Number_ItemCode_FromPackingCode_FromLot_FromLocationCode_ToLocationCode", - table: "Store_DeliverNoteDetail", - columns: new[] { "Number", "ItemCode", "FromPackingCode", "FromLot", "FromLocationCode", "ToLocationCode" }, - unique: true); - - migrationBuilder.CreateIndex( - name: "IX_Store_DeliverPlan_Number", - table: "Store_DeliverPlan", - column: "Number", - unique: true); - - migrationBuilder.CreateIndex( - name: "IX_Store_DeliverPlanDetail_MasterID", - table: "Store_DeliverPlanDetail", - column: "MasterID"); - - migrationBuilder.CreateIndex( - name: "IX_Store_DeliverPlanDetail_Number_SoNumber_SoLine", - table: "Store_DeliverPlanDetail", - columns: new[] { "Number", "SoNumber", "SoLine" }, - unique: true, - filter: "[SoNumber] IS NOT NULL AND [SoLine] IS NOT NULL"); - - migrationBuilder.CreateIndex( - name: "IX_Store_DeliverRequest_Number", - table: "Store_DeliverRequest", - column: "Number", - unique: true); - - migrationBuilder.CreateIndex( - name: "IX_Store_DeliverRequestDetail_MasterID", - table: "Store_DeliverRequestDetail", - column: "MasterID"); - - migrationBuilder.CreateIndex( - name: "IX_Store_DeliverRequestDetail_Number_ItemCode", - table: "Store_DeliverRequestDetail", - columns: new[] { "Number", "ItemCode" }, - unique: true); - - migrationBuilder.CreateIndex( - name: "IX_Store_InspectAbnormalNote_Number", - table: "Store_InspectAbnormalNote", - column: "Number", - unique: true); - - migrationBuilder.CreateIndex( - name: "IX_Store_InspectAbnormalNoteDetail_MasterID", - table: "Store_InspectAbnormalNoteDetail", - column: "MasterID"); - - migrationBuilder.CreateIndex( - name: "IX_Store_InspectAbnormalNoteDetail_Number_PackingCode", - table: "Store_InspectAbnormalNoteDetail", - columns: new[] { "Number", "PackingCode" }, - unique: true); - - migrationBuilder.CreateIndex( - name: "IX_Store_InspectNote_Number", - table: "Store_InspectNote", - column: "Number", - unique: true); - - migrationBuilder.CreateIndex( - name: "IX_Store_InspectNoteDetail_MasterID", - table: "Store_InspectNoteDetail", - column: "MasterID"); - - migrationBuilder.CreateIndex( - name: "IX_Store_InspectNoteDetail_Number_PackingCode", - table: "Store_InspectNoteDetail", - columns: new[] { "Number", "PackingCode" }, - unique: true); - - migrationBuilder.CreateIndex( - name: "IX_Store_InspectNoteSummaryDetail_MasterID", - table: "Store_InspectNoteSummaryDetail", - column: "MasterID"); - - migrationBuilder.CreateIndex( - name: "IX_Store_InspectNoteSummaryDetail_Number_ItemCode", - table: "Store_InspectNoteSummaryDetail", - columns: new[] { "Number", "ItemCode" }, - unique: true); - - migrationBuilder.CreateIndex( - name: "IX_Store_InspectRequest_Number", - table: "Store_InspectRequest", - column: "Number", - unique: true); - - migrationBuilder.CreateIndex( - name: "IX_Store_InspectRequestDetail_MasterID", - table: "Store_InspectRequestDetail", - column: "MasterID"); - - migrationBuilder.CreateIndex( - name: "IX_Store_InspectRequestDetail_Number_PackingCode", - table: "Store_InspectRequestDetail", - columns: new[] { "Number", "PackingCode" }, - unique: true); - - migrationBuilder.CreateIndex( - name: "IX_Store_InspectRequestSummaryDetail_MasterID", - table: "Store_InspectRequestSummaryDetail", - column: "MasterID"); - - migrationBuilder.CreateIndex( - name: "IX_Store_InspectRequestSummaryDetail_Number_ItemCode_Lot", - table: "Store_InspectRequestSummaryDetail", - columns: new[] { "Number", "ItemCode", "Lot" }, - unique: true, - filter: "[Lot] IS NOT NULL"); - - migrationBuilder.CreateIndex( - name: "IX_Store_InventoryInitialNote_Number", - table: "Store_InventoryInitialNote", - column: "Number", - unique: true); - - migrationBuilder.CreateIndex( - name: "IX_Store_InventoryInitialNoteDetail_MasterID", - table: "Store_InventoryInitialNoteDetail", - column: "MasterID"); - - migrationBuilder.CreateIndex( - name: "IX_Store_InventoryInitialNoteDetail_Number_PackingCode_ItemCode_Lot_Status", - table: "Store_InventoryInitialNoteDetail", - columns: new[] { "Number", "PackingCode", "ItemCode", "Lot", "Status" }, - unique: true, - filter: "[Lot] IS NOT NULL"); - - migrationBuilder.CreateIndex( - name: "IX_Store_InventoryTransferNote_Number", - table: "Store_InventoryTransferNote", - column: "Number", - unique: true); - - migrationBuilder.CreateIndex( - name: "IX_Store_InventoryTransferNoteDetail_MasterID", - table: "Store_InventoryTransferNoteDetail", - column: "MasterID"); - - migrationBuilder.CreateIndex( - name: "IX_Store_InventoryTransferNoteDetail_Number_FromPackingCode_FromLocationCode_ToLocationCode", - table: "Store_InventoryTransferNoteDetail", - columns: new[] { "Number", "FromPackingCode", "FromLocationCode", "ToLocationCode" }, - unique: true, - filter: "[FromPackingCode] IS NOT NULL"); - - migrationBuilder.CreateIndex( - name: "IX_Store_IsolationNote_Number", - table: "Store_IsolationNote", - column: "Number", - unique: true); - - migrationBuilder.CreateIndex( - name: "IX_Store_IsolationNoteDetail_FromPackingCode", - table: "Store_IsolationNoteDetail", - column: "FromPackingCode"); - - migrationBuilder.CreateIndex( - name: "IX_Store_IsolationNoteDetail_MasterID", - table: "Store_IsolationNoteDetail", - column: "MasterID"); - - migrationBuilder.CreateIndex( - name: "IX_Store_IsolationNoteDetail_Number_FromPackingCode_FromLocationCode_ToLocationCode", - table: "Store_IsolationNoteDetail", - columns: new[] { "Number", "FromPackingCode", "FromLocationCode", "ToLocationCode" }, - unique: true, - filter: "[FromPackingCode] IS NOT NULL"); - - migrationBuilder.CreateIndex( - name: "IX_Store_IssueNote_Number", - table: "Store_IssueNote", - column: "Number", - unique: true); - - migrationBuilder.CreateIndex( - name: "IX_Store_IssueNoteDetail_FromPackingCode", - table: "Store_IssueNoteDetail", - column: "FromPackingCode"); - - migrationBuilder.CreateIndex( - name: "IX_Store_IssueNoteDetail_MasterID", - table: "Store_IssueNoteDetail", - column: "MasterID"); - - migrationBuilder.CreateIndex( - name: "IX_Store_IssueNoteDetail_Number_FromPackingCode_FromLocationCode_ToLocationCode", - table: "Store_IssueNoteDetail", - columns: new[] { "Number", "FromPackingCode", "FromLocationCode", "ToLocationCode" }, - unique: true, - filter: "[FromPackingCode] IS NOT NULL"); - - migrationBuilder.CreateIndex( - name: "IX_Store_ItemTransformNote_Number", - table: "Store_ItemTransformNote", - column: "Number", - unique: true); - - migrationBuilder.CreateIndex( - name: "IX_Store_ItemTransformNoteDetail_MasterID", - table: "Store_ItemTransformNoteDetail", - column: "MasterID"); - - migrationBuilder.CreateIndex( - name: "IX_Store_ItemTransformNoteDetail_Number_FromPackingCode_FromStatus_ToPackingCode_ToStatus", - table: "Store_ItemTransformNoteDetail", - columns: new[] { "Number", "FromPackingCode", "FromStatus", "ToPackingCode", "ToStatus" }, - unique: true, - filter: "[FromPackingCode] IS NOT NULL AND [ToPackingCode] IS NOT NULL"); - - migrationBuilder.CreateIndex( - name: "IX_Store_ItemTransformRequest_Number", - table: "Store_ItemTransformRequest", - column: "Number", - unique: true); - - migrationBuilder.CreateIndex( - name: "IX_Store_ItemTransformRequestDetail_MasterID", - table: "Store_ItemTransformRequestDetail", - column: "MasterID"); - - migrationBuilder.CreateIndex( - name: "IX_Store_ItemTransformRequestDetail_Number_FromPackingCode_FromStatus_ToPackingCode_ToStatus", - table: "Store_ItemTransformRequestDetail", - columns: new[] { "Number", "FromPackingCode", "FromStatus", "ToPackingCode", "ToStatus" }, - unique: true, - filter: "[FromPackingCode] IS NOT NULL AND [ToPackingCode] IS NOT NULL"); - - migrationBuilder.CreateIndex( - name: "IX_Store_JisDeliverNote_Number", - table: "Store_JisDeliverNote", - column: "Number", - unique: true); - - migrationBuilder.CreateIndex( - name: "IX_Store_JisDeliverNoteDetail_MasterID", - table: "Store_JisDeliverNoteDetail", - column: "MasterID"); - - migrationBuilder.CreateIndex( - name: "IX_Store_JisDeliverNoteDetail_Number_FromPackingCode_FromLocationCode_ToLocationCode", - table: "Store_JisDeliverNoteDetail", - columns: new[] { "Number", "FromPackingCode", "FromLocationCode", "ToLocationCode" }, - unique: true, - filter: "[FromPackingCode] IS NOT NULL"); - - migrationBuilder.CreateIndex( - name: "IX_Store_JisProductReceiptNote_Number", - table: "Store_JisProductReceiptNote", - column: "Number", - unique: true); - - migrationBuilder.CreateIndex( - name: "IX_Store_JisProductReceiptNoteDetail_MasterID", - table: "Store_JisProductReceiptNoteDetail", - column: "MasterID"); - - migrationBuilder.CreateIndex( - name: "IX_Store_JisProductReceiptNoteDetail_Number_PackingCode", - table: "Store_JisProductReceiptNoteDetail", - columns: new[] { "Number", "PackingCode" }, - unique: true); - - migrationBuilder.CreateIndex( - name: "IX_Store_MaterialRequest_Number", - table: "Store_MaterialRequest", - column: "Number", - unique: true); - - migrationBuilder.CreateIndex( - name: "IX_Store_MaterialRequestDetail_ItemCode", - table: "Store_MaterialRequestDetail", - column: "ItemCode"); - - migrationBuilder.CreateIndex( - name: "IX_Store_MaterialRequestDetail_MasterID", - table: "Store_MaterialRequestDetail", - column: "MasterID"); - - migrationBuilder.CreateIndex( - name: "IX_Store_MaterialRequestDetail_Number_ItemCode_ToLocationCode", - table: "Store_MaterialRequestDetail", - columns: new[] { "Number", "ItemCode", "ToLocationCode" }, - unique: true); - - migrationBuilder.CreateIndex( - name: "IX_Store_NoOkConvertOkNote_Number", - table: "Store_NoOkConvertOkNote", - column: "Number", - unique: true); - - migrationBuilder.CreateIndex( - name: "IX_Store_NoOkConvertOkNoteDetail_MasterID", - table: "Store_NoOkConvertOkNoteDetail", - column: "MasterID"); - - migrationBuilder.CreateIndex( - name: "IX_Store_NoOkConvertOkNoteDetail_Number_FromPackingCode_FromLocationCode_ToLocationCode", - table: "Store_NoOkConvertOkNoteDetail", - columns: new[] { "Number", "FromPackingCode", "FromLocationCode", "ToLocationCode" }, - unique: true, - filter: "[FromPackingCode] IS NOT NULL"); - - migrationBuilder.CreateIndex( - name: "IX_Store_OfflineSettlementNote_Number", - table: "Store_OfflineSettlementNote", - column: "Number", - unique: true); - - migrationBuilder.CreateIndex( - name: "IX_Store_OfflineSettlementNoteDetail_MasterID", - table: "Store_OfflineSettlementNoteDetail", - column: "MasterID"); - - migrationBuilder.CreateIndex( - name: "IX_Store_OfflineSettlementNoteDetail_Number", - table: "Store_OfflineSettlementNoteDetail", - column: "Number", - unique: true); - - migrationBuilder.CreateIndex( - name: "IX_Store_PreparationPlan_Number", - table: "Store_PreparationPlan", - column: "Number", - unique: true); - - migrationBuilder.CreateIndex( - name: "IX_Store_PreparationPlanDetail_MasterID", - table: "Store_PreparationPlanDetail", - column: "MasterID"); - - migrationBuilder.CreateIndex( - name: "IX_Store_PreparationPlanDetail_Number_ItemCode", - table: "Store_PreparationPlanDetail", - columns: new[] { "Number", "ItemCode" }, - unique: true); - - migrationBuilder.CreateIndex( - name: "IX_Store_ProductionPlan_Number", - table: "Store_ProductionPlan", - column: "Number", - unique: true); - - migrationBuilder.CreateIndex( - name: "IX_Store_ProductionPlanDetail_MasterID", - table: "Store_ProductionPlanDetail", - column: "MasterID"); - - migrationBuilder.CreateIndex( - name: "IX_Store_ProductionPlanDetail_Number_ItemCode", - table: "Store_ProductionPlanDetail", - columns: new[] { "Number", "ItemCode" }, - unique: true); - - migrationBuilder.CreateIndex( - name: "IX_Store_ProductionReturnNote_Number", - table: "Store_ProductionReturnNote", - column: "Number", - unique: true); - - migrationBuilder.CreateIndex( - name: "IX_Store_ProductionReturnNoteDetail_MasterID", - table: "Store_ProductionReturnNoteDetail", - column: "MasterID"); - - migrationBuilder.CreateIndex( - name: "IX_Store_ProductionReturnNoteDetail_Number_ItemCode_FromPackingCode_ToPackingCode_FromLocationCode_ToLocationCode", - table: "Store_ProductionReturnNoteDetail", - columns: new[] { "Number", "ItemCode", "FromPackingCode", "ToPackingCode", "FromLocationCode", "ToLocationCode" }, - unique: true, - filter: "[FromPackingCode] IS NOT NULL AND [ToPackingCode] IS NOT NULL"); - - migrationBuilder.CreateIndex( - name: "IX_Store_ProductionReturnRequest_Number", - table: "Store_ProductionReturnRequest", - column: "Number", - unique: true); - - migrationBuilder.CreateIndex( - name: "IX_Store_ProductionReturnRequestDetail_ItemCode", - table: "Store_ProductionReturnRequestDetail", - column: "ItemCode"); - - migrationBuilder.CreateIndex( - name: "IX_Store_ProductionReturnRequestDetail_MasterID", - table: "Store_ProductionReturnRequestDetail", - column: "MasterID"); - - migrationBuilder.CreateIndex( - name: "IX_Store_ProductionReturnRequestDetail_Number_ItemCode_FromLocationCode", - table: "Store_ProductionReturnRequestDetail", - columns: new[] { "Number", "ItemCode", "FromLocationCode" }, - unique: true); - - migrationBuilder.CreateIndex( - name: "IX_Store_ProductL7PartsNote_Number", - table: "Store_ProductL7PartsNote", - column: "Number", - unique: true); - - migrationBuilder.CreateIndex( - name: "IX_Store_ProductL7PartsNoteDetail_MasterID", - table: "Store_ProductL7PartsNoteDetail", - column: "MasterID"); - - migrationBuilder.CreateIndex( - name: "IX_Store_ProductL7PartsNoteDetail_Number_ProductNo_Position_Configuration_L7Part", - table: "Store_ProductL7PartsNoteDetail", - columns: new[] { "Number", "ProductNo", "Position", "Configuration", "L7Part" }, - unique: true, - filter: "[ProductNo] IS NOT NULL AND [Position] IS NOT NULL AND [Configuration] IS NOT NULL AND [L7Part] IS NOT NULL"); - - migrationBuilder.CreateIndex( - name: "IX_Store_ProductReceiptNote_Number", - table: "Store_ProductReceiptNote", - column: "Number", - unique: true); - - migrationBuilder.CreateIndex( - name: "IX_Store_ProductReceiptNoteDetail_MasterID", - table: "Store_ProductReceiptNoteDetail", - column: "MasterID"); - - migrationBuilder.CreateIndex( - name: "IX_Store_ProductReceiptNoteDetail_Number_ItemCode_PackingCode_Lot_Status", - table: "Store_ProductReceiptNoteDetail", - columns: new[] { "Number", "ItemCode", "PackingCode", "Lot", "Status" }, - unique: true, - filter: "[Lot] IS NOT NULL"); - - migrationBuilder.CreateIndex( - name: "IX_Store_ProductReceiptRequest_Number", - table: "Store_ProductReceiptRequest", - column: "Number", - unique: true); - - migrationBuilder.CreateIndex( - name: "IX_Store_ProductReceiptRequestDetail_MasterID", - table: "Store_ProductReceiptRequestDetail", - column: "MasterID"); - - migrationBuilder.CreateIndex( - name: "IX_Store_ProductReceiptRequestDetail_Number_ItemCode_LocationCode", - table: "Store_ProductReceiptRequestDetail", - columns: new[] { "Number", "ItemCode", "LocationCode" }, - unique: true); - - migrationBuilder.CreateIndex( - name: "IX_Store_ProductRecycleMaterialDetail_MasterID", - table: "Store_ProductRecycleMaterialDetail", - column: "MasterID"); - - migrationBuilder.CreateIndex( - name: "IX_Store_ProductRecycleMaterialDetail_Number_ProductItemCode_ItemCode", - table: "Store_ProductRecycleMaterialDetail", - columns: new[] { "Number", "ProductItemCode", "ItemCode" }); - - migrationBuilder.CreateIndex( - name: "IX_Store_ProductRecycleNote_Number", - table: "Store_ProductRecycleNote", - column: "Number", - unique: true); - - migrationBuilder.CreateIndex( - name: "IX_Store_ProductRecycleNoteDetail_MasterID", - table: "Store_ProductRecycleNoteDetail", - column: "MasterID"); - - migrationBuilder.CreateIndex( - name: "IX_Store_ProductRecycleNoteDetail_Number_ItemCode", - table: "Store_ProductRecycleNoteDetail", - columns: new[] { "Number", "ItemCode" }, - unique: true); - - migrationBuilder.CreateIndex( - name: "IX_Store_ProductRecycleRequest_Number", - table: "Store_ProductRecycleRequest", - column: "Number", - unique: true); - - migrationBuilder.CreateIndex( - name: "IX_Store_ProductRecycleRequestDetail_MasterID", - table: "Store_ProductRecycleRequestDetail", - column: "MasterID"); - - migrationBuilder.CreateIndex( - name: "IX_Store_ProductRecycleRequestDetail_Number_ItemCode", - table: "Store_ProductRecycleRequestDetail", - columns: new[] { "Number", "ItemCode" }, - unique: true); - - migrationBuilder.CreateIndex( - name: "IX_Store_PurchaseOrder_Number", - table: "Store_PurchaseOrder", - column: "Number", - unique: true); - - migrationBuilder.CreateIndex( - name: "IX_Store_PurchaseOrderDetail_ItemCode_Number_PoLine", - table: "Store_PurchaseOrderDetail", - columns: new[] { "ItemCode", "Number", "PoLine" }, - unique: true, - filter: "[PoLine] IS NOT NULL"); - - migrationBuilder.CreateIndex( - name: "IX_Store_PurchaseOrderDetail_MasterID", - table: "Store_PurchaseOrderDetail", - column: "MasterID"); - - migrationBuilder.CreateIndex( - name: "IX_Store_PurchaseReceiptNote_Number", - table: "Store_PurchaseReceiptNote", - column: "Number", - unique: true); - - migrationBuilder.CreateIndex( - name: "IX_Store_PurchaseReceiptNote_SupplierCode", - table: "Store_PurchaseReceiptNote", - column: "SupplierCode"); - - migrationBuilder.CreateIndex( - name: "IX_Store_PurchaseReceiptNoteDetail_MasterID", - table: "Store_PurchaseReceiptNoteDetail", - column: "MasterID"); - - migrationBuilder.CreateIndex( - name: "IX_Store_PurchaseReceiptRequest_Number", - table: "Store_PurchaseReceiptRequest", - column: "Number", - unique: true); - - migrationBuilder.CreateIndex( - name: "IX_Store_PurchaseReceiptRequest_SupplierCode", - table: "Store_PurchaseReceiptRequest", - column: "SupplierCode"); - - migrationBuilder.CreateIndex( - name: "IX_Store_PurchaseReceiptRequestDetail_MasterID", - table: "Store_PurchaseReceiptRequestDetail", - column: "MasterID"); - - migrationBuilder.CreateIndex( - name: "IX_Store_PurchaseReceiptRequestDetail_Number_PackingCode", - table: "Store_PurchaseReceiptRequestDetail", - columns: new[] { "Number", "PackingCode" }, - unique: true); - - migrationBuilder.CreateIndex( - name: "IX_Store_PurchaseReturnNote_Number", - table: "Store_PurchaseReturnNote", - column: "Number", - unique: true); - - migrationBuilder.CreateIndex( - name: "IX_Store_PurchaseReturnNoteDetail_MasterID", - table: "Store_PurchaseReturnNoteDetail", - column: "MasterID"); - - migrationBuilder.CreateIndex( - name: "IX_Store_PurchaseReturnNoteDetail_Number_PackingCode", - table: "Store_PurchaseReturnNoteDetail", - columns: new[] { "Number", "PackingCode" }, - unique: true); - - migrationBuilder.CreateIndex( - name: "IX_Store_PurchaseReturnRequest_Number", - table: "Store_PurchaseReturnRequest", - column: "Number", - unique: true); - - migrationBuilder.CreateIndex( - name: "IX_Store_PurchaseReturnRequestDetail_MasterID", - table: "Store_PurchaseReturnRequestDetail", - column: "MasterID"); - - migrationBuilder.CreateIndex( - name: "IX_Store_PurchaseReturnRequestDetail_Number_PackingCode", - table: "Store_PurchaseReturnRequestDetail", - columns: new[] { "Number", "PackingCode" }, - unique: true); - - migrationBuilder.CreateIndex( - name: "IX_Store_PutawayNote_Number", - table: "Store_PutawayNote", - column: "Number", - unique: true); - - migrationBuilder.CreateIndex( - name: "IX_Store_PutawayNoteDetail_MasterID", - table: "Store_PutawayNoteDetail", - column: "MasterID"); - - migrationBuilder.CreateIndex( - name: "IX_Store_PutawayNoteDetail_Number_FromPackingCode_FromLocationCode_ToLocationCode_ToPackingCode", - table: "Store_PutawayNoteDetail", - columns: new[] { "Number", "FromPackingCode", "FromLocationCode", "ToLocationCode", "ToPackingCode" }, - unique: true, - filter: "[FromPackingCode] IS NOT NULL AND [ToPackingCode] IS NOT NULL"); - - migrationBuilder.CreateIndex( - name: "IX_Store_PutawayRequest_Number", - table: "Store_PutawayRequest", - column: "Number", - unique: true); - - migrationBuilder.CreateIndex( - name: "IX_Store_PutawayRequestDetail_MasterID", - table: "Store_PutawayRequestDetail", - column: "MasterID"); - - migrationBuilder.CreateIndex( - name: "IX_Store_ReceiptAbnormalNote_AsnNumber_Number_SupplierCode_ReceiptNumber", - table: "Store_ReceiptAbnormalNote", - columns: new[] { "AsnNumber", "Number", "SupplierCode", "ReceiptNumber" }, - unique: true); - - migrationBuilder.CreateIndex( - name: "IX_Store_ReceiptAbnormalNote_SupplierCode", - table: "Store_ReceiptAbnormalNote", - column: "SupplierCode"); - - migrationBuilder.CreateIndex( - name: "IX_Store_ReceiptAbnormalNoteDetail_MasterID", - table: "Store_ReceiptAbnormalNoteDetail", - column: "MasterID"); - - migrationBuilder.CreateIndex( - name: "IX_Store_ReceiptAbnormalNoteDetail_Number_PackingCode_ReceiptNumber", - table: "Store_ReceiptAbnormalNoteDetail", - columns: new[] { "Number", "PackingCode", "ReceiptNumber" }, - unique: true); - - migrationBuilder.CreateIndex( - name: "IX_Store_RecycledMaterialReceiptNote_Number", - table: "Store_RecycledMaterialReceiptNote", - column: "Number", - unique: true); - - migrationBuilder.CreateIndex( - name: "IX_Store_RecycledMaterialReceiptNoteDetail_MasterID", - table: "Store_RecycledMaterialReceiptNoteDetail", - column: "MasterID"); - - migrationBuilder.CreateIndex( - name: "IX_Store_RecycledMaterialReceiptNoteDetail_Number_PackingCode", - table: "Store_RecycledMaterialReceiptNoteDetail", - columns: new[] { "Number", "PackingCode" }, - unique: true); - - migrationBuilder.CreateIndex( - name: "IX_Store_SaleOrder_CustomerCode", - table: "Store_SaleOrder", - column: "CustomerCode"); - - migrationBuilder.CreateIndex( - name: "IX_Store_SaleOrder_Number", - table: "Store_SaleOrder", - column: "Number", - unique: true); - - migrationBuilder.CreateIndex( - name: "IX_Store_SaleOrderDetail_MasterID", - table: "Store_SaleOrderDetail", - column: "MasterID"); - - migrationBuilder.CreateIndex( - name: "IX_Store_SaleOrderDetail_Number_SoLine_ItemCode", - table: "Store_SaleOrderDetail", - columns: new[] { "Number", "SoLine", "ItemCode" }, - unique: true); - - migrationBuilder.CreateIndex( - name: "IX_Store_ScrapNote_Number", - table: "Store_ScrapNote", - column: "Number", - unique: true); - - migrationBuilder.CreateIndex( - name: "IX_Store_ScrapNoteDetail_MasterID", - table: "Store_ScrapNoteDetail", - column: "MasterID"); - - migrationBuilder.CreateIndex( - name: "IX_Store_ScrapNoteDetail_Number_ItemCode_FromPackingCode_FromLocationCode_ToLocationCode_FromLot_FromStatus", - table: "Store_ScrapNoteDetail", - columns: new[] { "Number", "ItemCode", "FromPackingCode", "FromLocationCode", "ToLocationCode", "FromLot", "FromStatus" }, - unique: true, - filter: "[FromPackingCode] IS NOT NULL AND [FromLot] IS NOT NULL"); - - migrationBuilder.CreateIndex( - name: "IX_Store_ScrapRequest_Number", - table: "Store_ScrapRequest", - column: "Number", - unique: true); - - migrationBuilder.CreateIndex( - name: "IX_Store_ScrapRequestDetail_MasterID", - table: "Store_ScrapRequestDetail", - column: "MasterID"); - - migrationBuilder.CreateIndex( - name: "IX_Store_ScrapRequestDetail_Number_ItemCode_LocationCode", - table: "Store_ScrapRequestDetail", - columns: new[] { "Number", "ItemCode", "LocationCode" }, - unique: true); - - migrationBuilder.CreateIndex( - name: "IX_Store_SplitPackingRec_FromPackingCode_ToPackingCode", - table: "Store_SplitPackingRec", - columns: new[] { "FromPackingCode", "ToPackingCode" }); - - migrationBuilder.CreateIndex( - name: "IX_Store_SplitPackingRec_ToPackingCode", - table: "Store_SplitPackingRec", - column: "ToPackingCode"); - - migrationBuilder.CreateIndex( - name: "IX_Store_SupplierAsn_Number", - table: "Store_SupplierAsn", - column: "Number", - unique: true); - - migrationBuilder.CreateIndex( - name: "IX_Store_SupplierAsn_SupplierCode", - table: "Store_SupplierAsn", - column: "SupplierCode"); - - migrationBuilder.CreateIndex( - name: "IX_Store_SupplierAsnDetail_MasterID", - table: "Store_SupplierAsnDetail", - column: "MasterID"); - - migrationBuilder.CreateIndex( - name: "IX_Store_SupplierAsnDetail_Number_ItemCode_PackingCode", - table: "Store_SupplierAsnDetail", - columns: new[] { "Number", "ItemCode", "PackingCode" }, - unique: true); - - migrationBuilder.CreateIndex( - name: "IX_Store_TransferNote_Number", - table: "Store_TransferNote", - column: "Number", - unique: true); - - migrationBuilder.CreateIndex( - name: "IX_Store_TransferNoteDetail_MasterID", - table: "Store_TransferNoteDetail", - column: "MasterID"); - - migrationBuilder.CreateIndex( - name: "IX_Store_TransferNoteDetail_Number_FromPackingCode_FromLocationCode_ToLocationCode_FromStatus_ToStatus", - table: "Store_TransferNoteDetail", - columns: new[] { "Number", "FromPackingCode", "FromLocationCode", "ToLocationCode", "FromStatus", "ToStatus" }, - unique: true, - filter: "[FromPackingCode] IS NOT NULL"); - - migrationBuilder.CreateIndex( - name: "IX_Store_TransferRequest_Number", - table: "Store_TransferRequest", - column: "Number", - unique: true); - - migrationBuilder.CreateIndex( - name: "IX_Store_TransferRequestDetail_MasterID", - table: "Store_TransferRequestDetail", - column: "MasterID"); - - migrationBuilder.CreateIndex( - name: "IX_Store_UnplannedIssueNote_Number", - table: "Store_UnplannedIssueNote", - column: "Number", - unique: true); - - migrationBuilder.CreateIndex( - name: "IX_Store_UnplannedIssueNoteDetail_MasterID", - table: "Store_UnplannedIssueNoteDetail", - column: "MasterID"); - - migrationBuilder.CreateIndex( - name: "IX_Store_UnplannedIssueNoteDetail_Number_PackingCode_ItemCode_Lot_Status", - table: "Store_UnplannedIssueNoteDetail", - columns: new[] { "Number", "PackingCode", "ItemCode", "Lot", "Status" }, - unique: true, - filter: "[Lot] IS NOT NULL"); - - migrationBuilder.CreateIndex( - name: "IX_Store_UnplannedIssueRequest_Number", - table: "Store_UnplannedIssueRequest", - column: "Number", - unique: true); - - migrationBuilder.CreateIndex( - name: "IX_Store_UnplannedIssueRequestDetail_MasterID", - table: "Store_UnplannedIssueRequestDetail", - column: "MasterID"); - - migrationBuilder.CreateIndex( - name: "IX_Store_UnplannedIssueRequestDetail_Number_PackingCode_ItemCode_Lot_Status", - table: "Store_UnplannedIssueRequestDetail", - columns: new[] { "Number", "PackingCode", "ItemCode", "Lot", "Status" }, - unique: true, - filter: "[Lot] IS NOT NULL"); - - migrationBuilder.CreateIndex( - name: "IX_Store_UnplannedReceiptNote_Number", - table: "Store_UnplannedReceiptNote", - column: "Number", - unique: true); - - migrationBuilder.CreateIndex( - name: "IX_Store_UnplannedReceiptNoteDetail_MasterID", - table: "Store_UnplannedReceiptNoteDetail", - column: "MasterID"); - - migrationBuilder.CreateIndex( - name: "IX_Store_UnplannedReceiptNoteDetail_Number_PackingCode_ItemCode_Lot_Status", - table: "Store_UnplannedReceiptNoteDetail", - columns: new[] { "Number", "PackingCode", "ItemCode", "Lot", "Status" }, - unique: true, - filter: "[Lot] IS NOT NULL"); - - migrationBuilder.CreateIndex( - name: "IX_Store_UnplannedReceiptRequest_Number", - table: "Store_UnplannedReceiptRequest", - column: "Number", - unique: true); - - migrationBuilder.CreateIndex( - name: "IX_Store_UnplannedReceiptRequestDetail_MasterID", - table: "Store_UnplannedReceiptRequestDetail", - column: "MasterID"); - - migrationBuilder.CreateIndex( - name: "IX_Store_UnplannedReceiptRequestDetail_Number_PackingCode_ItemCode_Lot_Status", - table: "Store_UnplannedReceiptRequestDetail", - columns: new[] { "Number", "PackingCode", "ItemCode", "Lot", "Status" }, - unique: true, - filter: "[Lot] IS NOT NULL"); - - migrationBuilder.CreateIndex( - name: "IX_Store_WarehouseTransferNote_Number", - table: "Store_WarehouseTransferNote", - column: "Number", - unique: true); - - migrationBuilder.CreateIndex( - name: "IX_Store_WarehouseTransferNoteDetail_MasterID", - table: "Store_WarehouseTransferNoteDetail", - column: "MasterID"); - - migrationBuilder.CreateIndex( - name: "IX_Store_WarehouseTransferNoteDetail_Number_FromPackingCode_FromLocationCode_ToLocationCode", - table: "Store_WarehouseTransferNoteDetail", - columns: new[] { "Number", "FromPackingCode", "FromLocationCode", "ToLocationCode" }, - unique: true, - filter: "[FromPackingCode] IS NOT NULL"); - - migrationBuilder.CreateIndex( - name: "IX_Store_WipWarehouseAdjustNote_Number", - table: "Store_WipWarehouseAdjustNote", - column: "Number", - unique: true); - - migrationBuilder.CreateIndex( - name: "IX_Store_WipWarehouseAdjustNoteDetail_MasterID", - table: "Store_WipWarehouseAdjustNoteDetail", - column: "MasterID"); - - migrationBuilder.CreateIndex( - name: "IX_Store_WipWarehouseAdjustNoteDetail_Number_FromPackingCode_FromLocationCode_ToLocationCode_FromStatus_ToStatus", - table: "Store_WipWarehouseAdjustNoteDetail", - columns: new[] { "Number", "FromPackingCode", "FromLocationCode", "ToLocationCode", "FromStatus", "ToStatus" }, - unique: true, - filter: "[FromPackingCode] IS NOT NULL"); - - migrationBuilder.CreateIndex( - name: "IX_Store_WipWarehouseAdjustRequest_Number", - table: "Store_WipWarehouseAdjustRequest", - column: "Number", - unique: true); - - migrationBuilder.CreateIndex( - name: "IX_Store_WipWarehouseAdjustRequestDetail_MasterID", - table: "Store_WipWarehouseAdjustRequestDetail", - column: "MasterID"); - - migrationBuilder.CreateIndex( - name: "IX_Store_WorkOrder_Number", - table: "Store_WorkOrder", - column: "Number", - unique: true); - - migrationBuilder.CreateIndex( - name: "IX_Store_WorkOrderDetail_MasterID", - table: "Store_WorkOrderDetail", - column: "MasterID"); - - migrationBuilder.CreateIndex( - name: "IX_Store_WorkOrderDetail_Number_ItemCode", - table: "Store_WorkOrderDetail", - columns: new[] { "Number", "ItemCode" }, - unique: true); - } - - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropTable( - name: "Job_CheckJobDetail"); - - migrationBuilder.DropTable( - name: "Job_CountJobDetail"); - - migrationBuilder.DropTable( - name: "Job_DeliverJobDetail"); - - migrationBuilder.DropTable( - name: "Job_InspectJobDetail"); - - migrationBuilder.DropTable( - name: "Job_InspectJobSummaryDetail"); - - migrationBuilder.DropTable( - name: "Job_IssueJobDetail"); - - migrationBuilder.DropTable( - name: "Job_JisDeliverJobDetail"); - - migrationBuilder.DropTable( - name: "Job_ProductionReturnJobDetail"); - - migrationBuilder.DropTable( - name: "Job_ProductReceiveJobDetail"); - - migrationBuilder.DropTable( - name: "Job_PurchaseReceiptJobDetail"); - - migrationBuilder.DropTable( - name: "Job_PurchaseReturnJobDetail"); - - migrationBuilder.DropTable( - name: "Job_PutawayJobDetail"); - - migrationBuilder.DropTable( - name: "Job_UnplannedIssueJobDetail"); - - migrationBuilder.DropTable( - name: "Job_UnplannedReceiptJobDetail"); - - migrationBuilder.DropTable( - name: "Store_BackFlushNoteDetail"); - - migrationBuilder.DropTable( - name: "Store_ContainerBindNoteDetail"); - - migrationBuilder.DropTable( - name: "Store_CountAdjustNoteDetail"); - - migrationBuilder.DropTable( - name: "Store_CountAdjustRequestDetail"); - - migrationBuilder.DropTable( - name: "Store_CountNoteDetail"); - - migrationBuilder.DropTable( - name: "Store_CountPlanDetail"); - - migrationBuilder.DropTable( - name: "Store_CustomerAsnDetail"); - - migrationBuilder.DropTable( - name: "Store_CustomerReturnNoteDetail"); - - migrationBuilder.DropTable( - name: "Store_DeliverNoteDetail"); - - migrationBuilder.DropTable( - name: "Store_DeliverPlanDetail"); - - migrationBuilder.DropTable( - name: "Store_DeliverRequestDetail"); - - migrationBuilder.DropTable( - name: "Store_ExchangeData"); - - migrationBuilder.DropTable( - name: "Store_InspectAbnormalNoteDetail"); - - migrationBuilder.DropTable( - name: "Store_InspectNoteDetail"); - - migrationBuilder.DropTable( - name: "Store_InspectNoteSummaryDetail"); - - migrationBuilder.DropTable( - name: "Store_InspectRequestDetail"); - - migrationBuilder.DropTable( - name: "Store_InspectRequestSummaryDetail"); - - migrationBuilder.DropTable( - name: "Store_InventoryInitialNoteDetail"); - - migrationBuilder.DropTable( - name: "Store_InventoryTransferNoteDetail"); - - migrationBuilder.DropTable( - name: "Store_IsolationNoteDetail"); - - migrationBuilder.DropTable( - name: "Store_IssueNoteDetail"); - - migrationBuilder.DropTable( - name: "Store_ItemTransformNoteDetail"); - - migrationBuilder.DropTable( - name: "Store_ItemTransformRequestDetail"); - - migrationBuilder.DropTable( - name: "Store_JisDeliverNoteDetail"); - - migrationBuilder.DropTable( - name: "Store_JisProductReceiptNoteDetail"); - - migrationBuilder.DropTable( - name: "Store_MaterialRequestDetail"); - - migrationBuilder.DropTable( - name: "Store_NoOkConvertOkNoteDetail"); - - migrationBuilder.DropTable( - name: "Store_OfflineSettlementNoteDetail"); - - migrationBuilder.DropTable( - name: "Store_PreparationPlanDetail"); - - migrationBuilder.DropTable( - name: "Store_ProductionPlanDetail"); - - migrationBuilder.DropTable( - name: "Store_ProductionReturnNoteDetail"); - - migrationBuilder.DropTable( - name: "Store_ProductionReturnRequestDetail"); - - migrationBuilder.DropTable( - name: "Store_ProductL7PartsNoteDetail"); - - migrationBuilder.DropTable( - name: "Store_ProductReceiptNoteDetail"); - - migrationBuilder.DropTable( - name: "Store_ProductReceiptRequestDetail"); - - migrationBuilder.DropTable( - name: "Store_ProductRecycleMaterialDetail"); - - migrationBuilder.DropTable( - name: "Store_ProductRecycleNoteDetail"); - - migrationBuilder.DropTable( - name: "Store_ProductRecycleRequestDetail"); - - migrationBuilder.DropTable( - name: "Store_PurchaseOrderDetail"); - - migrationBuilder.DropTable( - name: "Store_PurchaseReceiptNoteDetail"); - - migrationBuilder.DropTable( - name: "Store_PurchaseReceiptRequestDetail"); - - migrationBuilder.DropTable( - name: "Store_PurchaseReturnNoteDetail"); - - migrationBuilder.DropTable( - name: "Store_PurchaseReturnRequestDetail"); - - migrationBuilder.DropTable( - name: "Store_PutawayNoteDetail"); - - migrationBuilder.DropTable( - name: "Store_PutawayRequestDetail"); - - migrationBuilder.DropTable( - name: "Store_ReceiptAbnormalNoteDetail"); - - migrationBuilder.DropTable( - name: "Store_RecycledMaterialReceiptNoteDetail"); - - migrationBuilder.DropTable( - name: "Store_SaleOrderDetail"); - - migrationBuilder.DropTable( - name: "Store_ScrapNoteDetail"); - - migrationBuilder.DropTable( - name: "Store_ScrapRequestDetail"); - - migrationBuilder.DropTable( - name: "Store_SplitPackingRec"); - - migrationBuilder.DropTable( - name: "Store_SupplierAsnDetail"); - - migrationBuilder.DropTable( - name: "Store_TransferNoteDetail"); - - migrationBuilder.DropTable( - name: "Store_TransferRequestDetail"); - - migrationBuilder.DropTable( - name: "Store_UnplannedIssueNoteDetail"); - - migrationBuilder.DropTable( - name: "Store_UnplannedIssueRequestDetail"); - - migrationBuilder.DropTable( - name: "Store_UnplannedReceiptNoteDetail"); - - migrationBuilder.DropTable( - name: "Store_UnplannedReceiptRequestDetail"); - - migrationBuilder.DropTable( - name: "Store_WarehouseTransferNoteDetail"); - - migrationBuilder.DropTable( - name: "Store_WipWarehouseAdjustNoteDetail"); - - migrationBuilder.DropTable( - name: "Store_WipWarehouseAdjustRequestDetail"); - - migrationBuilder.DropTable( - name: "Store_WorkOrderDetail"); - - migrationBuilder.DropTable( - name: "Job_CheckJob"); - - migrationBuilder.DropTable( - name: "Job_CountJob"); - - migrationBuilder.DropTable( - name: "Job_DeliverJob"); - - migrationBuilder.DropTable( - name: "Job_InspectJob"); - - migrationBuilder.DropTable( - name: "Job_IssueJob"); - - migrationBuilder.DropTable( - name: "Job_JisDeliverJob"); - - migrationBuilder.DropTable( - name: "Job_ProductionReturnJob"); - - migrationBuilder.DropTable( - name: "Job_ProductReceiveJob"); - - migrationBuilder.DropTable( - name: "Job_PurchaseReceiptJob"); - - migrationBuilder.DropTable( - name: "Job_PurchaseReturnJob"); - - migrationBuilder.DropTable( - name: "Job_PutawayJob"); - - migrationBuilder.DropTable( - name: "Job_UnplannedIssueJob"); - - migrationBuilder.DropTable( - name: "Job_UnplannedReceiptJob"); - - migrationBuilder.DropTable( - name: "Store_BackFlushNote"); - - migrationBuilder.DropTable( - name: "Store_ContainerBindNote"); - - migrationBuilder.DropTable( - name: "Store_CountAdjustNote"); - - migrationBuilder.DropTable( - name: "Store_CountAdjustRequest"); - - migrationBuilder.DropTable( - name: "Store_CountNote"); - - migrationBuilder.DropTable( - name: "Store_CountPlan"); - - migrationBuilder.DropTable( - name: "Store_CustomerAsn"); - - migrationBuilder.DropTable( - name: "Store_CustomerReturnNote"); - - migrationBuilder.DropTable( - name: "Store_DeliverNote"); - - migrationBuilder.DropTable( - name: "Store_DeliverPlan"); - - migrationBuilder.DropTable( - name: "Store_DeliverRequest"); - - migrationBuilder.DropTable( - name: "Store_InspectAbnormalNote"); - - migrationBuilder.DropTable( - name: "Store_InspectNote"); - - migrationBuilder.DropTable( - name: "Store_InspectRequest"); - - migrationBuilder.DropTable( - name: "Store_InventoryInitialNote"); - - migrationBuilder.DropTable( - name: "Store_InventoryTransferNote"); - - migrationBuilder.DropTable( - name: "Store_IsolationNote"); - - migrationBuilder.DropTable( - name: "Store_IssueNote"); - - migrationBuilder.DropTable( - name: "Store_ItemTransformNote"); - - migrationBuilder.DropTable( - name: "Store_ItemTransformRequest"); - - migrationBuilder.DropTable( - name: "Store_JisDeliverNote"); - - migrationBuilder.DropTable( - name: "Store_JisProductReceiptNote"); - - migrationBuilder.DropTable( - name: "Store_MaterialRequest"); - - migrationBuilder.DropTable( - name: "Store_NoOkConvertOkNote"); - - migrationBuilder.DropTable( - name: "Store_OfflineSettlementNote"); - - migrationBuilder.DropTable( - name: "Store_PreparationPlan"); - - migrationBuilder.DropTable( - name: "Store_ProductionPlan"); - - migrationBuilder.DropTable( - name: "Store_ProductionReturnNote"); - - migrationBuilder.DropTable( - name: "Store_ProductionReturnRequest"); - - migrationBuilder.DropTable( - name: "Store_ProductL7PartsNote"); - - migrationBuilder.DropTable( - name: "Store_ProductReceiptNote"); - - migrationBuilder.DropTable( - name: "Store_ProductReceiptRequest"); - - migrationBuilder.DropTable( - name: "Store_ProductRecycleNote"); - - migrationBuilder.DropTable( - name: "Store_ProductRecycleRequest"); - - migrationBuilder.DropTable( - name: "Store_PurchaseOrder"); - - migrationBuilder.DropTable( - name: "Store_PurchaseReceiptNote"); - - migrationBuilder.DropTable( - name: "Store_PurchaseReceiptRequest"); - - migrationBuilder.DropTable( - name: "Store_PurchaseReturnNote"); - - migrationBuilder.DropTable( - name: "Store_PurchaseReturnRequest"); - - migrationBuilder.DropTable( - name: "Store_PutawayNote"); - - migrationBuilder.DropTable( - name: "Store_PutawayRequest"); - - migrationBuilder.DropTable( - name: "Store_ReceiptAbnormalNote"); - - migrationBuilder.DropTable( - name: "Store_RecycledMaterialReceiptNote"); - - migrationBuilder.DropTable( - name: "Store_SaleOrder"); - - migrationBuilder.DropTable( - name: "Store_ScrapNote"); - - migrationBuilder.DropTable( - name: "Store_ScrapRequest"); - - migrationBuilder.DropTable( - name: "Store_SupplierAsn"); - - migrationBuilder.DropTable( - name: "Store_TransferNote"); - - migrationBuilder.DropTable( - name: "Store_TransferRequest"); - - migrationBuilder.DropTable( - name: "Store_UnplannedIssueNote"); - - migrationBuilder.DropTable( - name: "Store_UnplannedIssueRequest"); - - migrationBuilder.DropTable( - name: "Store_UnplannedReceiptNote"); - - migrationBuilder.DropTable( - name: "Store_UnplannedReceiptRequest"); - - migrationBuilder.DropTable( - name: "Store_WarehouseTransferNote"); - - migrationBuilder.DropTable( - name: "Store_WipWarehouseAdjustNote"); - - migrationBuilder.DropTable( - name: "Store_WipWarehouseAdjustRequest"); - - migrationBuilder.DropTable( - name: "Store_WorkOrder"); - } - } -} diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/Migrations/20240223065640_base.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/Migrations/20240223065640_base.cs deleted file mode 100644 index a802febf7..000000000 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/Migrations/20240223065640_base.cs +++ /dev/null @@ -1,19 +0,0 @@ -using Microsoft.EntityFrameworkCore.Migrations; - -#nullable disable - -namespace Win_in.Sfs.Wms.Store.Migrations -{ - public partial class @base : Migration - { - protected override void Up(MigrationBuilder migrationBuilder) - { - - } - - protected override void Down(MigrationBuilder migrationBuilder) - { - - } - } -} diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/Migrations/20240223055707_temp.Designer.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/Migrations/20240327025142_transferLib.Designer.cs similarity index 90% rename from be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/Migrations/20240223055707_temp.Designer.cs rename to be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/Migrations/20240327025142_transferLib.Designer.cs index 7c029a486..f305f0af3 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/Migrations/20240223055707_temp.Designer.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/Migrations/20240327025142_transferLib.Designer.cs @@ -13,8 +13,8 @@ using Win_in.Sfs.Wms.Store.EntityFrameworkCore; namespace Win_in.Sfs.Wms.Store.Migrations { [DbContext(typeof(StoreDbContext))] - [Migration("20240223055707_temp")] - partial class temp + [Migration("20240327025142_transferLib")] + partial class transferLib { protected override void BuildTargetModel(ModelBuilder modelBuilder) { @@ -824,27 +824,42 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.ToTable("Store_ContainerBindNoteDetail", (string)null); }); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.CountAdjustNote", b => + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ContainerJob", b => { b.Property("Id") .HasColumnType("uniqueidentifier"); - b.Property("ActiveDate") + b.Property("AcceptTime") + .HasColumnType("datetime2"); + + b.Property("AcceptUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("AcceptUserName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("CompleteTime") .HasColumnType("datetime2"); + b.Property("CompleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CompleteUserName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + b.Property("ConcurrencyStamp") .IsConcurrencyToken() .HasMaxLength(40) .HasColumnType("nvarchar(40)") .HasColumnName("ConcurrencyStamp"); - b.Property("CountAdjustRequestNumber") - .HasColumnType("nvarchar(max)"); - - b.Property("CountNoteNumber") - .HasColumnType("nvarchar(max)"); + b.Property("ContainerRequestNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); - b.Property("CountPlanNumber") + b.Property("ContainerType") .HasMaxLength(64) .HasColumnType("nvarchar(64)"); @@ -860,11 +875,24 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("nvarchar(max)") .HasColumnName("ExtraProperties"); - b.Property("IsAdjusted") - .HasColumnType("bit"); + b.Property("IsAutoComplete") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false); - b.Property("JobNumber") - .HasColumnType("nvarchar(max)"); + 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") @@ -877,19 +905,43 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.Property("Number") .IsRequired() .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("Number"); + .HasColumnType("nvarchar(64)"); + + b.Property("Priority") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasDefaultValue(0); + + b.Property("PriorityIncrement") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasDefaultValue(0); b.Property("Remark") .HasMaxLength(3072) .HasColumnType("nvarchar(3072)") .HasColumnName("Remark"); + b.Property("RequestLocationCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("SpecificationsType") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + b.Property("TenantId") .HasColumnType("uniqueidentifier") .HasColumnName("TenantId"); - b.Property("Type") + b.Property("UpStreamJobNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("WarehouseCode") + .HasColumnType("nvarchar(max)"); + + b.Property("WorkGroupCode") .HasMaxLength(64) .HasColumnType("nvarchar(64)"); @@ -901,47 +953,83 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.HasIndex("Number") .IsUnique(); - b.ToTable("Store_CountAdjustNote", (string)null); + b.ToTable("Job_ContainerJob", (string)null); }); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.CountAdjustNoteDetail", b => + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ContainerJobDetail", b => { b.Property("Id") .HasColumnType("uniqueidentifier"); - b.Property("AdjustQty") - .HasColumnType("decimal(18,6)"); + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); - b.Property("ArriveDate") + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("FromLocationCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("HandledArriveDate") .HasColumnType("datetime2"); - b.Property("ContainerCode") + b.Property("HandledContainerCode") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("ContainerCode"); + .HasColumnName("HandledContainerCode"); - b.Property("CountLabel") - .IsRequired() + b.Property("HandledExpireDate") + .HasColumnType("datetime2"); + + b.Property("HandledFromLocationArea") .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledFromLocationArea"); - b.Property("CountQty") - .HasColumnType("decimal(18,6)"); + b.Property("HandledFromLocationCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledFromLocationCode"); - b.Property("CreationTime") - .HasColumnType("datetime2") - .HasColumnName("CreationTime"); + b.Property("HandledFromLocationErpCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledFromLocationErpCode"); - b.Property("CreatorId") - .HasColumnType("uniqueidentifier") - .HasColumnName("CreatorId"); + b.Property("HandledFromLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledFromLocationGroup"); - b.Property("ExpireDate") + 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("InventoryQty") + b.Property("HandledQty") .HasColumnType("decimal(18,6)"); + b.Property("HandledSupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledSupplierBatch"); + b.Property("ItemCode") .IsRequired() .HasMaxLength(64) @@ -971,54 +1059,70 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("LastModifierId"); - b.Property("LocationArea") + b.Property("MasterID") + .HasColumnType("uniqueidentifier"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("RecommendArriveDate") + .HasColumnType("datetime2"); + + b.Property("RecommendContainerCode") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("LocationArea"); + .HasColumnName("RecommendContainerCode"); - b.Property("LocationCode") - .IsRequired() + b.Property("RecommendExpireDate") + .HasColumnType("datetime2"); + + b.Property("RecommendFromLocationArea") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("LocationCode"); + .HasColumnName("RecommendFromLocationArea"); - b.Property("LocationErpCode") - .IsRequired() + b.Property("RecommendFromLocationCode") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("LocationErpCode"); + .HasColumnName("RecommendFromLocationCode"); - b.Property("LocationGroup") + b.Property("RecommendFromLocationErpCode") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("LocationGroup"); + .HasColumnName("RecommendFromLocationErpCode"); - b.Property("Lot") + b.Property("RecommendFromLocationGroup") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("Lot"); + .HasColumnName("RecommendFromLocationGroup"); - b.Property("MasterID") - .HasColumnType("uniqueidentifier"); + b.Property("RecommendFromWarehouseCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendFromWarehouseCode"); - b.Property("Number") - .IsRequired() + b.Property("RecommendLot") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("Number"); + .HasColumnName("RecommendLot"); - b.Property("PackingCode") - .IsRequired() + b.Property("RecommendPackingCode") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("PackingCode"); + .HasColumnName("RecommendPackingCode"); - b.Property("ProduceDate") + b.Property("RecommendProduceDate") .HasColumnType("datetime2"); - b.Property("ReasonCode") + b.Property("RecommendQty") + .HasColumnType("decimal(18,6)"); + + b.Property("RecommendSupplierBatch") .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendSupplierBatch"); b.Property("Remark") .HasMaxLength(3072) @@ -1033,42 +1137,25 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.Property("StdPackQty") .HasColumnType("decimal(18,6)"); - b.Property("SupplierBatch") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("SupplierBatch"); - b.Property("TenantId") .HasColumnType("uniqueidentifier") .HasColumnName("TenantId"); - b.Property("TransInOut") - .IsRequired() + b.Property("ToLocationCode") .HasMaxLength(64) .HasColumnType("nvarchar(64)"); b.Property("Uom") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("WarehouseCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("WarehouseCode"); + .HasColumnType("nvarchar(max)"); 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); + b.ToTable("Job_ContainerJobDetail", (string)null); }); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.CountAdjustRequest", b => + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ContainerNote", b => { b.Property("Id") .HasColumnType("uniqueidentifier"); @@ -1076,30 +1163,23 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.Property("ActiveDate") .HasColumnType("datetime2"); - b.Property("AutoAgree") - .HasColumnType("bit"); - - b.Property("AutoCompleteJob") - .HasColumnType("bit"); - - b.Property("AutoHandle") - .HasColumnType("bit"); - - b.Property("AutoSubmit") - .HasColumnType("bit"); - b.Property("ConcurrencyStamp") .IsConcurrencyToken() .HasMaxLength(40) .HasColumnType("nvarchar(40)") .HasColumnName("ConcurrencyStamp"); - b.Property("CountNoteNumber") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + b.Property("ConfirmTime") + .HasColumnType("datetime2"); - b.Property("CountPlanNumber") - .HasMaxLength(64) + b.Property("Confirmed") + .HasColumnType("bit"); + + b.Property("ContainerRequestNumber") + .HasColumnType("nvarchar(max)"); + + b.Property("ContainerType") + .HasMaxLength(64) .HasColumnType("nvarchar(64)"); b.Property("CreationTime") @@ -1110,13 +1190,15 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("CreatorId"); - b.Property("DirectCreateNote") - .HasColumnType("bit"); - b.Property("ExtraProperties") .HasColumnType("nvarchar(max)") .HasColumnName("ExtraProperties"); + b.Property("JobNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("JobNumber"); + b.Property("LastModificationTime") .HasColumnType("datetime2") .HasColumnName("LastModificationTime"); @@ -1136,8 +1218,11 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("nvarchar(3072)") .HasColumnName("Remark"); - b.Property("RequestStatus") - .IsRequired() + b.Property("RequestLocationCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("SpecificationsType") .HasMaxLength(64) .HasColumnType("nvarchar(64)"); @@ -1153,10 +1238,10 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.HasIndex("Number") .IsUnique(); - b.ToTable("Store_CountAdjustRequest", (string)null); + b.ToTable("Store_ContainerNote", (string)null); }); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.CountAdjustRequestDetail", b => + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ContainerNoteDetail", b => { b.Property("Id") .HasColumnType("uniqueidentifier"); @@ -1164,14 +1249,6 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.Property("ArriveDate") .HasColumnType("datetime2"); - b.Property("ContainerCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ContainerCode"); - - b.Property("CountQty") - .HasColumnType("decimal(18,6)"); - b.Property("CreationTime") .HasColumnType("datetime2") .HasColumnName("CreationTime"); @@ -1183,9 +1260,107 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.Property("ExpireDate") .HasColumnType("datetime2"); - b.Property("InventoryQty") + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("FromContainerCode") + .HasColumnType("nvarchar(max)"); + + b.Property("FromLocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromLocationArea"); + + b.Property("FromLocationCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromLocationCode"); + + b.Property("FromLocationErpCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromLocationErpCode"); + + b.Property("FromLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromLocationGroup"); + + b.Property("FromLot") + .HasColumnType("nvarchar(max)"); + + b.Property("FromPackingCode") + .HasColumnType("nvarchar(max)"); + + b.Property("FromStatus") + .HasColumnType("int"); + + b.Property("FromWarehouseCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromWarehouseCode"); + + b.Property("HandledArriveDate") + .HasColumnType("datetime2"); + + b.Property("HandledContainerCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledContainerCode"); + + b.Property("HandledExpireDate") + .HasColumnType("datetime2"); + + b.Property("HandledFromLocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledFromLocationArea"); + + b.Property("HandledFromLocationCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledFromLocationCode"); + + b.Property("HandledFromLocationErpCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledFromLocationErpCode"); + + b.Property("HandledFromLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledFromLocationGroup"); + + b.Property("HandledFromWarehouseCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledFromWarehouseCode"); + + b.Property("HandledLot") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledLot"); + + b.Property("HandledPackingCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledPackingCode"); + + b.Property("HandledProduceDate") + .HasColumnType("datetime2"); + + b.Property("HandledQty") .HasColumnType("decimal(18,6)"); + b.Property("HandledSupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledSupplierBatch"); + b.Property("ItemCode") .IsRequired() .HasMaxLength(64) @@ -1215,69 +1390,85 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("LastModifierId"); - b.Property("LocationArea") + b.Property("MasterID") + .HasColumnType("uniqueidentifier"); + + b.Property("Number") + .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("LocationArea"); + .HasColumnName("Number"); - b.Property("LocationCode") - .IsRequired() + b.Property("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("LocationCode"); + .HasColumnName("RecommendContainerCode"); - b.Property("LocationErpCode") - .IsRequired() + b.Property("RecommendExpireDate") + .HasColumnType("datetime2"); + + b.Property("RecommendFromLocationArea") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("LocationErpCode"); + .HasColumnName("RecommendFromLocationArea"); - b.Property("LocationGroup") + b.Property("RecommendFromLocationCode") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("LocationGroup"); + .HasColumnName("RecommendFromLocationCode"); - b.Property("Lot") + b.Property("RecommendFromLocationErpCode") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("Lot"); + .HasColumnName("RecommendFromLocationErpCode"); - b.Property("MasterID") - .HasColumnType("uniqueidentifier"); + b.Property("RecommendFromLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendFromLocationGroup"); - b.Property("Number") - .IsRequired() + b.Property("RecommendFromWarehouseCode") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("Number"); + .HasColumnName("RecommendFromWarehouseCode"); - b.Property("PackingCode") - .IsRequired() + b.Property("RecommendLot") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("PackingCode"); + .HasColumnName("RecommendLot"); - b.Property("ProduceDate") + b.Property("RecommendPackingCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendPackingCode"); + + b.Property("RecommendProduceDate") .HasColumnType("datetime2"); - b.Property("Qty") - .HasPrecision(18, 6) - .HasColumnType("decimal(18,6)") - .HasColumnName("Qty"); + b.Property("RecommendQty") + .HasColumnType("decimal(18,6)"); - b.Property("ReasonCode") - .HasColumnType("nvarchar(max)"); + b.Property("RecommendSupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendSupplierBatch"); b.Property("Remark") .HasMaxLength(3072) .HasColumnType("nvarchar(3072)") .HasColumnName("Remark"); - b.Property("Status") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - b.Property("StdPackQty") .HasColumnType("decimal(18,6)"); @@ -1290,53 +1481,81 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("TenantId"); - b.Property("Uom") + b.Property("ToContainerCode") + .HasColumnType("nvarchar(max)"); + + b.Property("ToLocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToLocationArea"); + + b.Property("ToLocationCode") .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("Uom"); + .HasColumnName("ToLocationCode"); - b.Property("WarehouseCode") + b.Property("ToLocationErpCode") .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("WarehouseCode"); + .HasColumnName("ToLocationErpCode"); + + b.Property("ToLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToLocationGroup"); + + b.Property("ToLot") + .HasColumnType("nvarchar(max)"); + + b.Property("ToPackingCode") + .HasColumnType("nvarchar(max)"); + + b.Property("ToStatus") + .HasColumnType("int"); + + b.Property("ToWarehouseCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToWarehouseCode"); + + b.Property("Uom") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Uom"); b.HasKey("Id"); b.HasIndex("MasterID"); - b.HasIndex("Number", "ItemCode", "LocationCode", "Lot", "Status", "PackingCode") - .IsUnique() - .HasFilter("[Lot] IS NOT NULL"); + b.HasIndex("Number") + .IsUnique(); - b.ToTable("Store_CountAdjustRequestDetail", (string)null); + b.ToTable("Store_ContainerNoteDetail", (string)null); }); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.CountJob", b => + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ContainerRequest", b => { b.Property("Id") .HasColumnType("uniqueidentifier"); - b.Property("AcceptTime") + b.Property("ActiveDate") .HasColumnType("datetime2"); - b.Property("AcceptUserId") - .HasColumnType("uniqueidentifier"); - - b.Property("AcceptUserName") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + b.Property("AutoAgree") + .HasColumnType("bit"); - b.Property("CompleteTime") - .HasColumnType("datetime2"); + b.Property("AutoCompleteJob") + .HasColumnType("bit"); - b.Property("CompleteUserId") - .HasColumnType("uniqueidentifier"); + b.Property("AutoHandle") + .HasColumnType("bit"); - b.Property("CompleteUserName") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + b.Property("AutoSubmit") + .HasColumnType("bit"); b.Property("ConcurrencyStamp") .IsConcurrencyToken() @@ -1344,17 +1563,7 @@ namespace Win_in.Sfs.Wms.Store.Migrations .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() + b.Property("ContainerType") .HasMaxLength(64) .HasColumnType("nvarchar(64)"); @@ -1366,36 +1575,13 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("CreatorId"); - b.Property("Description") - .HasColumnType("nvarchar(max)"); + b.Property("DirectCreateNote") + .HasColumnType("bit"); 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"); @@ -1404,50 +1590,35 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("LastModifierId"); - b.Property("LocationCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - b.Property("Number") .IsRequired() .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("Priority") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasDefaultValue(0); - - b.Property("PriorityIncrement") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasDefaultValue(0); + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); b.Property("Remark") .HasMaxLength(3072) .HasColumnType("nvarchar(3072)") .HasColumnName("Remark"); - b.Property("TenantId") - .HasColumnType("uniqueidentifier") - .HasColumnName("TenantId"); - - b.Property("Type") + b.Property("RequestLocationCode") .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)"); - b.Property("UpStreamJobNumber") + b.Property("RequestStatus") + .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)"); - b.Property("WarehouseCode") - .HasColumnType("nvarchar(max)"); - - b.Property("WorkGroupCode") + b.Property("SpecificationsType") .HasMaxLength(64) .HasColumnType("nvarchar(64)"); + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + b.Property("Worker") .HasColumnType("nvarchar(max)"); @@ -1456,41 +1627,14 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.HasIndex("Number") .IsUnique(); - b.ToTable("Job_CountJob", (string)null); + b.ToTable("Store_ContainerRequest", (string)null); }); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.CountJobDetail", b => + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ContainerRequestDetail", 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"); @@ -1499,15 +1643,9 @@ namespace Win_in.Sfs.Wms.Store.Migrations .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("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); b.Property("ItemCode") .IsRequired() @@ -1538,90 +1676,52 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("LastModifierId"); - b.Property("LocationArea") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("LocationArea"); - - b.Property("LocationCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("LocationCode"); - - b.Property("LocationErpCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("LocationErpCode"); - - b.Property("LocationGroup") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("LocationGroup"); - - b.Property("Lot") - .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"); + .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("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") + b.Property("ToLocationCode") .HasColumnType("nvarchar(max)"); - b.Property("WarehouseCode") + b.Property("Uom") .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("WarehouseCode"); + .HasColumnName("Uom"); b.HasKey("Id"); b.HasIndex("MasterID"); - b.ToTable("Job_CountJobDetail", (string)null); + b.HasIndex("Number") + .IsUnique(); + + b.ToTable("Store_ContainerRequestDetail", (string)null); }); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.CountNote", b => + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.CountAdjustNote", b => { b.Property("Id") .HasColumnType("uniqueidentifier"); @@ -1629,21 +1729,22 @@ namespace Win_in.Sfs.Wms.Store.Migrations 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") + 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"); @@ -1652,17 +1753,16 @@ namespace Win_in.Sfs.Wms.Store.Migrations .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("IsAdjusted") + .HasColumnType("bit"); + + b.Property("JobNumber") + .HasColumnType("nvarchar(max)"); + b.Property("LastModificationTime") .HasColumnType("datetime2") .HasColumnName("LastModificationTime"); @@ -1682,17 +1782,11 @@ namespace Win_in.Sfs.Wms.Store.Migrations .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)"); @@ -1704,49 +1798,33 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.HasIndex("Number") .IsUnique(); - b.ToTable("Store_CountNote", (string)null); + b.ToTable("Store_CountAdjustNote", (string)null); }); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.CountNoteDetail", b => + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.CountAdjustNoteDetail", b => { b.Property("Id") .HasColumnType("uniqueidentifier"); - b.Property("Adjusted") - .HasColumnType("bit"); + b.Property("AdjustQty") + .HasColumnType("decimal(18,6)"); b.Property("ArriveDate") .HasColumnType("datetime2"); - b.Property("AuditCountDescription") + b.Property("ContainerCode") .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + .HasColumnType("nvarchar(64)") + .HasColumnName("ContainerCode"); - b.Property("AuditCountOperator") + b.Property("CountLabel") + .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)"); - b.Property("AuditCountQty") - .HasPrecision(18, 6) + b.Property("CountQty") .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"); @@ -1755,33 +1833,9 @@ namespace Win_in.Sfs.Wms.Store.Migrations .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)"); @@ -1859,31 +1913,15 @@ namespace Win_in.Sfs.Wms.Store.Migrations 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("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) @@ -1901,8 +1939,14 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("TenantId"); + b.Property("TransInOut") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + b.Property("Uom") - .HasColumnType("nvarchar(max)"); + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); b.Property("WarehouseCode") .IsRequired() @@ -1914,13 +1958,14 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.HasIndex("MasterID"); - b.HasIndex("Number", "CountLabel") - .IsUnique(); + b.HasIndex("Number", "CountLabel", "ItemCode", "LocationCode", "Lot", "Status", "PackingCode") + .IsUnique() + .HasFilter("[Lot] IS NOT NULL"); - b.ToTable("Store_CountNoteDetail", (string)null); + b.ToTable("Store_CountAdjustNoteDetail", (string)null); }); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.CountPlan", b => + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.CountAdjustRequest", b => { b.Property("Id") .HasColumnType("uniqueidentifier"); @@ -1940,17 +1985,17 @@ namespace Win_in.Sfs.Wms.Store.Migrations 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() + b.Property("CountNoteNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("CountPlanNumber") .HasMaxLength(64) .HasColumnType("nvarchar(64)"); @@ -1962,29 +2007,13 @@ namespace Win_in.Sfs.Wms.Store.Migrations .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"); @@ -1999,9 +2028,6 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("nvarchar(64)") .HasColumnName("Number"); - b.Property("PlanTime") - .HasColumnType("datetime2"); - b.Property("Remark") .HasMaxLength(3072) .HasColumnType("nvarchar(3072)") @@ -2012,25 +2038,10 @@ namespace Win_in.Sfs.Wms.Store.Migrations .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)"); @@ -2039,10 +2050,10 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.HasIndex("Number") .IsUnique(); - b.ToTable("Store_CountPlan", (string)null); + b.ToTable("Store_CountAdjustRequest", (string)null); }); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.CountPlanDetail", b => + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.CountAdjustRequestDetail", b => { b.Property("Id") .HasColumnType("uniqueidentifier"); @@ -2050,30 +2061,13 @@ namespace Win_in.Sfs.Wms.Store.Migrations 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("CountQty") + .HasColumnType("decimal(18,6)"); b.Property("CreationTime") .HasColumnType("datetime2") @@ -2083,31 +2077,9 @@ namespace Win_in.Sfs.Wms.Store.Migrations .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)"); @@ -2185,31 +2157,19 @@ namespace Win_in.Sfs.Wms.Store.Migrations 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("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) @@ -2228,8 +2188,10 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnName("TenantId"); b.Property("Uom") + .IsRequired() .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + .HasColumnType("nvarchar(64)") + .HasColumnName("Uom"); b.Property("WarehouseCode") .IsRequired() @@ -2241,38 +2203,55 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.HasIndex("MasterID"); - b.HasIndex("Number", "CountLabel") - .IsUnique(); + b.HasIndex("Number", "ItemCode", "LocationCode", "Lot", "Status", "PackingCode") + .IsUnique() + .HasFilter("[Lot] IS NOT NULL"); - b.ToTable("Store_CountPlanDetail", (string)null); + b.ToTable("Store_CountAdjustRequestDetail", (string)null); }); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.CustomerAsn", b => + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.CountJob", b => { b.Property("Id") .HasColumnType("uniqueidentifier"); - b.Property("ActiveDate") + b.Property("AcceptTime") .HasColumnType("datetime2"); - b.Property("BeginTime") + 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("ContactEmail") + b.Property("CountMethod") + .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)"); - b.Property("ContactName") + b.Property("CountPlanNumber") .HasMaxLength(64) .HasColumnType("nvarchar(64)"); - b.Property("ContactPhone") + b.Property("CountStage") + .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)"); @@ -2284,71 +2263,131 @@ namespace Win_in.Sfs.Wms.Store.Migrations .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("Description") + .HasColumnType("nvarchar(max)"); b.Property("ExtraProperties") .HasColumnType("nvarchar(max)") .HasColumnName("ExtraProperties"); - b.Property("LastModificationTime") - .HasColumnType("datetime2") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("uniqueidentifier") + 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)") - .HasColumnName("Number"); + .HasColumnType("nvarchar(64)"); + + b.Property("Priority") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasDefaultValue(0); + + b.Property("PriorityIncrement") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasDefaultValue(0); b.Property("Remark") .HasMaxLength(3072) .HasColumnType("nvarchar(3072)") .HasColumnName("Remark"); - b.Property("SoNumber") + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Type") .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)"); - b.Property("Status") - .HasColumnType("int"); + b.Property("UpStreamJobNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); - b.Property("TenantId") - .HasColumnType("uniqueidentifier") - .HasColumnName("TenantId"); + 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("CustomerCode"); - b.HasIndex("Number") .IsUnique(); - b.ToTable("Store_CustomerAsn", (string)null); + b.ToTable("Job_CountJob", (string)null); }); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.CustomerAsnDetail", b => + 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"); @@ -2357,6 +2396,16 @@ namespace Win_in.Sfs.Wms.Store.Migrations .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) @@ -2386,57 +2435,90 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("LastModifierId"); + b.Property("LocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationArea"); + + b.Property("LocationCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationCode"); + + b.Property("LocationErpCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationErpCode"); + + b.Property("LocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationGroup"); + + b.Property("Lot") + .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("Number"); + .HasColumnName("PackingCode"); - b.Property("Qty") - .HasPrecision(18, 6) - .HasColumnType("decimal(18,6)") - .HasColumnName("Qty"); + b.Property("ProduceDate") + .HasColumnType("datetime2"); b.Property("Remark") .HasMaxLength(3072) .HasColumnType("nvarchar(3072)") .HasColumnName("Remark"); - b.Property("SoLine") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("SoNumber") + 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("Uom"); + .HasColumnName("WarehouseCode"); b.HasKey("Id"); b.HasIndex("MasterID"); - b.HasIndex("Number", "ItemCode") - .IsUnique(); - - b.ToTable("Store_CustomerAsnDetail", (string)null); + b.ToTable("Job_CountJobDetail", (string)null); }); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.CustomerReturnNote", b => + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.CountNote", b => { b.Property("Id") .HasColumnType("uniqueidentifier"); @@ -2444,12 +2526,21 @@ namespace Win_in.Sfs.Wms.Store.Migrations 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"); @@ -2458,19 +2549,17 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("CreatorId"); - b.Property("Customer") + b.Property("Description") .HasMaxLength(64) .HasColumnType("nvarchar(64)"); + b.Property("EndTime") + .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"); @@ -2490,13 +2579,20 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("nvarchar(3072)") .HasColumnName("Remark"); - b.Property("ReturnTime") - .HasColumnType("datetime2"); + 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)"); @@ -2505,17 +2601,49 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.HasIndex("Number") .IsUnique(); - b.ToTable("Store_CustomerReturnNote", (string)null); + b.ToTable("Store_CountNote", (string)null); }); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.CustomerReturnNoteDetail", b => + 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"); @@ -2524,50 +2652,35 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("CreatorId"); + b.Property("DetailStatus") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + b.Property("ExpireDate") .HasColumnType("datetime2"); - b.Property("FromContainerCode") - .HasColumnType("nvarchar(max)"); + b.Property("FinalCountQty") + .HasPrecision(18, 6) + .HasColumnType("decimal(18,6)"); - b.Property("FromLocationArea") + b.Property("FirstCountDescription") .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("FromLocationArea"); + .HasColumnType("nvarchar(64)"); - 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") + b.Property("FirstCountOperator") .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("FromLocationGroup"); - - b.Property("FromLot") - .HasColumnType("nvarchar(max)"); + .HasColumnType("nvarchar(64)"); - b.Property("FromPackingCode") - .HasColumnType("nvarchar(450)"); + b.Property("FirstCountQty") + .HasPrecision(18, 6) + .HasColumnType("decimal(18,6)"); - b.Property("FromStatus") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + b.Property("FirstCountTime") + .HasColumnType("datetime2"); - b.Property("FromWarehouseCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("FromWarehouseCode"); + b.Property("InventoryQty") + .HasColumnType("decimal(18,6)"); b.Property("ItemCode") .IsRequired() @@ -2598,6 +2711,33 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("LastModifierId"); + b.Property("LocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationArea"); + + b.Property("LocationCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationCode"); + + b.Property("LocationErpCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationErpCode"); + + b.Property("LocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationGroup"); + + b.Property("Lot") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Lot"); + b.Property("MasterID") .HasColumnType("uniqueidentifier"); @@ -2607,114 +2747,98 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("nvarchar(64)") .HasColumnName("Number"); + b.Property("PackingCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("PackingCode"); + b.Property("ProduceDate") .HasColumnType("datetime2"); - b.Property("Qty") - .HasPrecision(18, 6) - .HasColumnType("decimal(18,6)") - .HasColumnName("Qty"); - b.Property("Remark") .HasMaxLength(3072) .HasColumnType("nvarchar(3072)") .HasColumnName("Remark"); - b.Property("StdPackQty") - .HasColumnType("decimal(18,6)"); - - b.Property("SupplierBatch") + b.Property("RepeatCountDescription") .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("SupplierBatch"); + .HasColumnType("nvarchar(64)"); - b.Property("TenantId") - .HasColumnType("uniqueidentifier") - .HasColumnName("TenantId"); + b.Property("RepeatCountOperator") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); - b.Property("ToContainerCode") - .HasColumnType("nvarchar(max)"); + b.Property("RepeatCountQty") + .HasPrecision(18, 6) + .HasColumnType("decimal(18,6)"); - b.Property("ToLocationArea") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ToLocationArea"); + b.Property("RepeatCountTime") + .HasColumnType("datetime2"); - b.Property("ToLocationCode") + b.Property("Stage") .IsRequired() .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ToLocationCode"); + .HasColumnType("nvarchar(64)"); - b.Property("ToLocationErpCode") + b.Property("Status") .IsRequired() .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ToLocationErpCode"); + .HasColumnType("nvarchar(64)"); - b.Property("ToLocationGroup") + b.Property("StdPackQty") + .HasColumnType("decimal(18,6)"); + + b.Property("SupplierBatch") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("ToLocationGroup"); + .HasColumnName("SupplierBatch"); - b.Property("ToLot") - .HasColumnType("nvarchar(max)"); + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); - b.Property("ToPackingCode") + b.Property("Uom") .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") + b.Property("WarehouseCode") .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("Uom"); + .HasColumnName("WarehouseCode"); b.HasKey("Id"); b.HasIndex("MasterID"); - b.HasIndex("Number", "FromPackingCode", "FromLocationCode", "ToLocationCode") - .IsUnique() - .HasFilter("[FromPackingCode] IS NOT NULL"); + b.HasIndex("Number", "CountLabel") + .IsUnique(); - b.ToTable("Store_CustomerReturnNoteDetail", (string)null); + b.ToTable("Store_CountNoteDetail", (string)null); }); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.DeliverJob", b => + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.CountPlan", b => { b.Property("Id") .HasColumnType("uniqueidentifier"); - b.Property("AcceptTime") + b.Property("ActiveDate") .HasColumnType("datetime2"); - b.Property("AcceptUserId") - .HasColumnType("uniqueidentifier"); + b.Property("AutoAgree") + .HasColumnType("bit"); - b.Property("AcceptUserName") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + b.Property("AutoCompleteJob") + .HasColumnType("bit"); - b.Property("CompleteTime") - .HasColumnType("datetime2"); + b.Property("AutoHandle") + .HasColumnType("bit"); - b.Property("CompleteUserId") - .HasColumnType("uniqueidentifier"); + b.Property("AutoSubmit") + .HasColumnType("bit"); - b.Property("CompleteUserName") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + b.Property("BeginTime") + .HasColumnType("datetime2"); b.Property("ConcurrencyStamp") .IsConcurrencyToken() @@ -2722,6 +2846,11 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("nvarchar(40)") .HasColumnName("ConcurrencyStamp"); + b.Property("CountMethod") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + b.Property("CreationTime") .HasColumnType("datetime2") .HasColumnName("CreationTime"); @@ -2730,47 +2859,28 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("CreatorId"); - b.Property("CustomerAddressCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("CustomerCode") - .IsRequired() + b.Property("Description") .HasMaxLength(64) .HasColumnType("nvarchar(64)"); - b.Property("DeliverPlanNumber") - .HasColumnType("nvarchar(max)"); - - b.Property("DeliverRequestNumber") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + b.Property("DirectCreateNote") + .HasColumnType("bit"); - b.Property("DeliverTime") + b.Property("EndTime") .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("JsonInventoryStatus") + .HasColumnType("nvarchar(max)"); - b.Property("JobStatus") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + b.Property("JsonItemCodes") + .HasColumnType("nvarchar(max)"); - b.Property("JobType") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + b.Property("JsonLocationCodes") + .HasColumnType("nvarchar(max)"); b.Property("LastModificationTime") .HasColumnType("datetime2") @@ -2783,35 +2893,38 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.Property("Number") .IsRequired() .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("Priority") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasDefaultValue(0); + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); - b.Property("PriorityIncrement") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasDefaultValue(0); + b.Property("PlanTime") + .HasColumnType("datetime2"); b.Property("Remark") .HasMaxLength(3072) .HasColumnType("nvarchar(3072)") .HasColumnName("Remark"); - b.Property("TenantId") - .HasColumnType("uniqueidentifier") - .HasColumnName("TenantId"); + b.Property("RequestStatus") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); - b.Property("UpStreamJobNumber") + b.Property("RequestType") + .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)"); - b.Property("WarehouseCode") - .HasColumnType("nvarchar(max)"); + b.Property("Stage") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); - b.Property("WorkGroupCode") + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Type") + .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)"); @@ -2823,79 +2936,78 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.HasIndex("Number") .IsUnique(); - b.ToTable("Job_DeliverJob", (string)null); + b.ToTable("Store_CountPlan", (string)null); }); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.DeliverJobDetail", b => + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.CountPlanDetail", b => { b.Property("Id") .HasColumnType("uniqueidentifier"); - b.Property("CreationTime") - .HasColumnType("datetime2") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("uniqueidentifier") - .HasColumnName("CreatorId"); - - b.Property("HandledArriveDate") + b.Property("ArriveDate") .HasColumnType("datetime2"); - b.Property("HandledContainerCode") + b.Property("AuditCountDescription") .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("HandledContainerCode"); + .HasColumnType("nvarchar(64)"); - b.Property("HandledExpireDate") + 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("HandledFromLocationArea") + b.Property("ContainerCode") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("HandledFromLocationArea"); + .HasColumnName("ContainerCode"); - b.Property("HandledFromLocationCode") + b.Property("CountLabel") + .IsRequired() .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("HandledFromLocationCode"); + .HasColumnType("nvarchar(64)"); - b.Property("HandledFromLocationErpCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("HandledFromLocationErpCode"); + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); - b.Property("HandledFromLocationGroup") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("HandledFromLocationGroup"); + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); - b.Property("HandledFromWarehouseCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("HandledFromWarehouseCode"); + b.Property("DetailStatus") + .HasColumnType("int"); - b.Property("HandledLot") + b.Property("ExpireDate") + .HasColumnType("datetime2"); + + b.Property("FinalCountQty") + .HasPrecision(18, 6) + .HasColumnType("decimal(18,6)"); + + b.Property("FirstCountDescription") .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("HandledLot"); + .HasColumnType("nvarchar(64)"); - b.Property("HandledPackingCode") + b.Property("FirstCountOperator") .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("HandledPackingCode"); + .HasColumnType("nvarchar(64)"); - b.Property("HandledProduceDate") + b.Property("FirstCountQty") + .HasPrecision(18, 6) + .HasColumnType("decimal(18,6)"); + + b.Property("FirstCountTime") .HasColumnType("datetime2"); - b.Property("HandledQty") + b.Property("InventoryQty") .HasColumnType("decimal(18,6)"); - b.Property("HandledSupplierBatch") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("HandledSupplierBatch"); - b.Property("ItemCode") .IsRequired() .HasMaxLength(64) @@ -2925,121 +3037,114 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("LastModifierId"); - b.Property("MasterID") - .HasColumnType("uniqueidentifier"); - - b.Property("Number") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("OnTheWayLocationCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("RecommendArriveDate") - .HasColumnType("datetime2"); - - b.Property("RecommendContainerCode") + b.Property("LocationArea") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendContainerCode"); - - b.Property("RecommendExpireDate") - .HasColumnType("datetime2"); + .HasColumnName("LocationArea"); - b.Property("RecommendFromLocationArea") + b.Property("LocationCode") + .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendFromLocationArea"); + .HasColumnName("LocationCode"); - b.Property("RecommendFromLocationCode") + b.Property("LocationErpCode") + .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendFromLocationCode"); + .HasColumnName("LocationErpCode"); - b.Property("RecommendFromLocationErpCode") + b.Property("LocationGroup") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendFromLocationErpCode"); + .HasColumnName("LocationGroup"); - b.Property("RecommendFromLocationGroup") + b.Property("Lot") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendFromLocationGroup"); + .HasColumnName("Lot"); - b.Property("RecommendFromWarehouseCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendFromWarehouseCode"); + b.Property("MasterID") + .HasColumnType("uniqueidentifier"); - b.Property("RecommendLot") + b.Property("Number") + .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendLot"); + .HasColumnName("Number"); - b.Property("RecommendPackingCode") + b.Property("PackingCode") + .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendPackingCode"); + .HasColumnName("PackingCode"); - b.Property("RecommendProduceDate") + b.Property("ProduceDate") .HasColumnType("datetime2"); - b.Property("RecommendQty") - .HasColumnType("decimal(18,6)"); - - b.Property("RecommendSupplierBatch") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendSupplierBatch"); - b.Property("Remark") .HasMaxLength(3072) .HasColumnType("nvarchar(3072)") .HasColumnName("Remark"); - b.Property("Status") - .IsRequired() + b.Property("RepeatCountDescription") .HasMaxLength(64) .HasColumnType("nvarchar(64)"); - b.Property("StdPackQty") - .HasColumnType("decimal(18,6)"); + b.Property("RepeatCountOperator") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); - b.Property("TenantId") - .HasColumnType("uniqueidentifier") - .HasColumnName("TenantId"); + b.Property("RepeatCountQty") + .HasPrecision(18, 6) + .HasColumnType("decimal(18,6)"); - b.Property("ToLocationArea") - .HasColumnType("nvarchar(max)"); + b.Property("RepeatCountTime") + .HasColumnType("datetime2"); - b.Property("ToLocationCode") + b.Property("Stage") + .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)"); - b.Property("ToLocationErpCode") + b.Property("Status") + .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)"); - b.Property("ToLocationGroup") - .HasColumnType("nvarchar(max)"); + b.Property("StdPackQty") + .HasColumnType("decimal(18,6)"); - b.Property("ToWarehouseCode") + b.Property("SupplierBatch") .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + .HasColumnType("nvarchar(64)") + .HasColumnName("SupplierBatch"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); b.Property("Uom") - .HasColumnType("nvarchar(max)"); + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("WarehouseCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("WarehouseCode"); b.HasKey("Id"); b.HasIndex("MasterID"); - b.ToTable("Job_DeliverJobDetail", (string)null); + b.HasIndex("Number", "CountLabel") + .IsUnique(); + + b.ToTable("Store_CountPlanDetail", (string)null); }); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.DeliverNote", b => + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.CustomerAsn", b => { b.Property("Id") .HasColumnType("uniqueidentifier"); @@ -3047,14 +3152,26 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.Property("ActiveDate") .HasColumnType("datetime2"); + b.Property("BeginTime") + .HasColumnType("datetime2"); + b.Property("ConcurrencyStamp") .IsConcurrencyToken() .HasMaxLength(40) .HasColumnType("nvarchar(40)") .HasColumnName("ConcurrencyStamp"); - b.Property("CountPrint") - .HasColumnType("int"); + 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") @@ -3064,38 +3181,22 @@ namespace Win_in.Sfs.Wms.Store.Migrations .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() + b.Property("DockCode") .HasMaxLength(64) .HasColumnType("nvarchar(64)"); - b.Property("DeliverTime") + b.Property("EndTime") .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"); @@ -3115,6 +3216,14 @@ namespace Win_in.Sfs.Wms.Store.Migrations .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"); @@ -3124,20 +3233,19 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.HasKey("Id"); + b.HasIndex("CustomerCode"); + b.HasIndex("Number") .IsUnique(); - b.ToTable("Store_DeliverNote", (string)null); + b.ToTable("Store_CustomerAsn", (string)null); }); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.DeliverNoteDetail", b => + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.CustomerAsnDetail", b => { b.Property("Id") .HasColumnType("uniqueidentifier"); - b.Property("ArriveDate") - .HasColumnType("datetime2"); - b.Property("CreationTime") .HasColumnType("datetime2") .HasColumnName("CreationTime"); @@ -3146,115 +3254,217 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("CreatorId"); - b.Property("ExpireDate") - .HasColumnType("datetime2"); - - b.Property("ExtraProperties") - .HasColumnType("nvarchar(max)") - .HasColumnName("ExtraProperties"); - - b.Property("FromContainerCode") - .HasColumnType("nvarchar(max)"); - - b.Property("FromLocationArea") + b.Property("ItemCode") + .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("FromLocationArea"); + .HasColumnName("ItemCode"); - b.Property("FromLocationCode") - .IsRequired() + b.Property("ItemDesc1") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("FromLocationCode"); + .HasColumnName("ItemDesc1"); - b.Property("FromLocationErpCode") - .IsRequired() + b.Property("ItemDesc2") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("FromLocationErpCode"); + .HasColumnName("ItemDesc2"); - b.Property("FromLocationGroup") + b.Property("ItemName") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("FromLocationGroup"); + .HasColumnName("ItemName"); - b.Property("FromLot") + 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)"); + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); - b.Property("FromPackingCode") - .IsRequired() + 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("FromStatus") - .IsRequired() + b.Property("SoNumber") .HasMaxLength(64) .HasColumnType("nvarchar(64)"); - b.Property("FromWarehouseCode") + b.Property("StdPackQty") + .HasColumnType("decimal(18,6)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Uom") .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("FromWarehouseCode"); + .HasColumnName("Uom"); - b.Property("HandledArriveDate") - .HasColumnType("datetime2"); + b.HasKey("Id"); - b.Property("HandledContainerCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("HandledContainerCode"); + b.HasIndex("MasterID"); - b.Property("HandledExpireDate") + 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("HandledFromLocationArea") + b.Property("ConcurrencyStamp") + .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)") - .HasColumnName("HandledFromLocationArea"); + .HasColumnType("nvarchar(64)"); - b.Property("HandledFromLocationCode") + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("JobNumber") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("HandledFromLocationCode"); + .HasColumnName("JobNumber"); - b.Property("HandledFromLocationErpCode") + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Number") + .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("HandledFromLocationErpCode"); + .HasColumnName("Number"); - b.Property("HandledFromLocationGroup") + 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("HandledFromLocationGroup"); + .HasColumnName("FromLocationArea"); - b.Property("HandledFromWarehouseCode") + b.Property("FromLocationCode") + .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("HandledFromWarehouseCode"); + .HasColumnName("FromLocationCode"); - b.Property("HandledLot") + b.Property("FromLocationErpCode") + .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("HandledLot"); + .HasColumnName("FromLocationErpCode"); - b.Property("HandledPackingCode") + b.Property("FromLocationGroup") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("HandledPackingCode"); + .HasColumnName("FromLocationGroup"); - b.Property("HandledProduceDate") - .HasColumnType("datetime2"); + b.Property("FromLot") + .HasColumnType("nvarchar(max)"); - b.Property("HandledQty") - .HasColumnType("decimal(18,6)"); + b.Property("FromPackingCode") + .HasColumnType("nvarchar(450)"); - b.Property("HandledSupplierBatch") + b.Property("FromStatus") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("FromWarehouseCode") + .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("HandledSupplierBatch"); + .HasColumnName("FromWarehouseCode"); b.Property("ItemCode") .IsRequired() @@ -3302,114 +3512,53 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("decimal(18,6)") .HasColumnName("Qty"); - b.Property("RecommendArriveDate") - .HasColumnType("datetime2"); + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); - b.Property("RecommendContainerCode") + b.Property("StdPackQty") + .HasColumnType("decimal(18,6)"); + + b.Property("SupplierBatch") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendContainerCode"); + .HasColumnName("SupplierBatch"); - b.Property("RecommendExpireDate") - .HasColumnType("datetime2"); + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); - b.Property("RecommendFromLocationArea") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendFromLocationArea"); + b.Property("ToContainerCode") + .HasColumnType("nvarchar(max)"); - b.Property("RecommendFromLocationCode") + b.Property("ToLocationArea") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendFromLocationCode"); + .HasColumnName("ToLocationArea"); - b.Property("RecommendFromLocationErpCode") + b.Property("ToLocationCode") + .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendFromLocationErpCode"); + .HasColumnName("ToLocationCode"); - b.Property("RecommendFromLocationGroup") + b.Property("ToLocationErpCode") + .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendFromLocationGroup"); + .HasColumnName("ToLocationErpCode"); - 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") + b.Property("ToLocationGroup") .HasMaxLength(64) .HasColumnType("nvarchar(64)") .HasColumnName("ToLocationGroup"); b.Property("ToLot") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + .HasColumnType("nvarchar(max)"); b.Property("ToPackingCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + .HasColumnType("nvarchar(max)"); b.Property("ToStatus") .IsRequired() @@ -3432,31 +3581,37 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.HasIndex("MasterID"); - b.HasIndex("Number", "ItemCode", "FromPackingCode", "FromLot", "FromLocationCode", "ToLocationCode") - .IsUnique(); + b.HasIndex("Number", "FromPackingCode", "FromLocationCode", "ToLocationCode") + .IsUnique() + .HasFilter("[FromPackingCode] IS NOT NULL"); - b.ToTable("Store_DeliverNoteDetail", (string)null); + b.ToTable("Store_CustomerReturnNoteDetail", (string)null); }); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.DeliverPlan", b => + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.DeliverJob", b => { b.Property("Id") .HasColumnType("uniqueidentifier"); - b.Property("ActiveDate") + b.Property("AcceptTime") .HasColumnType("datetime2"); - b.Property("AutoAgree") - .HasColumnType("bit"); + b.Property("AcceptUserId") + .HasColumnType("uniqueidentifier"); - b.Property("AutoCompleteJob") - .HasColumnType("bit"); + b.Property("AcceptUserName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); - b.Property("AutoHandle") - .HasColumnType("bit"); + b.Property("CompleteTime") + .HasColumnType("datetime2"); - b.Property("AutoSubmit") - .HasColumnType("bit"); + b.Property("CompleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CompleteUserName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); b.Property("ConcurrencyStamp") .IsConcurrencyToken() @@ -3473,7 +3628,6 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnName("CreatorId"); b.Property("CustomerAddressCode") - .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)"); @@ -3482,13 +3636,39 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasMaxLength(64) .HasColumnType("nvarchar(64)"); - b.Property("DirectCreateNote") - .HasColumnType("bit"); + 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"); @@ -3500,39 +3680,38 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.Property("Number") .IsRequired() .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("Number"); - - b.Property("PlanDate") - .HasColumnType("datetime2"); + .HasColumnType("nvarchar(64)"); - b.Property("PlanTime") - .HasColumnType("datetime2"); + b.Property("Priority") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasDefaultValue(0); - b.Property("Project") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + b.Property("PriorityIncrement") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasDefaultValue(0); b.Property("Remark") .HasMaxLength(3072) .HasColumnType("nvarchar(3072)") .HasColumnName("Remark"); - b.Property("RequestStatus") - .IsRequired() + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("UpStreamJobNumber") .HasMaxLength(64) .HasColumnType("nvarchar(64)"); - b.Property("SoNumber") - .IsRequired() + b.Property("WarehouseCode") + .HasColumnType("nvarchar(max)"); + + b.Property("WorkGroupCode") .HasMaxLength(64) .HasColumnType("nvarchar(64)"); - b.Property("TenantId") - .HasColumnType("uniqueidentifier") - .HasColumnName("TenantId"); - b.Property("Worker") .HasColumnType("nvarchar(max)"); @@ -3541,10 +3720,10 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.HasIndex("Number") .IsUnique(); - b.ToTable("Store_DeliverPlan", (string)null); + b.ToTable("Job_DeliverJob", (string)null); }); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.DeliverPlanDetail", b => + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.DeliverJobDetail", b => { b.Property("Id") .HasColumnType("uniqueidentifier"); @@ -3557,6 +3736,63 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("CreatorId"); + b.Property("HandledArriveDate") + .HasColumnType("datetime2"); + + b.Property("HandledContainerCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledContainerCode"); + + b.Property("HandledExpireDate") + .HasColumnType("datetime2"); + + b.Property("HandledFromLocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledFromLocationArea"); + + b.Property("HandledFromLocationCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledFromLocationCode"); + + b.Property("HandledFromLocationErpCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledFromLocationErpCode"); + + b.Property("HandledFromLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledFromLocationGroup"); + + b.Property("HandledFromWarehouseCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledFromWarehouseCode"); + + b.Property("HandledLot") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledLot"); + + b.Property("HandledPackingCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledPackingCode"); + + b.Property("HandledProduceDate") + .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) @@ -3591,53 +3827,116 @@ namespace Win_in.Sfs.Wms.Store.Migrations 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") + b.Property("OnTheWayLocationCode") .HasMaxLength(64) .HasColumnType("nvarchar(64)"); - b.Property("StdPackQty") - .HasColumnType("decimal(18,6)"); + b.Property("RecommendArriveDate") + .HasColumnType("datetime2"); - b.Property("TenantId") - .HasColumnType("uniqueidentifier") - .HasColumnName("TenantId"); + b.Property("RecommendContainerCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendContainerCode"); - b.Property("Uom") - .IsRequired() + b.Property("RecommendExpireDate") + .HasColumnType("datetime2"); + + b.Property("RecommendFromLocationArea") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("Uom"); + .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.HasIndex("Number", "SoNumber", "SoLine") - .IsUnique() - .HasFilter("[SoNumber] IS NOT NULL AND [SoLine] IS NOT NULL"); - - b.ToTable("Store_DeliverPlanDetail", (string)null); + b.ToTable("Job_DeliverJobDetail", (string)null); }); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.DeliverRequest", b => + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.DeliverNote", b => { b.Property("Id") .HasColumnType("uniqueidentifier"); @@ -3645,24 +3944,15 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.Property("ActiveDate") .HasColumnType("datetime2"); - b.Property("AutoAgree") - .HasColumnType("bit"); - - b.Property("AutoCompleteJob") - .HasColumnType("bit"); - - b.Property("AutoHandle") - .HasColumnType("bit"); - - b.Property("AutoSubmit") - .HasColumnType("bit"); - b.Property("ConcurrencyStamp") .IsConcurrencyToken() .HasMaxLength(40) .HasColumnType("nvarchar(40)") .HasColumnName("ConcurrencyStamp"); + b.Property("CountPrint") + .HasColumnType("int"); + b.Property("CreationTime") .HasColumnType("datetime2") .HasColumnName("CreationTime"); @@ -3681,8 +3971,10 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("nvarchar(64)"); b.Property("DeliverPlanNumber") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + .HasColumnType("nvarchar(max)"); + + b.Property("DeliverRequestNumber") + .HasColumnType("nvarchar(max)"); b.Property("DeliverRequestType") .IsRequired() @@ -3692,13 +3984,15 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.Property("DeliverTime") .HasColumnType("datetime2"); - b.Property("DirectCreateNote") - .HasColumnType("bit"); - b.Property("ExtraProperties") .HasColumnType("nvarchar(max)") .HasColumnName("ExtraProperties"); + b.Property("JobNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("JobNumber"); + b.Property("LastModificationTime") .HasColumnType("datetime2") .HasColumnName("LastModificationTime"); @@ -3718,11 +4012,6 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("nvarchar(3072)") .HasColumnName("Remark"); - b.Property("RequestStatus") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - b.Property("TenantId") .HasColumnType("uniqueidentifier") .HasColumnName("TenantId"); @@ -3735,16 +4024,16 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.HasIndex("Number") .IsUnique(); - b.ToTable("Store_DeliverRequest", (string)null); + b.ToTable("Store_DeliverNote", (string)null); }); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.DeliverRequestDetail", b => + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.DeliverNoteDetail", b => { b.Property("Id") .HasColumnType("uniqueidentifier"); - b.Property("AreaCode") - .HasColumnType("nvarchar(max)"); + b.Property("ArriveDate") + .HasColumnType("datetime2"); b.Property("CreationTime") .HasColumnType("datetime2") @@ -3754,10 +4043,116 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("CreatorId"); + b.Property("ExpireDate") + .HasColumnType("datetime2"); + b.Property("ExtraProperties") .HasColumnType("nvarchar(max)") .HasColumnName("ExtraProperties"); + b.Property("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) @@ -3796,150 +4191,151 @@ namespace Win_in.Sfs.Wms.Store.Migrations .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("RecommendArriveDate") + .HasColumnType("datetime2"); - b.Property("StdPackQty") - .HasColumnType("decimal(18,6)"); - - b.Property("TenantId") - .HasColumnType("uniqueidentifier") - .HasColumnName("TenantId"); - - b.Property("Uom") - .IsRequired() + b.Property("RecommendContainerCode") .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"); + .HasColumnName("RecommendContainerCode"); - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("nvarchar(40)") - .HasColumnName("ConcurrencyStamp"); + b.Property("RecommendExpireDate") + .HasColumnType("datetime2"); - b.Property("CreationTime") - .HasColumnType("datetime2") - .HasColumnName("CreationTime"); + b.Property("RecommendFromLocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendFromLocationArea"); - b.Property("CreatorId") - .HasColumnType("uniqueidentifier") - .HasColumnName("CreatorId"); + b.Property("RecommendFromLocationCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendFromLocationCode"); - b.Property("DataAction") - .HasColumnType("int"); + b.Property("RecommendFromLocationErpCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendFromLocationErpCode"); - b.Property("DataContent") - .HasColumnType("nvarchar(max)"); + b.Property("RecommendFromLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendFromLocationGroup"); - b.Property("DataIdentityCode") - .IsRequired() + b.Property("RecommendFromWarehouseCode") .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendFromWarehouseCode"); - b.Property("DataType") - .IsRequired() + b.Property("RecommendLot") .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendLot"); - b.Property("DestinationSystem") - .IsRequired() + b.Property("RecommendPackingCode") .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendPackingCode"); - b.Property("EffectiveDate") + b.Property("RecommendProduceDate") .HasColumnType("datetime2"); - b.Property("ErrorCode") - .IsRequired() + b.Property("RecommendQty") + .HasColumnType("decimal(18,6)"); + + b.Property("RecommendSupplierBatch") .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendSupplierBatch"); - b.Property("ErrorMessage") + b.Property("Remark") .HasMaxLength(3072) - .HasColumnType("nvarchar(3072)"); + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); - b.Property("ExtraProperties") - .HasColumnType("nvarchar(max)") - .HasColumnName("ExtraProperties"); + b.Property("StdPackQty") + .HasColumnType("decimal(18,6)"); - b.Property("LastModificationTime") - .HasColumnType("datetime2") - .HasColumnName("LastModificationTime"); + b.Property("SupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("SupplierBatch"); - b.Property("LastModifierId") + b.Property("TenantId") .HasColumnType("uniqueidentifier") - .HasColumnName("LastModifierId"); + .HasColumnName("TenantId"); - b.Property("Number") - .HasColumnType("bigint"); + b.Property("ToContainerCode") + .HasColumnType("nvarchar(max)"); - b.Property("ReadTime") - .HasColumnType("datetime2"); + b.Property("ToLocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToLocationArea"); - b.Property("Reader") - .HasColumnType("nvarchar(max)"); + b.Property("ToLocationCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToLocationCode"); - b.Property("Remark") - .HasMaxLength(3072) - .HasColumnType("nvarchar(3072)") - .HasColumnName("Remark"); + b.Property("ToLocationErpCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToLocationErpCode"); - b.Property("RetryTimes") - .HasColumnType("int"); + b.Property("ToLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToLocationGroup"); - b.Property("SourceSystem") + b.Property("ToLot") .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)"); - b.Property("Status") + b.Property("ToPackingCode") .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)"); - b.Property("TenantId") - .HasColumnType("uniqueidentifier") - .HasColumnName("TenantId"); - - b.Property("TyrpNumber") + b.Property("ToStatus") .IsRequired() - .HasColumnType("nvarchar(max)"); + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); - b.Property("WriteTime") - .HasColumnType("datetime2"); + b.Property("ToWarehouseCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToWarehouseCode"); - b.Property("Writer") - .HasColumnType("nvarchar(max)"); + b.Property("Uom") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Uom"); b.HasKey("Id"); - b.ToTable("Store_ExchangeData", (string)null); + 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.InspectAbnormalNote", b => + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.DeliverPlan", b => { b.Property("Id") .HasColumnType("uniqueidentifier"); @@ -3947,6 +4343,18 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.Property("ActiveDate") .HasColumnType("datetime2"); + b.Property("AutoAgree") + .HasColumnType("bit"); + + b.Property("AutoCompleteJob") + .HasColumnType("bit"); + + b.Property("AutoHandle") + .HasColumnType("bit"); + + b.Property("AutoSubmit") + .HasColumnType("bit"); + b.Property("ConcurrencyStamp") .IsConcurrencyToken() .HasMaxLength(40) @@ -3961,14 +4369,23 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("CreatorId"); - b.Property("ExtraProperties") - .HasColumnType("nvarchar(max)") - .HasColumnName("ExtraProperties"); + b.Property("CustomerAddressCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); - b.Property("InspectNumber") + 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"); @@ -3983,7 +4400,14 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("nvarchar(64)") .HasColumnName("Number"); - b.Property("ReceiptNumber") + b.Property("PlanDate") + .HasColumnType("datetime2"); + + b.Property("PlanTime") + .HasColumnType("datetime2"); + + b.Property("Project") + .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)"); @@ -3992,7 +4416,12 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("nvarchar(3072)") .HasColumnName("Remark"); - b.Property("SupplierCode") + b.Property("RequestStatus") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("SoNumber") .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)"); @@ -4009,27 +4438,14 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.HasIndex("Number") .IsUnique(); - b.ToTable("Store_InspectAbnormalNote", (string)null); + b.ToTable("Store_DeliverPlan", (string)null); }); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.InspectAbnormalNoteDetail", b => + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.DeliverPlanDetail", 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"); @@ -4038,9 +4454,6 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("CreatorId"); - b.Property("ExpireDate") - .HasColumnType("datetime2"); - b.Property("ItemCode") .IsRequired() .HasMaxLength(64) @@ -4070,11 +4483,6 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("LastModifierId"); - b.Property("Lot") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("Lot"); - b.Property("MasterID") .HasColumnType("uniqueidentifier"); @@ -4084,18 +4492,6 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("nvarchar(64)") .HasColumnName("Number"); - b.Property("PackingCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("PackingCode"); - - b.Property("Photos") - .HasColumnType("nvarchar(max)"); - - b.Property("ProduceDate") - .HasColumnType("datetime2"); - b.Property("Qty") .HasPrecision(18, 6) .HasColumnType("decimal(18,6)") @@ -4106,13 +4502,16 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("nvarchar(3072)") .HasColumnName("Remark"); - b.Property("StdPackQty") - .HasColumnType("decimal(18,6)"); + b.Property("SoLine") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); - b.Property("SupplierBatch") + b.Property("SoNumber") .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("SupplierBatch"); + .HasColumnType("nvarchar(64)"); + + b.Property("StdPackQty") + .HasColumnType("decimal(18,6)"); b.Property("TenantId") .HasColumnType("uniqueidentifier") @@ -4128,40 +4527,32 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.HasIndex("MasterID"); - b.HasIndex("Number", "PackingCode") - .IsUnique(); + b.HasIndex("Number", "SoNumber", "SoLine") + .IsUnique() + .HasFilter("[SoNumber] IS NOT NULL AND [SoLine] IS NOT NULL"); - b.ToTable("Store_InspectAbnormalNoteDetail", (string)null); + b.ToTable("Store_DeliverPlanDetail", (string)null); }); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.InspectJob", b => + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.DeliverRequest", b => { b.Property("Id") .HasColumnType("uniqueidentifier"); - b.Property("AcceptTime") + b.Property("ActiveDate") .HasColumnType("datetime2"); - b.Property("AcceptUserId") - .HasColumnType("uniqueidentifier"); - - b.Property("AcceptUserName") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("AsnNumber") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + b.Property("AutoAgree") + .HasColumnType("bit"); - b.Property("CompleteTime") - .HasColumnType("datetime2"); + b.Property("AutoCompleteJob") + .HasColumnType("bit"); - b.Property("CompleteUserId") - .HasColumnType("uniqueidentifier"); + b.Property("AutoHandle") + .HasColumnType("bit"); - b.Property("CompleteUserName") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + b.Property("AutoSubmit") + .HasColumnType("bit"); b.Property("ConcurrencyStamp") .IsConcurrencyToken() @@ -4177,33 +4568,34 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("CreatorId"); - b.Property("ExtraProperties") - .HasColumnType("nvarchar(max)") - .HasColumnName("ExtraProperties"); - - b.Property("InspectNumber") + b.Property("CustomerAddressCode") .HasMaxLength(64) .HasColumnType("nvarchar(64)"); - b.Property("IsAutoComplete") - .ValueGeneratedOnAdd() - .HasColumnType("bit") - .HasDefaultValue(false); - - b.Property("JobDescription") - .HasMaxLength(1024) - .HasColumnType("nvarchar(1024)"); - - b.Property("JobStatus") + b.Property("CustomerCode") .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)"); - b.Property("JobType") + 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"); @@ -4212,65 +4604,26 @@ namespace Win_in.Sfs.Wms.Store.Migrations .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)"); + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); b.Property("Remark") .HasMaxLength(3072) .HasColumnType("nvarchar(3072)") .HasColumnName("Remark"); - b.Property("RpNumber") + b.Property("RequestStatus") + .IsRequired() .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)"); @@ -4279,33 +4632,17 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.HasIndex("Number") .IsUnique(); - b.ToTable("Job_InspectJob", (string)null); + b.ToTable("Store_DeliverRequest", (string)null); }); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.InspectJobDetail", b => + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.DeliverRequestDetail", b => { b.Property("Id") .HasColumnType("uniqueidentifier"); - b.Property("AbcClass") - .HasColumnType("nvarchar(max)"); - - b.Property("Appearance") + b.Property("AreaCode") .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"); @@ -4314,39 +4651,9 @@ namespace Win_in.Sfs.Wms.Store.Migrations .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("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); b.Property("ItemCode") .IsRequired() @@ -4377,133 +4684,58 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("LastModifierId"); - b.Property("LocationArea") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("LocationArea"); - - b.Property("LocationCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("LocationCode"); - - b.Property("LocationErpCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("LocationErpCode"); - - b.Property("LocationGroup") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("LocationGroup"); - - b.Property("Lot") - .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"); + .HasColumnName("Number"); - b.Property("ReceiveQty") - .HasColumnType("decimal(18,6)"); + b.Property("Qty") + .HasPrecision(18, 6) + .HasColumnType("decimal(18,6)") + .HasColumnName("Qty"); b.Property("Remark") .HasMaxLength(3072) .HasColumnType("nvarchar(3072)") .HasColumnName("Remark"); - b.Property("SamplePercent") + b.Property("StdPackQty") .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)"); + .HasColumnName("Uom"); b.HasKey("Id"); b.HasIndex("MasterID"); - b.ToTable("Job_InspectJobDetail", (string)null); + b.HasIndex("Number", "ItemCode") + .IsUnique(); + + b.ToTable("Store_DeliverRequestDetail", (string)null); }); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.InspectJobSummaryDetail", b => + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ExchangeData", 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("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); b.Property("CreationTime") .HasColumnType("datetime2") @@ -4513,58 +4745,42 @@ namespace Win_in.Sfs.Wms.Store.Migrations .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("DataAction") + .HasColumnType("int"); - b.Property("InspectReport") + b.Property("DataContent") .HasColumnType("nvarchar(max)"); - b.Property("InspectType") + b.Property("DataIdentityCode") .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)"); - b.Property("InspectUser") + b.Property("DataType") + .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)"); - b.Property("ItemCode") + b.Property("DestinationSystem") .IsRequired() .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ItemCode"); + .HasColumnType("nvarchar(64)"); - b.Property("ItemDesc1") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ItemDesc1"); + b.Property("EffectiveDate") + .HasColumnType("datetime2"); - b.Property("ItemDesc2") + b.Property("ErrorCode") + .IsRequired() .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ItemDesc2"); + .HasColumnType("nvarchar(64)"); - b.Property("ItemName") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ItemName"); + b.Property("ErrorMessage") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); b.Property("LastModificationTime") .HasColumnType("datetime2") @@ -4574,75 +4790,53 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("LastModifierId"); - b.Property("Lot") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("Lot"); - - b.Property("MasterID") - .HasColumnType("uniqueidentifier"); - - b.Property("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("Number") + .HasColumnType("bigint"); - b.Property("ProduceDate") + b.Property("ReadTime") .HasColumnType("datetime2"); - b.Property("ReceiveQty") - .HasColumnType("decimal(18,6)"); + b.Property("Reader") + .HasColumnType("nvarchar(max)"); 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("RetryTimes") + .HasColumnType("int"); - b.Property("SummaryInspectStatus") + b.Property("SourceSystem") .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)"); - b.Property("SupplierBatch") + b.Property("Status") + .IsRequired() .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("SupplierBatch"); + .HasColumnType("nvarchar(64)"); b.Property("TenantId") .HasColumnType("uniqueidentifier") .HasColumnName("TenantId"); - b.Property("Uom") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + b.Property("TyrpNumber") + .IsRequired() + .HasColumnType("nvarchar(max)"); - b.HasKey("Id"); + b.Property("WriteTime") + .HasColumnType("datetime2"); - b.HasIndex("MasterID"); + b.Property("Writer") + .HasColumnType("nvarchar(max)"); - b.ToTable("Job_InspectJobSummaryDetail", (string)null); + b.HasKey("Id"); + + b.ToTable("Store_ExchangeData", (string)null); }); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.InspectNote", b => + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.InspectAbnormalNote", b => { b.Property("Id") .HasColumnType("uniqueidentifier"); @@ -4650,10 +4844,6 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.Property("ActiveDate") .HasColumnType("datetime2"); - b.Property("AsnNumber") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - b.Property("ConcurrencyStamp") .IsConcurrencyToken() .HasMaxLength(40) @@ -4676,11 +4866,6 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasMaxLength(64) .HasColumnType("nvarchar(64)"); - b.Property("JobNumber") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("JobNumber"); - b.Property("LastModificationTime") .HasColumnType("datetime2") .HasColumnName("LastModificationTime"); @@ -4689,25 +4874,12 @@ namespace Win_in.Sfs.Wms.Store.Migrations .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)"); @@ -4717,10 +4889,6 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("nvarchar(3072)") .HasColumnName("Remark"); - b.Property("RpNumber") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - b.Property("SupplierCode") .IsRequired() .HasMaxLength(64) @@ -4738,19 +4906,18 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.HasIndex("Number") .IsUnique(); - b.ToTable("Store_InspectNote", (string)null); + b.ToTable("Store_InspectAbnormalNote", (string)null); }); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.InspectNoteDetail", b => + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.InspectAbnormalNoteDetail", b => { b.Property("Id") .HasColumnType("uniqueidentifier"); - b.Property("AbcClass") - .HasColumnType("nvarchar(max)"); - - b.Property("Appearance") - .HasColumnType("nvarchar(max)"); + b.Property("AbnormalType") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); b.Property("ArriveDate") .HasColumnType("datetime2"); @@ -4760,11 +4927,6 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("nvarchar(64)") .HasColumnName("ContainerCode"); - b.Property("CrackQty") - .ValueGeneratedOnAdd() - .HasColumnType("decimal(18,6)") - .HasDefaultValue(0m); - b.Property("CreationTime") .HasColumnType("datetime2") .HasColumnName("CreationTime"); @@ -4773,45 +4935,9 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("CreatorId"); - b.Property("DetailInspectStatus") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - b.Property("ExpireDate") .HasColumnType("datetime2"); - b.Property("FailedQty") - .ValueGeneratedOnAdd() - .HasColumnType("decimal(18,6)") - .HasDefaultValue(0m); - - b.Property("FailedReason") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("GoodQty") - .ValueGeneratedOnAdd() - .HasColumnType("decimal(18,6)") - .HasDefaultValue(0m); - - b.Property("InspectDate") - .HasColumnType("datetime2"); - - b.Property("InspectQty") - .ValueGeneratedOnAdd() - .HasColumnType("decimal(18,6)") - .HasDefaultValue(0m); - - b.Property("InspectType") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("InspectUser") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - b.Property("ItemCode") .IsRequired() .HasMaxLength(64) @@ -4841,127 +4967,219 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("LastModifierId"); - b.Property("LocationArea") + b.Property("Lot") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("LocationArea"); + .HasColumnName("Lot"); - b.Property("LocationCode") + b.Property("MasterID") + .HasColumnType("uniqueidentifier"); + + b.Property("Number") .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("LocationCode"); + .HasColumnName("Number"); - b.Property("LocationErpCode") + b.Property("PackingCode") .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("LocationErpCode"); + .HasColumnName("PackingCode"); - b.Property("LocationGroup") + 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("LocationGroup"); + .HasColumnName("SupplierBatch"); - b.Property("Lot") + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Uom") + .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("Lot"); + .HasColumnName("Uom"); - b.Property("MasterID") + 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("NotPassedQty") - .HasColumnType("decimal(18,6)"); + b.Property("AcceptTime") + .HasColumnType("datetime2"); - b.Property("Number") - .IsRequired() + b.Property("AcceptUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("AcceptUserName") .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("Number"); + .HasColumnType("nvarchar(64)"); - b.Property("OtherPropertyJson") - .HasColumnType("nvarchar(max)"); + b.Property("AsnNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); - b.Property("PackingCode") + 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)") - .HasColumnName("PackingCode"); + .HasColumnType("nvarchar(64)"); - b.Property("Photos") - .HasColumnType("nvarchar(max)"); + b.Property("JobType") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); - b.Property("PoLine") + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("NextAction") + .IsRequired() .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("PoLine"); + .HasColumnType("nvarchar(64)"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); b.Property("PoNumber") .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("PoNumber"); + .HasColumnType("nvarchar(64)"); - b.Property("ProduceDate") - .HasColumnType("datetime2"); + b.Property("Priority") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasDefaultValue(0); - b.Property("ReceiveQty") - .HasColumnType("decimal(18,6)"); + 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("SamplePercent") - .ValueGeneratedOnAdd() - .HasColumnType("decimal(18,6)") - .HasDefaultValue(0m); - - b.Property("Status") - .IsRequired() + b.Property("RpNumber") .HasMaxLength(64) .HasColumnType("nvarchar(64)"); - b.Property("StdPackQty") - .HasColumnType("decimal(18,6)"); - - b.Property("SupplierBatch") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("SupplierBatch"); + b.Property("SupplierCode") + .HasColumnType("nvarchar(max)"); b.Property("TenantId") .HasColumnType("uniqueidentifier") .HasColumnName("TenantId"); - b.Property("Uom") + b.Property("UpStreamJobNumber") .HasMaxLength(64) .HasColumnType("nvarchar(64)"); - b.Property("Volume") + b.Property("WarehouseCode") .HasColumnType("nvarchar(max)"); - b.Property("WarehouseCode") - .IsRequired() + b.Property("WorkGroupCode") .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("WarehouseCode"); + .HasColumnType("nvarchar(64)"); - b.Property("Weight") + b.Property("Worker") .HasColumnType("nvarchar(max)"); b.HasKey("Id"); - b.HasIndex("MasterID"); - - b.HasIndex("Number", "PackingCode") + b.HasIndex("Number") .IsUnique(); - b.ToTable("Store_InspectNoteDetail", (string)null); + b.ToTable("Job_InspectJob", (string)null); }); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.InspectNoteSummaryDetail", b => + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.InspectJobDetail", b => { b.Property("Id") .HasColumnType("uniqueidentifier"); @@ -4969,9 +5187,17 @@ namespace Win_in.Sfs.Wms.Store.Migrations 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)") @@ -4985,6 +5211,11 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("CreatorId"); + b.Property("DetailInspectStatus") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + b.Property("ExpireDate") .HasColumnType("datetime2"); @@ -5003,9 +5234,7 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasDefaultValue(0m); b.Property("InspectQty") - .ValueGeneratedOnAdd() - .HasColumnType("decimal(18,6)") - .HasDefaultValue(0m); + .HasColumnType("decimal(18,6)"); b.Property("InspectType") .IsRequired() @@ -5045,7 +5274,30 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("LastModifierId"); + b.Property("LocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationArea"); + + b.Property("LocationCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationCode"); + + b.Property("LocationErpCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationErpCode"); + + b.Property("LocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationGroup"); + b.Property("Lot") + .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)") .HasColumnName("Lot"); @@ -5054,23 +5306,31 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier"); b.Property("NotPassedQty") - .HasColumnType("decimal(18,6)"); + .ValueGeneratedOnAdd() + .HasColumnType("decimal(18,6)") + .HasDefaultValue(0m); b.Property("Number") .IsRequired() .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("Number"); + .HasColumnType("nvarchar(64)"); - b.Property("PoLine") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("PoLine"); + b.Property("OtherPropertyJson") + .HasColumnType("nvarchar(max)"); - b.Property("PoNumber") + b.Property("PackingCode") + .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("PoNumber"); + .HasColumnName("PackingCode"); + + b.Property("PoLine") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("PoNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); b.Property("ProduceDate") .HasColumnType("datetime2"); @@ -5084,10 +5344,173 @@ namespace Win_in.Sfs.Wms.Store.Migrations .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)"); @@ -5113,13 +5536,10 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.HasIndex("MasterID"); - b.HasIndex("Number", "ItemCode") - .IsUnique(); - - b.ToTable("Store_InspectNoteSummaryDetail", (string)null); + b.ToTable("Job_InspectJobSummaryDetail", (string)null); }); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.InspectRequest", b => + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.InspectNote", b => { b.Property("Id") .HasColumnType("uniqueidentifier"); @@ -5131,18 +5551,6 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasMaxLength(64) .HasColumnType("nvarchar(64)"); - b.Property("AutoAgree") - .HasColumnType("bit"); - - b.Property("AutoCompleteJob") - .HasColumnType("bit"); - - b.Property("AutoHandle") - .HasColumnType("bit"); - - b.Property("AutoSubmit") - .HasColumnType("bit"); - b.Property("ConcurrencyStamp") .IsConcurrencyToken() .HasMaxLength(40) @@ -5157,13 +5565,19 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("CreatorId"); - b.Property("DirectCreateNote") - .HasColumnType("bit"); - b.Property("ExtraProperties") .HasColumnType("nvarchar(max)") .HasColumnName("ExtraProperties"); + b.Property("InspectNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("JobNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("JobNumber"); + b.Property("LastModificationTime") .HasColumnType("datetime2") .HasColumnName("LastModificationTime"); @@ -5172,6 +5586,11 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("LastModifierId"); + b.Property("NextAction") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + b.Property("Number") .IsRequired() .HasMaxLength(64) @@ -5187,7 +5606,6 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("nvarchar(64)"); b.Property("ReceiptNumber") - .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)"); @@ -5196,11 +5614,6 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("nvarchar(3072)") .HasColumnName("Remark"); - b.Property("RequestStatus") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - b.Property("RpNumber") .HasMaxLength(64) .HasColumnType("nvarchar(64)"); @@ -5214,9 +5627,6 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("TenantId"); - b.Property("WarehouseCode") - .HasColumnType("nvarchar(max)"); - b.Property("Worker") .HasColumnType("nvarchar(max)"); @@ -5225,10 +5635,10 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.HasIndex("Number") .IsUnique(); - b.ToTable("Store_InspectRequest", (string)null); + b.ToTable("Store_InspectNote", (string)null); }); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.InspectRequestDetail", b => + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.InspectNoteDetail", b => { b.Property("Id") .HasColumnType("uniqueidentifier"); @@ -5236,17 +5646,22 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.Property("AbcClass") .HasColumnType("nvarchar(max)"); + b.Property("Appearance") + .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("CrackQty") + .ValueGeneratedOnAdd() + .HasColumnType("decimal(18,6)") + .HasDefaultValue(0m); + b.Property("CreationTime") .HasColumnType("datetime2") .HasColumnName("CreationTime"); @@ -5263,6 +5678,23 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.Property("ExpireDate") .HasColumnType("datetime2"); + b.Property("FailedQty") + .ValueGeneratedOnAdd() + .HasColumnType("decimal(18,6)") + .HasDefaultValue(0m); + + b.Property("FailedReason") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("GoodQty") + .ValueGeneratedOnAdd() + .HasColumnType("decimal(18,6)") + .HasDefaultValue(0m); + + b.Property("InspectDate") + .HasColumnType("datetime2"); + b.Property("InspectQty") .ValueGeneratedOnAdd() .HasColumnType("decimal(18,6)") @@ -5273,6 +5705,10 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasMaxLength(64) .HasColumnType("nvarchar(64)"); + b.Property("InspectUser") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + b.Property("ItemCode") .IsRequired() .HasMaxLength(64) @@ -5332,18 +5768,27 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.Property("MasterID") .HasColumnType("uniqueidentifier"); - b.Property("Number") - .IsRequired() + 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)") @@ -5391,12 +5836,18 @@ namespace Win_in.Sfs.Wms.Store.Migrations .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"); @@ -5404,10 +5855,10 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.HasIndex("Number", "PackingCode") .IsUnique(); - b.ToTable("Store_InspectRequestDetail", (string)null); + b.ToTable("Store_InspectNoteDetail", (string)null); }); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.InspectRequestSummaryDetail", b => + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.InspectNoteSummaryDetail", b => { b.Property("Id") .HasColumnType("uniqueidentifier"); @@ -5419,7 +5870,9 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("datetime2"); b.Property("CrackQty") - .HasColumnType("decimal(18,6)"); + .ValueGeneratedOnAdd() + .HasColumnType("decimal(18,6)") + .HasDefaultValue(0m); b.Property("CreationTime") .HasColumnType("datetime2") @@ -5433,24 +5886,33 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("datetime2"); b.Property("FailedQty") - .HasColumnType("decimal(18,6)"); + .ValueGeneratedOnAdd() + .HasColumnType("decimal(18,6)") + .HasDefaultValue(0m); + + b.Property("FailedReason") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); b.Property("GoodQty") - .HasColumnType("decimal(18,6)"); + .ValueGeneratedOnAdd() + .HasColumnType("decimal(18,6)") + .HasDefaultValue(0m); 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("InspectUser") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + b.Property("ItemCode") .IsRequired() .HasMaxLength(64) @@ -5548,22 +6010,36 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.HasIndex("MasterID"); - b.HasIndex("Number", "ItemCode", "Lot") - .IsUnique() - .HasFilter("[Lot] IS NOT NULL"); + b.HasIndex("Number", "ItemCode") + .IsUnique(); - b.ToTable("Store_InspectRequestSummaryDetail", (string)null); + b.ToTable("Store_InspectNoteSummaryDetail", (string)null); }); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.InventoryInitialNote", b => + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.InspectRequest", b => { b.Property("Id") - .ValueGeneratedOnAdd() .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) @@ -5578,6 +6054,9 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("CreatorId"); + b.Property("DirectCreateNote") + .HasColumnType("bit"); + b.Property("ExtraProperties") .HasColumnType("nvarchar(max)") .HasColumnName("ExtraProperties"); @@ -5596,12 +6075,35 @@ namespace Win_in.Sfs.Wms.Store.Migrations .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("RequestNumber") + 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)"); @@ -5609,6 +6111,9 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("TenantId"); + b.Property("WarehouseCode") + .HasColumnType("nvarchar(max)"); + b.Property("Worker") .HasColumnType("nvarchar(max)"); @@ -5617,18 +6122,23 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.HasIndex("Number") .IsUnique(); - b.ToTable("Store_InventoryInitialNote", (string)null); + b.ToTable("Store_InspectRequest", (string)null); }); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.InventoryInitialNoteDetail", b => + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.InspectRequestDetail", b => { b.Property("Id") - .ValueGeneratedOnAdd() .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)") @@ -5642,9 +6152,24 @@ namespace Win_in.Sfs.Wms.Store.Migrations .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) @@ -5716,19 +6241,32 @@ namespace Win_in.Sfs.Wms.Store.Migrations .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("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) @@ -5747,10 +6285,8 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnName("TenantId"); b.Property("Uom") - .IsRequired() .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("Uom"); + .HasColumnType("nvarchar(64)"); b.Property("WarehouseCode") .IsRequired() @@ -5762,26 +6298,25 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.HasIndex("MasterID"); - b.HasIndex("Number", "PackingCode", "ItemCode", "Lot", "Status") - .IsUnique() - .HasFilter("[Lot] IS NOT NULL"); + b.HasIndex("Number", "PackingCode") + .IsUnique(); - b.ToTable("Store_InventoryInitialNoteDetail", (string)null); + b.ToTable("Store_InspectRequestDetail", (string)null); }); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.InventoryTransferNote", b => + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.InspectRequestSummaryDetail", b => { b.Property("Id") .HasColumnType("uniqueidentifier"); - b.Property("ActiveDate") + b.Property("AbcClass") + .HasColumnType("nvarchar(max)"); + + b.Property("ArriveDate") .HasColumnType("datetime2"); - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("nvarchar(40)") - .HasColumnName("ConcurrencyStamp"); + b.Property("CrackQty") + .HasColumnType("decimal(18,6)"); b.Property("CreationTime") .HasColumnType("datetime2") @@ -5791,14 +6326,48 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("CreatorId"); - b.Property("ExtraProperties") - .HasColumnType("nvarchar(max)") - .HasColumnName("ExtraProperties"); + b.Property("ExpireDate") + .HasColumnType("datetime2"); - b.Property("JobNumber") + 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("JobNumber"); + .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") @@ -5808,49 +6377,96 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("LastModifierId"); + b.Property("Lot") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Lot"); + + b.Property("MasterID") + .HasColumnType("uniqueidentifier"); + + b.Property("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("SupplierCode") + 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("TenantId") + b.Property("SupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("SupplierBatch"); + + b.Property("TenantId") .HasColumnType("uniqueidentifier") .HasColumnName("TenantId"); - b.Property("TransferType") - .IsRequired() + b.Property("Uom") .HasMaxLength(64) .HasColumnType("nvarchar(64)"); - b.Property("Worker") - .HasColumnType("nvarchar(max)"); - b.HasKey("Id"); - b.HasIndex("Number") - .IsUnique(); + b.HasIndex("MasterID"); - b.ToTable("Store_InventoryTransferNote", (string)null); + 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.InventoryTransferNoteDetail", b => + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.InventoryInitialNote", b => { b.Property("Id") + .ValueGeneratedOnAdd() .HasColumnType("uniqueidentifier"); - b.Property("ArriveDate") + b.Property("ActiveDate") .HasColumnType("datetime2"); + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + b.Property("CreationTime") .HasColumnType("datetime2") .HasColumnName("CreationTime"); @@ -5859,50 +6475,72 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("CreatorId"); - b.Property("ExpireDate") - .HasColumnType("datetime2"); + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); - b.Property("FromContainerCode") - .HasColumnType("nvarchar(max)"); + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); - b.Property("FromLocationArea") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("FromLocationArea"); + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); - b.Property("FromLocationCode") + b.Property("Number") .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("FromLocationCode"); + .HasColumnName("Number"); - b.Property("FromLocationErpCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("FromLocationErpCode"); + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); - b.Property("FromLocationGroup") + b.Property("RequestNumber") .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("FromLocationGroup"); + .HasColumnType("nvarchar(64)"); - b.Property("FromLot") + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Worker") .HasColumnType("nvarchar(max)"); - b.Property("FromPackingCode") - .HasColumnType("nvarchar(450)"); + b.HasKey("Id"); - b.Property("FromStatus") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + b.HasIndex("Number") + .IsUnique(); - b.Property("FromWarehouseCode") - .IsRequired() + 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("FromWarehouseCode"); + .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() @@ -5933,6 +6571,33 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("LastModifierId"); + b.Property("LocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationArea"); + + b.Property("LocationCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationCode"); + + b.Property("LocationErpCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationErpCode"); + + b.Property("LocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationGroup"); + + b.Property("Lot") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Lot"); + b.Property("MasterID") .HasColumnType("uniqueidentifier"); @@ -5942,6 +6607,12 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("nvarchar(64)") .HasColumnName("Number"); + b.Property("PackingCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("PackingCode"); + b.Property("ProduceDate") .HasColumnType("datetime2"); @@ -5950,15 +6621,16 @@ namespace Win_in.Sfs.Wms.Store.Migrations .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("Status") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + b.Property("StdPackQty") .HasColumnType("decimal(18,6)"); @@ -5971,66 +6643,30 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("TenantId"); - b.Property("ToContainerCode") - .HasColumnType("nvarchar(max)"); - - b.Property("ToLocationArea") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ToLocationArea"); - - b.Property("ToLocationCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ToLocationCode"); - - b.Property("ToLocationErpCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ToLocationErpCode"); - - b.Property("ToLocationGroup") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ToLocationGroup"); - - b.Property("ToLot") - .HasColumnType("nvarchar(max)"); - - b.Property("ToPackingCode") - .HasColumnType("nvarchar(max)"); - - b.Property("ToStatus") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("ToWarehouseCode") + b.Property("Uom") .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("ToWarehouseCode"); + .HasColumnName("Uom"); - b.Property("Uom") + b.Property("WarehouseCode") .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("Uom"); + .HasColumnName("WarehouseCode"); b.HasKey("Id"); b.HasIndex("MasterID"); - b.HasIndex("Number", "FromPackingCode", "FromLocationCode", "ToLocationCode") + b.HasIndex("Number", "PackingCode", "ItemCode", "Lot", "Status") .IsUnique() - .HasFilter("[FromPackingCode] IS NOT NULL"); + .HasFilter("[Lot] IS NOT NULL"); - b.ToTable("Store_InventoryTransferNoteDetail", (string)null); + b.ToTable("Store_InventoryInitialNoteDetail", (string)null); }); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.IsolationNote", b => + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.InventoryTransferNote", b => { b.Property("Id") .HasColumnType("uniqueidentifier"); @@ -6080,10 +6716,19 @@ namespace Win_in.Sfs.Wms.Store.Migrations .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)"); @@ -6092,10 +6737,10 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.HasIndex("Number") .IsUnique(); - b.ToTable("Store_IsolationNote", (string)null); + b.ToTable("Store_InventoryTransferNote", (string)null); }); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.IsolationNoteDetail", b => + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.InventoryTransferNoteDetail", b => { b.Property("Id") .HasColumnType("uniqueidentifier"); @@ -6202,6 +6847,10 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("decimal(18,6)") .HasColumnName("Qty"); + b.Property("Reason") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + b.Property("Remark") .HasMaxLength(3072) .HasColumnType("nvarchar(3072)") @@ -6269,42 +6918,23 @@ namespace Win_in.Sfs.Wms.Store.Migrations 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); + b.ToTable("Store_InventoryTransferNoteDetail", (string)null); }); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.IssueJob", b => + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.IsolationNote", 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") + b.Property("ActiveDate") .HasColumnType("datetime2"); - b.Property("CompleteUserId") - .HasColumnType("uniqueidentifier"); - - b.Property("CompleteUserName") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - b.Property("ConcurrencyStamp") .IsConcurrencyToken() .HasMaxLength(40) @@ -6323,24 +6953,10 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("nvarchar(max)") .HasColumnName("ExtraProperties"); - b.Property("IsAutoComplete") - .ValueGeneratedOnAdd() - .HasColumnType("bit") - .HasDefaultValue(false); - - b.Property("JobDescription") - .HasMaxLength(1024) - .HasColumnType("nvarchar(1024)"); - - b.Property("JobStatus") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("JobType") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + b.Property("JobNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("JobNumber"); b.Property("LastModificationTime") .HasColumnType("datetime2") @@ -6350,76 +6966,40 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("LastModifierId"); - b.Property("MaterialRequestNumber") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - b.Property("Number") .IsRequired() .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("Priority") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasDefaultValue(0); - - b.Property("PriorityIncrement") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasDefaultValue(0); - - b.Property("ProdLine") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); 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); + b.ToTable("Store_IsolationNote", (string)null); }); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.IssueJobDetail", b => + 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"); @@ -6428,73 +7008,50 @@ namespace Win_in.Sfs.Wms.Store.Migrations .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") + b.Property("ExpireDate") .HasColumnType("datetime2"); - b.Property("HandledContainerCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("HandledContainerCode"); - - b.Property("HandledExpireDate") - .HasColumnType("datetime2"); + b.Property("FromContainerCode") + .HasColumnType("nvarchar(max)"); - b.Property("HandledFromLocationArea") + b.Property("FromLocationArea") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("HandledFromLocationArea"); + .HasColumnName("FromLocationArea"); - b.Property("HandledFromLocationCode") + b.Property("FromLocationCode") + .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("HandledFromLocationCode"); + .HasColumnName("FromLocationCode"); - b.Property("HandledFromLocationErpCode") + b.Property("FromLocationErpCode") + .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("HandledFromLocationErpCode"); + .HasColumnName("FromLocationErpCode"); - b.Property("HandledFromLocationGroup") + b.Property("FromLocationGroup") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("HandledFromLocationGroup"); + .HasColumnName("FromLocationGroup"); - b.Property("HandledFromWarehouseCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("HandledFromWarehouseCode"); + b.Property("FromLot") + .HasColumnType("nvarchar(max)"); - b.Property("HandledLot") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("HandledLot"); + b.Property("FromPackingCode") + .HasColumnType("nvarchar(450)"); - b.Property("HandledPackingCode") + b.Property("FromStatus") + .IsRequired() .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("HandledPackingCode"); - - b.Property("HandledProduceDate") - .HasColumnType("datetime2"); - - b.Property("HandledQty") - .HasColumnType("decimal(18,6)"); + .HasColumnType("nvarchar(64)"); - b.Property("HandledSupplierBatch") + b.Property("FromWarehouseCode") + .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("HandledSupplierBatch"); + .HasColumnName("FromWarehouseCode"); b.Property("ItemCode") .IsRequired() @@ -6531,168 +7088,126 @@ namespace Win_in.Sfs.Wms.Store.Migrations 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)"); + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); - b.Property("PlanBeginTime") + b.Property("ProduceDate") .HasColumnType("datetime2"); - b.Property("PlannedSplitRule") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + b.Property("Qty") + .HasPrecision(18, 6) + .HasColumnType("decimal(18,6)") + .HasColumnName("Qty"); - b.Property("ProdLine") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); - b.Property("RecommendArriveDate") - .HasColumnType("datetime2"); + b.Property("StdPackQty") + .HasColumnType("decimal(18,6)"); - b.Property("RecommendContainerCode") + b.Property("SupplierBatch") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendContainerCode"); + .HasColumnName("SupplierBatch"); - b.Property("RecommendExpireDate") - .HasColumnType("datetime2"); + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); - b.Property("RecommendFromLocationArea") + b.Property("ToContainerCode") + .HasColumnType("nvarchar(max)"); + + b.Property("ToLocationArea") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendFromLocationArea"); + .HasColumnName("ToLocationArea"); - b.Property("RecommendFromLocationCode") + b.Property("ToLocationCode") + .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendFromLocationCode"); + .HasColumnName("ToLocationCode"); - b.Property("RecommendFromLocationErpCode") + b.Property("ToLocationErpCode") + .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendFromLocationErpCode"); + .HasColumnName("ToLocationErpCode"); - b.Property("RecommendFromLocationGroup") + b.Property("ToLocationGroup") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendFromLocationGroup"); + .HasColumnName("ToLocationGroup"); - b.Property("RecommendFromWarehouseCode") + b.Property("ToLot") + .HasColumnType("nvarchar(max)"); + + b.Property("ToPackingCode") + .HasColumnType("nvarchar(max)"); + + b.Property("ToStatus") + .IsRequired() .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendFromWarehouseCode"); + .HasColumnType("nvarchar(64)"); - b.Property("RecommendLot") + b.Property("ToWarehouseCode") + .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendLot"); + .HasColumnName("ToWarehouseCode"); - b.Property("RecommendPackingCode") + b.Property("Uom") + .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendPackingCode"); + .HasColumnName("Uom"); - b.Property("RecommendProduceDate") - .HasColumnType("datetime2"); + b.HasKey("Id"); - b.Property("RecommendQty") - .HasColumnType("decimal(18,6)"); + b.HasIndex("FromPackingCode"); - b.Property("RecommendSupplierBatch") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendSupplierBatch"); + b.HasIndex("MasterID"); - b.Property("Remark") - .HasMaxLength(3072) - .HasColumnType("nvarchar(3072)") - .HasColumnName("Remark"); + b.HasIndex("Number", "FromPackingCode", "FromLocationCode", "ToLocationCode") + .IsUnique() + .HasFilter("[FromPackingCode] IS NOT NULL"); - b.Property("RequestLocationCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + b.ToTable("Store_IsolationNoteDetail", (string)null); + }); - b.Property("RoundedQty") - .HasColumnType("decimal(18,6)"); + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.IssueJob", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); - b.Property("Status") - .IsRequired() + b.Property("AcceptTime") + .HasColumnType("datetime2"); + + b.Property("AcceptUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("AcceptUserName") .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("CompleteTime") + .HasColumnType("datetime2"); - b.Property("Uom") - .HasColumnType("nvarchar(max)"); + b.Property("CompleteUserId") + .HasColumnType("uniqueidentifier"); - b.Property("WorkStation") + b.Property("CompleteUserName") .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"); @@ -6705,10 +7220,24 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("nvarchar(max)") .HasColumnName("ExtraProperties"); - b.Property("JobNumber") + b.Property("IsAutoComplete") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false); + + b.Property("JobDescription") + .HasMaxLength(1024) + .HasColumnType("nvarchar(1024)"); + + b.Property("JobStatus") + .IsRequired() .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("JobNumber"); + .HasColumnType("nvarchar(64)"); + + b.Property("JobType") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); b.Property("LastModificationTime") .HasColumnType("datetime2") @@ -6718,21 +7247,34 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("LastModifierId"); + b.Property("MaterialRequestNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + b.Property("Number") .IsRequired() .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("Number"); + .HasColumnType("nvarchar(64)"); + + b.Property("Priority") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasDefaultValue(0); + + b.Property("PriorityIncrement") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasDefaultValue(0); + + b.Property("ProdLine") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); b.Property("Remark") .HasMaxLength(3072) .HasColumnType("nvarchar(3072)") .HasColumnName("Remark"); - b.Property("RequestNumber") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - b.Property("RequestType") .HasMaxLength(64) .HasColumnType("nvarchar(64)"); @@ -6741,9 +7283,20 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("TenantId"); + b.Property("UpStreamJobNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + b.Property("UseOnTheWayLocation") .HasColumnType("bit"); + b.Property("WarehouseCode") + .HasColumnType("nvarchar(max)"); + + b.Property("WorkGroupCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + b.Property("Worker") .HasColumnType("nvarchar(max)"); @@ -6756,17 +7309,14 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.HasIndex("Number") .IsUnique(); - b.ToTable("Store_IssueNote", (string)null); + b.ToTable("Job_IssueJob", (string)null); }); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.IssueNoteDetail", b => + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.IssueJobDetail", b => { b.Property("Id") .HasColumnType("uniqueidentifier"); - b.Property("ArriveDate") - .HasColumnType("datetime2"); - b.Property("CreationTime") .HasColumnType("datetime2") .HasColumnName("CreationTime"); @@ -6775,53 +7325,16 @@ namespace Win_in.Sfs.Wms.Store.Migrations .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("DeliveryQty") + .HasColumnType("decimal(18,6)"); - b.Property("FromStatus") + b.Property("DistributionType") .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)"); - b.Property("FromWarehouseCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("FromWarehouseCode"); + b.Property("ExpiredTime") + .HasColumnType("datetime2"); b.Property("HandledArriveDate") .HasColumnType("datetime2"); @@ -6880,9 +7393,6 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("nvarchar(64)") .HasColumnName("HandledSupplierBatch"); - b.Property("IssueTime") - .HasColumnType("datetime2"); - b.Property("ItemCode") .IsRequired() .HasMaxLength(64) @@ -6918,24 +7428,31 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.Property("Number") .IsRequired() .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("Number"); + .HasColumnType("nvarchar(64)"); b.Property("OnTheWayLocationCode") .HasMaxLength(64) .HasColumnType("nvarchar(64)"); - b.Property("ProdLine") + b.Property("Operation") .HasMaxLength(64) .HasColumnType("nvarchar(64)"); - b.Property("ProduceDate") + b.Property("PlanBeginTime") .HasColumnType("datetime2"); - b.Property("Qty") - .HasPrecision(18, 6) - .HasColumnType("decimal(18,6)") - .HasColumnName("Qty"); + b.Property("PlannedSplitRule") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("PositionCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ProdLine") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); b.Property("RecommendArriveDate") .HasColumnType("datetime2"); @@ -6994,70 +7511,62 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("nvarchar(64)") .HasColumnName("RecommendSupplierBatch"); + b.Property("RecommendType") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + b.Property("Remark") .HasMaxLength(3072) .HasColumnType("nvarchar(3072)") .HasColumnName("Remark"); - b.Property("StdPackQty") + b.Property("RequestLocationCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("RoundedQty") .HasColumnType("decimal(18,6)"); - b.Property("SupplierBatch") + b.Property("Status") + .IsRequired() .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("SupplierBatch"); + .HasColumnType("nvarchar(64)"); + + b.Property("StdPackQty") + .HasColumnType("decimal(18,6)"); b.Property("TenantId") .HasColumnType("uniqueidentifier") .HasColumnName("TenantId"); - b.Property("ToContainerCode") - .HasColumnType("nvarchar(max)"); - b.Property("ToLocationArea") .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ToLocationArea"); + .HasColumnType("nvarchar(64)"); b.Property("ToLocationCode") - .IsRequired() .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ToLocationCode"); + .HasColumnType("nvarchar(64)"); b.Property("ToLocationErpCode") - .IsRequired() .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ToLocationErpCode"); + .HasColumnType("nvarchar(64)"); b.Property("ToLocationGroup") .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ToLocationGroup"); - - b.Property("ToLot") - .HasColumnType("nvarchar(max)"); - - b.Property("ToPackingCode") - .HasColumnType("nvarchar(max)"); + .HasColumnType("nvarchar(64)"); - b.Property("ToStatus") - .IsRequired() + b.Property("ToWarehouseCode") .HasMaxLength(64) .HasColumnType("nvarchar(64)"); - b.Property("ToWarehouseCode") + b.Property("TruncType") .IsRequired() .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ToWarehouseCode"); + .HasColumnType("nvarchar(64)"); b.Property("Uom") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("Uom"); + .HasColumnType("nvarchar(max)"); b.Property("WorkStation") .HasMaxLength(64) @@ -7065,18 +7574,12 @@ namespace Win_in.Sfs.Wms.Store.Migrations 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); + b.ToTable("Job_IssueJobDetail", (string)null); }); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ItemTransformNote", b => + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.IssueNote", b => { b.Property("Id") .HasColumnType("uniqueidentifier"); @@ -7090,6 +7593,12 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("nvarchar(40)") .HasColumnName("ConcurrencyStamp"); + b.Property("ConfirmTime") + .HasColumnType("datetime2"); + + b.Property("Confirmed") + .HasColumnType("bit"); + b.Property("CreationTime") .HasColumnType("datetime2") .HasColumnName("CreationTime"); @@ -7103,7 +7612,9 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnName("ExtraProperties"); b.Property("JobNumber") - .HasColumnType("nvarchar(max)"); + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("JobNumber"); b.Property("LastModificationTime") .HasColumnType("datetime2") @@ -7128,28 +7639,39 @@ namespace Win_in.Sfs.Wms.Store.Migrations .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_ItemTransformNote", (string)null); + b.ToTable("Store_IssueNote", (string)null); }); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ItemTransformNoteDetail", b => + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.IssueNoteDetail", b => { b.Property("Id") .HasColumnType("uniqueidentifier"); - b.Property("ConcurrencyStamp") - .HasColumnType("nvarchar(max)"); + b.Property("ArriveDate") + .HasColumnType("datetime2"); b.Property("CreationTime") .HasColumnType("datetime2") @@ -7159,15 +7681,15 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("CreatorId"); - b.Property("FromArriveDate") + b.Property("ExpireDate") + .HasColumnType("datetime2"); + + b.Property("ExpiredTime") .HasColumnType("datetime2"); b.Property("FromContainerCode") .HasColumnType("nvarchar(max)"); - b.Property("FromExpireDate") - .HasColumnType("datetime2"); - b.Property("FromLocationArea") .HasMaxLength(64) .HasColumnType("nvarchar(64)") @@ -7196,27 +7718,77 @@ namespace Win_in.Sfs.Wms.Store.Migrations 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("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) @@ -7255,43 +7827,107 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("nvarchar(64)") .HasColumnName("Number"); - b.Property("ReasonCode") + b.Property("OnTheWayLocationCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("PositionCode") .HasColumnType("nvarchar(max)"); - b.Property("Remark") - .HasMaxLength(3072) - .HasColumnType("nvarchar(3072)") - .HasColumnName("Remark"); + b.Property("ProdLine") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); - b.Property("TenantId") - .HasColumnType("uniqueidentifier") - .HasColumnName("TenantId"); + b.Property("ProduceDate") + .HasColumnType("datetime2"); - b.Property("ToArriveDate") + b.Property("Qty") + .HasPrecision(18, 6) + .HasColumnType("decimal(18,6)") + .HasColumnName("Qty"); + + b.Property("RecommendArriveDate") .HasColumnType("datetime2"); - b.Property("ToContainerCode") - .HasColumnType("nvarchar(max)"); + b.Property("RecommendContainerCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendContainerCode"); - b.Property("ToExpireDate") + b.Property("RecommendExpireDate") .HasColumnType("datetime2"); - b.Property("ToItemCode") + b.Property("RecommendFromLocationArea") .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendFromLocationArea"); - b.Property("ToItemDesc1") + b.Property("RecommendFromLocationCode") .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendFromLocationCode"); - b.Property("ToItemDesc2") + b.Property("RecommendFromLocationErpCode") .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendFromLocationErpCode"); - b.Property("ToItemName") + b.Property("RecommendFromLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendFromLocationGroup"); + + b.Property("RecommendFromWarehouseCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendFromWarehouseCode"); + + b.Property("RecommendLot") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendLot"); + + b.Property("RecommendPackingCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendPackingCode"); + + b.Property("RecommendProduceDate") + .HasColumnType("datetime2"); + + b.Property("RecommendQty") + .HasColumnType("decimal(18,6)"); + + b.Property("RecommendSupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendSupplierBatch"); + + b.Property("RecommendType") + .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)"); + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("StdPackQty") + .HasColumnType("decimal(18,6)"); + + b.Property("SupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("SupplierBatch"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("ToContainerCode") + .HasColumnType("nvarchar(max)"); + b.Property("ToLocationArea") .HasMaxLength(64) .HasColumnType("nvarchar(64)") @@ -7318,23 +7954,13 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("nvarchar(max)"); b.Property("ToPackingCode") - .HasColumnType("nvarchar(450)"); - - b.Property("ToProduceDate") - .HasColumnType("datetime2"); - - b.Property("ToQty") - .HasColumnType("decimal(18,6)"); + .HasColumnType("nvarchar(max)"); b.Property("ToStatus") .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)"); - b.Property("ToSupplierBatch") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - b.Property("ToWarehouseCode") .IsRequired() .HasMaxLength(64) @@ -7342,21 +7968,29 @@ namespace Win_in.Sfs.Wms.Store.Migrations .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", "FromStatus", "ToPackingCode", "ToStatus") + b.HasIndex("Number", "FromPackingCode", "FromLocationCode", "ToLocationCode") .IsUnique() - .HasFilter("[FromPackingCode] IS NOT NULL AND [ToPackingCode] IS NOT NULL"); + .HasFilter("[FromPackingCode] IS NOT NULL"); - b.ToTable("Store_ItemTransformNoteDetail", (string)null); + b.ToTable("Store_IssueNoteDetail", (string)null); }); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ItemTransformRequest", b => + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ItemTransformNote", b => { b.Property("Id") .HasColumnType("uniqueidentifier"); @@ -7364,18 +7998,6 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.Property("ActiveDate") .HasColumnType("datetime2"); - b.Property("AutoAgree") - .HasColumnType("bit"); - - b.Property("AutoCompleteJob") - .HasColumnType("bit"); - - b.Property("AutoHandle") - .HasColumnType("bit"); - - b.Property("AutoSubmit") - .HasColumnType("bit"); - b.Property("ConcurrencyStamp") .IsConcurrencyToken() .HasMaxLength(40) @@ -7390,13 +8012,13 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("CreatorId"); - b.Property("DirectCreateNote") - .HasColumnType("bit"); - b.Property("ExtraProperties") .HasColumnType("nvarchar(max)") .HasColumnName("ExtraProperties"); + b.Property("JobNumber") + .HasColumnType("nvarchar(max)"); + b.Property("LastModificationTime") .HasColumnType("datetime2") .HasColumnName("LastModificationTime"); @@ -7416,8 +8038,7 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("nvarchar(3072)") .HasColumnName("Remark"); - b.Property("RequestStatus") - .IsRequired() + b.Property("RequestNumber") .HasMaxLength(64) .HasColumnType("nvarchar(64)"); @@ -7433,14 +8054,17 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.HasIndex("Number") .IsUnique(); - b.ToTable("Store_ItemTransformRequest", (string)null); + b.ToTable("Store_ItemTransformNote", (string)null); }); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ItemTransformRequestDetail", b => + 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"); @@ -7643,33 +8267,28 @@ namespace Win_in.Sfs.Wms.Store.Migrations .IsUnique() .HasFilter("[FromPackingCode] IS NOT NULL AND [ToPackingCode] IS NOT NULL"); - b.ToTable("Store_ItemTransformRequestDetail", (string)null); + b.ToTable("Store_ItemTransformNoteDetail", (string)null); }); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.JisDeliverJob", b => + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ItemTransformRequest", b => { b.Property("Id") .HasColumnType("uniqueidentifier"); - b.Property("AcceptTime") + b.Property("ActiveDate") .HasColumnType("datetime2"); - b.Property("AcceptUserId") - .HasColumnType("uniqueidentifier"); - - b.Property("AcceptUserName") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + b.Property("AutoAgree") + .HasColumnType("bit"); - b.Property("CompleteTime") - .HasColumnType("datetime2"); + b.Property("AutoCompleteJob") + .HasColumnType("bit"); - b.Property("CompleteUserId") - .HasColumnType("uniqueidentifier"); + b.Property("AutoHandle") + .HasColumnType("bit"); - b.Property("CompleteUserName") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + b.Property("AutoSubmit") + .HasColumnType("bit"); b.Property("ConcurrencyStamp") .IsConcurrencyToken() @@ -7677,9 +8296,6 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("nvarchar(40)") .HasColumnName("ConcurrencyStamp"); - b.Property("ContainerQty") - .HasColumnType("decimal(18,6)"); - b.Property("CreationTime") .HasColumnType("datetime2") .HasColumnName("CreationTime"); @@ -7688,44 +8304,13 @@ namespace Win_in.Sfs.Wms.Store.Migrations .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("DirectCreateNote") + .HasColumnType("bit"); 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"); @@ -7737,46 +8322,22 @@ namespace Win_in.Sfs.Wms.Store.Migrations 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)"); + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); b.Property("Remark") .HasMaxLength(3072) .HasColumnType("nvarchar(3072)") .HasColumnName("Remark"); - b.Property("TenantId") - .HasColumnType("uniqueidentifier") - .HasColumnName("TenantId"); - - b.Property("UpStreamJobNumber") + b.Property("RequestStatus") + .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)"); - b.Property("WarehouseCode") - .HasColumnType("nvarchar(max)"); - - b.Property("WorkGroupCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); b.Property("Worker") .HasColumnType("nvarchar(max)"); @@ -7786,23 +8347,14 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.HasIndex("Number") .IsUnique(); - b.ToTable("Job_JisDeliverJob", (string)null); + b.ToTable("Store_ItemTransformRequest", (string)null); }); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.JisDeliverJobDetail", b => + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ItemTransformRequestDetail", 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"); @@ -7811,28 +8363,84 @@ namespace Win_in.Sfs.Wms.Store.Migrations .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)"); + .HasColumnType("nvarchar(64)") + .HasColumnName("FromLocationArea"); b.Property("FromLocationCode") + .IsRequired() .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + .HasColumnType("nvarchar(64)") + .HasColumnName("FromLocationCode"); b.Property("FromLocationErpCode") + .IsRequired() .HasMaxLength(64) - .HasColumnType("nvarchar(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("FromWarehouseCode") + b.Property("FromSupplierBatch") .HasMaxLength(64) .HasColumnType("nvarchar(64)"); - b.Property("ItemQty") - .HasColumnType("decimal(18,6)"); + 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") @@ -7846,6 +8454,12 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier"); b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("ReasonCode") .HasColumnType("nvarchar(max)"); b.Property("Remark") @@ -7853,54 +8467,126 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("nvarchar(3072)") .HasColumnName("Remark"); - b.Property("Status") - .IsRequired() - .HasColumnType("nvarchar(max)"); - b.Property("TenantId") .HasColumnType("uniqueidentifier") .HasColumnName("TenantId"); - b.Property("ToLocationArea") + 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("ToLocationCode") + b.Property("ToItemDesc1") .HasMaxLength(64) .HasColumnType("nvarchar(64)"); - b.Property("ToLocationErpCode") + b.Property("ToItemDesc2") .HasMaxLength(64) .HasColumnType("nvarchar(64)"); - b.Property("ToLocationGroup") + b.Property("ToItemName") .HasMaxLength(64) .HasColumnType("nvarchar(64)"); - b.Property("ToWarehouseCode") + b.Property("ToLocationArea") .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + .HasColumnType("nvarchar(64)") + .HasColumnName("ToLocationArea"); - b.HasKey("Id"); + b.Property("ToLocationCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToLocationCode"); - b.HasIndex("MasterID"); + b.Property("ToLocationErpCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToLocationErpCode"); - b.ToTable("Job_JisDeliverJobDetail", (string)null); - }); + b.Property("ToLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToLocationGroup"); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.JisDeliverNote", b => - { - b.Property("Id") - .HasColumnType("uniqueidentifier"); + b.Property("ToLot") + .HasColumnType("nvarchar(max)"); - b.Property("ActiveDate") - .HasColumnType("datetime2"); + b.Property("ToPackingCode") + .HasColumnType("nvarchar(450)"); - b.Property("ArrivalTime") + b.Property("ToProduceDate") .HasColumnType("datetime2"); - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() + 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"); @@ -7917,29 +8603,42 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnName("CreatorId"); b.Property("Customer") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + .HasColumnType("nvarchar(max)"); b.Property("CustomerAddressCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + .HasColumnType("nvarchar(max)"); - b.Property("DeliverTime") - .HasColumnType("datetime2"); + 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("JobNumber") + b.Property("JobDescription") + .HasMaxLength(1024) + .HasColumnType("nvarchar(1024)"); + + b.Property("JobStatus") + .IsRequired() .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("JobNumber"); + .HasColumnType("nvarchar(64)"); + + b.Property("JobType") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); b.Property("LastModificationTime") .HasColumnType("datetime2") @@ -7952,8 +8651,23 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.Property("Number") .IsRequired() .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("Number"); + .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)"); @@ -7967,9 +8681,17 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("TenantId"); - b.Property("TotalPackCapacity") + 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)"); @@ -7978,16 +8700,22 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.HasIndex("Number") .IsUnique(); - b.ToTable("Store_JisDeliverNote", (string)null); + b.ToTable("Job_JisDeliverJob", (string)null); }); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.JisDeliverNoteDetail", b => + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.JisDeliverJobDetail", b => { b.Property("Id") .HasColumnType("uniqueidentifier"); - b.Property("ArriveDate") - .HasColumnType("datetime2"); + b.Property("ContainerCode") + .HasColumnType("nvarchar(max)"); + + b.Property("ContainerDesc") + .HasColumnType("nvarchar(max)"); + + b.Property("ContainerName") + .HasColumnType("nvarchar(max)"); b.Property("CreationTime") .HasColumnType("datetime2") @@ -7997,77 +8725,28 @@ namespace Win_in.Sfs.Wms.Store.Migrations .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"); + .HasColumnType("nvarchar(64)"); b.Property("FromLocationCode") - .IsRequired() .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("FromLocationCode"); + .HasColumnType("nvarchar(64)"); b.Property("FromLocationErpCode") - .IsRequired() .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("FromLocationErpCode"); + .HasColumnType("nvarchar(64)"); 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"); + .HasColumnType("nvarchar(64)"); - b.Property("ItemName") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ItemName"); + b.Property("ItemQty") + .HasColumnType("decimal(18,6)"); b.Property("LastModificationTime") .HasColumnType("datetime2") @@ -8081,123 +8760,49 @@ namespace Win_in.Sfs.Wms.Store.Migrations .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") + b.Property("Status") + .IsRequired() .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"); + .HasColumnType("nvarchar(64)"); b.Property("ToLocationCode") - .IsRequired() .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ToLocationCode"); + .HasColumnType("nvarchar(64)"); b.Property("ToLocationErpCode") - .IsRequired() .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ToLocationErpCode"); + .HasColumnType("nvarchar(64)"); b.Property("ToLocationGroup") .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ToLocationGroup"); - - b.Property("ToLot") - .HasColumnType("nvarchar(max)"); - - b.Property("ToPackingCode") - .HasColumnType("nvarchar(max)"); - - b.Property("ToStatus") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(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)"); + .HasColumnType("nvarchar(64)"); b.HasKey("Id"); b.HasIndex("MasterID"); - b.HasIndex("Number", "FromPackingCode", "FromLocationCode", "ToLocationCode") - .IsUnique() - .HasFilter("[FromPackingCode] IS NOT NULL"); - - b.ToTable("Store_JisDeliverNoteDetail", (string)null); + b.ToTable("Job_JisDeliverJobDetail", (string)null); }); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.JisProductReceiptNote", b => + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.JisDeliverNote", b => { b.Property("Id") .HasColumnType("uniqueidentifier"); @@ -8205,7 +8810,7 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.Property("ActiveDate") .HasColumnType("datetime2"); - b.Property("CompleteTime") + b.Property("ArrivalTime") .HasColumnType("datetime2"); b.Property("ConcurrencyStamp") @@ -8225,6 +8830,19 @@ namespace Win_in.Sfs.Wms.Store.Migrations .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"); @@ -8245,54 +8863,27 @@ namespace Win_in.Sfs.Wms.Store.Migrations .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") + b.Property("ProjectCode") .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") + b.Property("TotalPackCapacity") .HasColumnType("nvarchar(max)"); - b.Property("WorkShop") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - b.Property("Worker") .HasColumnType("nvarchar(max)"); @@ -8301,10 +8892,10 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.HasIndex("Number") .IsUnique(); - b.ToTable("Store_JisProductReceiptNote", (string)null); + b.ToTable("Store_JisDeliverNote", (string)null); }); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.JisProductReceiptNoteDetail", b => + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.JisDeliverNoteDetail", b => { b.Property("Id") .HasColumnType("uniqueidentifier"); @@ -8312,15 +8903,6 @@ namespace Win_in.Sfs.Wms.Store.Migrations 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"); @@ -8329,64 +8911,85 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("CreatorId"); + b.Property("DeliverTime") + .HasColumnType("datetime2"); + b.Property("ExpireDate") .HasColumnType("datetime2"); - b.Property("ItemCode") - .IsRequired() + b.Property("ExpiredTime") + .HasColumnType("datetime2"); + + b.Property("FromContainerCode") + .HasColumnType("nvarchar(max)"); + + b.Property("FromLocationArea") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("ItemCode"); + .HasColumnName("FromLocationArea"); - b.Property("ItemDesc1") + b.Property("FromLocationCode") + .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("ItemDesc1"); + .HasColumnName("FromLocationCode"); - b.Property("ItemDesc2") + b.Property("FromLocationErpCode") + .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("ItemDesc2"); + .HasColumnName("FromLocationErpCode"); - b.Property("ItemName") + b.Property("FromLocationGroup") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("ItemName"); + .HasColumnName("FromLocationGroup"); - b.Property("LastModificationTime") - .HasColumnType("datetime2") - .HasColumnName("LastModificationTime"); + b.Property("FromLot") + .HasColumnType("nvarchar(max)"); - b.Property("LastModifierId") - .HasColumnType("uniqueidentifier") - .HasColumnName("LastModifierId"); + b.Property("FromPackingCode") + .HasColumnType("nvarchar(450)"); - b.Property("LocationArea") + b.Property("FromStatus") + .IsRequired() .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("LocationArea"); + .HasColumnType("nvarchar(64)"); - b.Property("LocationCode") + b.Property("FromWarehouseCode") .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("LocationCode"); + .HasColumnName("FromWarehouseCode"); - b.Property("LocationErpCode") + b.Property("ItemCode") .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("LocationErpCode"); + .HasColumnName("ItemCode"); - b.Property("LocationGroup") + b.Property("ItemDesc1") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("LocationGroup"); + .HasColumnName("ItemDesc1"); - b.Property("Lot") + b.Property("ItemDesc2") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("Lot"); + .HasColumnName("ItemDesc2"); + + b.Property("ItemName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemName"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); b.Property("MasterID") .HasColumnType("uniqueidentifier"); @@ -8397,19 +9000,14 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("nvarchar(64)") .HasColumnName("Number"); - b.Property("PackingCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("PackingCode"); + b.Property("OnlineType") + .HasColumnType("nvarchar(max)"); - b.Property("Position") + b.Property("PackCapacity") .HasColumnType("nvarchar(max)"); - b.Property("ProdLine") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + b.Property("Position") + .HasColumnType("nvarchar(max)"); b.Property("ProduceDate") .HasColumnType("datetime2"); @@ -8425,11 +9023,6 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("decimal(18,6)") .HasColumnName("Qty"); - b.Property("RawLocationCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - b.Property("Remark") .HasMaxLength(3072) .HasColumnType("nvarchar(3072)") @@ -8438,10 +9031,8 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.Property("SeqNo") .HasColumnType("nvarchar(max)"); - b.Property("Status") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + b.Property("Stage") + .HasColumnType("nvarchar(max)"); b.Property("StdPackQty") .HasColumnType("decimal(18,6)"); @@ -8455,17 +9046,56 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("TenantId"); - b.Property("Uom") + b.Property("ToContainerCode") + .HasColumnType("nvarchar(max)"); + + b.Property("ToLocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToLocationArea"); + + b.Property("ToLocationCode") .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("Uom"); + .HasColumnName("ToLocationCode"); - b.Property("WarehouseCode") + b.Property("ToLocationErpCode") .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("WarehouseCode"); + .HasColumnName("ToLocationErpCode"); + + b.Property("ToLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToLocationGroup"); + + b.Property("ToLot") + .HasColumnType("nvarchar(max)"); + + b.Property("ToPackingCode") + .HasColumnType("nvarchar(max)"); + + b.Property("ToStatus") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ToWarehouseCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToWarehouseCode"); + + b.Property("Uom") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Uom"); + + b.Property("UsedFor") + .HasColumnType("nvarchar(max)"); b.Property("Year") .HasColumnType("nvarchar(max)"); @@ -8474,13 +9104,14 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.HasIndex("MasterID"); - b.HasIndex("Number", "PackingCode") - .IsUnique(); + b.HasIndex("Number", "FromPackingCode", "FromLocationCode", "ToLocationCode") + .IsUnique() + .HasFilter("[FromPackingCode] IS NOT NULL"); - b.ToTable("Store_JisProductReceiptNoteDetail", (string)null); + b.ToTable("Store_JisDeliverNoteDetail", (string)null); }); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.MaterialRequest", b => + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.JisProductReceiptNote", b => { b.Property("Id") .HasColumnType("uniqueidentifier"); @@ -8488,17 +9119,8 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.Property("ActiveDate") .HasColumnType("datetime2"); - b.Property("AutoAgree") - .HasColumnType("bit"); - - b.Property("AutoCompleteJob") - .HasColumnType("bit"); - - b.Property("AutoHandle") - .HasColumnType("bit"); - - b.Property("AutoSubmit") - .HasColumnType("bit"); + b.Property("CompleteTime") + .HasColumnType("datetime2"); b.Property("ConcurrencyStamp") .IsConcurrencyToken() @@ -8506,6 +9128,9 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("nvarchar(40)") .HasColumnName("ConcurrencyStamp"); + b.Property("ContainerQty") + .HasColumnType("decimal(18,6)"); + b.Property("CreationTime") .HasColumnType("datetime2") .HasColumnName("CreationTime"); @@ -8514,13 +9139,18 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("CreatorId"); - b.Property("DirectCreateNote") - .HasColumnType("bit"); - b.Property("ExtraProperties") .HasColumnType("nvarchar(max)") .HasColumnName("ExtraProperties"); + b.Property("ItemQty") + .HasColumnType("decimal(18,6)"); + + b.Property("JobNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("JobNumber"); + b.Property("LastModificationTime") .HasColumnType("datetime2") .HasColumnName("LastModificationTime"); @@ -8529,17 +9159,27 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("LastModifierId"); + b.Property("LocationCode") + .HasColumnType("nvarchar(max)"); + b.Property("Number") .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)") .HasColumnName("Number"); - b.Property("PreparationPlanNumber") + b.Property("ProdLine") + .HasColumnType("nvarchar(max)"); + + b.Property("ProductionPlanNumber") .HasMaxLength(64) .HasColumnType("nvarchar(64)"); - b.Property("ProdLine") + b.Property("RawLocationCode") + .HasColumnType("nvarchar(max)"); + + b.Property("ReceiptType") + .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)"); @@ -8548,42 +9188,53 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("nvarchar(3072)") .HasColumnName("Remark"); - b.Property("RequestStatus") - .IsRequired() + b.Property("Shift") .HasMaxLength(64) .HasColumnType("nvarchar(64)"); + b.Property("SourceNumber") + .HasColumnType("nvarchar(max)"); + b.Property("TenantId") .HasColumnType("uniqueidentifier") .HasColumnName("TenantId"); - b.Property("Type") + b.Property("WarehouseCode") + .HasColumnType("nvarchar(max)"); + + b.Property("WorkShop") + .IsRequired() .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); + b.ToTable("Store_JisProductReceiptNote", (string)null); }); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.MaterialRequestDetail", b => + 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"); @@ -8592,16 +9243,9 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("CreatorId"); - b.Property("ExpiredTime") + b.Property("ExpireDate") .HasColumnType("datetime2"); - b.Property("FromLocationArea") - .HasColumnType("nvarchar(max)"); - - b.Property("IssuedQty") - .HasPrecision(18, 6) - .HasColumnType("decimal(18,6)"); - b.Property("ItemCode") .IsRequired() .HasMaxLength(64) @@ -8631,6 +9275,33 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("LastModifierId"); + b.Property("LocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationArea"); + + b.Property("LocationCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationCode"); + + b.Property("LocationErpCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationErpCode"); + + b.Property("LocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationGroup"); + + b.Property("Lot") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Lot"); + b.Property("MasterID") .HasColumnType("uniqueidentifier"); @@ -8640,24 +9311,47 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("nvarchar(64)") .HasColumnName("Number"); + b.Property("PackingCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("PackingCode"); + + b.Property("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("ReceivedQty") - .HasPrecision(18, 6) - .HasColumnType("decimal(18,6)"); + 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) @@ -8666,58 +9360,41 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.Property("StdPackQty") .HasColumnType("decimal(18,6)"); + b.Property("SupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("SupplierBatch"); + b.Property("TenantId") .HasColumnType("uniqueidentifier") .HasColumnName("TenantId"); - b.Property("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") + b.Property("WarehouseCode") + .IsRequired() .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + .HasColumnType("nvarchar(64)") + .HasColumnName("WarehouseCode"); - b.HasKey("Id"); + b.Property("Year") + .HasColumnType("nvarchar(max)"); - b.HasIndex("ItemCode"); + b.HasKey("Id"); b.HasIndex("MasterID"); - b.HasIndex("Number", "ItemCode", "ToLocationCode") + b.HasIndex("Number", "PackingCode") .IsUnique(); - b.ToTable("Store_MaterialRequestDetail", (string)null); + b.ToTable("Store_JisProductReceiptNoteDetail", (string)null); }); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.NoOkConvertOkNote", b => + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.MaterialRequest", b => { b.Property("Id") .HasColumnType("uniqueidentifier"); @@ -8725,6 +9402,18 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.Property("ActiveDate") .HasColumnType("datetime2"); + b.Property("AutoAgree") + .HasColumnType("bit"); + + b.Property("AutoCompleteJob") + .HasColumnType("bit"); + + b.Property("AutoHandle") + .HasColumnType("bit"); + + b.Property("AutoSubmit") + .HasColumnType("bit"); + b.Property("ConcurrencyStamp") .IsConcurrencyToken() .HasMaxLength(40) @@ -8739,6 +9428,9 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("CreatorId"); + b.Property("DirectCreateNote") + .HasColumnType("bit"); + b.Property("ExtraProperties") .HasColumnType("nvarchar(max)") .HasColumnName("ExtraProperties"); @@ -8757,34 +9449,55 @@ namespace Win_in.Sfs.Wms.Store.Migrations .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_NoOkConvertOkNote", (string)null); + b.ToTable("Store_MaterialRequest", (string)null); }); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.NoOkConvertOkNoteDetail", b => + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.MaterialRequestDetail", b => { b.Property("Id") .HasColumnType("uniqueidentifier"); - b.Property("ArriveDate") - .HasColumnType("datetime2"); - b.Property("CreationTime") .HasColumnType("datetime2") .HasColumnName("CreationTime"); @@ -8793,36 +9506,245 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("CreatorId"); - b.Property("ExpireDate") + b.Property("ExpiredTime") .HasColumnType("datetime2"); - b.Property("FromContainerCode") + b.Property("FromLocationArea") .HasColumnType("nvarchar(max)"); - b.Property("FromLocationArea") + b.Property("IssuedQty") + .HasPrecision(18, 6) + .HasColumnType("decimal(18,6)"); + + b.Property("ItemCode") + .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("FromLocationArea"); + .HasColumnName("ItemCode"); - b.Property("FromLocationCode") - .IsRequired() + b.Property("ItemDesc1") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("FromLocationCode"); + .HasColumnName("ItemDesc1"); - b.Property("FromLocationErpCode") - .IsRequired() + b.Property("ItemDesc2") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("FromLocationErpCode"); + .HasColumnName("ItemDesc2"); - b.Property("FromLocationGroup") + b.Property("ItemName") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("FromLocationGroup"); + .HasColumnName("ItemName"); - b.Property("FromLot") - .HasColumnType("nvarchar(max)"); + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("MasterID") + .HasColumnType("uniqueidentifier"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("PositionCode") + .HasColumnType("nvarchar(max)"); + + b.Property("ProdLine") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Qty") + .HasPrecision(18, 6) + .HasColumnType("decimal(18,6)") + .HasColumnName("Qty"); + + b.Property("ReceivedQty") + .HasPrecision(18, 6) + .HasColumnType("decimal(18,6)"); + + b.Property("RecommendType") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("Status") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("StdPackQty") + .HasColumnType("decimal(18,6)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("ToLocationArea") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ToLocationCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ToLocationErpCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ToLocationGroup") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ToWarehouseCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Uom") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Uom"); + + b.Property("WorkStation") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.HasKey("Id"); + + b.HasIndex("ItemCode"); + + b.HasIndex("MasterID"); + + b.HasIndex("Number", "ItemCode", "ToLocationCode") + .IsUnique(); + + b.ToTable("Store_MaterialRequestDetail", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.NoOkConvertOkNote", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ActiveDate") + .HasColumnType("datetime2"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Worker") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("Number") + .IsUnique(); + + b.ToTable("Store_NoOkConvertOkNote", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.NoOkConvertOkNoteDetail", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ArriveDate") + .HasColumnType("datetime2"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("ExpireDate") + .HasColumnType("datetime2"); + + b.Property("FromContainerCode") + .HasColumnType("nvarchar(max)"); + + b.Property("FromLocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromLocationArea"); + + b.Property("FromLocationCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromLocationCode"); + + b.Property("FromLocationErpCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromLocationErpCode"); + + b.Property("FromLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromLocationGroup"); + + b.Property("FromLot") + .HasColumnType("nvarchar(max)"); b.Property("FromPackingCode") .HasColumnType("nvarchar(450)"); @@ -11732,22 +12654,36 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.ToTable("Job_ProductReceiveJobDetail", (string)null); }); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ProductRecycleMaterialDetail", b => + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ProductRecycleJob", b => { b.Property("Id") .HasColumnType("uniqueidentifier"); - b.Property("ArriveDate") + b.Property("AcceptTime") .HasColumnType("datetime2"); - b.Property("BomVersion") + b.Property("AcceptUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("AcceptUserName") .HasMaxLength(64) .HasColumnType("nvarchar(64)"); - b.Property("ContainerCode") + b.Property("CompleteTime") + .HasColumnType("datetime2"); + + b.Property("CompleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CompleteUserName") .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ContainerCode"); + .HasColumnType("nvarchar(64)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); b.Property("CreationTime") .HasColumnType("datetime2") @@ -11757,19 +12693,842 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("CreatorId"); - b.Property("ExpireDate") - .HasColumnType("datetime2"); + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); - b.Property("ItemCode") + b.Property("IsAutoComplete") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false); + + b.Property("JobDescription") + .HasMaxLength(1024) + .HasColumnType("nvarchar(1024)"); + + b.Property("JobStatus") .IsRequired() .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ItemCode"); + .HasColumnType("nvarchar(64)"); - b.Property("ItemDesc1") + b.Property("JobType") + .IsRequired() .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ItemDesc1"); + .HasColumnType("nvarchar(64)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Priority") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasDefaultValue(0); + + b.Property("PriorityIncrement") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasDefaultValue(0); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("Shift") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("UpStreamJobNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("WarehouseCode") + .HasColumnType("nvarchar(max)"); + + b.Property("WorkGroupCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Worker") + .HasColumnType("nvarchar(max)"); + + b.Property("Workshop") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.HasKey("Id"); + + b.HasIndex("Number") + .IsUnique(); + + b.ToTable("Job_ProductRecycleJob", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ProductRecycleJobDetail", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("BomVersion") + .HasColumnType("nvarchar(max)"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("HandledArriveDate") + .HasColumnType("datetime2"); + + b.Property("HandledContainerCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledContainerCode"); + + b.Property("HandledExpireDate") + .HasColumnType("datetime2"); + + b.Property("HandledLot") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledLot"); + + b.Property("HandledPackingCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledPackingCode"); + + b.Property("HandledProduceDate") + .HasColumnType("datetime2"); + + b.Property("HandledQty") + .HasColumnType("decimal(18,6)"); + + b.Property("HandledSupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledSupplierBatch"); + + b.Property("HandledToLocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledToLocationArea"); + + b.Property("HandledToLocationCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledToLocationCode"); + + b.Property("HandledToLocationErpCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledToLocationErpCode"); + + b.Property("HandledToLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledToLocationGroup"); + + b.Property("HandledToWarehouseCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledToWarehouseCode"); + + b.Property("ItemCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemCode"); + + b.Property("ItemDesc1") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc1"); + + b.Property("ItemDesc2") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc2"); + + b.Property("ItemName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemName"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("LocationArea") + .HasColumnType("nvarchar(max)"); + + b.Property("LocationCode") + .HasColumnType("nvarchar(max)"); + + b.Property("LocationErpCode") + .HasColumnType("nvarchar(max)"); + + b.Property("LocationGroup") + .HasColumnType("nvarchar(max)"); + + b.Property("MasterID") + .HasColumnType("uniqueidentifier"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Qty") + .HasColumnType("decimal(18,6)"); + + b.Property("RawLocationArea") + .HasColumnType("nvarchar(max)"); + + b.Property("RawLocationCode") + .HasColumnType("nvarchar(max)"); + + b.Property("RawLocationErpCode") + .HasColumnType("nvarchar(max)"); + + b.Property("RawLocationGroup") + .HasColumnType("nvarchar(max)"); + + b.Property("RawWarehouseCode") + .HasColumnType("nvarchar(max)"); + + b.Property("RecommendArriveDate") + .HasColumnType("datetime2"); + + b.Property("RecommendContainerCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendContainerCode"); + + b.Property("RecommendExpireDate") + .HasColumnType("datetime2"); + + b.Property("RecommendLot") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendLot"); + + b.Property("RecommendPackingCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendPackingCode"); + + b.Property("RecommendProduceDate") + .HasColumnType("datetime2"); + + b.Property("RecommendQty") + .HasColumnType("decimal(18,6)"); + + b.Property("RecommendSupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendSupplierBatch"); + + b.Property("RecommendToLocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendToLocationArea"); + + b.Property("RecommendToLocationCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendToLocationCode"); + + b.Property("RecommendToLocationErpCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendToLocationErpCode"); + + b.Property("RecommendToLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendToLocationGroup"); + + b.Property("RecommendToWarehouseCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendToWarehouseCode"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("Status") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("StdPackQty") + .HasColumnType("decimal(18,6)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Uom") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("WarehouseCode") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("MasterID"); + + b.ToTable("Job_ProductRecycleJobDetail", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ProductRecycleMaterialDetail", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ArriveDate") + .HasColumnType("datetime2"); + + b.Property("BomVersion") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ContainerCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ContainerCode"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("ExpireDate") + .HasColumnType("datetime2"); + + b.Property("ItemCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemCode"); + + b.Property("ItemDesc1") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc1"); + + b.Property("ItemDesc2") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc2"); + + b.Property("ItemName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemName"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("LocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationArea"); + + b.Property("LocationCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationCode"); + + b.Property("LocationErpCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationErpCode"); + + b.Property("LocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationGroup"); + + b.Property("Lot") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Lot"); + + b.Property("MasterID") + .HasColumnType("uniqueidentifier"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("PackingCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("PackingCode"); + + b.Property("ProduceDate") + .HasColumnType("datetime2"); + + b.Property("ProductItemCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ProductItemDesc1") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ProductItemDesc2") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ProductItemName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ProductLot") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ProductPackingCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Qty") + .HasPrecision(18, 6) + .HasColumnType("decimal(18,6)") + .HasColumnName("Qty"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("Status") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("StdPackQty") + .HasColumnType("decimal(18,6)"); + + b.Property("SupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("SupplierBatch"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Uom") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Uom"); + + b.Property("WarehouseCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("WarehouseCode"); + + b.HasKey("Id"); + + b.HasIndex("MasterID"); + + b.HasIndex("Number", "ProductItemCode", "ItemCode"); + + b.ToTable("Store_ProductRecycleMaterialDetail", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ProductRecycleNote", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ActiveDate") + .HasColumnType("datetime2"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("RecycleTime") + .HasColumnType("datetime2"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("RequestNumber") + .HasColumnType("nvarchar(max)"); + + b.Property("Shift") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Worker") + .HasColumnType("nvarchar(max)"); + + b.Property("Workshop") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.HasKey("Id"); + + b.HasIndex("Number") + .IsUnique(); + + b.ToTable("Store_ProductRecycleNote", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ProductRecycleNoteDetail", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ArriveDate") + .HasColumnType("datetime2"); + + b.Property("ContainerCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ContainerCode"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("ExpireDate") + .HasColumnType("datetime2"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("ItemCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemCode"); + + b.Property("ItemDesc1") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc1"); + + b.Property("ItemDesc2") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc2"); + + b.Property("ItemName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemName"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("LocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationArea"); + + b.Property("LocationCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationCode"); + + b.Property("LocationErpCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationErpCode"); + + b.Property("LocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationGroup"); + + b.Property("Lot") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Lot"); + + b.Property("MasterID") + .HasColumnType("uniqueidentifier"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("PackingCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("PackingCode"); + + b.Property("ProduceDate") + .HasColumnType("datetime2"); + + b.Property("Qty") + .HasPrecision(18, 6) + .HasColumnType("decimal(18,6)") + .HasColumnName("Qty"); + + b.Property("ReasonCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("Status") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("StdPackQty") + .HasColumnType("decimal(18,6)"); + + b.Property("SupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("SupplierBatch"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Uom") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Uom"); + + b.Property("WarehouseCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("WarehouseCode"); + + b.HasKey("Id"); + + b.HasIndex("MasterID"); + + b.HasIndex("Number", "ItemCode") + .IsUnique(); + + b.ToTable("Store_ProductRecycleNoteDetail", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ProductRecycleRequest", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ActiveDate") + .HasColumnType("datetime2"); + + b.Property("AutoAgree") + .HasColumnType("bit"); + + b.Property("AutoCompleteJob") + .HasColumnType("bit"); + + b.Property("AutoHandle") + .HasColumnType("bit"); + + b.Property("AutoSubmit") + .HasColumnType("bit"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DirectCreateNote") + .HasColumnType("bit"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("RequestStatus") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Shift") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Worker") + .HasColumnType("nvarchar(max)"); + + b.Property("Workshop") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.HasKey("Id"); + + b.HasIndex("Number") + .IsUnique(); + + b.ToTable("Store_ProductRecycleRequest", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ProductRecycleRequestDetail", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("BomVersion") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("ItemCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemCode"); + + b.Property("ItemDesc1") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc1"); b.Property("ItemDesc2") .HasMaxLength(64) @@ -11811,11 +13570,6 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("nvarchar(64)") .HasColumnName("LocationGroup"); - b.Property("Lot") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("Lot"); - b.Property("MasterID") .HasColumnType("uniqueidentifier"); @@ -11825,44 +13579,31 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("nvarchar(64)") .HasColumnName("Number"); - b.Property("PackingCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("PackingCode"); - - b.Property("ProduceDate") - .HasColumnType("datetime2"); - - b.Property("ProductItemCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + b.Property("Qty") + .HasPrecision(18, 6) + .HasColumnType("decimal(18,6)") + .HasColumnName("Qty"); - b.Property("ProductItemDesc1") + b.Property("RawLocationArea") .HasMaxLength(64) .HasColumnType("nvarchar(64)"); - b.Property("ProductItemDesc2") + b.Property("RawLocationCode") .HasMaxLength(64) .HasColumnType("nvarchar(64)"); - b.Property("ProductItemName") + b.Property("RawLocationErpCode") .HasMaxLength(64) .HasColumnType("nvarchar(64)"); - b.Property("ProductLot") + b.Property("RawLocationGroup") .HasMaxLength(64) .HasColumnType("nvarchar(64)"); - b.Property("ProductPackingCode") + b.Property("RawWarehouseCode") .HasMaxLength(64) .HasColumnType("nvarchar(64)"); - b.Property("Qty") - .HasPrecision(18, 6) - .HasColumnType("decimal(18,6)") - .HasColumnName("Qty"); - b.Property("Remark") .HasMaxLength(3072) .HasColumnType("nvarchar(3072)") @@ -11873,14 +13614,6 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasMaxLength(64) .HasColumnType("nvarchar(64)"); - b.Property("StdPackQty") - .HasColumnType("decimal(18,6)"); - - b.Property("SupplierBatch") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("SupplierBatch"); - b.Property("TenantId") .HasColumnType("uniqueidentifier") .HasColumnName("TenantId"); @@ -11901,12 +13634,13 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.HasIndex("MasterID"); - b.HasIndex("Number", "ProductItemCode", "ItemCode"); + b.HasIndex("Number", "ItemCode") + .IsUnique(); - b.ToTable("Store_ProductRecycleMaterialDetail", (string)null); + b.ToTable("Store_ProductRecycleRequestDetail", (string)null); }); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ProductRecycleNote", b => + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.PurchaseOrder", b => { b.Property("Id") .HasColumnType("uniqueidentifier"); @@ -11920,6 +13654,18 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("nvarchar(40)") .HasColumnName("ConcurrencyStamp"); + b.Property("ContactEmail") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ContactName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ContactPhone") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + b.Property("CreationTime") .HasColumnType("datetime2") .HasColumnName("CreationTime"); @@ -11928,10 +13674,18 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("CreatorId"); + b.Property("DueDate") + .HasColumnType("datetime2"); + b.Property("ExtraProperties") .HasColumnType("nvarchar(max)") .HasColumnName("ExtraProperties"); + b.Property("IsConsignment") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false); + b.Property("LastModificationTime") .HasColumnType("datetime2") .HasColumnName("LastModificationTime"); @@ -11946,52 +13700,66 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("nvarchar(64)") .HasColumnName("Number"); - b.Property("RecycleTime") + b.Property("OrderDate") .HasColumnType("datetime2"); + b.Property("OrderStatus") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("PoType") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + b.Property("Remark") .HasMaxLength(3072) .HasColumnType("nvarchar(3072)") .HasColumnName("Remark"); - b.Property("RequestNumber") + b.Property("SupplierAddress") .HasColumnType("nvarchar(max)"); - b.Property("Shift") + b.Property("SupplierCode") .HasMaxLength(64) .HasColumnType("nvarchar(64)"); + b.Property("SupplierName") + .HasColumnType("nvarchar(max)"); + + b.Property("TaxRate") + .ValueGeneratedOnAdd() + .HasColumnType("decimal(18,6)") + .HasDefaultValue(0m); + b.Property("TenantId") .HasColumnType("uniqueidentifier") .HasColumnName("TenantId"); - b.Property("Worker") - .HasColumnType("nvarchar(max)"); - - b.Property("Workshop") + b.Property("Version") .HasMaxLength(64) .HasColumnType("nvarchar(64)"); + b.Property("Worker") + .HasColumnType("nvarchar(max)"); + b.HasKey("Id"); b.HasIndex("Number") .IsUnique(); - b.ToTable("Store_ProductRecycleNote", (string)null); + b.ToTable("Store_PurchaseOrder", (string)null); }); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ProductRecycleNoteDetail", b => + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.PurchaseOrderDetail", b => { b.Property("Id") .HasColumnType("uniqueidentifier"); - b.Property("ArriveDate") - .HasColumnType("datetime2"); - - b.Property("ContainerCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ContainerCode"); + b.Property("ConvertRate") + .ValueGeneratedOnAdd() + .HasColumnType("decimal(18,6)") + .HasDefaultValue(1m); b.Property("CreationTime") .HasColumnType("datetime2") @@ -12001,12 +13769,16 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("CreatorId"); + b.Property("Ctype") + .HasColumnType("nvarchar(max)"); + b.Property("ExpireDate") .HasColumnType("datetime2"); - b.Property("ExtraProperties") - .HasColumnType("nvarchar(max)") - .HasColumnName("ExtraProperties"); + b.Property("IsConsignment") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false); b.Property("ItemCode") .IsRequired() @@ -12037,32 +13809,17 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("LastModifierId"); - b.Property("LocationArea") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("LocationArea"); - - b.Property("LocationCode") + b.Property("LineStatus") .IsRequired() .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("LocationCode"); + .HasColumnType("nvarchar(64)"); b.Property("LocationErpCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("LocationErpCode"); - - b.Property("LocationGroup") .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("LocationGroup"); + .HasColumnType("nvarchar(64)"); b.Property("Lot") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("Lot"); + .HasColumnType("nvarchar(max)"); b.Property("MasterID") .HasColumnType("uniqueidentifier"); @@ -12073,41 +13830,56 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("nvarchar(64)") .HasColumnName("Number"); - b.Property("PackingCode") - .IsRequired() + b.Property("OrderRemark") + .HasColumnType("nvarchar(max)"); + + b.Property("PlanArriveDate") + .HasColumnType("datetime2"); + + b.Property("PlanUserCode") + .HasColumnType("nvarchar(max)"); + + b.Property("PoLine") .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("PackingCode"); + .HasColumnType("nvarchar(64)"); b.Property("ProduceDate") .HasColumnType("datetime2"); + b.Property("ProjectCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("PutAwayQty") + .HasColumnType("decimal(18,6)"); + b.Property("Qty") .HasPrecision(18, 6) .HasColumnType("decimal(18,6)") .HasColumnName("Qty"); - b.Property("ReasonCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + b.Property("ReceivedQty") + .HasColumnType("decimal(18,6)"); b.Property("Remark") .HasMaxLength(3072) .HasColumnType("nvarchar(3072)") .HasColumnName("Remark"); - b.Property("Status") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + b.Property("ReturnedQty") + .HasColumnType("decimal(18,6)"); + + b.Property("ShippedQty") + .HasColumnType("decimal(18,6)"); b.Property("StdPackQty") .HasColumnType("decimal(18,6)"); - b.Property("SupplierBatch") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("SupplierBatch"); + b.Property("SupplierPackQty") + .HasColumnType("decimal(18,6)"); + + b.Property("SupplierPackUom") + .HasColumnType("nvarchar(max)"); b.Property("TenantId") .HasColumnType("uniqueidentifier") @@ -12119,41 +13891,45 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("nvarchar(64)") .HasColumnName("Uom"); - b.Property("WarehouseCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("WarehouseCode"); - b.HasKey("Id"); b.HasIndex("MasterID"); - b.HasIndex("Number", "ItemCode") - .IsUnique(); + b.HasIndex("ItemCode", "Number", "PoLine") + .IsUnique() + .HasFilter("[PoLine] IS NOT NULL"); - b.ToTable("Store_ProductRecycleNoteDetail", (string)null); + b.ToTable("Store_PurchaseOrderDetail", (string)null); }); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ProductRecycleRequest", b => + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.PurchaseReceiptJob", b => { b.Property("Id") .HasColumnType("uniqueidentifier"); - b.Property("ActiveDate") + b.Property("AcceptTime") .HasColumnType("datetime2"); - b.Property("AutoAgree") - .HasColumnType("bit"); + b.Property("AcceptUserId") + .HasColumnType("uniqueidentifier"); - b.Property("AutoCompleteJob") - .HasColumnType("bit"); + b.Property("AcceptUserName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); - b.Property("AutoHandle") - .HasColumnType("bit"); + b.Property("AsnNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); - b.Property("AutoSubmit") - .HasColumnType("bit"); + b.Property("CompleteTime") + .HasColumnType("datetime2"); + + b.Property("CompleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CompleteUserName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); b.Property("ConcurrencyStamp") .IsConcurrencyToken() @@ -12169,12 +13945,28 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("CreatorId"); - b.Property("DirectCreateNote") - .HasColumnType("bit"); + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("IsAutoComplete") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false); + + b.Property("JobDescription") + .HasMaxLength(1024) + .HasColumnType("nvarchar(1024)"); + + b.Property("JobStatus") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); - b.Property("ExtraProperties") - .HasColumnType("nvarchar(max)") - .HasColumnName("ExtraProperties"); + b.Property("JobType") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); b.Property("LastModificationTime") .HasColumnType("datetime2") @@ -12187,20 +13979,47 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.Property("Number") .IsRequired() .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("Number"); + .HasColumnType("nvarchar(64)"); + + b.Property("PlanArriveDate") + .HasColumnType("datetime2"); + + b.Property("PoNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Priority") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasDefaultValue(0); + + b.Property("PriorityIncrement") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasDefaultValue(0); + + b.Property("PurchaseReceiptRequestNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); b.Property("Remark") .HasMaxLength(3072) .HasColumnType("nvarchar(3072)") .HasColumnName("Remark"); - b.Property("RequestStatus") + b.Property("RpNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("SupplierAddress") + .HasColumnType("nvarchar(max)"); + + b.Property("SupplierCode") .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)"); - b.Property("Shift") + b.Property("SupplierName") .HasMaxLength(64) .HasColumnType("nvarchar(64)"); @@ -12208,29 +14027,44 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("TenantId"); - b.Property("Worker") + b.Property("TimeWindow") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Type") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("UpStreamJobNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("WarehouseCode") .HasColumnType("nvarchar(max)"); - b.Property("Workshop") + b.Property("WorkGroupCode") .HasMaxLength(64) .HasColumnType("nvarchar(64)"); + b.Property("Worker") + .HasColumnType("nvarchar(max)"); + b.HasKey("Id"); b.HasIndex("Number") .IsUnique(); - b.ToTable("Store_ProductRecycleRequest", (string)null); + b.ToTable("Job_PurchaseReceiptJob", (string)null); }); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ProductRecycleRequestDetail", b => + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.PurchaseReceiptJobDetail", b => { b.Property("Id") .HasColumnType("uniqueidentifier"); - b.Property("BomVersion") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + b.Property("ArriveDate") + .HasColumnType("datetime2"); b.Property("CreationTime") .HasColumnType("datetime2") @@ -12240,9 +14074,68 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("CreatorId"); - b.Property("ExtraProperties") - .HasColumnType("nvarchar(max)") - .HasColumnName("ExtraProperties"); + b.Property("FailedReason") + .HasColumnType("nvarchar(max)"); + + b.Property("HandledArriveDate") + .HasColumnType("datetime2"); + + b.Property("HandledContainerCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledContainerCode"); + + b.Property("HandledExpireDate") + .HasColumnType("datetime2"); + + b.Property("HandledLot") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledLot"); + + b.Property("HandledPackingCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledPackingCode"); + + b.Property("HandledProduceDate") + .HasColumnType("datetime2"); + + b.Property("HandledQty") + .HasColumnType("decimal(18,6)"); + + b.Property("HandledSupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledSupplierBatch"); + + b.Property("HandledToLocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledToLocationArea"); + + b.Property("HandledToLocationCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledToLocationCode"); + + b.Property("HandledToLocationErpCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledToLocationErpCode"); + + b.Property("HandledToLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledToLocationGroup"); + + b.Property("HandledToWarehouseCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledToWarehouseCode"); + + b.Property("InspectPhotoJson") + .HasColumnType("nvarchar(max)"); b.Property("ItemCode") .IsRequired() @@ -12273,61 +14166,86 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("LastModifierId"); - b.Property("LocationArea") + b.Property("MassDefect") + .HasColumnType("nvarchar(max)"); + + b.Property("MasterID") + .HasColumnType("uniqueidentifier"); + + b.Property("Number") + .IsRequired() .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("LocationArea"); + .HasColumnType("nvarchar(64)"); - b.Property("LocationCode") + b.Property("PoLine") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("PoNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("PurchaseReceiptInspectStatus") .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("RecommendArriveDate") + .HasColumnType("datetime2"); + + b.Property("RecommendContainerCode") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("LocationCode"); + .HasColumnName("RecommendContainerCode"); - b.Property("LocationErpCode") - .IsRequired() + b.Property("RecommendExpireDate") + .HasColumnType("datetime2"); + + b.Property("RecommendLot") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("LocationErpCode"); + .HasColumnName("RecommendLot"); - b.Property("LocationGroup") + b.Property("RecommendPackingCode") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("LocationGroup"); + .HasColumnName("RecommendPackingCode"); - b.Property("MasterID") - .HasColumnType("uniqueidentifier"); + b.Property("RecommendProduceDate") + .HasColumnType("datetime2"); - b.Property("Number") - .IsRequired() + b.Property("RecommendQty") + .HasColumnType("decimal(18,6)"); + + b.Property("RecommendSupplierBatch") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("Number"); - - b.Property("Qty") - .HasPrecision(18, 6) - .HasColumnType("decimal(18,6)") - .HasColumnName("Qty"); + .HasColumnName("RecommendSupplierBatch"); - b.Property("RawLocationArea") + b.Property("RecommendToLocationArea") .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendToLocationArea"); - b.Property("RawLocationCode") + b.Property("RecommendToLocationCode") .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendToLocationCode"); - b.Property("RawLocationErpCode") + b.Property("RecommendToLocationErpCode") .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendToLocationErpCode"); - b.Property("RawLocationGroup") + b.Property("RecommendToLocationGroup") .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendToLocationGroup"); - b.Property("RawWarehouseCode") + b.Property("RecommendToWarehouseCode") .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendToWarehouseCode"); b.Property("Remark") .HasMaxLength(3072) @@ -12339,33 +14257,30 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasMaxLength(64) .HasColumnType("nvarchar(64)"); + b.Property("StdPackQty") + .HasColumnType("decimal(18,6)"); + + b.Property("SupplierPackQty") + .HasColumnType("decimal(18,6)"); + + b.Property("SupplierPackUom") + .HasColumnType("nvarchar(max)"); + b.Property("TenantId") .HasColumnType("uniqueidentifier") .HasColumnName("TenantId"); b.Property("Uom") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("Uom"); - - b.Property("WarehouseCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("WarehouseCode"); + .HasColumnType("nvarchar(max)"); b.HasKey("Id"); b.HasIndex("MasterID"); - b.HasIndex("Number", "ItemCode") - .IsUnique(); - - b.ToTable("Store_ProductRecycleRequestDetail", (string)null); + b.ToTable("Job_PurchaseReceiptJobDetail", (string)null); }); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.PurchaseOrder", b => + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.PurchaseReceiptNote", b => { b.Property("Id") .HasColumnType("uniqueidentifier"); @@ -12373,24 +14288,16 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.Property("ActiveDate") .HasColumnType("datetime2"); + b.Property("AsnNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + b.Property("ConcurrencyStamp") .IsConcurrencyToken() .HasMaxLength(40) .HasColumnType("nvarchar(40)") .HasColumnName("ConcurrencyStamp"); - b.Property("ContactEmail") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("ContactName") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("ContactPhone") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - b.Property("CreationTime") .HasColumnType("datetime2") .HasColumnName("CreationTime"); @@ -12399,17 +14306,14 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("CreatorId"); - b.Property("DueDate") - .HasColumnType("datetime2"); - b.Property("ExtraProperties") .HasColumnType("nvarchar(max)") .HasColumnName("ExtraProperties"); - b.Property("IsConsignment") - .ValueGeneratedOnAdd() - .HasColumnType("bit") - .HasDefaultValue(false); + b.Property("JobNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("JobNumber"); b.Property("LastModificationTime") .HasColumnType("datetime2") @@ -12425,46 +14329,54 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("nvarchar(64)") .HasColumnName("Number"); - b.Property("OrderDate") - .HasColumnType("datetime2"); - - b.Property("OrderStatus") - .IsRequired() + b.Property("PoNumber") .HasMaxLength(64) .HasColumnType("nvarchar(64)"); - b.Property("PoType") + b.Property("PurchaseReceiptRequestNumber") .HasMaxLength(64) .HasColumnType("nvarchar(64)"); + b.Property("ReceiveTime") + .HasColumnType("datetime2"); + b.Property("Remark") .HasMaxLength(3072) .HasColumnType("nvarchar(3072)") .HasColumnName("Remark"); + b.Property("RpNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Status") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + b.Property("SupplierAddress") .HasColumnType("nvarchar(max)"); b.Property("SupplierCode") + .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)"); b.Property("SupplierName") .HasColumnType("nvarchar(max)"); - b.Property("TaxRate") - .ValueGeneratedOnAdd() - .HasColumnType("decimal(18,6)") - .HasDefaultValue(0m); - b.Property("TenantId") .HasColumnType("uniqueidentifier") .HasColumnName("TenantId"); - b.Property("Version") + b.Property("Type") + .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)"); + b.Property("WarehouseCode") + .HasColumnType("nvarchar(max)"); + b.Property("Worker") .HasColumnType("nvarchar(max)"); @@ -12473,18 +14385,23 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.HasIndex("Number") .IsUnique(); - b.ToTable("Store_PurchaseOrder", (string)null); + b.HasIndex("SupplierCode"); + + b.ToTable("Store_PurchaseReceiptNote", (string)null); }); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.PurchaseOrderDetail", b => + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.PurchaseReceiptNoteDetail", b => { b.Property("Id") .HasColumnType("uniqueidentifier"); - b.Property("ConvertRate") - .ValueGeneratedOnAdd() - .HasColumnType("decimal(18,6)") - .HasDefaultValue(1m); + b.Property("ArriveDate") + .HasColumnType("datetime2"); + + b.Property("ContainerCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ContainerCode"); b.Property("CreationTime") .HasColumnType("datetime2") @@ -12494,16 +14411,71 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("CreatorId"); - b.Property("Ctype") + b.Property("ExpireDate") + .HasColumnType("datetime2"); + + b.Property("FailedReason") .HasColumnType("nvarchar(max)"); - b.Property("ExpireDate") + b.Property("HandledArriveDate") .HasColumnType("datetime2"); - b.Property("IsConsignment") - .ValueGeneratedOnAdd() - .HasColumnType("bit") - .HasDefaultValue(false); + b.Property("HandledContainerCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledContainerCode"); + + b.Property("HandledExpireDate") + .HasColumnType("datetime2"); + + b.Property("HandledLot") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledLot"); + + b.Property("HandledPackingCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledPackingCode"); + + b.Property("HandledProduceDate") + .HasColumnType("datetime2"); + + b.Property("HandledQty") + .HasColumnType("decimal(18,6)"); + + b.Property("HandledSupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledSupplierBatch"); + + b.Property("HandledToLocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledToLocationArea"); + + b.Property("HandledToLocationCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledToLocationCode"); + + b.Property("HandledToLocationErpCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledToLocationErpCode"); + + b.Property("HandledToLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledToLocationGroup"); + + b.Property("HandledToWarehouseCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledToWarehouseCode"); + + b.Property("InspectPhotoJson") + .HasColumnType("nvarchar(max)"); b.Property("ItemCode") .IsRequired() @@ -12534,16 +14506,34 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("LastModifierId"); - b.Property("LineStatus") + b.Property("LocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationArea"); + + b.Property("LocationCode") .IsRequired() .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationCode"); b.Property("LocationErpCode") + .IsRequired() .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationErpCode"); + + b.Property("LocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationGroup"); b.Property("Lot") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Lot"); + + b.Property("MassDefect") .HasColumnType("nvarchar(max)"); b.Property("MasterID") @@ -12555,51 +14545,110 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("nvarchar(64)") .HasColumnName("Number"); - b.Property("OrderRemark") - .HasColumnType("nvarchar(max)"); - - b.Property("PlanArriveDate") - .HasColumnType("datetime2"); - - b.Property("PlanUserCode") - .HasColumnType("nvarchar(max)"); + b.Property("PackingCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("PackingCode"); b.Property("PoLine") .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + .HasColumnType("nvarchar(64)") + .HasColumnName("PoLine"); + + b.Property("PoNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("PoNumber"); b.Property("ProduceDate") .HasColumnType("datetime2"); - b.Property("ProjectCode") + b.Property("PurchaseReceiptInspectStatus") + .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)"); - b.Property("PutAwayQty") - .HasColumnType("decimal(18,6)"); - b.Property("Qty") .HasPrecision(18, 6) .HasColumnType("decimal(18,6)") .HasColumnName("Qty"); - b.Property("ReceivedQty") + b.Property("RecommendArriveDate") + .HasColumnType("datetime2"); + + b.Property("RecommendContainerCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendContainerCode"); + + b.Property("RecommendExpireDate") + .HasColumnType("datetime2"); + + b.Property("RecommendLot") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendLot"); + + b.Property("RecommendPackingCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendPackingCode"); + + b.Property("RecommendProduceDate") + .HasColumnType("datetime2"); + + b.Property("RecommendQty") .HasColumnType("decimal(18,6)"); + b.Property("RecommendSupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendSupplierBatch"); + + b.Property("RecommendToLocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendToLocationArea"); + + b.Property("RecommendToLocationCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendToLocationCode"); + + b.Property("RecommendToLocationErpCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendToLocationErpCode"); + + b.Property("RecommendToLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendToLocationGroup"); + + b.Property("RecommendToWarehouseCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendToWarehouseCode"); + b.Property("Remark") .HasMaxLength(3072) .HasColumnType("nvarchar(3072)") .HasColumnName("Remark"); - b.Property("ReturnedQty") - .HasColumnType("decimal(18,6)"); - - b.Property("ShippedQty") - .HasColumnType("decimal(18,6)"); + b.Property("Status") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); b.Property("StdPackQty") .HasColumnType("decimal(18,6)"); + b.Property("SupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("SupplierBatch"); + b.Property("SupplierPackQty") .HasColumnType("decimal(18,6)"); @@ -12616,45 +14665,42 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("nvarchar(64)") .HasColumnName("Uom"); + b.Property("WarehouseCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("WarehouseCode"); + b.HasKey("Id"); b.HasIndex("MasterID"); - b.HasIndex("ItemCode", "Number", "PoLine") - .IsUnique() - .HasFilter("[PoLine] IS NOT NULL"); - - b.ToTable("Store_PurchaseOrderDetail", (string)null); + b.ToTable("Store_PurchaseReceiptNoteDetail", (string)null); }); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.PurchaseReceiptJob", b => + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.PurchaseReceiptRequest", b => { b.Property("Id") .HasColumnType("uniqueidentifier"); - b.Property("AcceptTime") + b.Property("ActiveDate") .HasColumnType("datetime2"); - b.Property("AcceptUserId") - .HasColumnType("uniqueidentifier"); - - b.Property("AcceptUserName") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - b.Property("AsnNumber") .HasMaxLength(64) .HasColumnType("nvarchar(64)"); - b.Property("CompleteTime") - .HasColumnType("datetime2"); + b.Property("AutoAgree") + .HasColumnType("bit"); - b.Property("CompleteUserId") - .HasColumnType("uniqueidentifier"); + b.Property("AutoCompleteJob") + .HasColumnType("bit"); - b.Property("CompleteUserName") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + b.Property("AutoHandle") + .HasColumnType("bit"); + + b.Property("AutoSubmit") + .HasColumnType("bit"); b.Property("ConcurrencyStamp") .IsConcurrencyToken() @@ -12670,28 +14716,17 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("CreatorId"); - b.Property("ExtraProperties") - .HasColumnType("nvarchar(max)") - .HasColumnName("ExtraProperties"); - - b.Property("IsAutoComplete") - .ValueGeneratedOnAdd() - .HasColumnType("bit") - .HasDefaultValue(false); - - b.Property("JobDescription") - .HasMaxLength(1024) - .HasColumnType("nvarchar(1024)"); + b.Property("DirectCreateNote") + .HasColumnType("bit"); - b.Property("JobStatus") + b.Property("DockCode") .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)"); - b.Property("JobType") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); b.Property("LastModificationTime") .HasColumnType("datetime2") @@ -12704,7 +14739,8 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.Property("Number") .IsRequired() .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); b.Property("PlanArriveDate") .HasColumnType("datetime2"); @@ -12713,25 +14749,16 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasMaxLength(64) .HasColumnType("nvarchar(64)"); - b.Property("Priority") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasDefaultValue(0); - - b.Property("PriorityIncrement") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasDefaultValue(0); - - b.Property("PurchaseReceiptRequestNumber") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - b.Property("Remark") .HasMaxLength(3072) .HasColumnType("nvarchar(3072)") .HasColumnName("Remark"); + b.Property("RequestStatus") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + b.Property("RpNumber") .HasMaxLength(64) .HasColumnType("nvarchar(64)"); @@ -12753,22 +14780,11 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnName("TenantId"); b.Property("TimeWindow") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("Type") .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)"); - b.Property("UpStreamJobNumber") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("WarehouseCode") - .HasColumnType("nvarchar(max)"); - - b.Property("WorkGroupCode") + b.Property("TruckNumber") .HasMaxLength(64) .HasColumnType("nvarchar(64)"); @@ -12780,10 +14796,12 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.HasIndex("Number") .IsUnique(); - b.ToTable("Job_PurchaseReceiptJob", (string)null); + b.HasIndex("SupplierCode"); + + b.ToTable("Store_PurchaseReceiptRequest", (string)null); }); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.PurchaseReceiptJobDetail", b => + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.PurchaseReceiptRequestDetail", b => { b.Property("Id") .HasColumnType("uniqueidentifier"); @@ -12791,6 +14809,14 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.Property("ArriveDate") .HasColumnType("datetime2"); + b.Property("ContainerCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ContainerCode"); + + b.Property("ConvertRate") + .HasColumnType("decimal(18,6)"); + b.Property("CreationTime") .HasColumnType("datetime2") .HasColumnName("CreationTime"); @@ -12799,69 +14825,9 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("CreatorId"); - b.Property("FailedReason") - .HasColumnType("nvarchar(max)"); - - b.Property("HandledArriveDate") - .HasColumnType("datetime2"); - - b.Property("HandledContainerCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("HandledContainerCode"); - - b.Property("HandledExpireDate") - .HasColumnType("datetime2"); - - b.Property("HandledLot") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("HandledLot"); - - b.Property("HandledPackingCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("HandledPackingCode"); - - b.Property("HandledProduceDate") + b.Property("ExpireDate") .HasColumnType("datetime2"); - b.Property("HandledQty") - .HasColumnType("decimal(18,6)"); - - b.Property("HandledSupplierBatch") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("HandledSupplierBatch"); - - b.Property("HandledToLocationArea") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("HandledToLocationArea"); - - b.Property("HandledToLocationCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("HandledToLocationCode"); - - b.Property("HandledToLocationErpCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("HandledToLocationErpCode"); - - b.Property("HandledToLocationGroup") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("HandledToLocationGroup"); - - b.Property("HandledToWarehouseCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("HandledToWarehouseCode"); - - b.Property("InspectPhotoJson") - .HasColumnType("nvarchar(max)"); - b.Property("ItemCode") .IsRequired() .HasMaxLength(64) @@ -12891,8 +14857,10 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("LastModifierId"); - b.Property("MassDefect") - .HasColumnType("nvarchar(max)"); + b.Property("Lot") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Lot"); b.Property("MasterID") .HasColumnType("uniqueidentifier"); @@ -12900,91 +14868,49 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.Property("Number") .IsRequired() .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("PoLine") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("PoNumber") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); - b.Property("PurchaseReceiptInspectStatus") + b.Property("PackingCode") .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("RecommendArriveDate") - .HasColumnType("datetime2"); - - b.Property("RecommendContainerCode") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendContainerCode"); - - b.Property("RecommendExpireDate") - .HasColumnType("datetime2"); + .HasColumnName("PackingCode"); - b.Property("RecommendLot") + b.Property("PoLine") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendLot"); + .HasColumnName("PoLine"); - b.Property("RecommendPackingCode") + b.Property("PoNumber") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendPackingCode"); + .HasColumnName("PoNumber"); - b.Property("RecommendProduceDate") + b.Property("ProduceDate") .HasColumnType("datetime2"); - b.Property("RecommendQty") - .HasColumnType("decimal(18,6)"); - - b.Property("RecommendSupplierBatch") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendSupplierBatch"); - - b.Property("RecommendToLocationArea") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendToLocationArea"); - - b.Property("RecommendToLocationCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendToLocationCode"); - - b.Property("RecommendToLocationErpCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendToLocationErpCode"); - - b.Property("RecommendToLocationGroup") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendToLocationGroup"); + b.Property("Qty") + .HasPrecision(18, 6) + .HasColumnType("decimal(18,6)") + .HasColumnName("Qty"); - b.Property("RecommendToWarehouseCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendToWarehouseCode"); + b.Property("RecommendErpCode") + .HasColumnType("nvarchar(max)"); b.Property("Remark") .HasMaxLength(3072) .HasColumnType("nvarchar(3072)") .HasColumnName("Remark"); - b.Property("Status") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - b.Property("StdPackQty") .HasColumnType("decimal(18,6)"); + b.Property("SupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("SupplierBatch"); + b.Property("SupplierPackQty") .HasColumnType("decimal(18,6)"); @@ -12996,27 +14922,50 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnName("TenantId"); b.Property("Uom") - .HasColumnType("nvarchar(max)"); + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Uom"); b.HasKey("Id"); b.HasIndex("MasterID"); - b.ToTable("Job_PurchaseReceiptJobDetail", (string)null); + b.HasIndex("Number", "PackingCode") + .IsUnique(); + + b.ToTable("Store_PurchaseReceiptRequestDetail", (string)null); }); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.PurchaseReceiptNote", b => + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.PurchaseReturnJob", b => { b.Property("Id") .HasColumnType("uniqueidentifier"); - b.Property("ActiveDate") + b.Property("AcceptTime") .HasColumnType("datetime2"); + b.Property("AcceptUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("AcceptUserName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + b.Property("AsnNumber") .HasMaxLength(64) .HasColumnType("nvarchar(64)"); + b.Property("CompleteTime") + .HasColumnType("datetime2"); + + b.Property("CompleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CompleteUserName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + b.Property("ConcurrencyStamp") .IsConcurrencyToken() .HasMaxLength(40) @@ -13035,10 +14984,24 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("nvarchar(max)") .HasColumnName("ExtraProperties"); - b.Property("JobNumber") + b.Property("IsAutoComplete") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false); + + b.Property("JobDescription") + .HasMaxLength(1024) + .HasColumnType("nvarchar(1024)"); + + b.Property("JobStatus") + .IsRequired() .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("JobNumber"); + .HasColumnType("nvarchar(64)"); + + b.Property("JobType") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); b.Property("LastModificationTime") .HasColumnType("datetime2") @@ -13051,57 +15014,65 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.Property("Number") .IsRequired() .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("Number"); + .HasColumnType("nvarchar(64)"); b.Property("PoNumber") .HasMaxLength(64) .HasColumnType("nvarchar(64)"); - b.Property("PurchaseReceiptRequestNumber") + b.Property("Priority") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasDefaultValue(0); + + b.Property("PriorityIncrement") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasDefaultValue(0); + + b.Property("PurchaseReturnRequestNumber") .HasMaxLength(64) .HasColumnType("nvarchar(64)"); - b.Property("ReceiveTime") - .HasColumnType("datetime2"); - b.Property("Remark") .HasMaxLength(3072) .HasColumnType("nvarchar(3072)") .HasColumnName("Remark"); - b.Property("RpNumber") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + b.Property("ReturnReason") + .HasColumnType("nvarchar(max)"); - b.Property("Status") + b.Property("ReturnTime") + .HasColumnType("datetime2"); + + b.Property("ReturnType") .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)"); - b.Property("SupplierAddress") - .HasColumnType("nvarchar(max)"); + b.Property("RpNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); b.Property("SupplierCode") - .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)"); - b.Property("SupplierName") - .HasColumnType("nvarchar(max)"); - b.Property("TenantId") .HasColumnType("uniqueidentifier") .HasColumnName("TenantId"); - b.Property("Type") - .IsRequired() + b.Property("UpStreamJobNumber") .HasMaxLength(64) .HasColumnType("nvarchar(64)"); b.Property("WarehouseCode") .HasColumnType("nvarchar(max)"); + b.Property("WorkGroupCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + b.Property("Worker") .HasColumnType("nvarchar(max)"); @@ -13110,24 +15081,14 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.HasIndex("Number") .IsUnique(); - b.HasIndex("SupplierCode"); - - b.ToTable("Store_PurchaseReceiptNote", (string)null); + b.ToTable("Job_PurchaseReturnJob", (string)null); }); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.PurchaseReceiptNoteDetail", b => + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.PurchaseReturnJobDetail", b => { b.Property("Id") .HasColumnType("uniqueidentifier"); - b.Property("ArriveDate") - .HasColumnType("datetime2"); - - b.Property("ContainerCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ContainerCode"); - b.Property("CreationTime") .HasColumnType("datetime2") .HasColumnName("CreationTime"); @@ -13136,12 +15097,6 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("CreatorId"); - b.Property("ExpireDate") - .HasColumnType("datetime2"); - - b.Property("FailedReason") - .HasColumnType("nvarchar(max)"); - b.Property("HandledArriveDate") .HasColumnType("datetime2"); @@ -13153,54 +15108,51 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.Property("HandledExpireDate") .HasColumnType("datetime2"); - b.Property("HandledLot") + b.Property("HandledFromLocationArea") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("HandledLot"); + .HasColumnName("HandledFromLocationArea"); - b.Property("HandledPackingCode") + b.Property("HandledFromLocationCode") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("HandledPackingCode"); - - b.Property("HandledProduceDate") - .HasColumnType("datetime2"); - - b.Property("HandledQty") - .HasColumnType("decimal(18,6)"); + .HasColumnName("HandledFromLocationCode"); - b.Property("HandledSupplierBatch") + b.Property("HandledFromLocationErpCode") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("HandledSupplierBatch"); + .HasColumnName("HandledFromLocationErpCode"); - b.Property("HandledToLocationArea") + b.Property("HandledFromLocationGroup") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("HandledToLocationArea"); + .HasColumnName("HandledFromLocationGroup"); - b.Property("HandledToLocationCode") + b.Property("HandledFromWarehouseCode") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("HandledToLocationCode"); + .HasColumnName("HandledFromWarehouseCode"); - b.Property("HandledToLocationErpCode") + b.Property("HandledLot") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("HandledToLocationErpCode"); + .HasColumnName("HandledLot"); - b.Property("HandledToLocationGroup") + b.Property("HandledPackingCode") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("HandledToLocationGroup"); + .HasColumnName("HandledPackingCode"); - b.Property("HandledToWarehouseCode") + b.Property("HandledProduceDate") + .HasColumnType("datetime2"); + + b.Property("HandledQty") + .HasColumnType("decimal(18,6)"); + + b.Property("HandledSupplierBatch") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("HandledToWarehouseCode"); - - b.Property("InspectPhotoJson") - .HasColumnType("nvarchar(max)"); + .HasColumnName("HandledSupplierBatch"); b.Property("ItemCode") .IsRequired() @@ -13231,73 +15183,24 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("LastModifierId"); - b.Property("LocationArea") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("LocationArea"); - - b.Property("LocationCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("LocationCode"); - - b.Property("LocationErpCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("LocationErpCode"); - - b.Property("LocationGroup") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("LocationGroup"); - - b.Property("Lot") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("Lot"); - - b.Property("MassDefect") - .HasColumnType("nvarchar(max)"); - b.Property("MasterID") .HasColumnType("uniqueidentifier"); b.Property("Number") .IsRequired() .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("Number"); - - b.Property("PackingCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("PackingCode"); + .HasColumnType("nvarchar(64)"); b.Property("PoLine") .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("PoLine"); + .HasColumnType("nvarchar(64)"); b.Property("PoNumber") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("PoNumber"); - - b.Property("ProduceDate") - .HasColumnType("datetime2"); - - b.Property("PurchaseReceiptInspectStatus") - .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)"); - b.Property("Qty") - .HasPrecision(18, 6) - .HasColumnType("decimal(18,6)") - .HasColumnName("Qty"); + b.Property("Reason") + .HasColumnType("nvarchar(max)"); b.Property("RecommendArriveDate") .HasColumnType("datetime2"); @@ -13310,51 +15213,51 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.Property("RecommendExpireDate") .HasColumnType("datetime2"); - b.Property("RecommendLot") + b.Property("RecommendFromLocationArea") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendLot"); + .HasColumnName("RecommendFromLocationArea"); - b.Property("RecommendPackingCode") + b.Property("RecommendFromLocationCode") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendPackingCode"); - - b.Property("RecommendProduceDate") - .HasColumnType("datetime2"); - - b.Property("RecommendQty") - .HasColumnType("decimal(18,6)"); + .HasColumnName("RecommendFromLocationCode"); - b.Property("RecommendSupplierBatch") + b.Property("RecommendFromLocationErpCode") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendSupplierBatch"); + .HasColumnName("RecommendFromLocationErpCode"); - b.Property("RecommendToLocationArea") + b.Property("RecommendFromLocationGroup") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendToLocationArea"); + .HasColumnName("RecommendFromLocationGroup"); - b.Property("RecommendToLocationCode") + b.Property("RecommendFromWarehouseCode") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendToLocationCode"); + .HasColumnName("RecommendFromWarehouseCode"); - b.Property("RecommendToLocationErpCode") + b.Property("RecommendLot") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendToLocationErpCode"); + .HasColumnName("RecommendLot"); - b.Property("RecommendToLocationGroup") + b.Property("RecommendPackingCode") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendToLocationGroup"); + .HasColumnName("RecommendPackingCode"); - b.Property("RecommendToWarehouseCode") + b.Property("RecommendProduceDate") + .HasColumnType("datetime2"); + + b.Property("RecommendQty") + .HasColumnType("decimal(18,6)"); + + b.Property("RecommendSupplierBatch") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendToWarehouseCode"); + .HasColumnName("RecommendSupplierBatch"); b.Property("Remark") .HasMaxLength(3072) @@ -13369,41 +15272,21 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.Property("StdPackQty") .HasColumnType("decimal(18,6)"); - b.Property("SupplierBatch") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("SupplierBatch"); - - b.Property("SupplierPackQty") - .HasColumnType("decimal(18,6)"); - - b.Property("SupplierPackUom") - .HasColumnType("nvarchar(max)"); - b.Property("TenantId") .HasColumnType("uniqueidentifier") .HasColumnName("TenantId"); b.Property("Uom") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("Uom"); - - b.Property("WarehouseCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("WarehouseCode"); + .HasColumnType("nvarchar(max)"); b.HasKey("Id"); b.HasIndex("MasterID"); - b.ToTable("Store_PurchaseReceiptNoteDetail", (string)null); + b.ToTable("Job_PurchaseReturnJobDetail", (string)null); }); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.PurchaseReceiptRequest", b => + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.PurchaseReturnNote", b => { b.Property("Id") .HasColumnType("uniqueidentifier"); @@ -13415,18 +15298,6 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasMaxLength(64) .HasColumnType("nvarchar(64)"); - b.Property("AutoAgree") - .HasColumnType("bit"); - - b.Property("AutoCompleteJob") - .HasColumnType("bit"); - - b.Property("AutoHandle") - .HasColumnType("bit"); - - b.Property("AutoSubmit") - .HasColumnType("bit"); - b.Property("ConcurrencyStamp") .IsConcurrencyToken() .HasMaxLength(40) @@ -13441,18 +15312,15 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("CreatorId"); - b.Property("DirectCreateNote") - .HasColumnType("bit"); - - b.Property("DockCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - b.Property("ExtraProperties") .HasColumnType("nvarchar(max)") .HasColumnName("ExtraProperties"); + b.Property("JobNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("JobNumber"); + b.Property("LastModificationTime") .HasColumnType("datetime2") .HasColumnName("LastModificationTime"); @@ -13467,19 +15335,26 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("nvarchar(64)") .HasColumnName("Number"); - b.Property("PlanArriveDate") - .HasColumnType("datetime2"); - b.Property("PoNumber") .HasMaxLength(64) .HasColumnType("nvarchar(64)"); + b.Property("PurchaseReturnRequestNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + b.Property("Remark") .HasMaxLength(3072) .HasColumnType("nvarchar(3072)") .HasColumnName("Remark"); - b.Property("RequestStatus") + b.Property("ReturnReason") + .HasColumnType("nvarchar(max)"); + + b.Property("ReturnTime") + .HasColumnType("datetime2"); + + b.Property("ReturnType") .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)"); @@ -13488,15 +15363,12 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasMaxLength(64) .HasColumnType("nvarchar(64)"); - b.Property("SupplierAddress") - .HasColumnType("nvarchar(max)"); - - b.Property("SupplierCode") + b.Property("Status") .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)"); - b.Property("SupplierName") + b.Property("SupplierCode") .HasMaxLength(64) .HasColumnType("nvarchar(64)"); @@ -13504,15 +15376,6 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("TenantId"); - b.Property("TimeWindow") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("TruckNumber") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - b.Property("Worker") .HasColumnType("nvarchar(max)"); @@ -13521,12 +15384,10 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.HasIndex("Number") .IsUnique(); - b.HasIndex("SupplierCode"); - - b.ToTable("Store_PurchaseReceiptRequest", (string)null); + b.ToTable("Store_PurchaseReturnNote", (string)null); }); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.PurchaseReceiptRequestDetail", b => + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.PurchaseReturnNoteDetail", b => { b.Property("Id") .HasColumnType("uniqueidentifier"); @@ -13539,9 +15400,6 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("nvarchar(64)") .HasColumnName("ContainerCode"); - b.Property("ConvertRate") - .HasColumnType("decimal(18,6)"); - b.Property("CreationTime") .HasColumnType("datetime2") .HasColumnName("CreationTime"); @@ -13553,6 +15411,63 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.Property("ExpireDate") .HasColumnType("datetime2"); + b.Property("HandledArriveDate") + .HasColumnType("datetime2"); + + b.Property("HandledContainerCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledContainerCode"); + + b.Property("HandledExpireDate") + .HasColumnType("datetime2"); + + b.Property("HandledFromLocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledFromLocationArea"); + + b.Property("HandledFromLocationCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledFromLocationCode"); + + b.Property("HandledFromLocationErpCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledFromLocationErpCode"); + + b.Property("HandledFromLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledFromLocationGroup"); + + b.Property("HandledFromWarehouseCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledFromWarehouseCode"); + + b.Property("HandledLot") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledLot"); + + b.Property("HandledPackingCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledPackingCode"); + + b.Property("HandledProduceDate") + .HasColumnType("datetime2"); + + b.Property("HandledQty") + .HasColumnType("decimal(18,6)"); + + b.Property("HandledSupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledSupplierBatch"); + b.Property("ItemCode") .IsRequired() .HasMaxLength(64) @@ -13562,72 +15477,157 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.Property("ItemDesc1") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("ItemDesc1"); + .HasColumnName("ItemDesc1"); + + b.Property("ItemDesc2") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc2"); + + b.Property("ItemName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemName"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("LocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationArea"); + + b.Property("LocationCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationCode"); + + b.Property("LocationErpCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationErpCode"); + + b.Property("LocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationGroup"); + + b.Property("Lot") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Lot"); + + b.Property("MasterID") + .HasColumnType("uniqueidentifier"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("PackingCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("PackingCode"); + + b.Property("PoLine") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("PoLine"); + + b.Property("PoNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("PoNumber"); + + b.Property("ProduceDate") + .HasColumnType("datetime2"); + + b.Property("Qty") + .HasPrecision(18, 6) + .HasColumnType("decimal(18,6)") + .HasColumnName("Qty"); + + b.Property("Reason") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("RecommendArriveDate") + .HasColumnType("datetime2"); + + b.Property("RecommendContainerCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendContainerCode"); - b.Property("ItemDesc2") + b.Property("RecommendExpireDate") + .HasColumnType("datetime2"); + + b.Property("RecommendFromLocationArea") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("ItemDesc2"); + .HasColumnName("RecommendFromLocationArea"); - b.Property("ItemName") + b.Property("RecommendFromLocationCode") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("ItemName"); - - b.Property("LastModificationTime") - .HasColumnType("datetime2") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("uniqueidentifier") - .HasColumnName("LastModifierId"); + .HasColumnName("RecommendFromLocationCode"); - b.Property("Lot") + b.Property("RecommendFromLocationErpCode") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("Lot"); - - b.Property("MasterID") - .HasColumnType("uniqueidentifier"); + .HasColumnName("RecommendFromLocationErpCode"); - b.Property("Number") - .IsRequired() + b.Property("RecommendFromLocationGroup") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("Number"); + .HasColumnName("RecommendFromLocationGroup"); - b.Property("PackingCode") - .IsRequired() + b.Property("RecommendFromWarehouseCode") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("PackingCode"); + .HasColumnName("RecommendFromWarehouseCode"); - b.Property("PoLine") + b.Property("RecommendLot") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("PoLine"); + .HasColumnName("RecommendLot"); - b.Property("PoNumber") + b.Property("RecommendPackingCode") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("PoNumber"); + .HasColumnName("RecommendPackingCode"); - b.Property("ProduceDate") + b.Property("RecommendProduceDate") .HasColumnType("datetime2"); - b.Property("Qty") - .HasPrecision(18, 6) - .HasColumnType("decimal(18,6)") - .HasColumnName("Qty"); + b.Property("RecommendQty") + .HasColumnType("decimal(18,6)"); - b.Property("RecommendErpCode") - .HasColumnType("nvarchar(max)"); + b.Property("RecommendSupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendSupplierBatch"); b.Property("Remark") .HasMaxLength(3072) .HasColumnType("nvarchar(3072)") .HasColumnName("Remark"); + b.Property("Status") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + b.Property("StdPackQty") .HasColumnType("decimal(18,6)"); @@ -13636,12 +15636,6 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("nvarchar(64)") .HasColumnName("SupplierBatch"); - b.Property("SupplierPackQty") - .HasColumnType("decimal(18,6)"); - - b.Property("SupplierPackUom") - .HasColumnType("nvarchar(max)"); - b.Property("TenantId") .HasColumnType("uniqueidentifier") .HasColumnName("TenantId"); @@ -13652,6 +15646,12 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("nvarchar(64)") .HasColumnName("Uom"); + b.Property("WarehouseCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("WarehouseCode"); + b.HasKey("Id"); b.HasIndex("MasterID"); @@ -13659,37 +15659,32 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.HasIndex("Number", "PackingCode") .IsUnique(); - b.ToTable("Store_PurchaseReceiptRequestDetail", (string)null); + b.ToTable("Store_PurchaseReturnNoteDetail", (string)null); }); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.PurchaseReturnJob", b => + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.PurchaseReturnRequest", b => { b.Property("Id") .HasColumnType("uniqueidentifier"); - b.Property("AcceptTime") + b.Property("ActiveDate") .HasColumnType("datetime2"); - b.Property("AcceptUserId") - .HasColumnType("uniqueidentifier"); - - b.Property("AcceptUserName") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - b.Property("AsnNumber") .HasMaxLength(64) .HasColumnType("nvarchar(64)"); - b.Property("CompleteTime") - .HasColumnType("datetime2"); + b.Property("AutoAgree") + .HasColumnType("bit"); - b.Property("CompleteUserId") - .HasColumnType("uniqueidentifier"); + b.Property("AutoCompleteJob") + .HasColumnType("bit"); - b.Property("CompleteUserName") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + b.Property("AutoHandle") + .HasColumnType("bit"); + + b.Property("AutoSubmit") + .HasColumnType("bit"); b.Property("ConcurrencyStamp") .IsConcurrencyToken() @@ -13705,29 +15700,13 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("CreatorId"); + b.Property("DirectCreateNote") + .HasColumnType("bit"); + b.Property("ExtraProperties") .HasColumnType("nvarchar(max)") .HasColumnName("ExtraProperties"); - b.Property("IsAutoComplete") - .ValueGeneratedOnAdd() - .HasColumnType("bit") - .HasDefaultValue(false); - - b.Property("JobDescription") - .HasMaxLength(1024) - .HasColumnType("nvarchar(1024)"); - - b.Property("JobStatus") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("JobType") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - b.Property("LastModificationTime") .HasColumnType("datetime2") .HasColumnName("LastModificationTime"); @@ -13739,33 +15718,22 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.Property("Number") .IsRequired() .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); b.Property("PoNumber") .HasMaxLength(64) .HasColumnType("nvarchar(64)"); - b.Property("Priority") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasDefaultValue(0); - - b.Property("PriorityIncrement") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasDefaultValue(0); - - b.Property("PurchaseReturnRequestNumber") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - b.Property("Remark") .HasMaxLength(3072) .HasColumnType("nvarchar(3072)") .HasColumnName("Remark"); - b.Property("ReturnReason") - .HasColumnType("nvarchar(max)"); + b.Property("RequestStatus") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); b.Property("ReturnTime") .HasColumnType("datetime2"); @@ -13787,17 +15755,6 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("TenantId"); - b.Property("UpStreamJobNumber") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("WarehouseCode") - .HasColumnType("nvarchar(max)"); - - b.Property("WorkGroupCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - b.Property("Worker") .HasColumnType("nvarchar(max)"); @@ -13806,14 +15763,22 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.HasIndex("Number") .IsUnique(); - b.ToTable("Job_PurchaseReturnJob", (string)null); + b.ToTable("Store_PurchaseReturnRequest", (string)null); }); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.PurchaseReturnJobDetail", b => + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.PurchaseReturnRequestDetail", b => { b.Property("Id") .HasColumnType("uniqueidentifier"); + b.Property("ArriveDate") + .HasColumnType("datetime2"); + + b.Property("ContainerCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ContainerCode"); + b.Property("CreationTime") .HasColumnType("datetime2") .HasColumnName("CreationTime"); @@ -13822,63 +15787,9 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("CreatorId"); - b.Property("HandledArriveDate") - .HasColumnType("datetime2"); - - b.Property("HandledContainerCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("HandledContainerCode"); - - b.Property("HandledExpireDate") - .HasColumnType("datetime2"); - - b.Property("HandledFromLocationArea") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("HandledFromLocationArea"); - - b.Property("HandledFromLocationCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("HandledFromLocationCode"); - - b.Property("HandledFromLocationErpCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("HandledFromLocationErpCode"); - - b.Property("HandledFromLocationGroup") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("HandledFromLocationGroup"); - - b.Property("HandledFromWarehouseCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("HandledFromWarehouseCode"); - - b.Property("HandledLot") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("HandledLot"); - - b.Property("HandledPackingCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("HandledPackingCode"); - - b.Property("HandledProduceDate") + b.Property("ExpireDate") .HasColumnType("datetime2"); - b.Property("HandledQty") - .HasColumnType("decimal(18,6)"); - - b.Property("HandledSupplierBatch") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("HandledSupplierBatch"); - b.Property("ItemCode") .IsRequired() .HasMaxLength(64) @@ -13898,91 +15809,75 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.Property("ItemName") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("ItemName"); - - b.Property("LastModificationTime") - .HasColumnType("datetime2") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("uniqueidentifier") - .HasColumnName("LastModifierId"); - - b.Property("MasterID") - .HasColumnType("uniqueidentifier"); - - b.Property("Number") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("PoLine") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("PoNumber") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + .HasColumnName("ItemName"); - b.Property("Reason") - .HasColumnType("nvarchar(max)"); + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); - b.Property("RecommendArriveDate") - .HasColumnType("datetime2"); + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); - b.Property("RecommendContainerCode") + b.Property("LocationArea") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendContainerCode"); + .HasColumnName("LocationArea"); - b.Property("RecommendExpireDate") - .HasColumnType("datetime2"); + b.Property("LocationCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationCode"); - b.Property("RecommendFromLocationArea") + b.Property("LocationErpCode") + .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendFromLocationArea"); + .HasColumnName("LocationErpCode"); - b.Property("RecommendFromLocationCode") + b.Property("LocationGroup") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendFromLocationCode"); + .HasColumnName("LocationGroup"); - b.Property("RecommendFromLocationErpCode") + b.Property("Lot") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendFromLocationErpCode"); + .HasColumnName("Lot"); - b.Property("RecommendFromLocationGroup") + b.Property("MasterID") + .HasColumnType("uniqueidentifier"); + + b.Property("Number") + .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendFromLocationGroup"); + .HasColumnName("Number"); - b.Property("RecommendFromWarehouseCode") + b.Property("PackingCode") + .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendFromWarehouseCode"); + .HasColumnName("PackingCode"); - b.Property("RecommendLot") + b.Property("PoLine") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendLot"); + .HasColumnName("PoLine"); - b.Property("RecommendPackingCode") + b.Property("PoNumber") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendPackingCode"); + .HasColumnName("PoNumber"); - b.Property("RecommendProduceDate") + b.Property("ProduceDate") .HasColumnType("datetime2"); - b.Property("RecommendQty") - .HasColumnType("decimal(18,6)"); - - b.Property("RecommendSupplierBatch") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendSupplierBatch"); + b.Property("Qty") + .HasPrecision(18, 6) + .HasColumnType("decimal(18,6)") + .HasColumnName("Qty"); b.Property("Remark") .HasMaxLength(3072) @@ -13997,32 +15892,66 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.Property("StdPackQty") .HasColumnType("decimal(18,6)"); + b.Property("SupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("SupplierBatch"); + b.Property("TenantId") .HasColumnType("uniqueidentifier") .HasColumnName("TenantId"); b.Property("Uom") - .HasColumnType("nvarchar(max)"); + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Uom"); + + b.Property("WarehouseCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("WarehouseCode"); b.HasKey("Id"); b.HasIndex("MasterID"); - b.ToTable("Job_PurchaseReturnJobDetail", (string)null); + b.HasIndex("Number", "PackingCode") + .IsUnique(); + + b.ToTable("Store_PurchaseReturnRequestDetail", (string)null); }); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.PurchaseReturnNote", b => + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.PutawayJob", b => { b.Property("Id") .HasColumnType("uniqueidentifier"); - b.Property("ActiveDate") + b.Property("AcceptTime") .HasColumnType("datetime2"); + b.Property("AcceptUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("AcceptUserName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + b.Property("AsnNumber") .HasMaxLength(64) .HasColumnType("nvarchar(64)"); + b.Property("CompleteTime") + .HasColumnType("datetime2"); + + b.Property("CompleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CompleteUserName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + b.Property("ConcurrencyStamp") .IsConcurrencyToken() .HasMaxLength(40) @@ -14041,10 +15970,28 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("nvarchar(max)") .HasColumnName("ExtraProperties"); - b.Property("JobNumber") + b.Property("InspectNumber") .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("JobNumber"); + .HasColumnType("nvarchar(64)"); + + b.Property("IsAutoComplete") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false); + + b.Property("JobDescription") + .HasMaxLength(1024) + .HasColumnType("nvarchar(1024)"); + + b.Property("JobStatus") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("JobType") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); b.Property("LastModificationTime") .HasColumnType("datetime2") @@ -14057,39 +16004,45 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.Property("Number") .IsRequired() .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("Number"); + .HasColumnType("nvarchar(64)"); b.Property("PoNumber") .HasMaxLength(64) .HasColumnType("nvarchar(64)"); - b.Property("PurchaseReturnRequestNumber") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + b.Property("Priority") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasDefaultValue(0); - b.Property("Remark") - .HasMaxLength(3072) - .HasColumnType("nvarchar(3072)") - .HasColumnName("Remark"); + b.Property("PriorityIncrement") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasDefaultValue(0); - b.Property("ReturnReason") - .HasColumnType("nvarchar(max)"); + b.Property("ProductReceiptNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); - b.Property("ReturnTime") - .HasColumnType("datetime2"); + b.Property("PurchaseReceiptRequestNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); - b.Property("ReturnType") + b.Property("PutawayMode") .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)"); - b.Property("RpNumber") + b.Property("ReceiptNumber") .HasMaxLength(64) .HasColumnType("nvarchar(64)"); - b.Property("Status") - .IsRequired() + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("RpNumber") .HasMaxLength(64) .HasColumnType("nvarchar(64)"); @@ -14101,6 +16054,22 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("TenantId"); + b.Property("Type") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("UpStreamJobNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("WarehouseCode") + .HasColumnType("nvarchar(max)"); + + b.Property("WorkGroupCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + b.Property("Worker") .HasColumnType("nvarchar(max)"); @@ -14109,22 +16078,14 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.HasIndex("Number") .IsUnique(); - b.ToTable("Store_PurchaseReturnNote", (string)null); + b.ToTable("Job_PutawayJob", (string)null); }); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.PurchaseReturnNoteDetail", b => + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.PutawayJobDetail", b => { b.Property("Id") .HasColumnType("uniqueidentifier"); - b.Property("ArriveDate") - .HasColumnType("datetime2"); - - b.Property("ContainerCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ContainerCode"); - b.Property("CreationTime") .HasColumnType("datetime2") .HasColumnName("CreationTime"); @@ -14133,8 +16094,25 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("CreatorId"); - b.Property("ExpireDate") - .HasColumnType("datetime2"); + b.Property("FromLocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("FromLocationCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("FromLocationErpCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("FromLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("FromWarehouseCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); b.Property("HandledArriveDate") .HasColumnType("datetime2"); @@ -14147,51 +16125,51 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.Property("HandledExpireDate") .HasColumnType("datetime2"); - b.Property("HandledFromLocationArea") + b.Property("HandledLot") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("HandledFromLocationArea"); + .HasColumnName("HandledLot"); - b.Property("HandledFromLocationCode") + b.Property("HandledPackingCode") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("HandledFromLocationCode"); + .HasColumnName("HandledPackingCode"); - b.Property("HandledFromLocationErpCode") + b.Property("HandledProduceDate") + .HasColumnType("datetime2"); + + b.Property("HandledQty") + .HasColumnType("decimal(18,6)"); + + b.Property("HandledSupplierBatch") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("HandledFromLocationErpCode"); + .HasColumnName("HandledSupplierBatch"); - b.Property("HandledFromLocationGroup") + b.Property("HandledToLocationArea") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("HandledFromLocationGroup"); + .HasColumnName("HandledToLocationArea"); - b.Property("HandledFromWarehouseCode") + b.Property("HandledToLocationCode") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("HandledFromWarehouseCode"); + .HasColumnName("HandledToLocationCode"); - b.Property("HandledLot") + b.Property("HandledToLocationErpCode") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("HandledLot"); + .HasColumnName("HandledToLocationErpCode"); - b.Property("HandledPackingCode") + b.Property("HandledToLocationGroup") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("HandledPackingCode"); - - b.Property("HandledProduceDate") - .HasColumnType("datetime2"); - - b.Property("HandledQty") - .HasColumnType("decimal(18,6)"); + .HasColumnName("HandledToLocationGroup"); - b.Property("HandledSupplierBatch") + b.Property("HandledToWarehouseCode") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("HandledSupplierBatch"); + .HasColumnName("HandledToWarehouseCode"); b.Property("ItemCode") .IsRequired() @@ -14222,70 +16200,27 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("LastModifierId"); - b.Property("LocationArea") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("LocationArea"); - - b.Property("LocationCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("LocationCode"); - - b.Property("LocationErpCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("LocationErpCode"); - - b.Property("LocationGroup") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("LocationGroup"); - - b.Property("Lot") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("Lot"); - b.Property("MasterID") .HasColumnType("uniqueidentifier"); b.Property("Number") .IsRequired() .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("Number"); - - b.Property("PackingCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("PackingCode"); + .HasColumnType("nvarchar(64)"); b.Property("PoLine") .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("PoLine"); + .HasColumnType("nvarchar(64)"); b.Property("PoNumber") .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("PoNumber"); - - b.Property("ProduceDate") - .HasColumnType("datetime2"); + .HasColumnType("nvarchar(64)"); b.Property("Qty") .HasPrecision(18, 6) .HasColumnType("decimal(18,6)") .HasColumnName("Qty"); - b.Property("Reason") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - b.Property("RecommendArriveDate") .HasColumnType("datetime2"); @@ -14297,51 +16232,51 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.Property("RecommendExpireDate") .HasColumnType("datetime2"); - b.Property("RecommendFromLocationArea") + b.Property("RecommendLot") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendFromLocationArea"); + .HasColumnName("RecommendLot"); - b.Property("RecommendFromLocationCode") + b.Property("RecommendPackingCode") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendFromLocationCode"); + .HasColumnName("RecommendPackingCode"); - b.Property("RecommendFromLocationErpCode") + b.Property("RecommendProduceDate") + .HasColumnType("datetime2"); + + b.Property("RecommendQty") + .HasColumnType("decimal(18,6)"); + + b.Property("RecommendSupplierBatch") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendFromLocationErpCode"); + .HasColumnName("RecommendSupplierBatch"); - b.Property("RecommendFromLocationGroup") + b.Property("RecommendToLocationArea") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendFromLocationGroup"); + .HasColumnName("RecommendToLocationArea"); - b.Property("RecommendFromWarehouseCode") + b.Property("RecommendToLocationCode") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendFromWarehouseCode"); + .HasColumnName("RecommendToLocationCode"); - b.Property("RecommendLot") + b.Property("RecommendToLocationErpCode") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendLot"); + .HasColumnName("RecommendToLocationErpCode"); - b.Property("RecommendPackingCode") + b.Property("RecommendToLocationGroup") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendPackingCode"); - - b.Property("RecommendProduceDate") - .HasColumnType("datetime2"); - - b.Property("RecommendQty") - .HasColumnType("decimal(18,6)"); + .HasColumnName("RecommendToLocationGroup"); - b.Property("RecommendSupplierBatch") + b.Property("RecommendToWarehouseCode") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendSupplierBatch"); + .HasColumnName("RecommendToWarehouseCode"); b.Property("Remark") .HasMaxLength(3072) @@ -14356,11 +16291,6 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.Property("StdPackQty") .HasColumnType("decimal(18,6)"); - b.Property("SupplierBatch") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("SupplierBatch"); - b.Property("TenantId") .HasColumnType("uniqueidentifier") .HasColumnName("TenantId"); @@ -14371,23 +16301,14 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("nvarchar(64)") .HasColumnName("Uom"); - b.Property("WarehouseCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("WarehouseCode"); - b.HasKey("Id"); b.HasIndex("MasterID"); - b.HasIndex("Number", "PackingCode") - .IsUnique(); - - b.ToTable("Store_PurchaseReturnNoteDetail", (string)null); + b.ToTable("Job_PutawayJobDetail", (string)null); }); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.PurchaseReturnRequest", b => + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.PutawayNote", b => { b.Property("Id") .HasColumnType("uniqueidentifier"); @@ -14399,18 +16320,6 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasMaxLength(64) .HasColumnType("nvarchar(64)"); - b.Property("AutoAgree") - .HasColumnType("bit"); - - b.Property("AutoCompleteJob") - .HasColumnType("bit"); - - b.Property("AutoHandle") - .HasColumnType("bit"); - - b.Property("AutoSubmit") - .HasColumnType("bit"); - b.Property("ConcurrencyStamp") .IsConcurrencyToken() .HasMaxLength(40) @@ -14425,13 +16334,19 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("CreatorId"); - b.Property("DirectCreateNote") - .HasColumnType("bit"); - b.Property("ExtraProperties") .HasColumnType("nvarchar(max)") .HasColumnName("ExtraProperties"); + b.Property("InspectNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("JobNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("JobNumber"); + b.Property("LastModificationTime") .HasColumnType("datetime2") .HasColumnName("LastModificationTime"); @@ -14446,28 +16361,23 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("nvarchar(64)") .HasColumnName("Number"); - b.Property("PoNumber") + b.Property("ProductReceiptNumber") .HasMaxLength(64) .HasColumnType("nvarchar(64)"); - b.Property("Remark") - .HasMaxLength(3072) - .HasColumnType("nvarchar(3072)") - .HasColumnName("Remark"); - - b.Property("RequestStatus") - .IsRequired() + b.Property("PurchaseReceiptRequestNumber") .HasMaxLength(64) .HasColumnType("nvarchar(64)"); - b.Property("ReturnTime") - .HasColumnType("datetime2"); - - b.Property("ReturnType") - .IsRequired() + b.Property("ReceiptNumber") .HasMaxLength(64) .HasColumnType("nvarchar(64)"); + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + b.Property("RpNumber") .HasMaxLength(64) .HasColumnType("nvarchar(64)"); @@ -14480,40 +16390,139 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("TenantId"); + b.Property("Type") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + b.Property("Worker") .HasColumnType("nvarchar(max)"); - b.HasKey("Id"); + b.HasKey("Id"); + + b.HasIndex("Number") + .IsUnique(); + + b.ToTable("Store_PutawayNote", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.PutawayNoteDetail", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ArriveDate") + .HasColumnType("datetime2"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("ExpireDate") + .HasColumnType("datetime2"); + + b.Property("FromContainerCode") + .HasColumnType("nvarchar(max)"); + + b.Property("FromLocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromLocationArea"); + + b.Property("FromLocationCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromLocationCode"); + + b.Property("FromLocationErpCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromLocationErpCode"); + + b.Property("FromLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromLocationGroup"); + + b.Property("FromLot") + .HasColumnType("nvarchar(max)"); + + b.Property("FromPackingCode") + .HasColumnType("nvarchar(450)"); + + b.Property("FromStatus") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("FromWarehouseCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromWarehouseCode"); + + b.Property("HandledArriveDate") + .HasColumnType("datetime2"); + + b.Property("HandledContainerCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledContainerCode"); + + b.Property("HandledExpireDate") + .HasColumnType("datetime2"); + + b.Property("HandledLot") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledLot"); + + b.Property("HandledPackingCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledPackingCode"); - b.HasIndex("Number") - .IsUnique(); + b.Property("HandledProduceDate") + .HasColumnType("datetime2"); - b.ToTable("Store_PurchaseReturnRequest", (string)null); - }); + b.Property("HandledQty") + .HasColumnType("decimal(18,6)"); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.PurchaseReturnRequestDetail", b => - { - b.Property("Id") - .HasColumnType("uniqueidentifier"); + b.Property("HandledSupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledSupplierBatch"); - b.Property("ArriveDate") - .HasColumnType("datetime2"); + b.Property("HandledToLocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledToLocationArea"); - b.Property("ContainerCode") + b.Property("HandledToLocationCode") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("ContainerCode"); + .HasColumnName("HandledToLocationCode"); - b.Property("CreationTime") - .HasColumnType("datetime2") - .HasColumnName("CreationTime"); + b.Property("HandledToLocationErpCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledToLocationErpCode"); - b.Property("CreatorId") - .HasColumnType("uniqueidentifier") - .HasColumnName("CreatorId"); + b.Property("HandledToLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledToLocationGroup"); - b.Property("ExpireDate") - .HasColumnType("datetime2"); + b.Property("HandledToWarehouseCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledToWarehouseCode"); b.Property("ItemCode") .IsRequired() @@ -14536,6 +16545,11 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("nvarchar(64)") .HasColumnName("ItemName"); + b.Property("JobNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("JobNumber"); + b.Property("LastModificationTime") .HasColumnType("datetime2") .HasColumnName("LastModificationTime"); @@ -14544,76 +16558,95 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("LastModifierId"); - b.Property("LocationArea") + b.Property("MasterID") + .HasColumnType("uniqueidentifier"); + + b.Property("Number") + .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("LocationArea"); + .HasColumnName("Number"); - b.Property("LocationCode") - .IsRequired() + b.Property("PoLine") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("LocationCode"); + .HasColumnName("PoLine"); - b.Property("LocationErpCode") - .IsRequired() + b.Property("PoNumber") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("LocationErpCode"); + .HasColumnName("PoNumber"); - b.Property("LocationGroup") + b.Property("ProduceDate") + .HasColumnType("datetime2"); + + b.Property("Qty") + .HasPrecision(18, 6) + .HasColumnType("decimal(18,6)") + .HasColumnName("Qty"); + + b.Property("RecommendArriveDate") + .HasColumnType("datetime2"); + + b.Property("RecommendContainerCode") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("LocationGroup"); + .HasColumnName("RecommendContainerCode"); - b.Property("Lot") + b.Property("RecommendExpireDate") + .HasColumnType("datetime2"); + + b.Property("RecommendLot") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("Lot"); + .HasColumnName("RecommendLot"); - b.Property("MasterID") - .HasColumnType("uniqueidentifier"); + b.Property("RecommendPackingCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendPackingCode"); - b.Property("Number") - .IsRequired() + b.Property("RecommendProduceDate") + .HasColumnType("datetime2"); + + b.Property("RecommendQty") + .HasColumnType("decimal(18,6)"); + + b.Property("RecommendSupplierBatch") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("Number"); + .HasColumnName("RecommendSupplierBatch"); - b.Property("PackingCode") - .IsRequired() + b.Property("RecommendToLocationArea") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("PackingCode"); + .HasColumnName("RecommendToLocationArea"); - b.Property("PoLine") + b.Property("RecommendToLocationCode") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("PoLine"); + .HasColumnName("RecommendToLocationCode"); - b.Property("PoNumber") + b.Property("RecommendToLocationErpCode") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("PoNumber"); + .HasColumnName("RecommendToLocationErpCode"); - b.Property("ProduceDate") - .HasColumnType("datetime2"); + b.Property("RecommendToLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendToLocationGroup"); - b.Property("Qty") - .HasPrecision(18, 6) - .HasColumnType("decimal(18,6)") - .HasColumnName("Qty"); + b.Property("RecommendToWarehouseCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendToWarehouseCode"); b.Property("Remark") .HasMaxLength(3072) .HasColumnType("nvarchar(3072)") .HasColumnName("Remark"); - b.Property("Status") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - b.Property("StdPackQty") .HasColumnType("decimal(18,6)"); @@ -14626,56 +16659,87 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("TenantId"); - b.Property("Uom") + b.Property("ToContainerCode") + .HasColumnType("nvarchar(max)"); + + b.Property("ToLocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToLocationArea"); + + b.Property("ToLocationCode") .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("Uom"); + .HasColumnName("ToLocationCode"); - b.Property("WarehouseCode") + b.Property("ToLocationErpCode") .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("WarehouseCode"); + .HasColumnName("ToLocationErpCode"); + + b.Property("ToLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToLocationGroup"); + + b.Property("ToLot") + .HasColumnType("nvarchar(max)"); + + b.Property("ToPackingCode") + .HasColumnType("nvarchar(450)"); + + b.Property("ToStatus") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ToWarehouseCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToWarehouseCode"); + + b.Property("Uom") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Uom"); b.HasKey("Id"); b.HasIndex("MasterID"); - b.HasIndex("Number", "PackingCode") - .IsUnique(); + b.HasIndex("Number", "FromPackingCode", "FromLocationCode", "ToLocationCode", "ToPackingCode") + .IsUnique() + .HasFilter("[FromPackingCode] IS NOT NULL AND [ToPackingCode] IS NOT NULL"); - b.ToTable("Store_PurchaseReturnRequestDetail", (string)null); + b.ToTable("Store_PutawayNoteDetail", (string)null); }); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.PutawayJob", b => + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.PutawayRequest", b => { b.Property("Id") .HasColumnType("uniqueidentifier"); - b.Property("AcceptTime") + b.Property("ActiveDate") .HasColumnType("datetime2"); - b.Property("AcceptUserId") - .HasColumnType("uniqueidentifier"); - - b.Property("AcceptUserName") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - b.Property("AsnNumber") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + .HasColumnType("nvarchar(max)"); - b.Property("CompleteTime") - .HasColumnType("datetime2"); + b.Property("AutoAgree") + .HasColumnType("bit"); - b.Property("CompleteUserId") - .HasColumnType("uniqueidentifier"); + b.Property("AutoCompleteJob") + .HasColumnType("bit"); - b.Property("CompleteUserName") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + b.Property("AutoHandle") + .HasColumnType("bit"); + + b.Property("AutoSubmit") + .HasColumnType("bit"); b.Property("ConcurrencyStamp") .IsConcurrencyToken() @@ -14691,32 +16755,15 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("CreatorId"); + b.Property("DirectCreateNote") + .HasColumnType("bit"); + b.Property("ExtraProperties") .HasColumnType("nvarchar(max)") .HasColumnName("ExtraProperties"); b.Property("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)"); + .HasColumnType("nvarchar(max)"); b.Property("LastModificationTime") .HasColumnType("datetime2") @@ -14729,29 +16776,17 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.Property("Number") .IsRequired() .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); b.Property("PoNumber") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("Priority") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasDefaultValue(0); - - b.Property("PriorityIncrement") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasDefaultValue(0); + .HasColumnType("nvarchar(max)"); b.Property("ProductReceiptNumber") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + .HasColumnType("nvarchar(max)"); b.Property("PurchaseReceiptRequestNumber") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + .HasColumnType("nvarchar(max)"); b.Property("PutawayMode") .IsRequired() @@ -14759,21 +16794,26 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("nvarchar(64)"); b.Property("ReceiptNumber") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + .HasColumnType("nvarchar(max)"); b.Property("Remark") .HasMaxLength(3072) .HasColumnType("nvarchar(3072)") .HasColumnName("Remark"); - b.Property("RpNumber") + b.Property("RequestNumber") + .HasColumnType("nvarchar(max)"); + + b.Property("RequestStatus") + .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)"); + b.Property("RpNumber") + .HasColumnType("nvarchar(max)"); + b.Property("SupplierCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + .HasColumnType("nvarchar(max)"); b.Property("TenantId") .HasColumnType("uniqueidentifier") @@ -14784,17 +16824,6 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasMaxLength(64) .HasColumnType("nvarchar(64)"); - b.Property("UpStreamJobNumber") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("WarehouseCode") - .HasColumnType("nvarchar(max)"); - - b.Property("WorkGroupCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - b.Property("Worker") .HasColumnType("nvarchar(max)"); @@ -14803,14 +16832,17 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.HasIndex("Number") .IsUnique(); - b.ToTable("Job_PutawayJob", (string)null); + b.ToTable("Store_PutawayRequest", (string)null); }); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.PutawayJobDetail", b => + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.PutawayRequestDetail", b => { b.Property("Id") .HasColumnType("uniqueidentifier"); + b.Property("ArriveDate") + .HasColumnType("datetime2"); + b.Property("CreationTime") .HasColumnType("datetime2") .HasColumnName("CreationTime"); @@ -14819,82 +16851,53 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("CreatorId"); - b.Property("FromLocationArea") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("FromLocationCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("FromLocationErpCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("FromLocationGroup") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("FromWarehouseCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("HandledArriveDate") + b.Property("ExpireDate") .HasColumnType("datetime2"); - b.Property("HandledContainerCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("HandledContainerCode"); - - b.Property("HandledExpireDate") - .HasColumnType("datetime2"); + b.Property("FromContainerCode") + .HasColumnType("nvarchar(max)"); - b.Property("HandledLot") + b.Property("FromLocationArea") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("HandledLot"); + .HasColumnName("FromLocationArea"); - b.Property("HandledPackingCode") + b.Property("FromLocationCode") + .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("HandledPackingCode"); - - b.Property("HandledProduceDate") - .HasColumnType("datetime2"); - - b.Property("HandledQty") - .HasColumnType("decimal(18,6)"); + .HasColumnName("FromLocationCode"); - b.Property("HandledSupplierBatch") + b.Property("FromLocationErpCode") + .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("HandledSupplierBatch"); + .HasColumnName("FromLocationErpCode"); - b.Property("HandledToLocationArea") + b.Property("FromLocationGroup") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("HandledToLocationArea"); + .HasColumnName("FromLocationGroup"); - b.Property("HandledToLocationCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("HandledToLocationCode"); + b.Property("FromLot") + .HasColumnType("nvarchar(max)"); - b.Property("HandledToLocationErpCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("HandledToLocationErpCode"); + b.Property("FromPackingCode") + .HasColumnType("nvarchar(max)"); - b.Property("HandledToLocationGroup") + b.Property("FromStatus") + .IsRequired() .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("HandledToLocationGroup"); + .HasColumnType("nvarchar(64)"); - b.Property("HandledToWarehouseCode") + b.Property("FromWarehouseCode") + .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("HandledToWarehouseCode"); + .HasColumnName("FromWarehouseCode"); + + b.Property("InventoryQty") + .HasColumnType("decimal(18,6)"); b.Property("ItemCode") .IsRequired() @@ -14931,94 +16934,85 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.Property("Number") .IsRequired() .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); b.Property("PoLine") .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + .HasColumnType("nvarchar(64)") + .HasColumnName("PoLine"); b.Property("PoNumber") .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + .HasColumnType("nvarchar(64)") + .HasColumnName("PoNumber"); + + b.Property("ProduceDate") + .HasColumnType("datetime2"); b.Property("Qty") .HasPrecision(18, 6) .HasColumnType("decimal(18,6)") .HasColumnName("Qty"); - b.Property("RecommendArriveDate") - .HasColumnType("datetime2"); - - b.Property("RecommendContainerCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendContainerCode"); - - b.Property("RecommendExpireDate") - .HasColumnType("datetime2"); + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); - b.Property("RecommendLot") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendLot"); + b.Property("StdPackQty") + .HasColumnType("decimal(18,6)"); - b.Property("RecommendPackingCode") + b.Property("SupplierBatch") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendPackingCode"); - - b.Property("RecommendProduceDate") - .HasColumnType("datetime2"); + .HasColumnName("SupplierBatch"); - b.Property("RecommendQty") - .HasColumnType("decimal(18,6)"); + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); - b.Property("RecommendSupplierBatch") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendSupplierBatch"); + b.Property("ToContainerCode") + .HasColumnType("nvarchar(max)"); - b.Property("RecommendToLocationArea") + b.Property("ToLocationArea") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendToLocationArea"); + .HasColumnName("ToLocationArea"); - b.Property("RecommendToLocationCode") + b.Property("ToLocationCode") + .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendToLocationCode"); + .HasColumnName("ToLocationCode"); - b.Property("RecommendToLocationErpCode") + b.Property("ToLocationErpCode") + .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendToLocationErpCode"); + .HasColumnName("ToLocationErpCode"); - b.Property("RecommendToLocationGroup") + b.Property("ToLocationGroup") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendToLocationGroup"); + .HasColumnName("ToLocationGroup"); - b.Property("RecommendToWarehouseCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendToWarehouseCode"); + b.Property("ToLot") + .HasColumnType("nvarchar(max)"); - b.Property("Remark") - .HasMaxLength(3072) - .HasColumnType("nvarchar(3072)") - .HasColumnName("Remark"); + b.Property("ToPackingCode") + .HasColumnType("nvarchar(max)"); - b.Property("Status") + b.Property("ToStatus") .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)"); - b.Property("StdPackQty") - .HasColumnType("decimal(18,6)"); - - b.Property("TenantId") - .HasColumnType("uniqueidentifier") - .HasColumnName("TenantId"); + b.Property("ToWarehouseCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToWarehouseCode"); b.Property("Uom") .IsRequired() @@ -15030,10 +17024,10 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.HasIndex("MasterID"); - b.ToTable("Job_PutawayJobDetail", (string)null); + b.ToTable("Store_PutawayRequestDetail", (string)null); }); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.PutawayNote", b => + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ReceiptAbnormalNote", b => { b.Property("Id") .HasColumnType("uniqueidentifier"); @@ -15042,6 +17036,7 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("datetime2"); b.Property("AsnNumber") + .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)"); @@ -15063,15 +17058,6 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("nvarchar(max)") .HasColumnName("ExtraProperties"); - b.Property("InspectNumber") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("JobNumber") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("JobNumber"); - b.Property("LastModificationTime") .HasColumnType("datetime2") .HasColumnName("LastModificationTime"); @@ -15086,28 +17072,18 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("nvarchar(64)") .HasColumnName("Number"); - b.Property("ProductReceiptNumber") - .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("RpNumber") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); b.Property("SupplierCode") + .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)"); @@ -15115,30 +17091,37 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("TenantId"); - b.Property("Type") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - b.Property("Worker") .HasColumnType("nvarchar(max)"); b.HasKey("Id"); - b.HasIndex("Number") + b.HasIndex("SupplierCode"); + + b.HasIndex("AsnNumber", "Number", "SupplierCode", "ReceiptNumber") .IsUnique(); - b.ToTable("Store_PutawayNote", (string)null); + b.ToTable("Store_ReceiptAbnormalNote", (string)null); }); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.PutawayNoteDetail", b => + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ReceiptAbnormalNoteDetail", b => { b.Property("Id") .HasColumnType("uniqueidentifier"); + b.Property("AbnormalType") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + b.Property("ArriveDate") .HasColumnType("datetime2"); + b.Property("ContainerCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ContainerCode"); + b.Property("CreationTime") .HasColumnType("datetime2") .HasColumnName("CreationTime"); @@ -15150,130 +17133,162 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.Property("ExpireDate") .HasColumnType("datetime2"); - b.Property("FromContainerCode") - .HasColumnType("nvarchar(max)"); - - b.Property("FromLocationArea") + b.Property("ItemCode") + .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("FromLocationArea"); + .HasColumnName("ItemCode"); - b.Property("FromLocationCode") - .IsRequired() + b.Property("ItemDesc1") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("FromLocationCode"); + .HasColumnName("ItemDesc1"); - b.Property("FromLocationErpCode") - .IsRequired() + b.Property("ItemDesc2") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("FromLocationErpCode"); + .HasColumnName("ItemDesc2"); - b.Property("FromLocationGroup") + b.Property("ItemName") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("FromLocationGroup"); + .HasColumnName("ItemName"); - b.Property("FromLot") - .HasColumnType("nvarchar(max)"); + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); - b.Property("FromPackingCode") - .HasColumnType("nvarchar(450)"); + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); - b.Property("FromStatus") + b.Property("LocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationArea"); + + b.Property("LocationCode") .IsRequired() .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationCode"); - b.Property("FromWarehouseCode") + b.Property("LocationErpCode") .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("FromWarehouseCode"); + .HasColumnName("LocationErpCode"); - b.Property("HandledArriveDate") - .HasColumnType("datetime2"); + b.Property("LocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationGroup"); - b.Property("HandledContainerCode") + b.Property("Lot") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("HandledContainerCode"); + .HasColumnName("Lot"); - b.Property("HandledExpireDate") - .HasColumnType("datetime2"); + b.Property("MasterID") + .HasColumnType("uniqueidentifier"); - b.Property("HandledLot") + b.Property("Number") + .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("HandledLot"); + .HasColumnName("Number"); - b.Property("HandledPackingCode") + b.Property("PackingCode") + .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("HandledPackingCode"); + .HasColumnName("PackingCode"); - b.Property("HandledProduceDate") + b.Property("Photos") + .HasColumnType("nvarchar(max)"); + + b.Property("ProduceDate") .HasColumnType("datetime2"); - b.Property("HandledQty") - .HasColumnType("decimal(18,6)"); + b.Property("Qty") + .HasPrecision(18, 6) + .HasColumnType("decimal(18,6)") + .HasColumnName("Qty"); - b.Property("HandledSupplierBatch") + b.Property("ReceiptNumber") + .IsRequired() .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("HandledSupplierBatch"); + .HasColumnType("nvarchar(64)"); - b.Property("HandledToLocationArea") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("HandledToLocationArea"); + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); - b.Property("HandledToLocationCode") + b.Property("Status") + .IsRequired() .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("HandledToLocationCode"); + .HasColumnType("nvarchar(64)"); - b.Property("HandledToLocationErpCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("HandledToLocationErpCode"); + b.Property("StdPackQty") + .HasColumnType("decimal(18,6)"); - b.Property("HandledToLocationGroup") + b.Property("SupplierBatch") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("HandledToLocationGroup"); + .HasColumnName("SupplierBatch"); - b.Property("HandledToWarehouseCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("HandledToWarehouseCode"); + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); - b.Property("ItemCode") + b.Property("Uom") .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("ItemCode"); + .HasColumnName("Uom"); - b.Property("ItemDesc1") + b.Property("WarehouseCode") + .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("ItemDesc1"); + .HasColumnName("WarehouseCode"); - b.Property("ItemDesc2") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ItemDesc2"); + b.HasKey("Id"); - b.Property("ItemName") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ItemName"); + b.HasIndex("MasterID"); - b.Property("JobNumber") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("JobNumber"); + b.HasIndex("Number", "PackingCode", "ReceiptNumber") + .IsUnique(); + + b.ToTable("Store_ReceiptAbnormalNoteDetail", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.RecycledMaterialReceiptNote", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ActiveDate") + .HasColumnType("datetime2"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); b.Property("LastModificationTime") .HasColumnType("datetime2") @@ -15283,148 +17298,159 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("LastModifierId"); - b.Property("MasterID") - .HasColumnType("uniqueidentifier"); - b.Property("Number") .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)") .HasColumnName("Number"); - b.Property("PoLine") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("PoLine"); + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); - b.Property("PoNumber") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("PoNumber"); + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); - b.Property("ProduceDate") - .HasColumnType("datetime2"); + b.Property("Worker") + .HasColumnType("nvarchar(max)"); - b.Property("Qty") - .HasPrecision(18, 6) - .HasColumnType("decimal(18,6)") - .HasColumnName("Qty"); + b.HasKey("Id"); - b.Property("RecommendArriveDate") - .HasColumnType("datetime2"); + b.HasIndex("Number") + .IsUnique(); - b.Property("RecommendContainerCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendContainerCode"); + b.ToTable("Store_RecycledMaterialReceiptNote", (string)null); + }); - b.Property("RecommendExpireDate") + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.RecycledMaterialReceiptNoteDetail", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ArriveDate") .HasColumnType("datetime2"); - b.Property("RecommendLot") + b.Property("ContainerCode") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendLot"); + .HasColumnName("ContainerCode"); - b.Property("RecommendPackingCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendPackingCode"); + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); - b.Property("RecommendProduceDate") + b.Property("ExpireDate") .HasColumnType("datetime2"); - b.Property("RecommendQty") - .HasColumnType("decimal(18,6)"); - - b.Property("RecommendSupplierBatch") + b.Property("ItemCode") + .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendSupplierBatch"); + .HasColumnName("ItemCode"); - b.Property("RecommendToLocationArea") + b.Property("ItemDesc1") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendToLocationArea"); + .HasColumnName("ItemDesc1"); - b.Property("RecommendToLocationCode") + b.Property("ItemDesc2") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendToLocationCode"); + .HasColumnName("ItemDesc2"); - b.Property("RecommendToLocationErpCode") + b.Property("ItemName") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendToLocationErpCode"); + .HasColumnName("ItemName"); - b.Property("RecommendToLocationGroup") + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("LocationArea") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendToLocationGroup"); + .HasColumnName("LocationArea"); - b.Property("RecommendToWarehouseCode") + b.Property("LocationCode") + .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendToWarehouseCode"); - - b.Property("Remark") - .HasMaxLength(3072) - .HasColumnType("nvarchar(3072)") - .HasColumnName("Remark"); - - b.Property("StdPackQty") - .HasColumnType("decimal(18,6)"); + .HasColumnName("LocationCode"); - b.Property("SupplierBatch") + b.Property("LocationErpCode") + .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("SupplierBatch"); - - b.Property("TenantId") - .HasColumnType("uniqueidentifier") - .HasColumnName("TenantId"); - - b.Property("ToContainerCode") - .HasColumnType("nvarchar(max)"); + .HasColumnName("LocationErpCode"); - b.Property("ToLocationArea") + b.Property("LocationGroup") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("ToLocationArea"); + .HasColumnName("LocationGroup"); - b.Property("ToLocationCode") - .IsRequired() + b.Property("Lot") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("ToLocationCode"); + .HasColumnName("Lot"); - b.Property("ToLocationErpCode") + b.Property("MasterID") + .HasColumnType("uniqueidentifier"); + + b.Property("Number") .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("ToLocationErpCode"); + .HasColumnName("Number"); - b.Property("ToLocationGroup") + b.Property("PackingCode") + .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("ToLocationGroup"); + .HasColumnName("PackingCode"); - b.Property("ToLot") + 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("ToPackingCode") - .HasColumnType("nvarchar(450)"); + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); - b.Property("ToStatus") + b.Property("Status") .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)"); - b.Property("ToWarehouseCode") - .IsRequired() + b.Property("StdPackQty") + .HasColumnType("decimal(18,6)"); + + b.Property("SupplierBatch") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("ToWarehouseCode"); + .HasColumnName("SupplierBatch"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); b.Property("Uom") .IsRequired() @@ -15432,18 +17458,23 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("nvarchar(64)") .HasColumnName("Uom"); + b.Property("WarehouseCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("WarehouseCode"); + b.HasKey("Id"); b.HasIndex("MasterID"); - b.HasIndex("Number", "FromPackingCode", "FromLocationCode", "ToLocationCode", "ToPackingCode") - .IsUnique() - .HasFilter("[FromPackingCode] IS NOT NULL AND [ToPackingCode] IS NOT NULL"); + b.HasIndex("Number", "PackingCode") + .IsUnique(); - b.ToTable("Store_PutawayNoteDetail", (string)null); + b.ToTable("Store_RecycledMaterialReceiptNoteDetail", (string)null); }); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.PutawayRequest", b => + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.SaleOrder", b => { b.Property("Id") .HasColumnType("uniqueidentifier"); @@ -15451,27 +17482,24 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.Property("ActiveDate") .HasColumnType("datetime2"); - b.Property("AsnNumber") - .HasColumnType("nvarchar(max)"); - - b.Property("AutoAgree") - .HasColumnType("bit"); - - b.Property("AutoCompleteJob") - .HasColumnType("bit"); - - b.Property("AutoHandle") - .HasColumnType("bit"); - - b.Property("AutoSubmit") - .HasColumnType("bit"); - b.Property("ConcurrencyStamp") .IsConcurrencyToken() .HasMaxLength(40) .HasColumnType("nvarchar(40)") .HasColumnName("ConcurrencyStamp"); + b.Property("ContactEmail") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ContactName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ContactPhone") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + b.Property("CreationTime") .HasColumnType("datetime2") .HasColumnName("CreationTime"); @@ -15480,16 +17508,17 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("CreatorId"); - b.Property("DirectCreateNote") - .HasColumnType("bit"); + b.Property("CustomerCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("DueDate") + .HasColumnType("datetime2"); b.Property("ExtraProperties") .HasColumnType("nvarchar(max)") .HasColumnName("ExtraProperties"); - b.Property("InspectNumber") - .HasColumnType("nvarchar(max)"); - b.Property("LastModificationTime") .HasColumnType("datetime2") .HasColumnName("LastModificationTime"); @@ -15504,48 +17533,33 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("nvarchar(64)") .HasColumnName("Number"); - b.Property("PoNumber") - .HasColumnType("nvarchar(max)"); - - b.Property("ProductReceiptNumber") - .HasColumnType("nvarchar(max)"); - - b.Property("PurchaseReceiptRequestNumber") - .HasColumnType("nvarchar(max)"); - - b.Property("PutawayMode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("ReceiptNumber") - .HasColumnType("nvarchar(max)"); + b.Property("OrderDate") + .HasColumnType("datetime2"); b.Property("Remark") .HasMaxLength(3072) .HasColumnType("nvarchar(3072)") .HasColumnName("Remark"); - b.Property("RequestNumber") - .HasColumnType("nvarchar(max)"); - - b.Property("RequestStatus") + b.Property("SoStatus") .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)"); - b.Property("RpNumber") - .HasColumnType("nvarchar(max)"); + b.Property("SoType") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); - b.Property("SupplierCode") - .HasColumnType("nvarchar(max)"); + b.Property("TaxRate") + .ValueGeneratedOnAdd() + .HasColumnType("decimal(18,6)") + .HasDefaultValue(0m); b.Property("TenantId") .HasColumnType("uniqueidentifier") .HasColumnName("TenantId"); - b.Property("Type") - .IsRequired() + b.Property("Version") .HasMaxLength(64) .HasColumnType("nvarchar(64)"); @@ -15554,76 +17568,38 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.HasKey("Id"); + b.HasIndex("CustomerCode"); + b.HasIndex("Number") .IsUnique(); - b.ToTable("Store_PutawayRequest", (string)null); + b.ToTable("Store_SaleOrder", (string)null); }); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.PutawayRequestDetail", b => + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.SaleOrderDetail", b => { b.Property("Id") .HasColumnType("uniqueidentifier"); - b.Property("ArriveDate") - .HasColumnType("datetime2"); - - b.Property("CreationTime") - .HasColumnType("datetime2") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("uniqueidentifier") - .HasColumnName("CreatorId"); - - b.Property("ExpireDate") - .HasColumnType("datetime2"); - - b.Property("FromContainerCode") - .HasColumnType("nvarchar(max)"); - - b.Property("FromLocationArea") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("FromLocationArea"); - - b.Property("FromLocationCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("FromLocationCode"); - - b.Property("FromLocationErpCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("FromLocationErpCode"); - - b.Property("FromLocationGroup") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("FromLocationGroup"); - - b.Property("FromLot") - .HasColumnType("nvarchar(max)"); - - b.Property("FromPackingCode") - .HasColumnType("nvarchar(max)"); + b.Property("ConvertRate") + .ValueGeneratedOnAdd() + .HasColumnType("decimal(18,6)") + .HasDefaultValue(1m); - b.Property("FromStatus") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); - b.Property("FromWarehouseCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("FromWarehouseCode"); + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); - b.Property("InventoryQty") + b.Property("CustomerPackQty") .HasColumnType("decimal(18,6)"); + b.Property("CustomerPackUom") + .HasColumnType("nvarchar(max)"); + b.Property("ItemCode") .IsRequired() .HasMaxLength(64) @@ -15653,6 +17629,11 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("LastModifierId"); + b.Property("LineStatus") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + b.Property("MasterID") .HasColumnType("uniqueidentifier"); @@ -15662,19 +17643,6 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("nvarchar(64)") .HasColumnName("Number"); - b.Property("PoLine") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("PoLine"); - - b.Property("PoNumber") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("PoNumber"); - - b.Property("ProduceDate") - .HasColumnType("datetime2"); - b.Property("Qty") .HasPrecision(18, 6) .HasColumnType("decimal(18,6)") @@ -15685,60 +17653,18 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("nvarchar(3072)") .HasColumnName("Remark"); + b.Property("SoLine") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + b.Property("StdPackQty") .HasColumnType("decimal(18,6)"); - b.Property("SupplierBatch") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("SupplierBatch"); - b.Property("TenantId") .HasColumnType("uniqueidentifier") .HasColumnName("TenantId"); - b.Property("ToContainerCode") - .HasColumnType("nvarchar(max)"); - - b.Property("ToLocationArea") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ToLocationArea"); - - b.Property("ToLocationCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ToLocationCode"); - - b.Property("ToLocationErpCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ToLocationErpCode"); - - b.Property("ToLocationGroup") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ToLocationGroup"); - - b.Property("ToLot") - .HasColumnType("nvarchar(max)"); - - b.Property("ToPackingCode") - .HasColumnType("nvarchar(max)"); - - b.Property("ToStatus") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("ToWarehouseCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ToWarehouseCode"); - b.Property("Uom") .IsRequired() .HasMaxLength(64) @@ -15749,10 +17675,13 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.HasIndex("MasterID"); - b.ToTable("Store_PutawayRequestDetail", (string)null); + b.HasIndex("Number", "SoLine", "ItemCode") + .IsUnique(); + + b.ToTable("Store_SaleOrderDetail", (string)null); }); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ReceiptAbnormalNote", b => + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ScrapNote", b => { b.Property("Id") .HasColumnType("uniqueidentifier"); @@ -15760,11 +17689,6 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.Property("ActiveDate") .HasColumnType("datetime2"); - b.Property("AsnNumber") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - b.Property("ConcurrencyStamp") .IsConcurrencyToken() .HasMaxLength(40) @@ -15783,6 +17707,11 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("nvarchar(max)") .HasColumnName("ExtraProperties"); + b.Property("JobNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("JobNumber"); + b.Property("LastModificationTime") .HasColumnType("datetime2") .HasColumnName("LastModificationTime"); @@ -15797,18 +17726,12 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("nvarchar(64)") .HasColumnName("Number"); - b.Property("ReceiptNumber") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - b.Property("Remark") .HasMaxLength(3072) .HasColumnType("nvarchar(3072)") .HasColumnName("Remark"); - b.Property("SupplierCode") - .IsRequired() + b.Property("ScrapRequestNumber") .HasMaxLength(64) .HasColumnType("nvarchar(64)"); @@ -15816,37 +17739,29 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("TenantId"); + b.Property("Type") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + b.Property("Worker") .HasColumnType("nvarchar(max)"); b.HasKey("Id"); - b.HasIndex("SupplierCode"); - - b.HasIndex("AsnNumber", "Number", "SupplierCode", "ReceiptNumber") + b.HasIndex("Number") .IsUnique(); - b.ToTable("Store_ReceiptAbnormalNote", (string)null); + b.ToTable("Store_ScrapNote", (string)null); }); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ReceiptAbnormalNoteDetail", b => + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ScrapNoteDetail", b => { b.Property("Id") .HasColumnType("uniqueidentifier"); - b.Property("AbnormalType") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - b.Property("ArriveDate") .HasColumnType("datetime2"); - b.Property("ContainerCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ContainerCode"); - b.Property("CreationTime") .HasColumnType("datetime2") .HasColumnName("CreationTime"); @@ -15858,6 +17773,49 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.Property("ExpireDate") .HasColumnType("datetime2"); + b.Property("FromContainerCode") + .HasColumnType("nvarchar(max)"); + + b.Property("FromLocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromLocationArea"); + + b.Property("FromLocationCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromLocationCode"); + + b.Property("FromLocationErpCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromLocationErpCode"); + + b.Property("FromLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromLocationGroup"); + + b.Property("FromLot") + .HasColumnType("nvarchar(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) @@ -15887,85 +17845,85 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("LastModifierId"); - b.Property("LocationArea") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("LocationArea"); + b.Property("MasterID") + .HasColumnType("uniqueidentifier"); - b.Property("LocationCode") + b.Property("Number") .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("LocationCode"); + .HasColumnName("Number"); - b.Property("LocationErpCode") - .IsRequired() + 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)") - .HasColumnName("LocationErpCode"); + .HasColumnType("nvarchar(64)"); - b.Property("LocationGroup") + 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("LocationGroup"); + .HasColumnName("SupplierBatch"); - b.Property("Lot") + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("ToContainerCode") + .HasColumnType("nvarchar(max)"); + + b.Property("ToLocationArea") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("Lot"); - - b.Property("MasterID") - .HasColumnType("uniqueidentifier"); + .HasColumnName("ToLocationArea"); - b.Property("Number") + b.Property("ToLocationCode") .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("Number"); + .HasColumnName("ToLocationCode"); - b.Property("PackingCode") + b.Property("ToLocationErpCode") .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"); + .HasColumnName("ToLocationErpCode"); - b.Property("ReceiptNumber") - .IsRequired() + b.Property("ToLocationGroup") .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + .HasColumnType("nvarchar(64)") + .HasColumnName("ToLocationGroup"); + + b.Property("ToLot") + .HasColumnType("nvarchar(max)"); - b.Property("Remark") - .HasMaxLength(3072) - .HasColumnType("nvarchar(3072)") - .HasColumnName("Remark"); + b.Property("ToPackingCode") + .HasColumnType("nvarchar(max)"); - b.Property("Status") + b.Property("ToStatus") .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)"); - b.Property("StdPackQty") - .HasColumnType("decimal(18,6)"); - - b.Property("SupplierBatch") + b.Property("ToWarehouseCode") + .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("SupplierBatch"); - - b.Property("TenantId") - .HasColumnType("uniqueidentifier") - .HasColumnName("TenantId"); + .HasColumnName("ToWarehouseCode"); b.Property("Uom") .IsRequired() @@ -15973,23 +17931,18 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("nvarchar(64)") .HasColumnName("Uom"); - b.Property("WarehouseCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("WarehouseCode"); - b.HasKey("Id"); b.HasIndex("MasterID"); - b.HasIndex("Number", "PackingCode", "ReceiptNumber") - .IsUnique(); + b.HasIndex("Number", "ItemCode", "FromPackingCode", "FromLocationCode", "ToLocationCode", "FromLot", "FromStatus") + .IsUnique() + .HasFilter("[FromPackingCode] IS NOT NULL AND [FromLot] IS NOT NULL"); - b.ToTable("Store_ReceiptAbnormalNoteDetail", (string)null); + b.ToTable("Store_ScrapNoteDetail", (string)null); }); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.RecycledMaterialReceiptNote", b => + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ScrapRequest", b => { b.Property("Id") .HasColumnType("uniqueidentifier"); @@ -15997,6 +17950,18 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.Property("ActiveDate") .HasColumnType("datetime2"); + b.Property("AutoAgree") + .HasColumnType("bit"); + + b.Property("AutoCompleteJob") + .HasColumnType("bit"); + + b.Property("AutoHandle") + .HasColumnType("bit"); + + b.Property("AutoSubmit") + .HasColumnType("bit"); + b.Property("ConcurrencyStamp") .IsConcurrencyToken() .HasMaxLength(40) @@ -16011,6 +17976,9 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("CreatorId"); + b.Property("DirectCreateNote") + .HasColumnType("bit"); + b.Property("ExtraProperties") .HasColumnType("nvarchar(max)") .HasColumnName("ExtraProperties"); @@ -16034,10 +18002,19 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("nvarchar(3072)") .HasColumnName("Remark"); + b.Property("RequestStatus") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + b.Property("TenantId") .HasColumnType("uniqueidentifier") .HasColumnName("TenantId"); + b.Property("Type") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + b.Property("Worker") .HasColumnType("nvarchar(max)"); @@ -16046,22 +18023,14 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.HasIndex("Number") .IsUnique(); - b.ToTable("Store_RecycledMaterialReceiptNote", (string)null); + b.ToTable("Store_ScrapRequest", (string)null); }); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.RecycledMaterialReceiptNoteDetail", b => + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ScrapRequestDetail", b => { b.Property("Id") .HasColumnType("uniqueidentifier"); - b.Property("ArriveDate") - .HasColumnType("datetime2"); - - b.Property("ContainerCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ContainerCode"); - b.Property("CreationTime") .HasColumnType("datetime2") .HasColumnName("CreationTime"); @@ -16070,9 +18039,6 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("CreatorId"); - b.Property("ExpireDate") - .HasColumnType("datetime2"); - b.Property("ItemCode") .IsRequired() .HasMaxLength(64) @@ -16124,11 +18090,6 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("nvarchar(64)") .HasColumnName("LocationGroup"); - b.Property("Lot") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("Lot"); - b.Property("MasterID") .HasColumnType("uniqueidentifier"); @@ -16138,41 +18099,23 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("nvarchar(64)") .HasColumnName("Number"); - b.Property("PackingCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("PackingCode"); - - b.Property("ProduceDate") - .HasColumnType("datetime2"); - b.Property("Qty") .HasPrecision(18, 6) .HasColumnType("decimal(18,6)") .HasColumnName("Qty"); b.Property("ReasonCode") - .HasColumnType("nvarchar(max)"); + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); b.Property("Remark") .HasMaxLength(3072) .HasColumnType("nvarchar(3072)") .HasColumnName("Remark"); - b.Property("Status") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - b.Property("StdPackQty") .HasColumnType("decimal(18,6)"); - b.Property("SupplierBatch") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("SupplierBatch"); - b.Property("TenantId") .HasColumnType("uniqueidentifier") .HasColumnName("TenantId"); @@ -16193,13 +18136,13 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.HasIndex("MasterID"); - b.HasIndex("Number", "PackingCode") + b.HasIndex("Number", "ItemCode", "LocationCode") .IsUnique(); - b.ToTable("Store_RecycledMaterialReceiptNoteDetail", (string)null); + b.ToTable("Store_ScrapRequestDetail", (string)null); }); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.SaleOrder", b => + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.SupplierAsn", b => { b.Property("Id") .HasColumnType("uniqueidentifier"); @@ -16225,6 +18168,11 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasMaxLength(64) .HasColumnType("nvarchar(64)"); + b.Property("CreateType") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + b.Property("CreationTime") .HasColumnType("datetime2") .HasColumnName("CreationTime"); @@ -16233,7 +18181,11 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("CreatorId"); - b.Property("CustomerCode") + b.Property("Ctype") + .HasColumnType("nvarchar(max)"); + + b.Property("DockCode") + .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)"); @@ -16258,33 +18210,54 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("nvarchar(64)") .HasColumnName("Number"); - b.Property("OrderDate") + b.Property("PlanArriveDate") .HasColumnType("datetime2"); + b.Property("PlanUserCode") + .HasColumnType("nvarchar(max)"); + + b.Property("PoNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + b.Property("Remark") .HasMaxLength(3072) .HasColumnType("nvarchar(3072)") .HasColumnName("Remark"); - b.Property("SoStatus") + b.Property("RpNumber") .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)"); - b.Property("SoType") + b.Property("ShipDate") + .HasColumnType("datetime2"); + + b.Property("Status") + .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)"); - b.Property("TaxRate") - .ValueGeneratedOnAdd() - .HasColumnType("decimal(18,6)") - .HasDefaultValue(0m); + b.Property("SupplierAddress") + .HasColumnType("nvarchar(max)"); + + b.Property("SupplierCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("SupplierName") + .HasColumnType("nvarchar(max)"); b.Property("TenantId") .HasColumnType("uniqueidentifier") .HasColumnName("TenantId"); - b.Property("Version") + b.Property("TimeWindow") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("TruckNumber") .HasMaxLength(64) .HasColumnType("nvarchar(64)"); @@ -16293,23 +18266,29 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.HasKey("Id"); - b.HasIndex("CustomerCode"); - b.HasIndex("Number") .IsUnique(); - b.ToTable("Store_SaleOrder", (string)null); + b.HasIndex("SupplierCode"); + + b.ToTable("Store_SupplierAsn", (string)null); }); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.SaleOrderDetail", b => + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.SupplierAsnDetail", b => { b.Property("Id") .HasColumnType("uniqueidentifier"); + b.Property("ArriveDate") + .HasColumnType("datetime2"); + + b.Property("ContainerCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ContainerCode"); + b.Property("ConvertRate") - .ValueGeneratedOnAdd() - .HasColumnType("decimal(18,6)") - .HasDefaultValue(1m); + .HasColumnType("decimal(18,6)"); b.Property("CreationTime") .HasColumnType("datetime2") @@ -16319,12 +18298,12 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("CreatorId"); - b.Property("CustomerPackQty") - .HasColumnType("decimal(18,6)"); - - b.Property("CustomerPackUom") + b.Property("Ctype") .HasColumnType("nvarchar(max)"); + b.Property("ExpireDate") + .HasColumnType("datetime2"); + b.Property("ItemCode") .IsRequired() .HasMaxLength(64) @@ -16354,10 +18333,10 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("LastModifierId"); - b.Property("LineStatus") - .IsRequired() + b.Property("Lot") .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + .HasColumnType("nvarchar(64)") + .HasColumnName("Lot"); b.Property("MasterID") .HasColumnType("uniqueidentifier"); @@ -16368,24 +18347,58 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("nvarchar(64)") .HasColumnName("Number"); + b.Property("PackingCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("PackingCode"); + + b.Property("PlanUserCode") + .HasColumnType("nvarchar(max)"); + + b.Property("PoLine") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("PoLine"); + + b.Property("PoNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("PoNumber"); + + b.Property("ProduceDate") + .HasColumnType("datetime2"); + + b.Property("ProjectCode") + .HasColumnType("nvarchar(max)"); + b.Property("Qty") .HasPrecision(18, 6) .HasColumnType("decimal(18,6)") .HasColumnName("Qty"); + b.Property("RecommendErpCode") + .HasColumnType("nvarchar(max)"); + b.Property("Remark") .HasMaxLength(3072) .HasColumnType("nvarchar(3072)") .HasColumnName("Remark"); - b.Property("SoLine") - .IsRequired() + b.Property("StdPackQty") + .HasColumnType("decimal(18,6)"); + + b.Property("SupplierBatch") .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + .HasColumnType("nvarchar(64)") + .HasColumnName("SupplierBatch"); - b.Property("StdPackQty") + b.Property("SupplierPackQty") .HasColumnType("decimal(18,6)"); + b.Property("SupplierPackUom") + .HasColumnType("nvarchar(max)"); + b.Property("TenantId") .HasColumnType("uniqueidentifier") .HasColumnName("TenantId"); @@ -16400,26 +18413,46 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.HasIndex("MasterID"); - b.HasIndex("Number", "SoLine", "ItemCode") + b.HasIndex("Number", "ItemCode", "PackingCode") .IsUnique(); - b.ToTable("Store_SaleOrderDetail", (string)null); + b.ToTable("Store_SupplierAsnDetail", (string)null); }); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ScrapNote", b => + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.TransferLibJob", b => { b.Property("Id") .HasColumnType("uniqueidentifier"); - b.Property("ActiveDate") + b.Property("AcceptTime") .HasColumnType("datetime2"); + b.Property("AcceptUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("AcceptUserName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("CompleteTime") + .HasColumnType("datetime2"); + + b.Property("CompleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CompleteUserName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + b.Property("ConcurrencyStamp") .IsConcurrencyToken() .HasMaxLength(40) .HasColumnType("nvarchar(40)") .HasColumnName("ConcurrencyStamp"); + b.Property("ConfirmTime") + .HasColumnType("datetime2"); + b.Property("CreationTime") .HasColumnType("datetime2") .HasColumnName("CreationTime"); @@ -16432,10 +18465,27 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("nvarchar(max)") .HasColumnName("ExtraProperties"); + b.Property("IsAutoComplete") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false); + + b.Property("JobDescription") + .HasMaxLength(1024) + .HasColumnType("nvarchar(1024)"); + b.Property("JobNumber") + .HasColumnType("nvarchar(max)"); + + b.Property("JobStatus") + .IsRequired() .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("JobNumber"); + .HasColumnType("nvarchar(64)"); + + b.Property("JobType") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); b.Property("LastModificationTime") .HasColumnType("datetime2") @@ -16448,23 +18498,45 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.Property("Number") .IsRequired() .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("Number"); + .HasColumnType("nvarchar(64)"); + + b.Property("Priority") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasDefaultValue(0); + + b.Property("PriorityIncrement") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasDefaultValue(0); b.Property("Remark") .HasMaxLength(3072) .HasColumnType("nvarchar(3072)") .HasColumnName("Remark"); - b.Property("ScrapRequestNumber") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + b.Property("RequestNumber") + .HasColumnType("nvarchar(max)"); b.Property("TenantId") .HasColumnType("uniqueidentifier") .HasColumnName("TenantId"); b.Property("Type") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("UpStreamJobNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("UseOnTheWayLocation") + .HasColumnType("bit"); + + b.Property("WarehouseCode") + .HasColumnType("nvarchar(max)"); + + b.Property("WorkGroupCode") .HasMaxLength(64) .HasColumnType("nvarchar(64)"); @@ -16476,10 +18548,10 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.HasIndex("Number") .IsUnique(); - b.ToTable("Store_ScrapNote", (string)null); + b.ToTable("Job_TransferLibJob", (string)null); }); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ScrapNoteDetail", b => + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.TransferLibJobDetail", b => { b.Property("Id") .HasColumnType("uniqueidentifier"); @@ -16524,16 +18596,13 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnName("FromLocationGroup"); b.Property("FromLot") - .HasColumnType("nvarchar(450)"); + .HasColumnType("nvarchar(max)"); b.Property("FromPackingCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + .HasColumnType("nvarchar(max)"); - b.Property("FromStatus") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + b.Property("FromStatus") + .HasColumnType("int"); b.Property("FromWarehouseCode") .IsRequired() @@ -16562,6 +18631,9 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("nvarchar(64)") .HasColumnName("ItemName"); + b.Property("JobStatus") + .HasColumnType("int"); + b.Property("LastModificationTime") .HasColumnType("datetime2") .HasColumnName("LastModificationTime"); @@ -16574,10 +18646,10 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier"); b.Property("Number") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("Number"); + .HasColumnType("nvarchar(max)"); + + b.Property("OnTheWayLocationCode") + .HasColumnType("nvarchar(max)"); b.Property("ProduceDate") .HasColumnType("datetime2"); @@ -16587,9 +18659,8 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("decimal(18,6)") .HasColumnName("Qty"); - b.Property("ReasonCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + b.Property("Reason") + .HasColumnType("nvarchar(max)"); b.Property("Remark") .HasMaxLength(3072) @@ -16639,10 +18710,8 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.Property("ToPackingCode") .HasColumnType("nvarchar(max)"); - b.Property("ToStatus") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + b.Property("ToStatus") + .HasColumnType("int"); b.Property("ToWarehouseCode") .IsRequired() @@ -16660,14 +18729,10 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.HasIndex("MasterID"); - b.HasIndex("Number", "ItemCode", "FromPackingCode", "FromLocationCode", "ToLocationCode", "FromLot", "FromStatus") - .IsUnique() - .HasFilter("[FromPackingCode] IS NOT NULL AND [FromLot] IS NOT NULL"); - - b.ToTable("Store_ScrapNoteDetail", (string)null); + b.ToTable("Job_TransferLibJobDetail", (string)null); }); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ScrapRequest", b => + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.TransferLibNote", b => { b.Property("Id") .HasColumnType("uniqueidentifier"); @@ -16675,24 +18740,18 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.Property("ActiveDate") .HasColumnType("datetime2"); - b.Property("AutoAgree") - .HasColumnType("bit"); - - b.Property("AutoCompleteJob") - .HasColumnType("bit"); - - b.Property("AutoHandle") - .HasColumnType("bit"); - - b.Property("AutoSubmit") - .HasColumnType("bit"); - b.Property("ConcurrencyStamp") .IsConcurrencyToken() .HasMaxLength(40) .HasColumnType("nvarchar(40)") .HasColumnName("ConcurrencyStamp"); + b.Property("ConfirmTime") + .HasColumnType("datetime2"); + + b.Property("Confirmed") + .HasColumnType("bit"); + b.Property("CreationTime") .HasColumnType("datetime2") .HasColumnName("CreationTime"); @@ -16701,13 +18760,15 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("CreatorId"); - b.Property("DirectCreateNote") - .HasColumnType("bit"); - b.Property("ExtraProperties") .HasColumnType("nvarchar(max)") .HasColumnName("ExtraProperties"); + b.Property("JobNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("JobNumber"); + b.Property("LastModificationTime") .HasColumnType("datetime2") .HasColumnName("LastModificationTime"); @@ -16727,19 +18788,21 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("nvarchar(3072)") .HasColumnName("Remark"); - b.Property("RequestStatus") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + b.Property("RequestNumber") + .HasColumnType("nvarchar(max)"); b.Property("TenantId") .HasColumnType("uniqueidentifier") .HasColumnName("TenantId"); b.Property("Type") + .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)"); + b.Property("UseOnTheWayLocation") + .HasColumnType("bit"); + b.Property("Worker") .HasColumnType("nvarchar(max)"); @@ -16748,139 +18811,16 @@ namespace Win_in.Sfs.Wms.Store.Migrations 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); + b.ToTable("Store_TransferLibNote", (string)null); }); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.SplitPackingRec", b => + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.TransferLibNoteDetail", b => { b.Property("Id") .HasColumnType("uniqueidentifier"); - b.Property("ArrivalNoticNumber") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("nvarchar(40)") - .HasColumnName("ConcurrencyStamp"); + b.Property("ArriveDate") + .HasColumnType("datetime2"); b.Property("CreationTime") .HasColumnType("datetime2") @@ -16890,54 +18830,73 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("CreatorId"); - b.Property("ExtraProperties") - .HasColumnType("nvarchar(max)") - .HasColumnName("ExtraProperties"); + b.Property("ExpireDate") + .HasColumnType("datetime2"); - b.Property("FromLot") + b.Property("FromContainerCode") + .HasColumnType("nvarchar(max)"); + + b.Property("FromLocationArea") .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + .HasColumnType("nvarchar(64)") + .HasColumnName("FromLocationArea"); - b.Property("FromPackingCode") + b.Property("FromLocationCode") .IsRequired() .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + .HasColumnType("nvarchar(64)") + .HasColumnName("FromLocationCode"); - b.Property("FromQty") - .HasPrecision(18, 6) - .HasColumnType("decimal(18,6)"); + b.Property("FromLocationErpCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromLocationErpCode"); - b.Property("FromStdPackQty") - .HasColumnType("decimal(18,6)"); + b.Property("FromLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromLocationGroup"); + + b.Property("FromLot") + .HasColumnType("nvarchar(max)"); - b.Property("FromTopPackingCode") + b.Property("FromPackingCode") + .HasColumnType("nvarchar(450)"); + + b.Property("FromStatus") .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)"); - b.Property("FromUom") + b.Property("FromWarehouseCode") .IsRequired() .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + .HasColumnType("nvarchar(64)") + .HasColumnName("FromWarehouseCode"); b.Property("ItemCode") .IsRequired() .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemCode"); b.Property("ItemDesc1") - .HasMaxLength(1024) - .HasColumnType("nvarchar(1024)"); + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc1"); b.Property("ItemDesc2") - .HasMaxLength(1024) - .HasColumnType("nvarchar(1024)"); + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc2"); b.Property("ItemName") .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemName"); - b.Property("LabelType") + b.Property("JobStatus") .HasColumnType("int"); b.Property("LastModificationTime") @@ -16948,72 +18907,107 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("LastModifierId"); - b.Property("OprType") - .HasColumnType("int"); + b.Property("MasterID") + .HasColumnType("uniqueidentifier"); - b.Property("PurchaseInfo_AsnNumber") + b.Property("Number") + .IsRequired() .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); - b.Property("PurchaseInfo_PoNumber") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + b.Property("OnTheWayLocationCode") + .HasColumnType("nvarchar(max)"); - b.Property("PutOnShelfNumber") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + b.Property("ProduceDate") + .HasColumnType("datetime2"); + + b.Property("Qty") + .HasPrecision(18, 6) + .HasColumnType("decimal(18,6)") + .HasColumnName("Qty"); - b.Property("ReceiptRecNumber") + b.Property("Reason") .HasMaxLength(64) .HasColumnType("nvarchar(64)"); b.Property("Remark") - .HasColumnType("nvarchar(max)"); + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("StdPackQty") + .HasColumnType("decimal(18,6)"); - b.Property("TaskOrderNumber") + b.Property("SupplierBatch") .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + .HasColumnType("nvarchar(64)") + .HasColumnName("SupplierBatch"); b.Property("TenantId") .HasColumnType("uniqueidentifier") .HasColumnName("TenantId"); - b.Property("ToLot") + b.Property("ToContainerCode") + .HasColumnType("nvarchar(max)"); + + b.Property("ToLocationArea") .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + .HasColumnType("nvarchar(64)") + .HasColumnName("ToLocationArea"); - b.Property("ToPackingCode") + b.Property("ToLocationCode") .IsRequired() .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + .HasColumnType("nvarchar(64)") + .HasColumnName("ToLocationCode"); - b.Property("ToQty") - .HasPrecision(18, 6) - .HasColumnType("decimal(18,6)"); + b.Property("ToLocationErpCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToLocationErpCode"); - b.Property("ToStdPackQty") - .HasColumnType("decimal(18,6)"); + b.Property("ToLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToLocationGroup"); + + b.Property("ToLot") + .HasColumnType("nvarchar(max)"); + + b.Property("ToPackingCode") + .HasColumnType("nvarchar(max)"); - b.Property("ToTopPackingCode") + b.Property("ToStatus") .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)"); - b.Property("ToUom") + b.Property("ToWarehouseCode") .IsRequired() .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + .HasColumnType("nvarchar(64)") + .HasColumnName("ToWarehouseCode"); + + b.Property("Uom") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Uom"); b.HasKey("Id"); - b.HasIndex("ToPackingCode"); + b.HasIndex("MasterID"); - b.HasIndex("FromPackingCode", "ToPackingCode"); + b.HasIndex("Number", "FromPackingCode", "FromLocationCode", "ToLocationCode", "FromStatus", "ToStatus") + .IsUnique() + .HasFilter("[FromPackingCode] IS NOT NULL"); - b.ToTable("Store_SplitPackingRec", (string)null); + b.ToTable("Store_TransferLibNoteDetail", (string)null); }); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.SupplierAsn", b => + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.TransferLibRequest", b => { b.Property("Id") .HasColumnType("uniqueidentifier"); @@ -17021,29 +19015,24 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.Property("ActiveDate") .HasColumnType("datetime2"); + b.Property("AutoAgree") + .HasColumnType("bit"); + + b.Property("AutoCompleteJob") + .HasColumnType("bit"); + + b.Property("AutoHandle") + .HasColumnType("bit"); + + b.Property("AutoSubmit") + .HasColumnType("bit"); + b.Property("ConcurrencyStamp") .IsConcurrencyToken() .HasMaxLength(40) .HasColumnType("nvarchar(40)") .HasColumnName("ConcurrencyStamp"); - b.Property("ContactEmail") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("ContactName") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("ContactPhone") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("CreateType") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - b.Property("CreationTime") .HasColumnType("datetime2") .HasColumnName("CreationTime"); @@ -17052,16 +19041,8 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("CreatorId"); - b.Property("Ctype") - .HasColumnType("nvarchar(max)"); - - b.Property("DockCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("DueDate") - .HasColumnType("datetime2"); + b.Property("DirectCreateNote") + .HasColumnType("bit"); b.Property("ExtraProperties") .HasColumnType("nvarchar(max)") @@ -17081,56 +19062,26 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("nvarchar(64)") .HasColumnName("Number"); - b.Property("PlanArriveDate") - .HasColumnType("datetime2"); - - b.Property("PlanUserCode") - .HasColumnType("nvarchar(max)"); - - b.Property("PoNumber") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - b.Property("Remark") .HasMaxLength(3072) .HasColumnType("nvarchar(3072)") .HasColumnName("Remark"); - b.Property("RpNumber") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("ShipDate") - .HasColumnType("datetime2"); - - b.Property("Status") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("SupplierAddress") - .HasColumnType("nvarchar(max)"); - - b.Property("SupplierCode") + b.Property("RequestStatus") .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)"); - b.Property("SupplierName") - .HasColumnType("nvarchar(max)"); - b.Property("TenantId") .HasColumnType("uniqueidentifier") .HasColumnName("TenantId"); - b.Property("TimeWindow") + b.Property("Type") .HasMaxLength(64) .HasColumnType("nvarchar(64)"); - b.Property("TruckNumber") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + b.Property("UseOnTheWayLocation") + .HasColumnType("bit"); b.Property("Worker") .HasColumnType("nvarchar(max)"); @@ -17140,12 +19091,10 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.HasIndex("Number") .IsUnique(); - b.HasIndex("SupplierCode"); - - b.ToTable("Store_SupplierAsn", (string)null); + b.ToTable("Store_TransferLibRequest", (string)null); }); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.SupplierAsnDetail", b => + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.TransferLibRequestDetail", b => { b.Property("Id") .HasColumnType("uniqueidentifier"); @@ -17153,27 +19102,58 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.Property("ArriveDate") .HasColumnType("datetime2"); - b.Property("ContainerCode") + 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("ContainerCode"); + .HasColumnName("FromLocationArea"); - b.Property("ConvertRate") - .HasColumnType("decimal(18,6)"); + b.Property("FromLocationCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromLocationCode"); - b.Property("CreationTime") - .HasColumnType("datetime2") - .HasColumnName("CreationTime"); + b.Property("FromLocationErpCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromLocationErpCode"); - b.Property("CreatorId") - .HasColumnType("uniqueidentifier") - .HasColumnName("CreatorId"); + b.Property("FromLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromLocationGroup"); - b.Property("Ctype") + b.Property("FromLot") .HasColumnType("nvarchar(max)"); - b.Property("ExpireDate") - .HasColumnType("datetime2"); + 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() @@ -17196,6 +19176,9 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("nvarchar(64)") .HasColumnName("ItemName"); + b.Property("JobStatus") + .HasColumnType("int"); + b.Property("LastModificationTime") .HasColumnType("datetime2") .HasColumnName("LastModificationTime"); @@ -17204,11 +19187,6 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("LastModifierId"); - b.Property("Lot") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("Lot"); - b.Property("MasterID") .HasColumnType("uniqueidentifier"); @@ -17218,37 +19196,15 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("nvarchar(64)") .HasColumnName("Number"); - b.Property("PackingCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("PackingCode"); - - b.Property("PlanUserCode") - .HasColumnType("nvarchar(max)"); - - b.Property("PoLine") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("PoLine"); - - b.Property("PoNumber") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("PoNumber"); - b.Property("ProduceDate") .HasColumnType("datetime2"); - b.Property("ProjectCode") - .HasColumnType("nvarchar(max)"); - b.Property("Qty") .HasPrecision(18, 6) .HasColumnType("decimal(18,6)") .HasColumnName("Qty"); - b.Property("RecommendErpCode") + b.Property("Reason") .HasColumnType("nvarchar(max)"); b.Property("Remark") @@ -17264,16 +19220,52 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("nvarchar(64)") .HasColumnName("SupplierBatch"); - b.Property("SupplierPackQty") - .HasColumnType("decimal(18,6)"); - - b.Property("SupplierPackUom") - .HasColumnType("nvarchar(max)"); - b.Property("TenantId") .HasColumnType("uniqueidentifier") .HasColumnName("TenantId"); + b.Property("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) @@ -17284,10 +19276,7 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.HasIndex("MasterID"); - b.HasIndex("Number", "ItemCode", "PackingCode") - .IsUnique(); - - b.ToTable("Store_SupplierAsnDetail", (string)null); + b.ToTable("Store_TransferLibRequestDetail", (string)null); }); modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.TransferNote", b => @@ -20787,6 +22776,87 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.ToTable("Store_WorkOrderDetail", (string)null); }); + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Equipments.EquipmentRecord", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("BarCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Batch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("EqptCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("FromLocCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("PartCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Qty") + .HasColumnType("decimal(18,6)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("State") + .HasColumnType("int"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("ToLocCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Type") + .HasMaxLength(64) + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("EqptCode"); + + b.ToTable("Store_EquipmentRecord", (string)null); + }); + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.BackFlushNoteDetail", b => { b.HasOne("Win_in.Sfs.Wms.Store.Domain.BackFlushNote", null) @@ -20814,6 +22884,33 @@ namespace Win_in.Sfs.Wms.Store.Migrations .IsRequired(); }); + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ContainerJobDetail", b => + { + b.HasOne("Win_in.Sfs.Wms.Store.Domain.ContainerJob", null) + .WithMany("Details") + .HasForeignKey("MasterID") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ContainerNoteDetail", b => + { + b.HasOne("Win_in.Sfs.Wms.Store.Domain.ContainerNote", null) + .WithMany("Details") + .HasForeignKey("MasterID") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ContainerRequestDetail", b => + { + b.HasOne("Win_in.Sfs.Wms.Store.Domain.ContainerRequest", null) + .WithMany("Details") + .HasForeignKey("MasterID") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.CountAdjustNoteDetail", b => { b.HasOne("Win_in.Sfs.Wms.Store.Domain.CountAdjustNote", null) @@ -21174,6 +23271,15 @@ namespace Win_in.Sfs.Wms.Store.Migrations .IsRequired(); }); + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ProductRecycleJobDetail", b => + { + b.HasOne("Win_in.Sfs.Wms.Store.Domain.ProductRecycleJob", null) + .WithMany("Details") + .HasForeignKey("MasterID") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ProductRecycleMaterialDetail", b => { b.HasOne("Win_in.Sfs.Wms.Store.Domain.ProductRecycleNote", null) @@ -21345,6 +23451,33 @@ namespace Win_in.Sfs.Wms.Store.Migrations .IsRequired(); }); + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.TransferLibJobDetail", b => + { + b.HasOne("Win_in.Sfs.Wms.Store.Domain.TransferLibJob", null) + .WithMany("Details") + .HasForeignKey("MasterID") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.TransferLibNoteDetail", b => + { + b.HasOne("Win_in.Sfs.Wms.Store.Domain.TransferLibNote", null) + .WithMany("Details") + .HasForeignKey("MasterID") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.TransferLibRequestDetail", b => + { + b.HasOne("Win_in.Sfs.Wms.Store.Domain.TransferLibRequest", null) + .WithMany("Details") + .HasForeignKey("MasterID") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.TransferNoteDetail", b => { b.HasOne("Win_in.Sfs.Wms.Store.Domain.TransferNote", null) @@ -21468,6 +23601,21 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.Navigation("Details"); }); + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ContainerJob", b => + { + b.Navigation("Details"); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ContainerNote", b => + { + b.Navigation("Details"); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ContainerRequest", b => + { + b.Navigation("Details"); + }); + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.CountAdjustNote", b => { b.Navigation("Details"); @@ -21659,6 +23807,11 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.Navigation("Details"); }); + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ProductRecycleJob", b => + { + b.Navigation("Details"); + }); + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ProductRecycleNote", b => { b.Navigation("Details"); @@ -21751,6 +23904,21 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.Navigation("Details"); }); + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.TransferLibJob", b => + { + b.Navigation("Details"); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.TransferLibNote", b => + { + b.Navigation("Details"); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.TransferLibRequest", b => + { + b.Navigation("Details"); + }); + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.TransferNote", b => { b.Navigation("Details"); diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/Migrations/20240327025142_transferLib.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/Migrations/20240327025142_transferLib.cs new file mode 100644 index 000000000..4323f7a1f --- /dev/null +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/Migrations/20240327025142_transferLib.cs @@ -0,0 +1,361 @@ +using System; +using Microsoft.EntityFrameworkCore.Migrations; + +#nullable disable + +namespace Win_in.Sfs.Wms.Store.Migrations +{ + public partial class transferLib : Migration + { + protected override void Up(MigrationBuilder migrationBuilder) + { + + + migrationBuilder.CreateTable( + name: "Job_TransferLibJob", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + RequestNumber = table.Column(type: "nvarchar(max)", nullable: true), + JobNumber = table.Column(type: "nvarchar(max)", nullable: true), + Type = table.Column(type: "nvarchar(max)", nullable: false), + UseOnTheWayLocation = table.Column(type: "bit", nullable: false), + ConfirmTime = table.Column(type: "datetime2", nullable: true), + ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true), + ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: true), + CreationTime = table.Column(type: "datetime2", nullable: false), + CreatorId = table.Column(type: "uniqueidentifier", nullable: true), + LastModificationTime = table.Column(type: "datetime2", nullable: true), + LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + Remark = table.Column(type: "nvarchar(3072)", maxLength: 3072, nullable: true), + Worker = table.Column(type: "nvarchar(max)", nullable: true), + Number = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + UpStreamJobNumber = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + JobDescription = table.Column(type: "nvarchar(1024)", maxLength: 1024, nullable: true), + JobType = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + JobStatus = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + Priority = table.Column(type: "int", nullable: false, defaultValue: 0), + PriorityIncrement = table.Column(type: "int", nullable: false, defaultValue: 0), + WorkGroupCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + IsAutoComplete = table.Column(type: "bit", nullable: false, defaultValue: false), + AcceptUserId = table.Column(type: "uniqueidentifier", nullable: true), + AcceptUserName = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + AcceptTime = table.Column(type: "datetime2", nullable: true), + CompleteUserId = table.Column(type: "uniqueidentifier", nullable: true), + CompleteUserName = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + CompleteTime = table.Column(type: "datetime2", nullable: true), + WarehouseCode = table.Column(type: "nvarchar(max)", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_Job_TransferLibJob", x => x.Id); + }); + + + + migrationBuilder.CreateTable( + name: "Store_TransferLibNote", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + RequestNumber = table.Column(type: "nvarchar(max)", nullable: true), + JobNumber = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + Type = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + UseOnTheWayLocation = table.Column(type: "bit", nullable: false), + ConfirmTime = table.Column(type: "datetime2", nullable: true), + Confirmed = table.Column(type: "bit", nullable: false), + ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true), + ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: true), + CreationTime = table.Column(type: "datetime2", nullable: false), + CreatorId = table.Column(type: "uniqueidentifier", nullable: true), + LastModificationTime = table.Column(type: "datetime2", nullable: true), + LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + Remark = table.Column(type: "nvarchar(3072)", maxLength: 3072, nullable: true), + Worker = table.Column(type: "nvarchar(max)", nullable: true), + Number = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + ActiveDate = table.Column(type: "datetime2", nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_Store_TransferLibNote", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "Store_TransferLibRequest", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + Type = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + UseOnTheWayLocation = table.Column(type: "bit", nullable: false), + ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true), + ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: true), + CreationTime = table.Column(type: "datetime2", nullable: false), + CreatorId = table.Column(type: "uniqueidentifier", nullable: true), + LastModificationTime = table.Column(type: "datetime2", nullable: true), + LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + Remark = table.Column(type: "nvarchar(3072)", maxLength: 3072, nullable: true), + Worker = table.Column(type: "nvarchar(max)", nullable: true), + Number = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + ActiveDate = table.Column(type: "datetime2", nullable: false), + AutoSubmit = table.Column(type: "bit", nullable: false), + AutoAgree = table.Column(type: "bit", nullable: false), + AutoHandle = table.Column(type: "bit", nullable: false), + AutoCompleteJob = table.Column(type: "bit", nullable: false), + DirectCreateNote = table.Column(type: "bit", nullable: false), + RequestStatus = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_Store_TransferLibRequest", x => x.Id); + }); + + + migrationBuilder.CreateTable( + name: "Job_TransferLibJobDetail", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + OnTheWayLocationCode = table.Column(type: "nvarchar(max)", nullable: true), + Reason = table.Column(type: "nvarchar(max)", nullable: true), + JobStatus = table.Column(type: "int", nullable: false), + CreationTime = table.Column(type: "datetime2", nullable: false), + CreatorId = table.Column(type: "uniqueidentifier", nullable: true), + LastModificationTime = table.Column(type: "datetime2", nullable: true), + LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), + MasterID = table.Column(type: "uniqueidentifier", nullable: false), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + Number = table.Column(type: "nvarchar(max)", nullable: true), + Remark = table.Column(type: "nvarchar(3072)", maxLength: 3072, nullable: true), + ItemName = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + ItemDesc1 = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + ItemDesc2 = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + ItemCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + Uom = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + Qty = table.Column(type: "decimal(18,6)", precision: 18, scale: 6, nullable: false), + StdPackQty = table.Column(type: "decimal(18,6)", nullable: false), + FromPackingCode = table.Column(type: "nvarchar(max)", nullable: true), + ToPackingCode = table.Column(type: "nvarchar(max)", nullable: true), + FromContainerCode = table.Column(type: "nvarchar(max)", nullable: true), + ToContainerCode = table.Column(type: "nvarchar(max)", nullable: true), + FromLot = table.Column(type: "nvarchar(max)", nullable: true), + ToLot = table.Column(type: "nvarchar(max)", nullable: true), + SupplierBatch = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + ArriveDate = table.Column(type: "datetime2", nullable: false), + ProduceDate = table.Column(type: "datetime2", nullable: false), + ExpireDate = table.Column(type: "datetime2", nullable: false), + FromLocationCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + FromLocationArea = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + FromLocationGroup = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + FromLocationErpCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + FromWarehouseCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + FromStatus = table.Column(type: "int", nullable: false), + ToLocationCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + ToLocationArea = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + ToLocationGroup = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + ToLocationErpCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + ToWarehouseCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + ToStatus = table.Column(type: "int", nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_Job_TransferLibJobDetail", x => x.Id); + table.ForeignKey( + name: "FK_Job_TransferLibJobDetail_Job_TransferLibJob_MasterID", + column: x => x.MasterID, + principalTable: "Job_TransferLibJob", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }); + + + migrationBuilder.CreateTable( + name: "Store_TransferLibNoteDetail", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + OnTheWayLocationCode = table.Column(type: "nvarchar(max)", nullable: true), + Reason = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + JobStatus = table.Column(type: "int", nullable: false), + CreationTime = table.Column(type: "datetime2", nullable: false), + CreatorId = table.Column(type: "uniqueidentifier", nullable: true), + LastModificationTime = table.Column(type: "datetime2", nullable: true), + LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), + MasterID = table.Column(type: "uniqueidentifier", nullable: false), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + Number = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + Remark = table.Column(type: "nvarchar(3072)", maxLength: 3072, nullable: true), + ItemName = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + ItemDesc1 = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + ItemDesc2 = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + ItemCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + Uom = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + Qty = table.Column(type: "decimal(18,6)", precision: 18, scale: 6, nullable: false), + StdPackQty = table.Column(type: "decimal(18,6)", nullable: false), + FromPackingCode = table.Column(type: "nvarchar(450)", nullable: true), + ToPackingCode = table.Column(type: "nvarchar(max)", nullable: true), + FromContainerCode = table.Column(type: "nvarchar(max)", nullable: true), + ToContainerCode = table.Column(type: "nvarchar(max)", nullable: true), + FromLot = table.Column(type: "nvarchar(max)", nullable: true), + ToLot = table.Column(type: "nvarchar(max)", nullable: true), + SupplierBatch = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + ArriveDate = table.Column(type: "datetime2", nullable: false), + ProduceDate = table.Column(type: "datetime2", nullable: false), + ExpireDate = table.Column(type: "datetime2", nullable: false), + FromLocationCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + FromLocationArea = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + FromLocationGroup = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + FromLocationErpCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + FromWarehouseCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + FromStatus = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + ToLocationCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + ToLocationArea = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + ToLocationGroup = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + ToLocationErpCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + ToWarehouseCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + ToStatus = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_Store_TransferLibNoteDetail", x => x.Id); + table.ForeignKey( + name: "FK_Store_TransferLibNoteDetail_Store_TransferLibNote_MasterID", + column: x => x.MasterID, + principalTable: "Store_TransferLibNote", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }); + + migrationBuilder.CreateTable( + name: "Store_TransferLibRequestDetail", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + Reason = table.Column(type: "nvarchar(max)", nullable: true), + JobStatus = table.Column(type: "int", nullable: false), + CreationTime = table.Column(type: "datetime2", nullable: false), + CreatorId = table.Column(type: "uniqueidentifier", nullable: true), + LastModificationTime = table.Column(type: "datetime2", nullable: true), + LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), + MasterID = table.Column(type: "uniqueidentifier", nullable: false), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + Number = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + Remark = table.Column(type: "nvarchar(3072)", maxLength: 3072, nullable: true), + ItemName = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + ItemDesc1 = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + ItemDesc2 = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + ItemCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + Uom = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + Qty = table.Column(type: "decimal(18,6)", precision: 18, scale: 6, nullable: false), + StdPackQty = table.Column(type: "decimal(18,6)", nullable: false), + FromPackingCode = table.Column(type: "nvarchar(max)", nullable: true), + ToPackingCode = table.Column(type: "nvarchar(max)", nullable: true), + FromContainerCode = table.Column(type: "nvarchar(max)", nullable: true), + ToContainerCode = table.Column(type: "nvarchar(max)", nullable: true), + FromLot = table.Column(type: "nvarchar(max)", nullable: true), + ToLot = table.Column(type: "nvarchar(max)", nullable: true), + SupplierBatch = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + ArriveDate = table.Column(type: "datetime2", nullable: false), + ProduceDate = table.Column(type: "datetime2", nullable: false), + ExpireDate = table.Column(type: "datetime2", nullable: false), + FromLocationCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + FromLocationArea = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + FromLocationGroup = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + FromLocationErpCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + FromWarehouseCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + FromStatus = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + ToLocationCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + ToLocationArea = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + ToLocationGroup = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + ToLocationErpCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + ToWarehouseCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + ToStatus = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_Store_TransferLibRequestDetail", x => x.Id); + table.ForeignKey( + name: "FK_Store_TransferLibRequestDetail_Store_TransferLibRequest_MasterID", + column: x => x.MasterID, + principalTable: "Store_TransferLibRequest", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }); + + + + migrationBuilder.CreateIndex( + name: "IX_Job_TransferLibJob_Number", + table: "Job_TransferLibJob", + column: "Number", + unique: true); + + migrationBuilder.CreateIndex( + name: "IX_Job_TransferLibJobDetail_MasterID", + table: "Job_TransferLibJobDetail", + column: "MasterID"); + + + + migrationBuilder.CreateIndex( + name: "IX_Store_TransferLibNote_Number", + table: "Store_TransferLibNote", + column: "Number", + unique: true); + + migrationBuilder.CreateIndex( + name: "IX_Store_TransferLibNoteDetail_MasterID", + table: "Store_TransferLibNoteDetail", + column: "MasterID"); + + migrationBuilder.CreateIndex( + name: "IX_Store_TransferLibNoteDetail_Number_FromPackingCode_FromLocationCode_ToLocationCode_FromStatus_ToStatus", + table: "Store_TransferLibNoteDetail", + columns: new[] { "Number", "FromPackingCode", "FromLocationCode", "ToLocationCode", "FromStatus", "ToStatus" }, + unique: true, + filter: "[FromPackingCode] IS NOT NULL"); + + migrationBuilder.CreateIndex( + name: "IX_Store_TransferLibRequest_Number", + table: "Store_TransferLibRequest", + column: "Number", + unique: true); + + migrationBuilder.CreateIndex( + name: "IX_Store_TransferLibRequestDetail_MasterID", + table: "Store_TransferLibRequestDetail", + column: "MasterID"); + } + + protected override void Down(MigrationBuilder migrationBuilder) + { + + migrationBuilder.DropTable( + name: "Job_TransferLibJobDetail"); + + + migrationBuilder.DropTable( + name: "Store_TransferLibNoteDetail"); + + migrationBuilder.DropTable( + name: "Store_TransferLibRequestDetail"); + + migrationBuilder.DropTable( + name: "Job_ContainerJob"); + + + migrationBuilder.DropTable( + name: "Job_TransferLibJob"); + + + migrationBuilder.DropTable( + name: "Store_TransferLibNote"); + + migrationBuilder.DropTable( + name: "Store_TransferLibRequest"); + + } + } +} diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/Migrations/20240223065640_base.Designer.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/Migrations/20240328035332_Update_2024_03_28_ProductLine.Designer.cs similarity index 83% rename from be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/Migrations/20240223065640_base.Designer.cs rename to be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/Migrations/20240328035332_Update_2024_03_28_ProductLine.Designer.cs index 0703708b5..e22cdcc7a 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/Migrations/20240223065640_base.Designer.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/Migrations/20240328035332_Update_2024_03_28_ProductLine.Designer.cs @@ -13,8 +13,8 @@ using Win_in.Sfs.Wms.Store.EntityFrameworkCore; namespace Win_in.Sfs.Wms.Store.Migrations { [DbContext(typeof(StoreDbContext))] - [Migration("20240223065640_base")] - partial class @base + [Migration("20240328035332_Update_2024_03_28_ProductLine")] + partial class Update_2024_03_28_ProductLine { protected override void BuildTargetModel(ModelBuilder modelBuilder) { @@ -824,27 +824,42 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.ToTable("Store_ContainerBindNoteDetail", (string)null); }); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.CountAdjustNote", b => + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ContainerJob", b => { b.Property("Id") .HasColumnType("uniqueidentifier"); - b.Property("ActiveDate") + b.Property("AcceptTime") + .HasColumnType("datetime2"); + + b.Property("AcceptUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("AcceptUserName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("CompleteTime") .HasColumnType("datetime2"); + b.Property("CompleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CompleteUserName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + b.Property("ConcurrencyStamp") .IsConcurrencyToken() .HasMaxLength(40) .HasColumnType("nvarchar(40)") .HasColumnName("ConcurrencyStamp"); - b.Property("CountAdjustRequestNumber") - .HasColumnType("nvarchar(max)"); - - b.Property("CountNoteNumber") - .HasColumnType("nvarchar(max)"); + b.Property("ContainerRequestNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); - b.Property("CountPlanNumber") + b.Property("ContainerType") .HasMaxLength(64) .HasColumnType("nvarchar(64)"); @@ -860,11 +875,24 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("nvarchar(max)") .HasColumnName("ExtraProperties"); - b.Property("IsAdjusted") - .HasColumnType("bit"); + b.Property("IsAutoComplete") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false); - b.Property("JobNumber") - .HasColumnType("nvarchar(max)"); + 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") @@ -877,19 +905,43 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.Property("Number") .IsRequired() .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("Number"); + .HasColumnType("nvarchar(64)"); + + b.Property("Priority") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasDefaultValue(0); + + b.Property("PriorityIncrement") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasDefaultValue(0); b.Property("Remark") .HasMaxLength(3072) .HasColumnType("nvarchar(3072)") .HasColumnName("Remark"); + b.Property("RequestLocationCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("SpecificationsType") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + b.Property("TenantId") .HasColumnType("uniqueidentifier") .HasColumnName("TenantId"); - b.Property("Type") + b.Property("UpStreamJobNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("WarehouseCode") + .HasColumnType("nvarchar(max)"); + + b.Property("WorkGroupCode") .HasMaxLength(64) .HasColumnType("nvarchar(64)"); @@ -901,47 +953,83 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.HasIndex("Number") .IsUnique(); - b.ToTable("Store_CountAdjustNote", (string)null); + b.ToTable("Job_ContainerJob", (string)null); }); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.CountAdjustNoteDetail", b => + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ContainerJobDetail", b => { b.Property("Id") .HasColumnType("uniqueidentifier"); - b.Property("AdjustQty") - .HasColumnType("decimal(18,6)"); + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); - b.Property("ArriveDate") + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("FromLocationCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("HandledArriveDate") .HasColumnType("datetime2"); - b.Property("ContainerCode") + b.Property("HandledContainerCode") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("ContainerCode"); + .HasColumnName("HandledContainerCode"); - b.Property("CountLabel") - .IsRequired() + b.Property("HandledExpireDate") + .HasColumnType("datetime2"); + + b.Property("HandledFromLocationArea") .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledFromLocationArea"); - b.Property("CountQty") - .HasColumnType("decimal(18,6)"); + b.Property("HandledFromLocationCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledFromLocationCode"); - b.Property("CreationTime") - .HasColumnType("datetime2") - .HasColumnName("CreationTime"); + b.Property("HandledFromLocationErpCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledFromLocationErpCode"); - b.Property("CreatorId") - .HasColumnType("uniqueidentifier") - .HasColumnName("CreatorId"); + b.Property("HandledFromLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledFromLocationGroup"); - b.Property("ExpireDate") + 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("InventoryQty") + b.Property("HandledQty") .HasColumnType("decimal(18,6)"); + b.Property("HandledSupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledSupplierBatch"); + b.Property("ItemCode") .IsRequired() .HasMaxLength(64) @@ -971,54 +1059,70 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("LastModifierId"); - b.Property("LocationArea") + b.Property("MasterID") + .HasColumnType("uniqueidentifier"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("RecommendArriveDate") + .HasColumnType("datetime2"); + + b.Property("RecommendContainerCode") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("LocationArea"); + .HasColumnName("RecommendContainerCode"); - b.Property("LocationCode") - .IsRequired() + b.Property("RecommendExpireDate") + .HasColumnType("datetime2"); + + b.Property("RecommendFromLocationArea") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("LocationCode"); + .HasColumnName("RecommendFromLocationArea"); - b.Property("LocationErpCode") - .IsRequired() + b.Property("RecommendFromLocationCode") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("LocationErpCode"); + .HasColumnName("RecommendFromLocationCode"); - b.Property("LocationGroup") + b.Property("RecommendFromLocationErpCode") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("LocationGroup"); + .HasColumnName("RecommendFromLocationErpCode"); - b.Property("Lot") + b.Property("RecommendFromLocationGroup") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("Lot"); + .HasColumnName("RecommendFromLocationGroup"); - b.Property("MasterID") - .HasColumnType("uniqueidentifier"); + b.Property("RecommendFromWarehouseCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendFromWarehouseCode"); - b.Property("Number") - .IsRequired() + b.Property("RecommendLot") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("Number"); + .HasColumnName("RecommendLot"); - b.Property("PackingCode") - .IsRequired() + b.Property("RecommendPackingCode") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("PackingCode"); + .HasColumnName("RecommendPackingCode"); - b.Property("ProduceDate") + b.Property("RecommendProduceDate") .HasColumnType("datetime2"); - b.Property("ReasonCode") + b.Property("RecommendQty") + .HasColumnType("decimal(18,6)"); + + b.Property("RecommendSupplierBatch") .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendSupplierBatch"); b.Property("Remark") .HasMaxLength(3072) @@ -1033,42 +1137,25 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.Property("StdPackQty") .HasColumnType("decimal(18,6)"); - b.Property("SupplierBatch") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("SupplierBatch"); - b.Property("TenantId") .HasColumnType("uniqueidentifier") .HasColumnName("TenantId"); - b.Property("TransInOut") - .IsRequired() + b.Property("ToLocationCode") .HasMaxLength(64) .HasColumnType("nvarchar(64)"); b.Property("Uom") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("WarehouseCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("WarehouseCode"); + .HasColumnType("nvarchar(max)"); 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); + b.ToTable("Job_ContainerJobDetail", (string)null); }); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.CountAdjustRequest", b => + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ContainerNote", b => { b.Property("Id") .HasColumnType("uniqueidentifier"); @@ -1076,30 +1163,23 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.Property("ActiveDate") .HasColumnType("datetime2"); - b.Property("AutoAgree") - .HasColumnType("bit"); - - b.Property("AutoCompleteJob") - .HasColumnType("bit"); - - b.Property("AutoHandle") - .HasColumnType("bit"); - - b.Property("AutoSubmit") - .HasColumnType("bit"); - b.Property("ConcurrencyStamp") .IsConcurrencyToken() .HasMaxLength(40) .HasColumnType("nvarchar(40)") .HasColumnName("ConcurrencyStamp"); - b.Property("CountNoteNumber") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + b.Property("ConfirmTime") + .HasColumnType("datetime2"); - b.Property("CountPlanNumber") - .HasMaxLength(64) + b.Property("Confirmed") + .HasColumnType("bit"); + + b.Property("ContainerRequestNumber") + .HasColumnType("nvarchar(max)"); + + b.Property("ContainerType") + .HasMaxLength(64) .HasColumnType("nvarchar(64)"); b.Property("CreationTime") @@ -1110,13 +1190,15 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("CreatorId"); - b.Property("DirectCreateNote") - .HasColumnType("bit"); - b.Property("ExtraProperties") .HasColumnType("nvarchar(max)") .HasColumnName("ExtraProperties"); + b.Property("JobNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("JobNumber"); + b.Property("LastModificationTime") .HasColumnType("datetime2") .HasColumnName("LastModificationTime"); @@ -1136,8 +1218,11 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("nvarchar(3072)") .HasColumnName("Remark"); - b.Property("RequestStatus") - .IsRequired() + b.Property("RequestLocationCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("SpecificationsType") .HasMaxLength(64) .HasColumnType("nvarchar(64)"); @@ -1153,10 +1238,10 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.HasIndex("Number") .IsUnique(); - b.ToTable("Store_CountAdjustRequest", (string)null); + b.ToTable("Store_ContainerNote", (string)null); }); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.CountAdjustRequestDetail", b => + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ContainerNoteDetail", b => { b.Property("Id") .HasColumnType("uniqueidentifier"); @@ -1164,14 +1249,6 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.Property("ArriveDate") .HasColumnType("datetime2"); - b.Property("ContainerCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ContainerCode"); - - b.Property("CountQty") - .HasColumnType("decimal(18,6)"); - b.Property("CreationTime") .HasColumnType("datetime2") .HasColumnName("CreationTime"); @@ -1183,9 +1260,107 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.Property("ExpireDate") .HasColumnType("datetime2"); - b.Property("InventoryQty") + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("FromContainerCode") + .HasColumnType("nvarchar(max)"); + + b.Property("FromLocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromLocationArea"); + + b.Property("FromLocationCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromLocationCode"); + + b.Property("FromLocationErpCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromLocationErpCode"); + + b.Property("FromLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromLocationGroup"); + + b.Property("FromLot") + .HasColumnType("nvarchar(max)"); + + b.Property("FromPackingCode") + .HasColumnType("nvarchar(max)"); + + b.Property("FromStatus") + .HasColumnType("int"); + + b.Property("FromWarehouseCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromWarehouseCode"); + + b.Property("HandledArriveDate") + .HasColumnType("datetime2"); + + b.Property("HandledContainerCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledContainerCode"); + + b.Property("HandledExpireDate") + .HasColumnType("datetime2"); + + b.Property("HandledFromLocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledFromLocationArea"); + + b.Property("HandledFromLocationCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledFromLocationCode"); + + b.Property("HandledFromLocationErpCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledFromLocationErpCode"); + + b.Property("HandledFromLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledFromLocationGroup"); + + b.Property("HandledFromWarehouseCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledFromWarehouseCode"); + + b.Property("HandledLot") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledLot"); + + b.Property("HandledPackingCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledPackingCode"); + + b.Property("HandledProduceDate") + .HasColumnType("datetime2"); + + b.Property("HandledQty") .HasColumnType("decimal(18,6)"); + b.Property("HandledSupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledSupplierBatch"); + b.Property("ItemCode") .IsRequired() .HasMaxLength(64) @@ -1215,69 +1390,85 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("LastModifierId"); - b.Property("LocationArea") + b.Property("MasterID") + .HasColumnType("uniqueidentifier"); + + b.Property("Number") + .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("LocationArea"); + .HasColumnName("Number"); - b.Property("LocationCode") - .IsRequired() + b.Property("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("LocationCode"); + .HasColumnName("RecommendContainerCode"); - b.Property("LocationErpCode") - .IsRequired() + b.Property("RecommendExpireDate") + .HasColumnType("datetime2"); + + b.Property("RecommendFromLocationArea") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("LocationErpCode"); + .HasColumnName("RecommendFromLocationArea"); - b.Property("LocationGroup") + b.Property("RecommendFromLocationCode") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("LocationGroup"); + .HasColumnName("RecommendFromLocationCode"); - b.Property("Lot") + b.Property("RecommendFromLocationErpCode") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("Lot"); + .HasColumnName("RecommendFromLocationErpCode"); - b.Property("MasterID") - .HasColumnType("uniqueidentifier"); + b.Property("RecommendFromLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendFromLocationGroup"); - b.Property("Number") - .IsRequired() + b.Property("RecommendFromWarehouseCode") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("Number"); + .HasColumnName("RecommendFromWarehouseCode"); - b.Property("PackingCode") - .IsRequired() + b.Property("RecommendLot") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("PackingCode"); + .HasColumnName("RecommendLot"); - b.Property("ProduceDate") + b.Property("RecommendPackingCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendPackingCode"); + + b.Property("RecommendProduceDate") .HasColumnType("datetime2"); - b.Property("Qty") - .HasPrecision(18, 6) - .HasColumnType("decimal(18,6)") - .HasColumnName("Qty"); + b.Property("RecommendQty") + .HasColumnType("decimal(18,6)"); - b.Property("ReasonCode") - .HasColumnType("nvarchar(max)"); + b.Property("RecommendSupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendSupplierBatch"); b.Property("Remark") .HasMaxLength(3072) .HasColumnType("nvarchar(3072)") .HasColumnName("Remark"); - b.Property("Status") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - b.Property("StdPackQty") .HasColumnType("decimal(18,6)"); @@ -1290,53 +1481,81 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("TenantId"); - b.Property("Uom") + b.Property("ToContainerCode") + .HasColumnType("nvarchar(max)"); + + b.Property("ToLocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToLocationArea"); + + b.Property("ToLocationCode") .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("Uom"); + .HasColumnName("ToLocationCode"); - b.Property("WarehouseCode") + b.Property("ToLocationErpCode") .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("WarehouseCode"); + .HasColumnName("ToLocationErpCode"); + + b.Property("ToLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToLocationGroup"); + + b.Property("ToLot") + .HasColumnType("nvarchar(max)"); + + b.Property("ToPackingCode") + .HasColumnType("nvarchar(max)"); + + b.Property("ToStatus") + .HasColumnType("int"); + + b.Property("ToWarehouseCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToWarehouseCode"); + + b.Property("Uom") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Uom"); b.HasKey("Id"); b.HasIndex("MasterID"); - b.HasIndex("Number", "ItemCode", "LocationCode", "Lot", "Status", "PackingCode") - .IsUnique() - .HasFilter("[Lot] IS NOT NULL"); + b.HasIndex("Number") + .IsUnique(); - b.ToTable("Store_CountAdjustRequestDetail", (string)null); + b.ToTable("Store_ContainerNoteDetail", (string)null); }); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.CountJob", b => + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ContainerRequest", b => { b.Property("Id") .HasColumnType("uniqueidentifier"); - b.Property("AcceptTime") + b.Property("ActiveDate") .HasColumnType("datetime2"); - b.Property("AcceptUserId") - .HasColumnType("uniqueidentifier"); - - b.Property("AcceptUserName") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + b.Property("AutoAgree") + .HasColumnType("bit"); - b.Property("CompleteTime") - .HasColumnType("datetime2"); + b.Property("AutoCompleteJob") + .HasColumnType("bit"); - b.Property("CompleteUserId") - .HasColumnType("uniqueidentifier"); + b.Property("AutoHandle") + .HasColumnType("bit"); - b.Property("CompleteUserName") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + b.Property("AutoSubmit") + .HasColumnType("bit"); b.Property("ConcurrencyStamp") .IsConcurrencyToken() @@ -1344,17 +1563,7 @@ namespace Win_in.Sfs.Wms.Store.Migrations .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() + b.Property("ContainerType") .HasMaxLength(64) .HasColumnType("nvarchar(64)"); @@ -1366,36 +1575,13 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("CreatorId"); - b.Property("Description") - .HasColumnType("nvarchar(max)"); + b.Property("DirectCreateNote") + .HasColumnType("bit"); 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"); @@ -1404,50 +1590,35 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("LastModifierId"); - b.Property("LocationCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - b.Property("Number") .IsRequired() .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("Priority") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasDefaultValue(0); - - b.Property("PriorityIncrement") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasDefaultValue(0); + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); b.Property("Remark") .HasMaxLength(3072) .HasColumnType("nvarchar(3072)") .HasColumnName("Remark"); - b.Property("TenantId") - .HasColumnType("uniqueidentifier") - .HasColumnName("TenantId"); - - b.Property("Type") + b.Property("RequestLocationCode") .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)"); - b.Property("UpStreamJobNumber") + b.Property("RequestStatus") + .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)"); - b.Property("WarehouseCode") - .HasColumnType("nvarchar(max)"); - - b.Property("WorkGroupCode") + b.Property("SpecificationsType") .HasMaxLength(64) .HasColumnType("nvarchar(64)"); + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + b.Property("Worker") .HasColumnType("nvarchar(max)"); @@ -1456,41 +1627,14 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.HasIndex("Number") .IsUnique(); - b.ToTable("Job_CountJob", (string)null); + b.ToTable("Store_ContainerRequest", (string)null); }); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.CountJobDetail", b => + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ContainerRequestDetail", 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"); @@ -1499,15 +1643,9 @@ namespace Win_in.Sfs.Wms.Store.Migrations .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("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); b.Property("ItemCode") .IsRequired() @@ -1538,90 +1676,52 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("LastModifierId"); - b.Property("LocationArea") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("LocationArea"); - - b.Property("LocationCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("LocationCode"); - - b.Property("LocationErpCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("LocationErpCode"); - - b.Property("LocationGroup") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("LocationGroup"); - - b.Property("Lot") - .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"); + .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("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") + b.Property("ToLocationCode") .HasColumnType("nvarchar(max)"); - b.Property("WarehouseCode") + b.Property("Uom") .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("WarehouseCode"); + .HasColumnName("Uom"); b.HasKey("Id"); b.HasIndex("MasterID"); - b.ToTable("Job_CountJobDetail", (string)null); + b.HasIndex("Number") + .IsUnique(); + + b.ToTable("Store_ContainerRequestDetail", (string)null); }); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.CountNote", b => + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.CountAdjustNote", b => { b.Property("Id") .HasColumnType("uniqueidentifier"); @@ -1629,21 +1729,22 @@ namespace Win_in.Sfs.Wms.Store.Migrations 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") + 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"); @@ -1652,17 +1753,16 @@ namespace Win_in.Sfs.Wms.Store.Migrations .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("IsAdjusted") + .HasColumnType("bit"); + + b.Property("JobNumber") + .HasColumnType("nvarchar(max)"); + b.Property("LastModificationTime") .HasColumnType("datetime2") .HasColumnName("LastModificationTime"); @@ -1682,17 +1782,11 @@ namespace Win_in.Sfs.Wms.Store.Migrations .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)"); @@ -1704,49 +1798,33 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.HasIndex("Number") .IsUnique(); - b.ToTable("Store_CountNote", (string)null); + b.ToTable("Store_CountAdjustNote", (string)null); }); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.CountNoteDetail", b => + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.CountAdjustNoteDetail", b => { b.Property("Id") .HasColumnType("uniqueidentifier"); - b.Property("Adjusted") - .HasColumnType("bit"); + b.Property("AdjustQty") + .HasColumnType("decimal(18,6)"); b.Property("ArriveDate") .HasColumnType("datetime2"); - b.Property("AuditCountDescription") + b.Property("ContainerCode") .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + .HasColumnType("nvarchar(64)") + .HasColumnName("ContainerCode"); - b.Property("AuditCountOperator") + b.Property("CountLabel") + .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)"); - b.Property("AuditCountQty") - .HasPrecision(18, 6) + b.Property("CountQty") .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"); @@ -1755,33 +1833,9 @@ namespace Win_in.Sfs.Wms.Store.Migrations .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)"); @@ -1859,31 +1913,15 @@ namespace Win_in.Sfs.Wms.Store.Migrations 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("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) @@ -1901,8 +1939,14 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("TenantId"); + b.Property("TransInOut") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + b.Property("Uom") - .HasColumnType("nvarchar(max)"); + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); b.Property("WarehouseCode") .IsRequired() @@ -1914,13 +1958,14 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.HasIndex("MasterID"); - b.HasIndex("Number", "CountLabel") - .IsUnique(); + b.HasIndex("Number", "CountLabel", "ItemCode", "LocationCode", "Lot", "Status", "PackingCode") + .IsUnique() + .HasFilter("[Lot] IS NOT NULL"); - b.ToTable("Store_CountNoteDetail", (string)null); + b.ToTable("Store_CountAdjustNoteDetail", (string)null); }); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.CountPlan", b => + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.CountAdjustRequest", b => { b.Property("Id") .HasColumnType("uniqueidentifier"); @@ -1940,17 +1985,17 @@ namespace Win_in.Sfs.Wms.Store.Migrations 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() + b.Property("CountNoteNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("CountPlanNumber") .HasMaxLength(64) .HasColumnType("nvarchar(64)"); @@ -1962,29 +2007,13 @@ namespace Win_in.Sfs.Wms.Store.Migrations .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"); @@ -1999,9 +2028,6 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("nvarchar(64)") .HasColumnName("Number"); - b.Property("PlanTime") - .HasColumnType("datetime2"); - b.Property("Remark") .HasMaxLength(3072) .HasColumnType("nvarchar(3072)") @@ -2012,25 +2038,10 @@ namespace Win_in.Sfs.Wms.Store.Migrations .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)"); @@ -2039,10 +2050,10 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.HasIndex("Number") .IsUnique(); - b.ToTable("Store_CountPlan", (string)null); + b.ToTable("Store_CountAdjustRequest", (string)null); }); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.CountPlanDetail", b => + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.CountAdjustRequestDetail", b => { b.Property("Id") .HasColumnType("uniqueidentifier"); @@ -2050,30 +2061,13 @@ namespace Win_in.Sfs.Wms.Store.Migrations 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("CountQty") + .HasColumnType("decimal(18,6)"); b.Property("CreationTime") .HasColumnType("datetime2") @@ -2083,31 +2077,9 @@ namespace Win_in.Sfs.Wms.Store.Migrations .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)"); @@ -2185,31 +2157,19 @@ namespace Win_in.Sfs.Wms.Store.Migrations 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("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) @@ -2228,8 +2188,10 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnName("TenantId"); b.Property("Uom") + .IsRequired() .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + .HasColumnType("nvarchar(64)") + .HasColumnName("Uom"); b.Property("WarehouseCode") .IsRequired() @@ -2241,38 +2203,55 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.HasIndex("MasterID"); - b.HasIndex("Number", "CountLabel") - .IsUnique(); + b.HasIndex("Number", "ItemCode", "LocationCode", "Lot", "Status", "PackingCode") + .IsUnique() + .HasFilter("[Lot] IS NOT NULL"); - b.ToTable("Store_CountPlanDetail", (string)null); + b.ToTable("Store_CountAdjustRequestDetail", (string)null); }); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.CustomerAsn", b => + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.CountJob", b => { b.Property("Id") .HasColumnType("uniqueidentifier"); - b.Property("ActiveDate") + b.Property("AcceptTime") .HasColumnType("datetime2"); - b.Property("BeginTime") + 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("ContactEmail") + b.Property("CountMethod") + .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)"); - b.Property("ContactName") + b.Property("CountPlanNumber") .HasMaxLength(64) .HasColumnType("nvarchar(64)"); - b.Property("ContactPhone") + b.Property("CountStage") + .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)"); @@ -2284,71 +2263,131 @@ namespace Win_in.Sfs.Wms.Store.Migrations .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("Description") + .HasColumnType("nvarchar(max)"); b.Property("ExtraProperties") .HasColumnType("nvarchar(max)") .HasColumnName("ExtraProperties"); - b.Property("LastModificationTime") - .HasColumnType("datetime2") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("uniqueidentifier") + 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)") - .HasColumnName("Number"); + .HasColumnType("nvarchar(64)"); + + b.Property("Priority") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasDefaultValue(0); + + b.Property("PriorityIncrement") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasDefaultValue(0); b.Property("Remark") .HasMaxLength(3072) .HasColumnType("nvarchar(3072)") .HasColumnName("Remark"); - b.Property("SoNumber") + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Type") .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)"); - b.Property("Status") - .HasColumnType("int"); + b.Property("UpStreamJobNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); - b.Property("TenantId") - .HasColumnType("uniqueidentifier") - .HasColumnName("TenantId"); + 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("CustomerCode"); - b.HasIndex("Number") .IsUnique(); - b.ToTable("Store_CustomerAsn", (string)null); + b.ToTable("Job_CountJob", (string)null); }); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.CustomerAsnDetail", b => + 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"); @@ -2357,6 +2396,16 @@ namespace Win_in.Sfs.Wms.Store.Migrations .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) @@ -2386,57 +2435,90 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("LastModifierId"); + b.Property("LocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationArea"); + + b.Property("LocationCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationCode"); + + b.Property("LocationErpCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationErpCode"); + + b.Property("LocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationGroup"); + + b.Property("Lot") + .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("Number"); + .HasColumnName("PackingCode"); - b.Property("Qty") - .HasPrecision(18, 6) - .HasColumnType("decimal(18,6)") - .HasColumnName("Qty"); + b.Property("ProduceDate") + .HasColumnType("datetime2"); b.Property("Remark") .HasMaxLength(3072) .HasColumnType("nvarchar(3072)") .HasColumnName("Remark"); - b.Property("SoLine") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("SoNumber") + 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("Uom"); + .HasColumnName("WarehouseCode"); b.HasKey("Id"); b.HasIndex("MasterID"); - b.HasIndex("Number", "ItemCode") - .IsUnique(); - - b.ToTable("Store_CustomerAsnDetail", (string)null); + b.ToTable("Job_CountJobDetail", (string)null); }); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.CustomerReturnNote", b => + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.CountNote", b => { b.Property("Id") .HasColumnType("uniqueidentifier"); @@ -2444,12 +2526,21 @@ namespace Win_in.Sfs.Wms.Store.Migrations 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"); @@ -2458,19 +2549,17 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("CreatorId"); - b.Property("Customer") + b.Property("Description") .HasMaxLength(64) .HasColumnType("nvarchar(64)"); + b.Property("EndTime") + .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"); @@ -2490,13 +2579,20 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("nvarchar(3072)") .HasColumnName("Remark"); - b.Property("ReturnTime") - .HasColumnType("datetime2"); + 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)"); @@ -2505,17 +2601,49 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.HasIndex("Number") .IsUnique(); - b.ToTable("Store_CustomerReturnNote", (string)null); + b.ToTable("Store_CountNote", (string)null); }); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.CustomerReturnNoteDetail", b => + 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"); @@ -2524,50 +2652,35 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("CreatorId"); + b.Property("DetailStatus") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + b.Property("ExpireDate") .HasColumnType("datetime2"); - b.Property("FromContainerCode") - .HasColumnType("nvarchar(max)"); + b.Property("FinalCountQty") + .HasPrecision(18, 6) + .HasColumnType("decimal(18,6)"); - b.Property("FromLocationArea") + b.Property("FirstCountDescription") .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("FromLocationArea"); + .HasColumnType("nvarchar(64)"); - 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") + b.Property("FirstCountOperator") .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("FromLocationGroup"); - - b.Property("FromLot") - .HasColumnType("nvarchar(max)"); + .HasColumnType("nvarchar(64)"); - b.Property("FromPackingCode") - .HasColumnType("nvarchar(450)"); + b.Property("FirstCountQty") + .HasPrecision(18, 6) + .HasColumnType("decimal(18,6)"); - b.Property("FromStatus") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + b.Property("FirstCountTime") + .HasColumnType("datetime2"); - b.Property("FromWarehouseCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("FromWarehouseCode"); + b.Property("InventoryQty") + .HasColumnType("decimal(18,6)"); b.Property("ItemCode") .IsRequired() @@ -2598,6 +2711,33 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("LastModifierId"); + b.Property("LocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationArea"); + + b.Property("LocationCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationCode"); + + b.Property("LocationErpCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationErpCode"); + + b.Property("LocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationGroup"); + + b.Property("Lot") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Lot"); + b.Property("MasterID") .HasColumnType("uniqueidentifier"); @@ -2607,114 +2747,98 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("nvarchar(64)") .HasColumnName("Number"); + b.Property("PackingCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("PackingCode"); + b.Property("ProduceDate") .HasColumnType("datetime2"); - b.Property("Qty") - .HasPrecision(18, 6) - .HasColumnType("decimal(18,6)") - .HasColumnName("Qty"); - b.Property("Remark") .HasMaxLength(3072) .HasColumnType("nvarchar(3072)") .HasColumnName("Remark"); - b.Property("StdPackQty") - .HasColumnType("decimal(18,6)"); - - b.Property("SupplierBatch") + b.Property("RepeatCountDescription") .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("SupplierBatch"); + .HasColumnType("nvarchar(64)"); - b.Property("TenantId") - .HasColumnType("uniqueidentifier") - .HasColumnName("TenantId"); + b.Property("RepeatCountOperator") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); - b.Property("ToContainerCode") - .HasColumnType("nvarchar(max)"); + b.Property("RepeatCountQty") + .HasPrecision(18, 6) + .HasColumnType("decimal(18,6)"); - b.Property("ToLocationArea") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ToLocationArea"); + b.Property("RepeatCountTime") + .HasColumnType("datetime2"); - b.Property("ToLocationCode") + b.Property("Stage") .IsRequired() .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ToLocationCode"); + .HasColumnType("nvarchar(64)"); - b.Property("ToLocationErpCode") + b.Property("Status") .IsRequired() .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ToLocationErpCode"); + .HasColumnType("nvarchar(64)"); - b.Property("ToLocationGroup") + b.Property("StdPackQty") + .HasColumnType("decimal(18,6)"); + + b.Property("SupplierBatch") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("ToLocationGroup"); + .HasColumnName("SupplierBatch"); - b.Property("ToLot") - .HasColumnType("nvarchar(max)"); + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); - b.Property("ToPackingCode") + b.Property("Uom") .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") + b.Property("WarehouseCode") .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("Uom"); + .HasColumnName("WarehouseCode"); b.HasKey("Id"); b.HasIndex("MasterID"); - b.HasIndex("Number", "FromPackingCode", "FromLocationCode", "ToLocationCode") - .IsUnique() - .HasFilter("[FromPackingCode] IS NOT NULL"); + b.HasIndex("Number", "CountLabel") + .IsUnique(); - b.ToTable("Store_CustomerReturnNoteDetail", (string)null); + b.ToTable("Store_CountNoteDetail", (string)null); }); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.DeliverJob", b => + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.CountPlan", b => { b.Property("Id") .HasColumnType("uniqueidentifier"); - b.Property("AcceptTime") + b.Property("ActiveDate") .HasColumnType("datetime2"); - b.Property("AcceptUserId") - .HasColumnType("uniqueidentifier"); + b.Property("AutoAgree") + .HasColumnType("bit"); - b.Property("AcceptUserName") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + b.Property("AutoCompleteJob") + .HasColumnType("bit"); - b.Property("CompleteTime") - .HasColumnType("datetime2"); + b.Property("AutoHandle") + .HasColumnType("bit"); - b.Property("CompleteUserId") - .HasColumnType("uniqueidentifier"); + b.Property("AutoSubmit") + .HasColumnType("bit"); - b.Property("CompleteUserName") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + b.Property("BeginTime") + .HasColumnType("datetime2"); b.Property("ConcurrencyStamp") .IsConcurrencyToken() @@ -2722,6 +2846,11 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("nvarchar(40)") .HasColumnName("ConcurrencyStamp"); + b.Property("CountMethod") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + b.Property("CreationTime") .HasColumnType("datetime2") .HasColumnName("CreationTime"); @@ -2730,47 +2859,28 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("CreatorId"); - b.Property("CustomerAddressCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("CustomerCode") - .IsRequired() + b.Property("Description") .HasMaxLength(64) .HasColumnType("nvarchar(64)"); - b.Property("DeliverPlanNumber") - .HasColumnType("nvarchar(max)"); - - b.Property("DeliverRequestNumber") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + b.Property("DirectCreateNote") + .HasColumnType("bit"); - b.Property("DeliverTime") + b.Property("EndTime") .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("JsonInventoryStatus") + .HasColumnType("nvarchar(max)"); - b.Property("JobStatus") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + b.Property("JsonItemCodes") + .HasColumnType("nvarchar(max)"); - b.Property("JobType") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + b.Property("JsonLocationCodes") + .HasColumnType("nvarchar(max)"); b.Property("LastModificationTime") .HasColumnType("datetime2") @@ -2783,35 +2893,38 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.Property("Number") .IsRequired() .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("Priority") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasDefaultValue(0); + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); - b.Property("PriorityIncrement") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasDefaultValue(0); + b.Property("PlanTime") + .HasColumnType("datetime2"); b.Property("Remark") .HasMaxLength(3072) .HasColumnType("nvarchar(3072)") .HasColumnName("Remark"); - b.Property("TenantId") - .HasColumnType("uniqueidentifier") - .HasColumnName("TenantId"); + b.Property("RequestStatus") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); - b.Property("UpStreamJobNumber") + b.Property("RequestType") + .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)"); - b.Property("WarehouseCode") - .HasColumnType("nvarchar(max)"); + b.Property("Stage") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); - b.Property("WorkGroupCode") + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Type") + .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)"); @@ -2823,79 +2936,78 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.HasIndex("Number") .IsUnique(); - b.ToTable("Job_DeliverJob", (string)null); + b.ToTable("Store_CountPlan", (string)null); }); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.DeliverJobDetail", b => + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.CountPlanDetail", b => { b.Property("Id") .HasColumnType("uniqueidentifier"); - b.Property("CreationTime") - .HasColumnType("datetime2") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("uniqueidentifier") - .HasColumnName("CreatorId"); - - b.Property("HandledArriveDate") + b.Property("ArriveDate") .HasColumnType("datetime2"); - b.Property("HandledContainerCode") + b.Property("AuditCountDescription") .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("HandledContainerCode"); + .HasColumnType("nvarchar(64)"); - b.Property("HandledExpireDate") + 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("HandledFromLocationArea") + b.Property("ContainerCode") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("HandledFromLocationArea"); + .HasColumnName("ContainerCode"); - b.Property("HandledFromLocationCode") + b.Property("CountLabel") + .IsRequired() .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("HandledFromLocationCode"); + .HasColumnType("nvarchar(64)"); - b.Property("HandledFromLocationErpCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("HandledFromLocationErpCode"); + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); - b.Property("HandledFromLocationGroup") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("HandledFromLocationGroup"); + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); - b.Property("HandledFromWarehouseCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("HandledFromWarehouseCode"); + b.Property("DetailStatus") + .HasColumnType("int"); - b.Property("HandledLot") + b.Property("ExpireDate") + .HasColumnType("datetime2"); + + b.Property("FinalCountQty") + .HasPrecision(18, 6) + .HasColumnType("decimal(18,6)"); + + b.Property("FirstCountDescription") .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("HandledLot"); + .HasColumnType("nvarchar(64)"); - b.Property("HandledPackingCode") + b.Property("FirstCountOperator") .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("HandledPackingCode"); + .HasColumnType("nvarchar(64)"); - b.Property("HandledProduceDate") + b.Property("FirstCountQty") + .HasPrecision(18, 6) + .HasColumnType("decimal(18,6)"); + + b.Property("FirstCountTime") .HasColumnType("datetime2"); - b.Property("HandledQty") + b.Property("InventoryQty") .HasColumnType("decimal(18,6)"); - b.Property("HandledSupplierBatch") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("HandledSupplierBatch"); - b.Property("ItemCode") .IsRequired() .HasMaxLength(64) @@ -2925,121 +3037,114 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("LastModifierId"); - b.Property("MasterID") - .HasColumnType("uniqueidentifier"); - - b.Property("Number") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("OnTheWayLocationCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("RecommendArriveDate") - .HasColumnType("datetime2"); - - b.Property("RecommendContainerCode") + b.Property("LocationArea") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendContainerCode"); - - b.Property("RecommendExpireDate") - .HasColumnType("datetime2"); + .HasColumnName("LocationArea"); - b.Property("RecommendFromLocationArea") + b.Property("LocationCode") + .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendFromLocationArea"); + .HasColumnName("LocationCode"); - b.Property("RecommendFromLocationCode") + b.Property("LocationErpCode") + .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendFromLocationCode"); + .HasColumnName("LocationErpCode"); - b.Property("RecommendFromLocationErpCode") + b.Property("LocationGroup") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendFromLocationErpCode"); + .HasColumnName("LocationGroup"); - b.Property("RecommendFromLocationGroup") + b.Property("Lot") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendFromLocationGroup"); + .HasColumnName("Lot"); - b.Property("RecommendFromWarehouseCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendFromWarehouseCode"); + b.Property("MasterID") + .HasColumnType("uniqueidentifier"); - b.Property("RecommendLot") + b.Property("Number") + .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendLot"); + .HasColumnName("Number"); - b.Property("RecommendPackingCode") + b.Property("PackingCode") + .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendPackingCode"); + .HasColumnName("PackingCode"); - b.Property("RecommendProduceDate") + b.Property("ProduceDate") .HasColumnType("datetime2"); - b.Property("RecommendQty") - .HasColumnType("decimal(18,6)"); - - b.Property("RecommendSupplierBatch") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendSupplierBatch"); - b.Property("Remark") .HasMaxLength(3072) .HasColumnType("nvarchar(3072)") .HasColumnName("Remark"); - b.Property("Status") - .IsRequired() + b.Property("RepeatCountDescription") .HasMaxLength(64) .HasColumnType("nvarchar(64)"); - b.Property("StdPackQty") - .HasColumnType("decimal(18,6)"); + b.Property("RepeatCountOperator") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); - b.Property("TenantId") - .HasColumnType("uniqueidentifier") - .HasColumnName("TenantId"); + b.Property("RepeatCountQty") + .HasPrecision(18, 6) + .HasColumnType("decimal(18,6)"); - b.Property("ToLocationArea") - .HasColumnType("nvarchar(max)"); + b.Property("RepeatCountTime") + .HasColumnType("datetime2"); - b.Property("ToLocationCode") + b.Property("Stage") + .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)"); - b.Property("ToLocationErpCode") + b.Property("Status") + .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)"); - b.Property("ToLocationGroup") - .HasColumnType("nvarchar(max)"); + b.Property("StdPackQty") + .HasColumnType("decimal(18,6)"); - b.Property("ToWarehouseCode") + b.Property("SupplierBatch") .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + .HasColumnType("nvarchar(64)") + .HasColumnName("SupplierBatch"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); b.Property("Uom") - .HasColumnType("nvarchar(max)"); + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("WarehouseCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("WarehouseCode"); b.HasKey("Id"); b.HasIndex("MasterID"); - b.ToTable("Job_DeliverJobDetail", (string)null); + b.HasIndex("Number", "CountLabel") + .IsUnique(); + + b.ToTable("Store_CountPlanDetail", (string)null); }); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.DeliverNote", b => + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.CustomerAsn", b => { b.Property("Id") .HasColumnType("uniqueidentifier"); @@ -3047,14 +3152,26 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.Property("ActiveDate") .HasColumnType("datetime2"); + b.Property("BeginTime") + .HasColumnType("datetime2"); + b.Property("ConcurrencyStamp") .IsConcurrencyToken() .HasMaxLength(40) .HasColumnType("nvarchar(40)") .HasColumnName("ConcurrencyStamp"); - b.Property("CountPrint") - .HasColumnType("int"); + 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") @@ -3064,38 +3181,22 @@ namespace Win_in.Sfs.Wms.Store.Migrations .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() + b.Property("DockCode") .HasMaxLength(64) .HasColumnType("nvarchar(64)"); - b.Property("DeliverTime") + b.Property("EndTime") .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"); @@ -3115,6 +3216,14 @@ namespace Win_in.Sfs.Wms.Store.Migrations .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"); @@ -3124,20 +3233,19 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.HasKey("Id"); + b.HasIndex("CustomerCode"); + b.HasIndex("Number") .IsUnique(); - b.ToTable("Store_DeliverNote", (string)null); + b.ToTable("Store_CustomerAsn", (string)null); }); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.DeliverNoteDetail", b => + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.CustomerAsnDetail", b => { b.Property("Id") .HasColumnType("uniqueidentifier"); - b.Property("ArriveDate") - .HasColumnType("datetime2"); - b.Property("CreationTime") .HasColumnType("datetime2") .HasColumnName("CreationTime"); @@ -3146,115 +3254,217 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("CreatorId"); - b.Property("ExpireDate") - .HasColumnType("datetime2"); - - b.Property("ExtraProperties") - .HasColumnType("nvarchar(max)") - .HasColumnName("ExtraProperties"); - - b.Property("FromContainerCode") - .HasColumnType("nvarchar(max)"); - - b.Property("FromLocationArea") + b.Property("ItemCode") + .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("FromLocationArea"); + .HasColumnName("ItemCode"); - b.Property("FromLocationCode") - .IsRequired() + b.Property("ItemDesc1") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("FromLocationCode"); + .HasColumnName("ItemDesc1"); - b.Property("FromLocationErpCode") - .IsRequired() + b.Property("ItemDesc2") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("FromLocationErpCode"); + .HasColumnName("ItemDesc2"); - b.Property("FromLocationGroup") + b.Property("ItemName") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("FromLocationGroup"); + .HasColumnName("ItemName"); - b.Property("FromLot") + 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)"); + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); - b.Property("FromPackingCode") - .IsRequired() + 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("FromStatus") - .IsRequired() + b.Property("SoNumber") .HasMaxLength(64) .HasColumnType("nvarchar(64)"); - b.Property("FromWarehouseCode") + b.Property("StdPackQty") + .HasColumnType("decimal(18,6)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Uom") .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("FromWarehouseCode"); + .HasColumnName("Uom"); - b.Property("HandledArriveDate") - .HasColumnType("datetime2"); + b.HasKey("Id"); - b.Property("HandledContainerCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("HandledContainerCode"); + b.HasIndex("MasterID"); - b.Property("HandledExpireDate") + 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("HandledFromLocationArea") + b.Property("ConcurrencyStamp") + .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)") - .HasColumnName("HandledFromLocationArea"); + .HasColumnType("nvarchar(64)"); - b.Property("HandledFromLocationCode") + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("JobNumber") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("HandledFromLocationCode"); + .HasColumnName("JobNumber"); - b.Property("HandledFromLocationErpCode") + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Number") + .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("HandledFromLocationErpCode"); + .HasColumnName("Number"); - b.Property("HandledFromLocationGroup") + 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("HandledFromLocationGroup"); + .HasColumnName("FromLocationArea"); - b.Property("HandledFromWarehouseCode") + b.Property("FromLocationCode") + .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("HandledFromWarehouseCode"); + .HasColumnName("FromLocationCode"); - b.Property("HandledLot") + b.Property("FromLocationErpCode") + .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("HandledLot"); + .HasColumnName("FromLocationErpCode"); - b.Property("HandledPackingCode") + b.Property("FromLocationGroup") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("HandledPackingCode"); + .HasColumnName("FromLocationGroup"); - b.Property("HandledProduceDate") - .HasColumnType("datetime2"); + b.Property("FromLot") + .HasColumnType("nvarchar(max)"); - b.Property("HandledQty") - .HasColumnType("decimal(18,6)"); + b.Property("FromPackingCode") + .HasColumnType("nvarchar(450)"); - b.Property("HandledSupplierBatch") + b.Property("FromStatus") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("FromWarehouseCode") + .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("HandledSupplierBatch"); + .HasColumnName("FromWarehouseCode"); b.Property("ItemCode") .IsRequired() @@ -3302,114 +3512,53 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("decimal(18,6)") .HasColumnName("Qty"); - b.Property("RecommendArriveDate") - .HasColumnType("datetime2"); + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); - b.Property("RecommendContainerCode") + b.Property("StdPackQty") + .HasColumnType("decimal(18,6)"); + + b.Property("SupplierBatch") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendContainerCode"); + .HasColumnName("SupplierBatch"); - b.Property("RecommendExpireDate") - .HasColumnType("datetime2"); + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); - b.Property("RecommendFromLocationArea") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendFromLocationArea"); + b.Property("ToContainerCode") + .HasColumnType("nvarchar(max)"); - b.Property("RecommendFromLocationCode") + b.Property("ToLocationArea") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendFromLocationCode"); + .HasColumnName("ToLocationArea"); - b.Property("RecommendFromLocationErpCode") + b.Property("ToLocationCode") + .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendFromLocationErpCode"); + .HasColumnName("ToLocationCode"); - b.Property("RecommendFromLocationGroup") + b.Property("ToLocationErpCode") + .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendFromLocationGroup"); + .HasColumnName("ToLocationErpCode"); - 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") + b.Property("ToLocationGroup") .HasMaxLength(64) .HasColumnType("nvarchar(64)") .HasColumnName("ToLocationGroup"); b.Property("ToLot") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + .HasColumnType("nvarchar(max)"); b.Property("ToPackingCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + .HasColumnType("nvarchar(max)"); b.Property("ToStatus") .IsRequired() @@ -3432,31 +3581,37 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.HasIndex("MasterID"); - b.HasIndex("Number", "ItemCode", "FromPackingCode", "FromLot", "FromLocationCode", "ToLocationCode") - .IsUnique(); + b.HasIndex("Number", "FromPackingCode", "FromLocationCode", "ToLocationCode") + .IsUnique() + .HasFilter("[FromPackingCode] IS NOT NULL"); - b.ToTable("Store_DeliverNoteDetail", (string)null); + b.ToTable("Store_CustomerReturnNoteDetail", (string)null); }); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.DeliverPlan", b => + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.DeliverJob", b => { b.Property("Id") .HasColumnType("uniqueidentifier"); - b.Property("ActiveDate") + b.Property("AcceptTime") .HasColumnType("datetime2"); - b.Property("AutoAgree") - .HasColumnType("bit"); + b.Property("AcceptUserId") + .HasColumnType("uniqueidentifier"); - b.Property("AutoCompleteJob") - .HasColumnType("bit"); + b.Property("AcceptUserName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); - b.Property("AutoHandle") - .HasColumnType("bit"); + b.Property("CompleteTime") + .HasColumnType("datetime2"); - b.Property("AutoSubmit") - .HasColumnType("bit"); + b.Property("CompleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CompleteUserName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); b.Property("ConcurrencyStamp") .IsConcurrencyToken() @@ -3473,7 +3628,6 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnName("CreatorId"); b.Property("CustomerAddressCode") - .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)"); @@ -3482,13 +3636,39 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasMaxLength(64) .HasColumnType("nvarchar(64)"); - b.Property("DirectCreateNote") - .HasColumnType("bit"); + 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"); @@ -3500,39 +3680,38 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.Property("Number") .IsRequired() .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("Number"); - - b.Property("PlanDate") - .HasColumnType("datetime2"); + .HasColumnType("nvarchar(64)"); - b.Property("PlanTime") - .HasColumnType("datetime2"); + b.Property("Priority") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasDefaultValue(0); - b.Property("Project") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + b.Property("PriorityIncrement") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasDefaultValue(0); b.Property("Remark") .HasMaxLength(3072) .HasColumnType("nvarchar(3072)") .HasColumnName("Remark"); - b.Property("RequestStatus") - .IsRequired() + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("UpStreamJobNumber") .HasMaxLength(64) .HasColumnType("nvarchar(64)"); - b.Property("SoNumber") - .IsRequired() + b.Property("WarehouseCode") + .HasColumnType("nvarchar(max)"); + + b.Property("WorkGroupCode") .HasMaxLength(64) .HasColumnType("nvarchar(64)"); - b.Property("TenantId") - .HasColumnType("uniqueidentifier") - .HasColumnName("TenantId"); - b.Property("Worker") .HasColumnType("nvarchar(max)"); @@ -3541,10 +3720,10 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.HasIndex("Number") .IsUnique(); - b.ToTable("Store_DeliverPlan", (string)null); + b.ToTable("Job_DeliverJob", (string)null); }); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.DeliverPlanDetail", b => + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.DeliverJobDetail", b => { b.Property("Id") .HasColumnType("uniqueidentifier"); @@ -3557,6 +3736,63 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("CreatorId"); + b.Property("HandledArriveDate") + .HasColumnType("datetime2"); + + b.Property("HandledContainerCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledContainerCode"); + + b.Property("HandledExpireDate") + .HasColumnType("datetime2"); + + b.Property("HandledFromLocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledFromLocationArea"); + + b.Property("HandledFromLocationCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledFromLocationCode"); + + b.Property("HandledFromLocationErpCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledFromLocationErpCode"); + + b.Property("HandledFromLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledFromLocationGroup"); + + b.Property("HandledFromWarehouseCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledFromWarehouseCode"); + + b.Property("HandledLot") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledLot"); + + b.Property("HandledPackingCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledPackingCode"); + + b.Property("HandledProduceDate") + .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) @@ -3591,53 +3827,116 @@ namespace Win_in.Sfs.Wms.Store.Migrations 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") + b.Property("OnTheWayLocationCode") .HasMaxLength(64) .HasColumnType("nvarchar(64)"); - b.Property("StdPackQty") - .HasColumnType("decimal(18,6)"); + b.Property("RecommendArriveDate") + .HasColumnType("datetime2"); - b.Property("TenantId") - .HasColumnType("uniqueidentifier") - .HasColumnName("TenantId"); + b.Property("RecommendContainerCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendContainerCode"); - b.Property("Uom") - .IsRequired() + b.Property("RecommendExpireDate") + .HasColumnType("datetime2"); + + b.Property("RecommendFromLocationArea") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("Uom"); + .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.HasIndex("Number", "SoNumber", "SoLine") - .IsUnique() - .HasFilter("[SoNumber] IS NOT NULL AND [SoLine] IS NOT NULL"); - - b.ToTable("Store_DeliverPlanDetail", (string)null); + b.ToTable("Job_DeliverJobDetail", (string)null); }); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.DeliverRequest", b => + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.DeliverNote", b => { b.Property("Id") .HasColumnType("uniqueidentifier"); @@ -3645,24 +3944,15 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.Property("ActiveDate") .HasColumnType("datetime2"); - b.Property("AutoAgree") - .HasColumnType("bit"); - - b.Property("AutoCompleteJob") - .HasColumnType("bit"); - - b.Property("AutoHandle") - .HasColumnType("bit"); - - b.Property("AutoSubmit") - .HasColumnType("bit"); - b.Property("ConcurrencyStamp") .IsConcurrencyToken() .HasMaxLength(40) .HasColumnType("nvarchar(40)") .HasColumnName("ConcurrencyStamp"); + b.Property("CountPrint") + .HasColumnType("int"); + b.Property("CreationTime") .HasColumnType("datetime2") .HasColumnName("CreationTime"); @@ -3681,8 +3971,10 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("nvarchar(64)"); b.Property("DeliverPlanNumber") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + .HasColumnType("nvarchar(max)"); + + b.Property("DeliverRequestNumber") + .HasColumnType("nvarchar(max)"); b.Property("DeliverRequestType") .IsRequired() @@ -3692,13 +3984,15 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.Property("DeliverTime") .HasColumnType("datetime2"); - b.Property("DirectCreateNote") - .HasColumnType("bit"); - b.Property("ExtraProperties") .HasColumnType("nvarchar(max)") .HasColumnName("ExtraProperties"); + b.Property("JobNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("JobNumber"); + b.Property("LastModificationTime") .HasColumnType("datetime2") .HasColumnName("LastModificationTime"); @@ -3718,11 +4012,6 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("nvarchar(3072)") .HasColumnName("Remark"); - b.Property("RequestStatus") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - b.Property("TenantId") .HasColumnType("uniqueidentifier") .HasColumnName("TenantId"); @@ -3735,16 +4024,16 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.HasIndex("Number") .IsUnique(); - b.ToTable("Store_DeliverRequest", (string)null); + b.ToTable("Store_DeliverNote", (string)null); }); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.DeliverRequestDetail", b => + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.DeliverNoteDetail", b => { b.Property("Id") .HasColumnType("uniqueidentifier"); - b.Property("AreaCode") - .HasColumnType("nvarchar(max)"); + b.Property("ArriveDate") + .HasColumnType("datetime2"); b.Property("CreationTime") .HasColumnType("datetime2") @@ -3754,10 +4043,116 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("CreatorId"); + b.Property("ExpireDate") + .HasColumnType("datetime2"); + b.Property("ExtraProperties") .HasColumnType("nvarchar(max)") .HasColumnName("ExtraProperties"); + b.Property("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) @@ -3796,150 +4191,151 @@ namespace Win_in.Sfs.Wms.Store.Migrations .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("RecommendArriveDate") + .HasColumnType("datetime2"); - b.Property("StdPackQty") - .HasColumnType("decimal(18,6)"); - - b.Property("TenantId") - .HasColumnType("uniqueidentifier") - .HasColumnName("TenantId"); - - b.Property("Uom") - .IsRequired() + b.Property("RecommendContainerCode") .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"); + .HasColumnName("RecommendContainerCode"); - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("nvarchar(40)") - .HasColumnName("ConcurrencyStamp"); + b.Property("RecommendExpireDate") + .HasColumnType("datetime2"); - b.Property("CreationTime") - .HasColumnType("datetime2") - .HasColumnName("CreationTime"); + b.Property("RecommendFromLocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendFromLocationArea"); - b.Property("CreatorId") - .HasColumnType("uniqueidentifier") - .HasColumnName("CreatorId"); + b.Property("RecommendFromLocationCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendFromLocationCode"); - b.Property("DataAction") - .HasColumnType("int"); + b.Property("RecommendFromLocationErpCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendFromLocationErpCode"); - b.Property("DataContent") - .HasColumnType("nvarchar(max)"); + b.Property("RecommendFromLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendFromLocationGroup"); - b.Property("DataIdentityCode") - .IsRequired() + b.Property("RecommendFromWarehouseCode") .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendFromWarehouseCode"); - b.Property("DataType") - .IsRequired() + b.Property("RecommendLot") .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendLot"); - b.Property("DestinationSystem") - .IsRequired() + b.Property("RecommendPackingCode") .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendPackingCode"); - b.Property("EffectiveDate") + b.Property("RecommendProduceDate") .HasColumnType("datetime2"); - b.Property("ErrorCode") - .IsRequired() + b.Property("RecommendQty") + .HasColumnType("decimal(18,6)"); + + b.Property("RecommendSupplierBatch") .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendSupplierBatch"); - b.Property("ErrorMessage") + b.Property("Remark") .HasMaxLength(3072) - .HasColumnType("nvarchar(3072)"); + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); - b.Property("ExtraProperties") - .HasColumnType("nvarchar(max)") - .HasColumnName("ExtraProperties"); + b.Property("StdPackQty") + .HasColumnType("decimal(18,6)"); - b.Property("LastModificationTime") - .HasColumnType("datetime2") - .HasColumnName("LastModificationTime"); + b.Property("SupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("SupplierBatch"); - b.Property("LastModifierId") + b.Property("TenantId") .HasColumnType("uniqueidentifier") - .HasColumnName("LastModifierId"); + .HasColumnName("TenantId"); - b.Property("Number") - .HasColumnType("bigint"); + b.Property("ToContainerCode") + .HasColumnType("nvarchar(max)"); - b.Property("ReadTime") - .HasColumnType("datetime2"); + b.Property("ToLocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToLocationArea"); - b.Property("Reader") - .HasColumnType("nvarchar(max)"); + b.Property("ToLocationCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToLocationCode"); - b.Property("Remark") - .HasMaxLength(3072) - .HasColumnType("nvarchar(3072)") - .HasColumnName("Remark"); + b.Property("ToLocationErpCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToLocationErpCode"); - b.Property("RetryTimes") - .HasColumnType("int"); + b.Property("ToLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToLocationGroup"); - b.Property("SourceSystem") + b.Property("ToLot") .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)"); - b.Property("Status") + b.Property("ToPackingCode") .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)"); - b.Property("TenantId") - .HasColumnType("uniqueidentifier") - .HasColumnName("TenantId"); - - b.Property("TyrpNumber") + b.Property("ToStatus") .IsRequired() - .HasColumnType("nvarchar(max)"); + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); - b.Property("WriteTime") - .HasColumnType("datetime2"); + b.Property("ToWarehouseCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToWarehouseCode"); - b.Property("Writer") - .HasColumnType("nvarchar(max)"); + b.Property("Uom") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Uom"); b.HasKey("Id"); - b.ToTable("Store_ExchangeData", (string)null); + 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.InspectAbnormalNote", b => + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.DeliverPlan", b => { b.Property("Id") .HasColumnType("uniqueidentifier"); @@ -3947,6 +4343,18 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.Property("ActiveDate") .HasColumnType("datetime2"); + b.Property("AutoAgree") + .HasColumnType("bit"); + + b.Property("AutoCompleteJob") + .HasColumnType("bit"); + + b.Property("AutoHandle") + .HasColumnType("bit"); + + b.Property("AutoSubmit") + .HasColumnType("bit"); + b.Property("ConcurrencyStamp") .IsConcurrencyToken() .HasMaxLength(40) @@ -3961,14 +4369,23 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("CreatorId"); - b.Property("ExtraProperties") - .HasColumnType("nvarchar(max)") - .HasColumnName("ExtraProperties"); + b.Property("CustomerAddressCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); - b.Property("InspectNumber") + 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"); @@ -3983,7 +4400,14 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("nvarchar(64)") .HasColumnName("Number"); - b.Property("ReceiptNumber") + b.Property("PlanDate") + .HasColumnType("datetime2"); + + b.Property("PlanTime") + .HasColumnType("datetime2"); + + b.Property("Project") + .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)"); @@ -3992,7 +4416,12 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("nvarchar(3072)") .HasColumnName("Remark"); - b.Property("SupplierCode") + b.Property("RequestStatus") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("SoNumber") .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)"); @@ -4009,27 +4438,14 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.HasIndex("Number") .IsUnique(); - b.ToTable("Store_InspectAbnormalNote", (string)null); + b.ToTable("Store_DeliverPlan", (string)null); }); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.InspectAbnormalNoteDetail", b => + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.DeliverPlanDetail", 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"); @@ -4038,9 +4454,6 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("CreatorId"); - b.Property("ExpireDate") - .HasColumnType("datetime2"); - b.Property("ItemCode") .IsRequired() .HasMaxLength(64) @@ -4070,11 +4483,6 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("LastModifierId"); - b.Property("Lot") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("Lot"); - b.Property("MasterID") .HasColumnType("uniqueidentifier"); @@ -4084,18 +4492,6 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("nvarchar(64)") .HasColumnName("Number"); - b.Property("PackingCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("PackingCode"); - - b.Property("Photos") - .HasColumnType("nvarchar(max)"); - - b.Property("ProduceDate") - .HasColumnType("datetime2"); - b.Property("Qty") .HasPrecision(18, 6) .HasColumnType("decimal(18,6)") @@ -4106,13 +4502,16 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("nvarchar(3072)") .HasColumnName("Remark"); - b.Property("StdPackQty") - .HasColumnType("decimal(18,6)"); + b.Property("SoLine") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); - b.Property("SupplierBatch") + b.Property("SoNumber") .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("SupplierBatch"); + .HasColumnType("nvarchar(64)"); + + b.Property("StdPackQty") + .HasColumnType("decimal(18,6)"); b.Property("TenantId") .HasColumnType("uniqueidentifier") @@ -4128,40 +4527,32 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.HasIndex("MasterID"); - b.HasIndex("Number", "PackingCode") - .IsUnique(); + b.HasIndex("Number", "SoNumber", "SoLine") + .IsUnique() + .HasFilter("[SoNumber] IS NOT NULL AND [SoLine] IS NOT NULL"); - b.ToTable("Store_InspectAbnormalNoteDetail", (string)null); + b.ToTable("Store_DeliverPlanDetail", (string)null); }); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.InspectJob", b => + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.DeliverRequest", b => { b.Property("Id") .HasColumnType("uniqueidentifier"); - b.Property("AcceptTime") + b.Property("ActiveDate") .HasColumnType("datetime2"); - b.Property("AcceptUserId") - .HasColumnType("uniqueidentifier"); - - b.Property("AcceptUserName") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("AsnNumber") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + b.Property("AutoAgree") + .HasColumnType("bit"); - b.Property("CompleteTime") - .HasColumnType("datetime2"); + b.Property("AutoCompleteJob") + .HasColumnType("bit"); - b.Property("CompleteUserId") - .HasColumnType("uniqueidentifier"); + b.Property("AutoHandle") + .HasColumnType("bit"); - b.Property("CompleteUserName") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + b.Property("AutoSubmit") + .HasColumnType("bit"); b.Property("ConcurrencyStamp") .IsConcurrencyToken() @@ -4177,33 +4568,34 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("CreatorId"); - b.Property("ExtraProperties") - .HasColumnType("nvarchar(max)") - .HasColumnName("ExtraProperties"); - - b.Property("InspectNumber") + b.Property("CustomerAddressCode") .HasMaxLength(64) .HasColumnType("nvarchar(64)"); - b.Property("IsAutoComplete") - .ValueGeneratedOnAdd() - .HasColumnType("bit") - .HasDefaultValue(false); - - b.Property("JobDescription") - .HasMaxLength(1024) - .HasColumnType("nvarchar(1024)"); - - b.Property("JobStatus") + b.Property("CustomerCode") .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)"); - b.Property("JobType") + 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"); @@ -4212,65 +4604,26 @@ namespace Win_in.Sfs.Wms.Store.Migrations .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)"); + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); b.Property("Remark") .HasMaxLength(3072) .HasColumnType("nvarchar(3072)") .HasColumnName("Remark"); - b.Property("RpNumber") + b.Property("RequestStatus") + .IsRequired() .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)"); @@ -4279,33 +4632,17 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.HasIndex("Number") .IsUnique(); - b.ToTable("Job_InspectJob", (string)null); + b.ToTable("Store_DeliverRequest", (string)null); }); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.InspectJobDetail", b => + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.DeliverRequestDetail", b => { b.Property("Id") .HasColumnType("uniqueidentifier"); - b.Property("AbcClass") - .HasColumnType("nvarchar(max)"); - - b.Property("Appearance") + b.Property("AreaCode") .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"); @@ -4314,39 +4651,9 @@ namespace Win_in.Sfs.Wms.Store.Migrations .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("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); b.Property("ItemCode") .IsRequired() @@ -4377,133 +4684,58 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("LastModifierId"); - b.Property("LocationArea") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("LocationArea"); - - b.Property("LocationCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("LocationCode"); - - b.Property("LocationErpCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("LocationErpCode"); - - b.Property("LocationGroup") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("LocationGroup"); - - b.Property("Lot") - .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"); + .HasColumnName("Number"); - b.Property("ReceiveQty") - .HasColumnType("decimal(18,6)"); + b.Property("Qty") + .HasPrecision(18, 6) + .HasColumnType("decimal(18,6)") + .HasColumnName("Qty"); b.Property("Remark") .HasMaxLength(3072) .HasColumnType("nvarchar(3072)") .HasColumnName("Remark"); - b.Property("SamplePercent") + b.Property("StdPackQty") .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)"); + .HasColumnName("Uom"); b.HasKey("Id"); b.HasIndex("MasterID"); - b.ToTable("Job_InspectJobDetail", (string)null); + b.HasIndex("Number", "ItemCode") + .IsUnique(); + + b.ToTable("Store_DeliverRequestDetail", (string)null); }); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.InspectJobSummaryDetail", b => + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ExchangeData", 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("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); b.Property("CreationTime") .HasColumnType("datetime2") @@ -4513,58 +4745,42 @@ namespace Win_in.Sfs.Wms.Store.Migrations .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("DataAction") + .HasColumnType("int"); - b.Property("InspectReport") + b.Property("DataContent") .HasColumnType("nvarchar(max)"); - b.Property("InspectType") + b.Property("DataIdentityCode") .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)"); - b.Property("InspectUser") + b.Property("DataType") + .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)"); - b.Property("ItemCode") + b.Property("DestinationSystem") .IsRequired() .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ItemCode"); + .HasColumnType("nvarchar(64)"); - b.Property("ItemDesc1") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ItemDesc1"); + b.Property("EffectiveDate") + .HasColumnType("datetime2"); - b.Property("ItemDesc2") + b.Property("ErrorCode") + .IsRequired() .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ItemDesc2"); + .HasColumnType("nvarchar(64)"); - b.Property("ItemName") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ItemName"); + b.Property("ErrorMessage") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); b.Property("LastModificationTime") .HasColumnType("datetime2") @@ -4574,83 +4790,74 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("LastModifierId"); - b.Property("Lot") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("Lot"); - - b.Property("MasterID") - .HasColumnType("uniqueidentifier"); - - b.Property("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("Number") + .HasColumnType("bigint"); - b.Property("ProduceDate") + b.Property("ReadTime") .HasColumnType("datetime2"); - b.Property("ReceiveQty") - .HasColumnType("decimal(18,6)"); + b.Property("Reader") + .HasColumnType("nvarchar(max)"); 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("RetryTimes") + .HasColumnType("int"); - b.Property("SummaryInspectStatus") + b.Property("SourceSystem") .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)"); - b.Property("SupplierBatch") + b.Property("Status") + .IsRequired() .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("SupplierBatch"); + .HasColumnType("nvarchar(64)"); b.Property("TenantId") .HasColumnType("uniqueidentifier") .HasColumnName("TenantId"); - b.Property("Uom") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + b.Property("TyrpNumber") + .IsRequired() + .HasColumnType("nvarchar(max)"); - b.HasKey("Id"); + b.Property("WriteTime") + .HasColumnType("datetime2"); - b.HasIndex("MasterID"); + b.Property("Writer") + .HasColumnType("nvarchar(max)"); - b.ToTable("Job_InspectJobSummaryDetail", (string)null); + b.HasKey("Id"); + + b.ToTable("Store_ExchangeData", (string)null); }); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.InspectNote", b => + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.InjectionJob", b => { b.Property("Id") .HasColumnType("uniqueidentifier"); - b.Property("ActiveDate") + b.Property("AcceptTime") .HasColumnType("datetime2"); - b.Property("AsnNumber") + 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)"); @@ -4672,14 +4879,28 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("nvarchar(max)") .HasColumnName("ExtraProperties"); - b.Property("InspectNumber") + b.Property("InjectionRequestNumber") .HasMaxLength(64) .HasColumnType("nvarchar(64)"); - b.Property("JobNumber") + b.Property("IsAutoComplete") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false); + + b.Property("JobDescription") + .HasMaxLength(1024) + .HasColumnType("nvarchar(1024)"); + + b.Property("JobStatus") + .IsRequired() .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("JobNumber"); + .HasColumnType("nvarchar(64)"); + + b.Property("JobType") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); b.Property("LastModificationTime") .HasColumnType("datetime2") @@ -4689,26 +4910,22 @@ namespace Win_in.Sfs.Wms.Store.Migrations .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("Priority") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasDefaultValue(0); - b.Property("ReceiptNumber") + b.Property("PriorityIncrement") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasDefaultValue(0); + + b.Property("ProdLine") .HasMaxLength(64) .HasColumnType("nvarchar(64)"); @@ -4717,12 +4934,7 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("nvarchar(3072)") .HasColumnName("Remark"); - b.Property("RpNumber") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("SupplierCode") - .IsRequired() + b.Property("RequestType") .HasMaxLength(64) .HasColumnType("nvarchar(64)"); @@ -4730,41 +4942,40 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("TenantId"); + b.Property("UpStreamJobNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("UseOnTheWayLocation") + .HasColumnType("bit"); + + b.Property("WarehouseCode") + .HasColumnType("nvarchar(max)"); + + b.Property("WorkGroupCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + b.Property("Worker") .HasColumnType("nvarchar(max)"); + b.Property("Workshop") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + b.HasKey("Id"); b.HasIndex("Number") .IsUnique(); - b.ToTable("Store_InspectNote", (string)null); + b.ToTable("Job_InjectionJob", (string)null); }); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.InspectNoteDetail", b => + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.InjectionJobDetail", 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"); @@ -4773,44 +4984,73 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("CreatorId"); - b.Property("DetailInspectStatus") + b.Property("DeliveryQty") + .HasColumnType("decimal(18,6)"); + + b.Property("DistributionType") .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)"); - b.Property("ExpireDate") + b.Property("ExpiredTime") .HasColumnType("datetime2"); - b.Property("FailedQty") - .ValueGeneratedOnAdd() - .HasColumnType("decimal(18,6)") - .HasDefaultValue(0m); + b.Property("HandledArriveDate") + .HasColumnType("datetime2"); - b.Property("FailedReason") + b.Property("HandledContainerCode") .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("GoodQty") - .ValueGeneratedOnAdd() - .HasColumnType("decimal(18,6)") - .HasDefaultValue(0m); + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledContainerCode"); - b.Property("InspectDate") + b.Property("HandledExpireDate") .HasColumnType("datetime2"); - b.Property("InspectQty") - .ValueGeneratedOnAdd() - .HasColumnType("decimal(18,6)") - .HasDefaultValue(0m); + b.Property("HandledFromLocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledFromLocationArea"); - b.Property("InspectType") - .IsRequired() + b.Property("HandledFromLocationCode") .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledFromLocationCode"); - b.Property("InspectUser") + b.Property("HandledFromLocationErpCode") .HasMaxLength(64) - .HasColumnType("nvarchar(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() @@ -4841,82 +5081,111 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("LastModifierId"); - b.Property("LocationArea") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("LocationArea"); + b.Property("MasterID") + .HasColumnType("uniqueidentifier"); - b.Property("LocationCode") + b.Property("Number") .IsRequired() .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("LocationCode"); + .HasColumnType("nvarchar(64)"); - b.Property("LocationErpCode") + 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)") - .HasColumnName("LocationErpCode"); + .HasColumnType("nvarchar(64)"); - b.Property("LocationGroup") + b.Property("PositionCode") .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("LocationGroup"); + .HasColumnType("nvarchar(64)"); - b.Property("Lot") + b.Property("ProdLine") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("RecommendArriveDate") + .HasColumnType("datetime2"); + + b.Property("RecommendContainerCode") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("Lot"); + .HasColumnName("RecommendContainerCode"); - b.Property("MasterID") - .HasColumnType("uniqueidentifier"); + b.Property("RecommendExpireDate") + .HasColumnType("datetime2"); - b.Property("NotPassedQty") - .HasColumnType("decimal(18,6)"); + b.Property("RecommendFromLocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendFromLocationArea"); - b.Property("Number") - .IsRequired() + b.Property("RecommendFromLocationCode") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("Number"); + .HasColumnName("RecommendFromLocationCode"); - b.Property("OtherPropertyJson") - .HasColumnType("nvarchar(max)"); + b.Property("RecommendFromLocationErpCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendFromLocationErpCode"); - b.Property("PackingCode") - .IsRequired() + b.Property("RecommendFromLocationGroup") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("PackingCode"); + .HasColumnName("RecommendFromLocationGroup"); - b.Property("Photos") - .HasColumnType("nvarchar(max)"); + b.Property("RecommendFromWarehouseCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendFromWarehouseCode"); - b.Property("PoLine") + b.Property("RecommendLot") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("PoLine"); + .HasColumnName("RecommendLot"); - b.Property("PoNumber") + b.Property("RecommendPackingCode") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("PoNumber"); + .HasColumnName("RecommendPackingCode"); - b.Property("ProduceDate") + b.Property("RecommendProduceDate") .HasColumnType("datetime2"); - b.Property("ReceiveQty") + b.Property("RecommendQty") .HasColumnType("decimal(18,6)"); + b.Property("RecommendSupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendSupplierBatch"); + + b.Property("RecommendType") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + b.Property("Remark") .HasMaxLength(3072) .HasColumnType("nvarchar(3072)") .HasColumnName("Remark"); - b.Property("SamplePercent") - .ValueGeneratedOnAdd() - .HasColumnType("decimal(18,6)") - .HasDefaultValue(0m); + b.Property("RequestLocationCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("RoundedQty") + .HasColumnType("decimal(18,6)"); b.Property("Status") .IsRequired() @@ -4926,56 +5195,68 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.Property("StdPackQty") .HasColumnType("decimal(18,6)"); - b.Property("SupplierBatch") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("SupplierBatch"); - b.Property("TenantId") .HasColumnType("uniqueidentifier") .HasColumnName("TenantId"); - b.Property("Uom") + b.Property("ToLocationArea") .HasMaxLength(64) .HasColumnType("nvarchar(64)"); - b.Property("Volume") - .HasColumnType("nvarchar(max)"); + b.Property("ToLocationCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); - b.Property("WarehouseCode") + 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)") - .HasColumnName("WarehouseCode"); + .HasColumnType("nvarchar(64)"); - b.Property("Weight") + b.Property("Uom") .HasColumnType("nvarchar(max)"); + b.Property("WorkStation") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + b.HasKey("Id"); b.HasIndex("MasterID"); - b.HasIndex("Number", "PackingCode") - .IsUnique(); - - b.ToTable("Store_InspectNoteDetail", (string)null); + b.ToTable("Job_InjectionJobDetail", (string)null); }); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.InspectNoteSummaryDetail", b => + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.InjectionNote", b => { b.Property("Id") .HasColumnType("uniqueidentifier"); - b.Property("AbcClass") - .HasColumnType("nvarchar(max)"); + b.Property("ActiveDate") + .HasColumnType("datetime2"); - b.Property("ArriveDate") + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("ConfirmTime") .HasColumnType("datetime2"); - b.Property("CrackQty") - .ValueGeneratedOnAdd() - .HasColumnType("decimal(18,6)") - .HasDefaultValue(0m); + b.Property("Confirmed") + .HasColumnType("bit"); b.Property("CreationTime") .HasColumnType("datetime2") @@ -4985,37 +5266,3931 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("CreatorId"); - b.Property("ExpireDate") + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("JobNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("JobNumber"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("RequestNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("RequestType") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("UseOnTheWayLocation") + .HasColumnType("bit"); + + b.Property("Worker") + .HasColumnType("nvarchar(max)"); + + b.Property("Workshop") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.HasKey("Id"); + + b.HasIndex("Number") + .IsUnique(); + + b.ToTable("Store_InjectionNote", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.InjectionNoteDetail", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ArriveDate") .HasColumnType("datetime2"); - b.Property("FailedQty") - .ValueGeneratedOnAdd() - .HasColumnType("decimal(18,6)") - .HasDefaultValue(0m); + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); - b.Property("FailedReason") + 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("GoodQty") - .ValueGeneratedOnAdd() - .HasColumnType("decimal(18,6)") - .HasDefaultValue(0m); + b.Property("FromWarehouseCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromWarehouseCode"); - b.Property("InspectQty") - .ValueGeneratedOnAdd() + b.Property("HandledArriveDate") + .HasColumnType("datetime2"); + + b.Property("HandledContainerCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledContainerCode"); + + b.Property("HandledExpireDate") + .HasColumnType("datetime2"); + + b.Property("HandledFromLocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledFromLocationArea"); + + b.Property("HandledFromLocationCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledFromLocationCode"); + + b.Property("HandledFromLocationErpCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledFromLocationErpCode"); + + b.Property("HandledFromLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledFromLocationGroup"); + + b.Property("HandledFromWarehouseCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledFromWarehouseCode"); + + b.Property("HandledLot") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledLot"); + + b.Property("HandledPackingCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledPackingCode"); + + b.Property("HandledProduceDate") + .HasColumnType("datetime2"); + + b.Property("HandledQty") + .HasColumnType("decimal(18,6)"); + + b.Property("HandledSupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledSupplierBatch"); + + b.Property("IssueTime") + .HasColumnType("datetime2"); + + b.Property("ItemCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemCode"); + + b.Property("ItemDesc1") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc1"); + + b.Property("ItemDesc2") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc2"); + + b.Property("ItemName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemName"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("MasterID") + .HasColumnType("uniqueidentifier"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("OnTheWayLocationCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("PositionCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ProdLine") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ProduceDate") + .HasColumnType("datetime2"); + + b.Property("Qty") + .HasPrecision(18, 6) .HasColumnType("decimal(18,6)") - .HasDefaultValue(0m); + .HasColumnName("Qty"); + + b.Property("RecommendArriveDate") + .HasColumnType("datetime2"); + + b.Property("RecommendContainerCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendContainerCode"); + + b.Property("RecommendExpireDate") + .HasColumnType("datetime2"); + + b.Property("RecommendFromLocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendFromLocationArea"); + + b.Property("RecommendFromLocationCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendFromLocationCode"); + + b.Property("RecommendFromLocationErpCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendFromLocationErpCode"); + + b.Property("RecommendFromLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendFromLocationGroup"); + + b.Property("RecommendFromWarehouseCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendFromWarehouseCode"); + + b.Property("RecommendLot") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendLot"); + + b.Property("RecommendPackingCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendPackingCode"); + + b.Property("RecommendProduceDate") + .HasColumnType("datetime2"); + + b.Property("RecommendQty") + .HasColumnType("decimal(18,6)"); + + b.Property("RecommendSupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendSupplierBatch"); + + b.Property("RecommendType") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("StdPackQty") + .HasColumnType("decimal(18,6)"); + + b.Property("SupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("SupplierBatch"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("ToContainerCode") + .HasColumnType("nvarchar(max)"); + + b.Property("ToLocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToLocationArea"); + + b.Property("ToLocationCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToLocationCode"); + + b.Property("ToLocationErpCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToLocationErpCode"); + + b.Property("ToLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToLocationGroup"); + + b.Property("ToLot") + .HasColumnType("nvarchar(max)"); + + b.Property("ToPackingCode") + .HasColumnType("nvarchar(max)"); + + b.Property("ToStatus") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ToWarehouseCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToWarehouseCode"); + + b.Property("Uom") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Uom"); + + b.Property("WorkStation") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.HasKey("Id"); + + b.HasIndex("FromPackingCode"); + + b.HasIndex("MasterID"); + + b.HasIndex("Number", "FromPackingCode", "FromLocationCode", "ToLocationCode") + .IsUnique() + .HasFilter("[FromPackingCode] IS NOT NULL"); + + b.ToTable("Store_InjectionNoteDetail", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.InjectionRequest", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ActiveDate") + .HasColumnType("datetime2"); + + b.Property("AutoAgree") + .HasColumnType("bit"); + + b.Property("AutoCompleteJob") + .HasColumnType("bit"); + + b.Property("AutoHandle") + .HasColumnType("bit"); + + b.Property("AutoSubmit") + .HasColumnType("bit"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DirectCreateNote") + .HasColumnType("bit"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("PreparationPlanNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ProdLine") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("RequestStatus") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Type") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("UseOnTheWayLocation") + .HasColumnType("bit"); + + b.Property("Worker") + .HasColumnType("nvarchar(max)"); + + b.Property("Workshop") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.HasKey("Id"); + + b.HasIndex("Number") + .IsUnique(); + + b.ToTable("Store_InjectionRequest", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.InjectionRequestDetail", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("ExpiredTime") + .HasColumnType("datetime2"); + + b.Property("FromLocationArea") + .HasColumnType("nvarchar(max)"); + + b.Property("IssuedQty") + .HasPrecision(18, 6) + .HasColumnType("decimal(18,6)"); + + b.Property("ItemCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemCode"); + + b.Property("ItemDesc1") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc1"); + + b.Property("ItemDesc2") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc2"); + + b.Property("ItemName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemName"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("MasterID") + .HasColumnType("uniqueidentifier"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("PositionCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ProdLine") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Qty") + .HasPrecision(18, 6) + .HasColumnType("decimal(18,6)") + .HasColumnName("Qty"); + + b.Property("ReceivedQty") + .HasPrecision(18, 6) + .HasColumnType("decimal(18,6)"); + + b.Property("RecommendType") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("Status") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("StdPackQty") + .HasColumnType("decimal(18,6)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("ToLocationArea") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ToLocationCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ToLocationErpCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ToLocationGroup") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ToWarehouseCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Uom") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Uom"); + + b.Property("WorkStation") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.HasKey("Id"); + + b.HasIndex("ItemCode"); + + b.HasIndex("MasterID"); + + b.HasIndex("Number", "ItemCode", "ToLocationCode") + .IsUnique(); + + b.ToTable("Store_InjectionRequestDetail", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.InspectAbnormalNote", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ActiveDate") + .HasColumnType("datetime2"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("InspectNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("ReceiptNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("SupplierCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Worker") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("Number") + .IsUnique(); + + b.ToTable("Store_InspectAbnormalNote", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.InspectAbnormalNoteDetail", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AbnormalType") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ArriveDate") + .HasColumnType("datetime2"); + + b.Property("ContainerCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ContainerCode"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("ExpireDate") + .HasColumnType("datetime2"); + + b.Property("ItemCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemCode"); + + b.Property("ItemDesc1") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc1"); + + b.Property("ItemDesc2") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc2"); + + b.Property("ItemName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemName"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Lot") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Lot"); + + b.Property("MasterID") + .HasColumnType("uniqueidentifier"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("PackingCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("PackingCode"); + + b.Property("Photos") + .HasColumnType("nvarchar(max)"); + + b.Property("ProduceDate") + .HasColumnType("datetime2"); + + b.Property("Qty") + .HasPrecision(18, 6) + .HasColumnType("decimal(18,6)") + .HasColumnName("Qty"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("StdPackQty") + .HasColumnType("decimal(18,6)"); + + b.Property("SupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("SupplierBatch"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Uom") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Uom"); + + b.HasKey("Id"); + + b.HasIndex("MasterID"); + + b.HasIndex("Number", "PackingCode") + .IsUnique(); + + b.ToTable("Store_InspectAbnormalNoteDetail", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.InspectJob", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AcceptTime") + .HasColumnType("datetime2"); + + b.Property("AcceptUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("AcceptUserName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("AsnNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("CompleteTime") + .HasColumnType("datetime2"); + + b.Property("CompleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CompleteUserName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("InspectNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("IsAutoComplete") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false); + + b.Property("JobDescription") + .HasMaxLength(1024) + .HasColumnType("nvarchar(1024)"); + + b.Property("JobStatus") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("JobType") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("NextAction") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("PoNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Priority") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasDefaultValue(0); + + b.Property("PriorityIncrement") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasDefaultValue(0); + + b.Property("PurchaseReceiptRequestNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ReceiptNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("RpNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("SupplierCode") + .HasColumnType("nvarchar(max)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("UpStreamJobNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("WarehouseCode") + .HasColumnType("nvarchar(max)"); + + b.Property("WorkGroupCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Worker") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("Number") + .IsUnique(); + + b.ToTable("Job_InspectJob", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.InspectJobDetail", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AbcClass") + .HasColumnType("nvarchar(max)"); + + b.Property("Appearance") + .HasColumnType("nvarchar(max)"); + + b.Property("ArriveDate") + .HasColumnType("datetime2"); + + b.Property("ContainerCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ContainerCode"); + + b.Property("CrackQty") + .ValueGeneratedOnAdd() + .HasColumnType("decimal(18,6)") + .HasDefaultValue(0m); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DetailInspectStatus") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ExpireDate") + .HasColumnType("datetime2"); + + b.Property("FailedQty") + .ValueGeneratedOnAdd() + .HasColumnType("decimal(18,6)") + .HasDefaultValue(0m); + + b.Property("FailedReason") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("GoodQty") + .ValueGeneratedOnAdd() + .HasColumnType("decimal(18,6)") + .HasDefaultValue(0m); + + b.Property("InspectQty") + .HasColumnType("decimal(18,6)"); + + b.Property("InspectType") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("InspectUser") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ItemCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemCode"); + + b.Property("ItemDesc1") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc1"); + + b.Property("ItemDesc2") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc2"); + + b.Property("ItemName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemName"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("LocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationArea"); + + b.Property("LocationCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationCode"); + + b.Property("LocationErpCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationErpCode"); + + b.Property("LocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationGroup"); + + b.Property("Lot") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Lot"); + + b.Property("MasterID") + .HasColumnType("uniqueidentifier"); + + b.Property("NotPassedQty") + .ValueGeneratedOnAdd() + .HasColumnType("decimal(18,6)") + .HasDefaultValue(0m); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("OtherPropertyJson") + .HasColumnType("nvarchar(max)"); + + b.Property("PackingCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("PackingCode"); + + b.Property("PoLine") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("PoNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ProduceDate") + .HasColumnType("datetime2"); + + b.Property("ReceiveQty") + .HasColumnType("decimal(18,6)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("SamplePercent") + .HasColumnType("decimal(18,6)"); + + b.Property("Status") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("StdPackQty") + .HasColumnType("decimal(18,6)"); + + b.Property("SupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("SupplierBatch"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Uom") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Volume") + .HasColumnType("nvarchar(max)"); + + b.Property("WarehouseCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("WarehouseCode"); + + b.Property("Weight") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("MasterID"); + + b.ToTable("Job_InspectJobDetail", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.InspectJobSummaryDetail", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AbcClass") + .HasColumnType("nvarchar(max)"); + + b.Property("ArriveDate") + .HasColumnType("datetime2"); + + b.Property("CrackQty") + .ValueGeneratedOnAdd() + .HasColumnType("decimal(18,6)") + .HasDefaultValue(0m); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("ExpireDate") + .HasColumnType("datetime2"); + + b.Property("FailedQty") + .ValueGeneratedOnAdd() + .HasColumnType("decimal(18,6)") + .HasDefaultValue(0m); + + b.Property("FailedReason") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("GoodQty") + .ValueGeneratedOnAdd() + .HasColumnType("decimal(18,6)") + .HasDefaultValue(0m); + + b.Property("InspectQty") + .HasColumnType("decimal(18,6)"); + + b.Property("InspectReport") + .HasColumnType("nvarchar(max)"); + + b.Property("InspectType") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("InspectUser") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ItemCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemCode"); + + b.Property("ItemDesc1") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc1"); + + b.Property("ItemDesc2") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc2"); + + b.Property("ItemName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemName"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Lot") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Lot"); + + b.Property("MasterID") + .HasColumnType("uniqueidentifier"); + + b.Property("NotPassedQty") + .ValueGeneratedOnAdd() + .HasColumnType("decimal(18,6)") + .HasDefaultValue(0m); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("PoLine") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("PoNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ProduceDate") + .HasColumnType("datetime2"); + + b.Property("ReceiveQty") + .HasColumnType("decimal(18,6)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("SamplePercent") + .HasColumnType("decimal(18,6)"); + + b.Property("StdPackQty") + .HasColumnType("decimal(18,6)"); + + b.Property("SummaryInspectStatus") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("SupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("SupplierBatch"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Uom") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.HasKey("Id"); + + b.HasIndex("MasterID"); + + b.ToTable("Job_InspectJobSummaryDetail", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.InspectNote", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ActiveDate") + .HasColumnType("datetime2"); + + b.Property("AsnNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("InspectNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("JobNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("JobNumber"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("NextAction") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("PoNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("PurchaseReceiptRequestNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ReceiptNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("RpNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("SupplierCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Worker") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("Number") + .IsUnique(); + + b.ToTable("Store_InspectNote", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.InspectNoteDetail", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AbcClass") + .HasColumnType("nvarchar(max)"); + + b.Property("Appearance") + .HasColumnType("nvarchar(max)"); + + b.Property("ArriveDate") + .HasColumnType("datetime2"); + + b.Property("ContainerCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ContainerCode"); + + b.Property("CrackQty") + .ValueGeneratedOnAdd() + .HasColumnType("decimal(18,6)") + .HasDefaultValue(0m); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DetailInspectStatus") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ExpireDate") + .HasColumnType("datetime2"); + + b.Property("FailedQty") + .ValueGeneratedOnAdd() + .HasColumnType("decimal(18,6)") + .HasDefaultValue(0m); + + b.Property("FailedReason") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("GoodQty") + .ValueGeneratedOnAdd() + .HasColumnType("decimal(18,6)") + .HasDefaultValue(0m); + + b.Property("InspectDate") + .HasColumnType("datetime2"); + + b.Property("InspectQty") + .ValueGeneratedOnAdd() + .HasColumnType("decimal(18,6)") + .HasDefaultValue(0m); + + b.Property("InspectType") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("InspectUser") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ItemCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemCode"); + + b.Property("ItemDesc1") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc1"); + + b.Property("ItemDesc2") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc2"); + + b.Property("ItemName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemName"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("LocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationArea"); + + b.Property("LocationCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationCode"); + + b.Property("LocationErpCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationErpCode"); + + b.Property("LocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationGroup"); + + b.Property("Lot") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Lot"); + + b.Property("MasterID") + .HasColumnType("uniqueidentifier"); + + b.Property("NotPassedQty") + .HasColumnType("decimal(18,6)"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("OtherPropertyJson") + .HasColumnType("nvarchar(max)"); + + b.Property("PackingCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("PackingCode"); + + b.Property("Photos") + .HasColumnType("nvarchar(max)"); + + b.Property("PoLine") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("PoLine"); + + b.Property("PoNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("PoNumber"); + + b.Property("ProduceDate") + .HasColumnType("datetime2"); + + b.Property("ReceiveQty") + .HasColumnType("decimal(18,6)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("SamplePercent") + .ValueGeneratedOnAdd() + .HasColumnType("decimal(18,6)") + .HasDefaultValue(0m); + + b.Property("Status") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("StdPackQty") + .HasColumnType("decimal(18,6)"); + + b.Property("SupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("SupplierBatch"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Uom") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Volume") + .HasColumnType("nvarchar(max)"); + + b.Property("WarehouseCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("WarehouseCode"); + + b.Property("Weight") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("MasterID"); + + b.HasIndex("Number", "PackingCode") + .IsUnique(); + + b.ToTable("Store_InspectNoteDetail", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.InspectNoteSummaryDetail", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AbcClass") + .HasColumnType("nvarchar(max)"); + + b.Property("ArriveDate") + .HasColumnType("datetime2"); + + b.Property("CrackQty") + .ValueGeneratedOnAdd() + .HasColumnType("decimal(18,6)") + .HasDefaultValue(0m); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("ExpireDate") + .HasColumnType("datetime2"); + + b.Property("FailedQty") + .ValueGeneratedOnAdd() + .HasColumnType("decimal(18,6)") + .HasDefaultValue(0m); + + b.Property("FailedReason") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("GoodQty") + .ValueGeneratedOnAdd() + .HasColumnType("decimal(18,6)") + .HasDefaultValue(0m); + + b.Property("InspectQty") + .ValueGeneratedOnAdd() + .HasColumnType("decimal(18,6)") + .HasDefaultValue(0m); + + b.Property("InspectType") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("InspectUser") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ItemCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemCode"); + + b.Property("ItemDesc1") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc1"); + + b.Property("ItemDesc2") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc2"); + + b.Property("ItemName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemName"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Lot") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Lot"); + + b.Property("MasterID") + .HasColumnType("uniqueidentifier"); + + b.Property("NotPassedQty") + .HasColumnType("decimal(18,6)"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("PoLine") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("PoLine"); + + b.Property("PoNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("PoNumber"); + + b.Property("ProduceDate") + .HasColumnType("datetime2"); + + b.Property("ReceiveQty") + .HasColumnType("decimal(18,6)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("SamplePercent") + .ValueGeneratedOnAdd() + .HasColumnType("decimal(18,6)") + .HasDefaultValue(0m); + + b.Property("StdPackQty") + .HasColumnType("decimal(18,6)"); + + b.Property("SummaryInspectStatus") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("SupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("SupplierBatch"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Uom") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.HasKey("Id"); + + b.HasIndex("MasterID"); + + b.HasIndex("Number", "ItemCode") + .IsUnique(); + + b.ToTable("Store_InspectNoteSummaryDetail", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.InspectRequest", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ActiveDate") + .HasColumnType("datetime2"); + + b.Property("AsnNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("AutoAgree") + .HasColumnType("bit"); + + b.Property("AutoCompleteJob") + .HasColumnType("bit"); + + b.Property("AutoHandle") + .HasColumnType("bit"); + + b.Property("AutoSubmit") + .HasColumnType("bit"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DirectCreateNote") + .HasColumnType("bit"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("PoNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("PurchaseReceiptRequestNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ReceiptNumber") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("RequestStatus") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("RpNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("SupplierCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("WarehouseCode") + .HasColumnType("nvarchar(max)"); + + b.Property("Worker") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("Number") + .IsUnique(); + + b.ToTable("Store_InspectRequest", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.InspectRequestDetail", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AbcClass") + .HasColumnType("nvarchar(max)"); + + b.Property("ArriveDate") + .HasColumnType("datetime2"); + + b.Property("Attributes") + .HasColumnType("nvarchar(max)"); + + b.Property("ContainerCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ContainerCode"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DetailInspectStatus") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ExpireDate") + .HasColumnType("datetime2"); + + b.Property("InspectQty") + .ValueGeneratedOnAdd() + .HasColumnType("decimal(18,6)") + .HasDefaultValue(0m); + + b.Property("InspectType") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ItemCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemCode"); + + b.Property("ItemDesc1") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc1"); + + b.Property("ItemDesc2") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc2"); + + b.Property("ItemName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemName"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("LocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationArea"); + + b.Property("LocationCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationCode"); + + b.Property("LocationErpCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationErpCode"); + + b.Property("LocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationGroup"); + + b.Property("Lot") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Lot"); + + b.Property("MasterID") + .HasColumnType("uniqueidentifier"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("PackingCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("PackingCode"); + + b.Property("PoLine") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("PoLine"); + + b.Property("PoNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("PoNumber"); + + b.Property("ProduceDate") + .HasColumnType("datetime2"); + + b.Property("ReceiveQty") + .HasColumnType("decimal(18,6)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("SamplePercent") + .ValueGeneratedOnAdd() + .HasColumnType("decimal(18,6)") + .HasDefaultValue(0m); + + b.Property("Status") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("StdPackQty") + .HasColumnType("decimal(18,6)"); + + b.Property("SupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("SupplierBatch"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Uom") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("WarehouseCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("WarehouseCode"); + + b.HasKey("Id"); + + b.HasIndex("MasterID"); + + b.HasIndex("Number", "PackingCode") + .IsUnique(); + + b.ToTable("Store_InspectRequestDetail", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.InspectRequestSummaryDetail", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AbcClass") + .HasColumnType("nvarchar(max)"); + + b.Property("ArriveDate") + .HasColumnType("datetime2"); + + b.Property("CrackQty") + .HasColumnType("decimal(18,6)"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("ExpireDate") + .HasColumnType("datetime2"); + + b.Property("FailedQty") + .HasColumnType("decimal(18,6)"); + + b.Property("GoodQty") + .HasColumnType("decimal(18,6)"); + + b.Property("InspectQty") + .ValueGeneratedOnAdd() + .HasColumnType("decimal(18,6)") + .HasDefaultValue(0m); + + b.Property("InspectReport") + .HasColumnType("nvarchar(max)"); + + b.Property("InspectType") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ItemCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemCode"); + + b.Property("ItemDesc1") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc1"); + + b.Property("ItemDesc2") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc2"); + + b.Property("ItemName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemName"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Lot") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Lot"); + + b.Property("MasterID") + .HasColumnType("uniqueidentifier"); + + b.Property("NotPassedQty") + .HasColumnType("decimal(18,6)"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("PoLine") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("PoLine"); + + b.Property("PoNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("PoNumber"); + + b.Property("ProduceDate") + .HasColumnType("datetime2"); + + b.Property("ReceiveQty") + .HasColumnType("decimal(18,6)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("SamplePercent") + .ValueGeneratedOnAdd() + .HasColumnType("decimal(18,6)") + .HasDefaultValue(0m); + + b.Property("StdPackQty") + .HasColumnType("decimal(18,6)"); + + b.Property("SummaryInspectStatus") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("SupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("SupplierBatch"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Uom") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.HasKey("Id"); + + b.HasIndex("MasterID"); + + b.HasIndex("Number", "ItemCode", "Lot") + .IsUnique() + .HasFilter("[Lot] IS NOT NULL"); + + b.ToTable("Store_InspectRequestSummaryDetail", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.InventoryInitialNote", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("ActiveDate") + .HasColumnType("datetime2"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("RequestNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Worker") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("Number") + .IsUnique(); + + b.ToTable("Store_InventoryInitialNote", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.InventoryInitialNoteDetail", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("ArriveDate") + .HasColumnType("datetime2"); + + b.Property("ContainerCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ContainerCode"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("ExpireDate") + .HasColumnType("datetime2"); + + b.Property("ItemCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemCode"); + + b.Property("ItemDesc1") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc1"); + + b.Property("ItemDesc2") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc2"); + + b.Property("ItemName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemName"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("LocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationArea"); + + b.Property("LocationCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationCode"); + + b.Property("LocationErpCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationErpCode"); + + b.Property("LocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationGroup"); + + b.Property("Lot") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Lot"); + + b.Property("MasterID") + .HasColumnType("uniqueidentifier"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("PackingCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("PackingCode"); + + b.Property("ProduceDate") + .HasColumnType("datetime2"); + + b.Property("Qty") + .HasPrecision(18, 6) + .HasColumnType("decimal(18,6)") + .HasColumnName("Qty"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("Status") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("StdPackQty") + .HasColumnType("decimal(18,6)"); + + b.Property("SupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("SupplierBatch"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Uom") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Uom"); + + b.Property("WarehouseCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("WarehouseCode"); + + b.HasKey("Id"); + + b.HasIndex("MasterID"); + + b.HasIndex("Number", "PackingCode", "ItemCode", "Lot", "Status") + .IsUnique() + .HasFilter("[Lot] IS NOT NULL"); + + b.ToTable("Store_InventoryInitialNoteDetail", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.InventoryTransferNote", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ActiveDate") + .HasColumnType("datetime2"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("JobNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("JobNumber"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("SupplierCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("TransferType") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Worker") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("Number") + .IsUnique(); + + b.ToTable("Store_InventoryTransferNote", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.InventoryTransferNoteDetail", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ArriveDate") + .HasColumnType("datetime2"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("ExpireDate") + .HasColumnType("datetime2"); + + b.Property("FromContainerCode") + .HasColumnType("nvarchar(max)"); + + b.Property("FromLocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromLocationArea"); + + b.Property("FromLocationCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromLocationCode"); + + b.Property("FromLocationErpCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromLocationErpCode"); + + b.Property("FromLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromLocationGroup"); + + b.Property("FromLot") + .HasColumnType("nvarchar(max)"); + + b.Property("FromPackingCode") + .HasColumnType("nvarchar(450)"); + + b.Property("FromStatus") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("FromWarehouseCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromWarehouseCode"); + + b.Property("ItemCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemCode"); + + b.Property("ItemDesc1") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc1"); + + b.Property("ItemDesc2") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc2"); + + b.Property("ItemName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemName"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("MasterID") + .HasColumnType("uniqueidentifier"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("ProduceDate") + .HasColumnType("datetime2"); + + b.Property("Qty") + .HasPrecision(18, 6) + .HasColumnType("decimal(18,6)") + .HasColumnName("Qty"); + + b.Property("Reason") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("StdPackQty") + .HasColumnType("decimal(18,6)"); + + b.Property("SupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("SupplierBatch"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("ToContainerCode") + .HasColumnType("nvarchar(max)"); + + b.Property("ToLocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToLocationArea"); + + b.Property("ToLocationCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToLocationCode"); + + b.Property("ToLocationErpCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToLocationErpCode"); + + b.Property("ToLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToLocationGroup"); + + b.Property("ToLot") + .HasColumnType("nvarchar(max)"); + + b.Property("ToPackingCode") + .HasColumnType("nvarchar(max)"); + + b.Property("ToStatus") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ToWarehouseCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToWarehouseCode"); + + b.Property("Uom") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Uom"); + + b.HasKey("Id"); + + b.HasIndex("MasterID"); + + b.HasIndex("Number", "FromPackingCode", "FromLocationCode", "ToLocationCode") + .IsUnique() + .HasFilter("[FromPackingCode] IS NOT NULL"); + + b.ToTable("Store_InventoryTransferNoteDetail", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.IsolationNote", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ActiveDate") + .HasColumnType("datetime2"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("JobNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("JobNumber"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Worker") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("Number") + .IsUnique(); + + b.ToTable("Store_IsolationNote", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.IsolationNoteDetail", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ArriveDate") + .HasColumnType("datetime2"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("ExpireDate") + .HasColumnType("datetime2"); + + b.Property("FromContainerCode") + .HasColumnType("nvarchar(max)"); + + b.Property("FromLocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromLocationArea"); + + b.Property("FromLocationCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromLocationCode"); + + b.Property("FromLocationErpCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromLocationErpCode"); + + b.Property("FromLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromLocationGroup"); + + b.Property("FromLot") + .HasColumnType("nvarchar(max)"); + + b.Property("FromPackingCode") + .HasColumnType("nvarchar(450)"); + + b.Property("FromStatus") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("FromWarehouseCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromWarehouseCode"); + + b.Property("ItemCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemCode"); + + b.Property("ItemDesc1") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc1"); + + b.Property("ItemDesc2") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc2"); + + b.Property("ItemName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemName"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("MasterID") + .HasColumnType("uniqueidentifier"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("ProduceDate") + .HasColumnType("datetime2"); + + b.Property("Qty") + .HasPrecision(18, 6) + .HasColumnType("decimal(18,6)") + .HasColumnName("Qty"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("StdPackQty") + .HasColumnType("decimal(18,6)"); + + b.Property("SupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("SupplierBatch"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("ToContainerCode") + .HasColumnType("nvarchar(max)"); + + b.Property("ToLocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToLocationArea"); + + b.Property("ToLocationCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToLocationCode"); + + b.Property("ToLocationErpCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToLocationErpCode"); + + b.Property("ToLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToLocationGroup"); + + b.Property("ToLot") + .HasColumnType("nvarchar(max)"); + + b.Property("ToPackingCode") + .HasColumnType("nvarchar(max)"); + + b.Property("ToStatus") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ToWarehouseCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToWarehouseCode"); + + b.Property("Uom") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Uom"); + + b.HasKey("Id"); + + b.HasIndex("FromPackingCode"); + + b.HasIndex("MasterID"); + + b.HasIndex("Number", "FromPackingCode", "FromLocationCode", "ToLocationCode") + .IsUnique() + .HasFilter("[FromPackingCode] IS NOT NULL"); + + b.ToTable("Store_IsolationNoteDetail", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.IssueJob", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AcceptTime") + .HasColumnType("datetime2"); + + b.Property("AcceptUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("AcceptUserName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("CompleteTime") + .HasColumnType("datetime2"); + + b.Property("CompleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CompleteUserName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("IsAutoComplete") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false); + + b.Property("JobDescription") + .HasMaxLength(1024) + .HasColumnType("nvarchar(1024)"); + + b.Property("JobStatus") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("JobType") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("MaterialRequestNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Priority") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasDefaultValue(0); + + b.Property("PriorityIncrement") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasDefaultValue(0); + + b.Property("ProdLine") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("RequestType") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("UpStreamJobNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("UseOnTheWayLocation") + .HasColumnType("bit"); + + b.Property("WarehouseCode") + .HasColumnType("nvarchar(max)"); + + b.Property("WorkGroupCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Worker") + .HasColumnType("nvarchar(max)"); + + b.Property("Workshop") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.HasKey("Id"); + + b.HasIndex("Number") + .IsUnique(); + + b.ToTable("Job_IssueJob", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.IssueJobDetail", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DeliveryQty") + .HasColumnType("decimal(18,6)"); + + b.Property("DistributionType") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ExpiredTime") + .HasColumnType("datetime2"); + + b.Property("HandledArriveDate") + .HasColumnType("datetime2"); + + b.Property("HandledContainerCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledContainerCode"); + + b.Property("HandledExpireDate") + .HasColumnType("datetime2"); + + b.Property("HandledFromLocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledFromLocationArea"); + + b.Property("HandledFromLocationCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledFromLocationCode"); + + b.Property("HandledFromLocationErpCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledFromLocationErpCode"); + + b.Property("HandledFromLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledFromLocationGroup"); + + b.Property("HandledFromWarehouseCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledFromWarehouseCode"); + + b.Property("HandledLot") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledLot"); + + b.Property("HandledPackingCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledPackingCode"); + + b.Property("HandledProduceDate") + .HasColumnType("datetime2"); + + b.Property("HandledQty") + .HasColumnType("decimal(18,6)"); + + b.Property("HandledSupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledSupplierBatch"); + + b.Property("ItemCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemCode"); + + b.Property("ItemDesc1") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc1"); + + b.Property("ItemDesc2") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc2"); + + b.Property("ItemName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemName"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("MasterID") + .HasColumnType("uniqueidentifier"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("OnTheWayLocationCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Operation") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("PlanBeginTime") + .HasColumnType("datetime2"); + + b.Property("PlannedSplitRule") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("PositionCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ProdLine") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("RecommendArriveDate") + .HasColumnType("datetime2"); + + b.Property("RecommendContainerCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendContainerCode"); + + b.Property("RecommendExpireDate") + .HasColumnType("datetime2"); + + b.Property("RecommendFromLocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendFromLocationArea"); + + b.Property("RecommendFromLocationCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendFromLocationCode"); + + b.Property("RecommendFromLocationErpCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendFromLocationErpCode"); + + b.Property("RecommendFromLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendFromLocationGroup"); + + b.Property("RecommendFromWarehouseCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendFromWarehouseCode"); + + b.Property("RecommendLot") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendLot"); + + b.Property("RecommendPackingCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendPackingCode"); + + b.Property("RecommendProduceDate") + .HasColumnType("datetime2"); + + b.Property("RecommendQty") + .HasColumnType("decimal(18,6)"); + + b.Property("RecommendSupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendSupplierBatch"); + + b.Property("RecommendType") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("RequestLocationCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("RoundedQty") + .HasColumnType("decimal(18,6)"); + + b.Property("Status") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("StdPackQty") + .HasColumnType("decimal(18,6)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("ToLocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ToLocationCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ToLocationErpCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ToLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ToWarehouseCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("TruncType") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Uom") + .HasColumnType("nvarchar(max)"); + + b.Property("WorkStation") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.HasKey("Id"); + + b.HasIndex("MasterID"); + + b.ToTable("Job_IssueJobDetail", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.IssueNote", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ActiveDate") + .HasColumnType("datetime2"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("ConfirmTime") + .HasColumnType("datetime2"); + + b.Property("Confirmed") + .HasColumnType("bit"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("JobNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("JobNumber"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("RequestNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("RequestType") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("UseOnTheWayLocation") + .HasColumnType("bit"); + + b.Property("Worker") + .HasColumnType("nvarchar(max)"); + + b.Property("Workshop") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.HasKey("Id"); + + b.HasIndex("Number") + .IsUnique(); + + b.ToTable("Store_IssueNote", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.IssueNoteDetail", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ArriveDate") + .HasColumnType("datetime2"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("ExpireDate") + .HasColumnType("datetime2"); + + b.Property("ExpiredTime") + .HasColumnType("datetime2"); + + b.Property("FromContainerCode") + .HasColumnType("nvarchar(max)"); + + b.Property("FromLocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromLocationArea"); + + b.Property("FromLocationCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromLocationCode"); + + b.Property("FromLocationErpCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromLocationErpCode"); + + b.Property("FromLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromLocationGroup"); + + b.Property("FromLot") + .HasColumnType("nvarchar(max)"); + + b.Property("FromPackingCode") + .HasColumnType("nvarchar(450)"); + + b.Property("FromStatus") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("FromWarehouseCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromWarehouseCode"); + + b.Property("HandledArriveDate") + .HasColumnType("datetime2"); + + b.Property("HandledContainerCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledContainerCode"); + + b.Property("HandledExpireDate") + .HasColumnType("datetime2"); + + b.Property("HandledFromLocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledFromLocationArea"); + + b.Property("HandledFromLocationCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledFromLocationCode"); + + b.Property("HandledFromLocationErpCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledFromLocationErpCode"); + + b.Property("HandledFromLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledFromLocationGroup"); + + b.Property("HandledFromWarehouseCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledFromWarehouseCode"); + + b.Property("HandledLot") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledLot"); + + b.Property("HandledPackingCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledPackingCode"); + + b.Property("HandledProduceDate") + .HasColumnType("datetime2"); + + b.Property("HandledQty") + .HasColumnType("decimal(18,6)"); + + b.Property("HandledSupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledSupplierBatch"); + + b.Property("IssueTime") + .HasColumnType("datetime2"); + + b.Property("ItemCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemCode"); + + b.Property("ItemDesc1") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc1"); + + b.Property("ItemDesc2") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc2"); + + b.Property("ItemName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemName"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("MasterID") + .HasColumnType("uniqueidentifier"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("OnTheWayLocationCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("PositionCode") + .HasColumnType("nvarchar(max)"); + + b.Property("ProdLine") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ProduceDate") + .HasColumnType("datetime2"); + + b.Property("Qty") + .HasPrecision(18, 6) + .HasColumnType("decimal(18,6)") + .HasColumnName("Qty"); + + b.Property("RecommendArriveDate") + .HasColumnType("datetime2"); + + b.Property("RecommendContainerCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendContainerCode"); + + b.Property("RecommendExpireDate") + .HasColumnType("datetime2"); + + b.Property("RecommendFromLocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendFromLocationArea"); + + b.Property("RecommendFromLocationCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendFromLocationCode"); + + b.Property("RecommendFromLocationErpCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendFromLocationErpCode"); + + b.Property("RecommendFromLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendFromLocationGroup"); + + b.Property("RecommendFromWarehouseCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendFromWarehouseCode"); + + b.Property("RecommendLot") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendLot"); + + b.Property("RecommendPackingCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendPackingCode"); + + b.Property("RecommendProduceDate") + .HasColumnType("datetime2"); + + b.Property("RecommendQty") + .HasColumnType("decimal(18,6)"); + + b.Property("RecommendSupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendSupplierBatch"); + + b.Property("RecommendType") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("StdPackQty") + .HasColumnType("decimal(18,6)"); + + b.Property("SupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("SupplierBatch"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("ToContainerCode") + .HasColumnType("nvarchar(max)"); + + b.Property("ToLocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToLocationArea"); + + b.Property("ToLocationCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToLocationCode"); + + b.Property("ToLocationErpCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToLocationErpCode"); + + b.Property("ToLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToLocationGroup"); + + b.Property("ToLot") + .HasColumnType("nvarchar(max)"); + + b.Property("ToPackingCode") + .HasColumnType("nvarchar(max)"); + + b.Property("ToStatus") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ToWarehouseCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToWarehouseCode"); + + b.Property("Uom") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Uom"); + + b.Property("WorkStation") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.HasKey("Id"); + + b.HasIndex("FromPackingCode"); + + b.HasIndex("MasterID"); + + b.HasIndex("Number", "FromPackingCode", "FromLocationCode", "ToLocationCode") + .IsUnique() + .HasFilter("[FromPackingCode] IS NOT NULL"); + + b.ToTable("Store_IssueNoteDetail", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ItemTransformNote", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ActiveDate") + .HasColumnType("datetime2"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("JobNumber") + .HasColumnType("nvarchar(max)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("RequestNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Worker") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("Number") + .IsUnique(); + + b.ToTable("Store_ItemTransformNote", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ItemTransformNoteDetail", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ConcurrencyStamp") + .HasColumnType("nvarchar(max)"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("FromArriveDate") + .HasColumnType("datetime2"); + + b.Property("FromContainerCode") + .HasColumnType("nvarchar(max)"); + + b.Property("FromExpireDate") + .HasColumnType("datetime2"); + + b.Property("FromLocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromLocationArea"); + + b.Property("FromLocationCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromLocationCode"); + + b.Property("FromLocationErpCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromLocationErpCode"); + + b.Property("FromLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromLocationGroup"); + + b.Property("FromLot") + .HasColumnType("nvarchar(max)"); + + b.Property("FromPackingCode") + .HasColumnType("nvarchar(450)"); + + b.Property("FromProduceDate") + .HasColumnType("datetime2"); + + b.Property("FromQty") + .HasColumnType("decimal(18,6)"); - b.Property("InspectType") + b.Property("FromStatus") .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)"); - b.Property("InspectUser") + 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) @@ -5045,65 +9220,100 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("LastModifierId"); - b.Property("Lot") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("Lot"); - b.Property("MasterID") .HasColumnType("uniqueidentifier"); - b.Property("NotPassedQty") - .HasColumnType("decimal(18,6)"); - b.Property("Number") .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)") .HasColumnName("Number"); - b.Property("PoLine") + 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("PoLine"); + .HasColumnName("ToLocationArea"); - b.Property("PoNumber") + b.Property("ToLocationCode") + .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("PoNumber"); + .HasColumnName("ToLocationCode"); - b.Property("ProduceDate") - .HasColumnType("datetime2"); + b.Property("ToLocationErpCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToLocationErpCode"); - b.Property("ReceiveQty") - .HasColumnType("decimal(18,6)"); + b.Property("ToLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToLocationGroup"); - b.Property("Remark") - .HasMaxLength(3072) - .HasColumnType("nvarchar(3072)") - .HasColumnName("Remark"); + b.Property("ToLot") + .HasColumnType("nvarchar(max)"); - b.Property("SamplePercent") - .ValueGeneratedOnAdd() - .HasColumnType("decimal(18,6)") - .HasDefaultValue(0m); + b.Property("ToPackingCode") + .HasColumnType("nvarchar(450)"); - b.Property("StdPackQty") + b.Property("ToProduceDate") + .HasColumnType("datetime2"); + + b.Property("ToQty") .HasColumnType("decimal(18,6)"); - b.Property("SummaryInspectStatus") + b.Property("ToStatus") .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)"); - b.Property("SupplierBatch") + b.Property("ToSupplierBatch") .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("SupplierBatch"); + .HasColumnType("nvarchar(64)"); - b.Property("TenantId") - .HasColumnType("uniqueidentifier") - .HasColumnName("TenantId"); + b.Property("ToWarehouseCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToWarehouseCode"); b.Property("Uom") .HasMaxLength(64) @@ -5113,13 +9323,14 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.HasIndex("MasterID"); - b.HasIndex("Number", "ItemCode") - .IsUnique(); + b.HasIndex("Number", "FromPackingCode", "FromStatus", "ToPackingCode", "ToStatus") + .IsUnique() + .HasFilter("[FromPackingCode] IS NOT NULL AND [ToPackingCode] IS NOT NULL"); - b.ToTable("Store_InspectNoteSummaryDetail", (string)null); + b.ToTable("Store_ItemTransformNoteDetail", (string)null); }); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.InspectRequest", b => + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ItemTransformRequest", b => { b.Property("Id") .HasColumnType("uniqueidentifier"); @@ -5127,10 +9338,6 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.Property("ActiveDate") .HasColumnType("datetime2"); - b.Property("AsnNumber") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - b.Property("AutoAgree") .HasColumnType("bit"); @@ -5161,138 +9368,8 @@ namespace Win_in.Sfs.Wms.Store.Migrations .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"); + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); b.Property("LastModificationTime") .HasColumnType("datetime2") @@ -5302,125 +9379,42 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("LastModifierId"); - b.Property("LocationArea") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("LocationArea"); - - b.Property("LocationCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("LocationCode"); - - b.Property("LocationErpCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("LocationErpCode"); - - b.Property("LocationGroup") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("LocationGroup"); - - b.Property("Lot") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("Lot"); - - b.Property("MasterID") - .HasColumnType("uniqueidentifier"); - b.Property("Number") .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)") .HasColumnName("Number"); - b.Property("PackingCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("PackingCode"); - - b.Property("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") + b.Property("RequestStatus") .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.Property("Worker") + .HasColumnType("nvarchar(max)"); b.HasKey("Id"); - b.HasIndex("MasterID"); - - b.HasIndex("Number", "PackingCode") + b.HasIndex("Number") .IsUnique(); - b.ToTable("Store_InspectRequestDetail", (string)null); + b.ToTable("Store_ItemTransformRequest", (string)null); }); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.InspectRequestSummaryDetail", b => + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ItemTransformRequestDetail", 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"); @@ -5429,28 +9423,64 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("CreatorId"); - b.Property("ExpireDate") + b.Property("FromArriveDate") .HasColumnType("datetime2"); - b.Property("FailedQty") - .HasColumnType("decimal(18,6)"); + b.Property("FromContainerCode") + .HasColumnType("nvarchar(max)"); - b.Property("GoodQty") - .HasColumnType("decimal(18,6)"); + b.Property("FromExpireDate") + .HasColumnType("datetime2"); - b.Property("InspectQty") - .ValueGeneratedOnAdd() - .HasColumnType("decimal(18,6)") - .HasDefaultValue(0m); + b.Property("FromLocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromLocationArea"); - b.Property("InspectReport") + 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("InspectType") + 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) @@ -5480,65 +9510,100 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("LastModifierId"); - b.Property("Lot") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("Lot"); - b.Property("MasterID") .HasColumnType("uniqueidentifier"); - b.Property("NotPassedQty") - .HasColumnType("decimal(18,6)"); - b.Property("Number") .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)") .HasColumnName("Number"); - b.Property("PoLine") + 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("PoLine"); + .HasColumnName("ToLocationArea"); - b.Property("PoNumber") + b.Property("ToLocationCode") + .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("PoNumber"); + .HasColumnName("ToLocationCode"); - b.Property("ProduceDate") - .HasColumnType("datetime2"); + b.Property("ToLocationErpCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToLocationErpCode"); - b.Property("ReceiveQty") - .HasColumnType("decimal(18,6)"); + b.Property("ToLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToLocationGroup"); - b.Property("Remark") - .HasMaxLength(3072) - .HasColumnType("nvarchar(3072)") - .HasColumnName("Remark"); + b.Property("ToLot") + .HasColumnType("nvarchar(max)"); - b.Property("SamplePercent") - .ValueGeneratedOnAdd() - .HasColumnType("decimal(18,6)") - .HasDefaultValue(0m); + b.Property("ToPackingCode") + .HasColumnType("nvarchar(450)"); - b.Property("StdPackQty") + b.Property("ToProduceDate") + .HasColumnType("datetime2"); + + b.Property("ToQty") .HasColumnType("decimal(18,6)"); - b.Property("SummaryInspectStatus") + b.Property("ToStatus") .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)"); - b.Property("SupplierBatch") + b.Property("ToSupplierBatch") .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("SupplierBatch"); + .HasColumnType("nvarchar(64)"); - b.Property("TenantId") - .HasColumnType("uniqueidentifier") - .HasColumnName("TenantId"); + b.Property("ToWarehouseCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToWarehouseCode"); b.Property("Uom") .HasMaxLength(64) @@ -5548,28 +9613,47 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.HasIndex("MasterID"); - b.HasIndex("Number", "ItemCode", "Lot") + b.HasIndex("Number", "FromPackingCode", "FromStatus", "ToPackingCode", "ToStatus") .IsUnique() - .HasFilter("[Lot] IS NOT NULL"); + .HasFilter("[FromPackingCode] IS NOT NULL AND [ToPackingCode] IS NOT NULL"); - b.ToTable("Store_InspectRequestSummaryDetail", (string)null); + b.ToTable("Store_ItemTransformRequestDetail", (string)null); }); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.InventoryInitialNote", b => + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.JisDeliverJob", b => { b.Property("Id") - .ValueGeneratedOnAdd() .HasColumnType("uniqueidentifier"); - b.Property("ActiveDate") + b.Property("AcceptTime") + .HasColumnType("datetime2"); + + b.Property("AcceptUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("AcceptUserName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("CompleteTime") .HasColumnType("datetime2"); + b.Property("CompleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CompleteUserName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + b.Property("ConcurrencyStamp") .IsConcurrencyToken() .HasMaxLength(40) .HasColumnType("nvarchar(40)") .HasColumnName("ConcurrencyStamp"); + b.Property("ContainerQty") + .HasColumnType("decimal(18,6)"); + b.Property("CreationTime") .HasColumnType("datetime2") .HasColumnName("CreationTime"); @@ -5578,10 +9662,44 @@ namespace Win_in.Sfs.Wms.Store.Migrations .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"); @@ -5593,22 +9711,47 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.Property("Number") .IsRequired() .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("Number"); + .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("RequestNumber") - .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)"); @@ -5617,22 +9760,22 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.HasIndex("Number") .IsUnique(); - b.ToTable("Store_InventoryInitialNote", (string)null); + b.ToTable("Job_JisDeliverJob", (string)null); }); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.InventoryInitialNoteDetail", b => + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.JisDeliverJobDetail", b => { b.Property("Id") - .ValueGeneratedOnAdd() .HasColumnType("uniqueidentifier"); - b.Property("ArriveDate") - .HasColumnType("datetime2"); - b.Property("ContainerCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ContainerCode"); + .HasColumnType("nvarchar(max)"); + + b.Property("ContainerDesc") + .HasColumnType("nvarchar(max)"); + + b.Property("ContainerName") + .HasColumnType("nvarchar(max)"); b.Property("CreationTime") .HasColumnType("datetime2") @@ -5642,29 +9785,28 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("CreatorId"); - b.Property("ExpireDate") - .HasColumnType("datetime2"); + b.Property("FromLocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); - b.Property("ItemCode") - .IsRequired() + b.Property("FromLocationCode") .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ItemCode"); + .HasColumnType("nvarchar(64)"); - b.Property("ItemDesc1") + b.Property("FromLocationErpCode") .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ItemDesc1"); + .HasColumnType("nvarchar(64)"); - b.Property("ItemDesc2") + b.Property("FromLocationGroup") .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ItemDesc2"); + .HasColumnType("nvarchar(64)"); - b.Property("ItemName") + b.Property("FromWarehouseCode") .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ItemName"); + .HasColumnType("nvarchar(64)"); + + b.Property("ItemQty") + .HasColumnType("decimal(18,6)"); b.Property("LastModificationTime") .HasColumnType("datetime2") @@ -5674,55 +9816,11 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("LastModifierId"); - b.Property("LocationArea") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("LocationArea"); - - b.Property("LocationCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("LocationCode"); - - b.Property("LocationErpCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("LocationErpCode"); - - b.Property("LocationGroup") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("LocationGroup"); - - b.Property("Lot") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("Lot"); - b.Property("MasterID") .HasColumnType("uniqueidentifier"); b.Property("Number") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("Number"); - - b.Property("PackingCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("PackingCode"); - - b.Property("ProduceDate") - .HasColumnType("datetime2"); - - b.Property("Qty") - .HasPrecision(18, 6) - .HasColumnType("decimal(18,6)") - .HasColumnName("Qty"); + .HasColumnType("nvarchar(max)"); b.Property("Remark") .HasMaxLength(3072) @@ -5731,45 +9829,40 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.Property("Status") .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("ToLocationArea") .HasMaxLength(64) .HasColumnType("nvarchar(64)"); - b.Property("StdPackQty") - .HasColumnType("decimal(18,6)"); - - b.Property("SupplierBatch") + b.Property("ToLocationCode") .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("SupplierBatch"); + .HasColumnType("nvarchar(64)"); - b.Property("TenantId") - .HasColumnType("uniqueidentifier") - .HasColumnName("TenantId"); + b.Property("ToLocationErpCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); - b.Property("Uom") - .IsRequired() + b.Property("ToLocationGroup") .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("Uom"); + .HasColumnType("nvarchar(64)"); - b.Property("WarehouseCode") - .IsRequired() + b.Property("ToWarehouseCode") .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("WarehouseCode"); + .HasColumnType("nvarchar(64)"); 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); + b.ToTable("Job_JisDeliverJobDetail", (string)null); }); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.InventoryTransferNote", b => + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.JisDeliverNote", b => { b.Property("Id") .HasColumnType("uniqueidentifier"); @@ -5777,12 +9870,18 @@ namespace Win_in.Sfs.Wms.Store.Migrations 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"); @@ -5791,10 +9890,26 @@ namespace Win_in.Sfs.Wms.Store.Migrations .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)") @@ -5814,23 +9929,20 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("nvarchar(64)") .HasColumnName("Number"); + b.Property("ProjectCode") + .HasColumnType("nvarchar(max)"); + 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("TotalPackCapacity") + .HasColumnType("nvarchar(max)"); b.Property("Worker") .HasColumnType("nvarchar(max)"); @@ -5840,10 +9952,10 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.HasIndex("Number") .IsUnique(); - b.ToTable("Store_InventoryTransferNote", (string)null); + b.ToTable("Store_JisDeliverNote", (string)null); }); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.InventoryTransferNoteDetail", b => + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.JisDeliverNoteDetail", b => { b.Property("Id") .HasColumnType("uniqueidentifier"); @@ -5859,9 +9971,15 @@ namespace Win_in.Sfs.Wms.Store.Migrations .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)"); @@ -5942,23 +10060,40 @@ namespace Win_in.Sfs.Wms.Store.Migrations .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("Reason") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - 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)"); @@ -6019,6 +10154,12 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("nvarchar(64)") .HasColumnName("Uom"); + b.Property("UsedFor") + .HasColumnType("nvarchar(max)"); + + b.Property("Year") + .HasColumnType("nvarchar(max)"); + b.HasKey("Id"); b.HasIndex("MasterID"); @@ -6027,10 +10168,10 @@ namespace Win_in.Sfs.Wms.Store.Migrations .IsUnique() .HasFilter("[FromPackingCode] IS NOT NULL"); - b.ToTable("Store_InventoryTransferNoteDetail", (string)null); + b.ToTable("Store_JisDeliverNoteDetail", (string)null); }); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.IsolationNote", b => + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.JisProductReceiptNote", b => { b.Property("Id") .HasColumnType("uniqueidentifier"); @@ -6038,12 +10179,18 @@ namespace Win_in.Sfs.Wms.Store.Migrations 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"); @@ -6056,6 +10203,9 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("nvarchar(max)") .HasColumnName("ExtraProperties"); + b.Property("ItemQty") + .HasColumnType("decimal(18,6)"); + b.Property("JobNumber") .HasMaxLength(64) .HasColumnType("nvarchar(64)") @@ -6069,21 +10219,54 @@ namespace Win_in.Sfs.Wms.Store.Migrations .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)"); @@ -6092,10 +10275,10 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.HasIndex("Number") .IsUnique(); - b.ToTable("Store_IsolationNote", (string)null); + b.ToTable("Store_JisProductReceiptNote", (string)null); }); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.IsolationNoteDetail", b => + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.JisProductReceiptNoteDetail", b => { b.Property("Id") .HasColumnType("uniqueidentifier"); @@ -6103,6 +10286,15 @@ namespace Win_in.Sfs.Wms.Store.Migrations 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"); @@ -6114,76 +10306,61 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.Property("ExpireDate") .HasColumnType("datetime2"); - b.Property("FromContainerCode") - .HasColumnType("nvarchar(max)"); - - b.Property("FromLocationArea") + b.Property("ItemCode") + .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("FromLocationArea"); + .HasColumnName("ItemCode"); - b.Property("FromLocationCode") - .IsRequired() + b.Property("ItemDesc1") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("FromLocationCode"); + .HasColumnName("ItemDesc1"); - b.Property("FromLocationErpCode") - .IsRequired() + b.Property("ItemDesc2") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("FromLocationErpCode"); + .HasColumnName("ItemDesc2"); - b.Property("FromLocationGroup") + b.Property("ItemName") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("FromLocationGroup"); - - b.Property("FromLot") - .HasColumnType("nvarchar(max)"); + .HasColumnName("ItemName"); - b.Property("FromPackingCode") - .HasColumnType("nvarchar(450)"); + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); - b.Property("FromStatus") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); - b.Property("FromWarehouseCode") - .IsRequired() + b.Property("LocationArea") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("FromWarehouseCode"); + .HasColumnName("LocationArea"); - b.Property("ItemCode") + b.Property("LocationCode") .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("ItemCode"); + .HasColumnName("LocationCode"); - b.Property("ItemDesc1") + b.Property("LocationErpCode") + .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("ItemDesc1"); + .HasColumnName("LocationErpCode"); - b.Property("ItemDesc2") + b.Property("LocationGroup") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("ItemDesc2"); + .HasColumnName("LocationGroup"); - b.Property("ItemName") + b.Property("Lot") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("ItemName"); - - b.Property("LastModificationTime") - .HasColumnType("datetime2") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("uniqueidentifier") - .HasColumnName("LastModifierId"); + .HasColumnName("Lot"); b.Property("MasterID") .HasColumnType("uniqueidentifier"); @@ -6194,19 +10371,52 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("nvarchar(64)") .HasColumnName("Number"); + b.Property("PackingCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("PackingCode"); + + b.Property("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)"); @@ -6219,91 +10429,50 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("TenantId"); - b.Property("ToContainerCode") - .HasColumnType("nvarchar(max)"); - - b.Property("ToLocationArea") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ToLocationArea"); - - b.Property("ToLocationCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ToLocationCode"); - - b.Property("ToLocationErpCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ToLocationErpCode"); - - b.Property("ToLocationGroup") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ToLocationGroup"); - - b.Property("ToLot") - .HasColumnType("nvarchar(max)"); - - b.Property("ToPackingCode") - .HasColumnType("nvarchar(max)"); - - b.Property("ToStatus") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("ToWarehouseCode") + b.Property("Uom") .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("ToWarehouseCode"); + .HasColumnName("Uom"); - b.Property("Uom") + b.Property("WarehouseCode") .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("Uom"); + .HasColumnName("WarehouseCode"); - b.HasKey("Id"); + b.Property("Year") + .HasColumnType("nvarchar(max)"); - b.HasIndex("FromPackingCode"); + b.HasKey("Id"); b.HasIndex("MasterID"); - b.HasIndex("Number", "FromPackingCode", "FromLocationCode", "ToLocationCode") - .IsUnique() - .HasFilter("[FromPackingCode] IS NOT NULL"); + b.HasIndex("Number", "PackingCode") + .IsUnique(); - b.ToTable("Store_IsolationNoteDetail", (string)null); + b.ToTable("Store_JisProductReceiptNoteDetail", (string)null); }); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.IssueJob", b => + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.MaterialRequest", b => { b.Property("Id") .HasColumnType("uniqueidentifier"); - b.Property("AcceptTime") + b.Property("ActiveDate") .HasColumnType("datetime2"); - b.Property("AcceptUserId") - .HasColumnType("uniqueidentifier"); - - b.Property("AcceptUserName") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + b.Property("AutoAgree") + .HasColumnType("bit"); - b.Property("CompleteTime") - .HasColumnType("datetime2"); + b.Property("AutoCompleteJob") + .HasColumnType("bit"); - b.Property("CompleteUserId") - .HasColumnType("uniqueidentifier"); + b.Property("AutoHandle") + .HasColumnType("bit"); - b.Property("CompleteUserName") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + b.Property("AutoSubmit") + .HasColumnType("bit"); b.Property("ConcurrencyStamp") .IsConcurrencyToken() @@ -6319,29 +10488,13 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("CreatorId"); + b.Property("DirectCreateNote") + .HasColumnType("bit"); + b.Property("ExtraProperties") .HasColumnType("nvarchar(max)") .HasColumnName("ExtraProperties"); - b.Property("IsAutoComplete") - .ValueGeneratedOnAdd() - .HasColumnType("bit") - .HasDefaultValue(false); - - b.Property("JobDescription") - .HasMaxLength(1024) - .HasColumnType("nvarchar(1024)"); - - b.Property("JobStatus") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("JobType") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - b.Property("LastModificationTime") .HasColumnType("datetime2") .HasColumnName("LastModificationTime"); @@ -6350,24 +10503,15 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("LastModifierId"); - b.Property("MaterialRequestNumber") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - b.Property("Number") .IsRequired() .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("Priority") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasDefaultValue(0); + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); - b.Property("PriorityIncrement") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasDefaultValue(0); + b.Property("PreparationPlanNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); b.Property("ProdLine") .HasMaxLength(64) @@ -6378,7 +10522,8 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("nvarchar(3072)") .HasColumnName("Remark"); - b.Property("RequestType") + b.Property("RequestStatus") + .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)"); @@ -6386,20 +10531,13 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("TenantId"); - b.Property("UpStreamJobNumber") + b.Property("Type") .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)"); @@ -6412,10 +10550,10 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.HasIndex("Number") .IsUnique(); - b.ToTable("Job_IssueJob", (string)null); + b.ToTable("Store_MaterialRequest", (string)null); }); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.IssueJobDetail", b => + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.MaterialRequestDetail", b => { b.Property("Id") .HasColumnType("uniqueidentifier"); @@ -6428,74 +10566,16 @@ namespace Win_in.Sfs.Wms.Store.Migrations .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("FromLocationArea") + .HasColumnType("nvarchar(max)"); - b.Property("HandledQty") + b.Property("IssuedQty") + .HasPrecision(18, 6) .HasColumnType("decimal(18,6)"); - b.Property("HandledSupplierBatch") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("HandledSupplierBatch"); - b.Property("ItemCode") .IsRequired() .HasMaxLength(64) @@ -6531,97 +10611,35 @@ namespace Win_in.Sfs.Wms.Store.Migrations 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"); + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); - b.Property("PlannedSplitRule") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + b.Property("PositionCode") + .HasColumnType("nvarchar(max)"); b.Property("ProdLine") .HasMaxLength(64) .HasColumnType("nvarchar(64)"); - b.Property("RecommendArriveDate") - .HasColumnType("datetime2"); - - b.Property("RecommendContainerCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendContainerCode"); - - b.Property("RecommendExpireDate") - .HasColumnType("datetime2"); - - b.Property("RecommendFromLocationArea") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendFromLocationArea"); - - b.Property("RecommendFromLocationCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendFromLocationCode"); - - b.Property("RecommendFromLocationErpCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendFromLocationErpCode"); - - b.Property("RecommendFromLocationGroup") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendFromLocationGroup"); - - b.Property("RecommendFromWarehouseCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendFromWarehouseCode"); - - b.Property("RecommendLot") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendLot"); - - b.Property("RecommendPackingCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendPackingCode"); - - b.Property("RecommendProduceDate") - .HasColumnType("datetime2"); + b.Property("Qty") + .HasPrecision(18, 6) + .HasColumnType("decimal(18,6)") + .HasColumnName("Qty"); - b.Property("RecommendQty") + b.Property("ReceivedQty") + .HasPrecision(18, 6) .HasColumnType("decimal(18,6)"); - b.Property("RecommendSupplierBatch") + b.Property("RecommendType") + .IsRequired() .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendSupplierBatch"); + .HasColumnType("nvarchar(64)"); b.Property("Remark") .HasMaxLength(3072) .HasColumnType("nvarchar(3072)") .HasColumnName("Remark"); - b.Property("RequestLocationCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("RoundedQty") - .HasColumnType("decimal(18,6)"); - b.Property("Status") .IsRequired() .HasMaxLength(64) @@ -6635,32 +10653,35 @@ namespace Win_in.Sfs.Wms.Store.Migrations .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") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("TruncType") + b.Property("ToWarehouseCode") .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)"); b.Property("Uom") - .HasColumnType("nvarchar(max)"); + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Uom"); b.Property("WorkStation") .HasMaxLength(64) @@ -6668,12 +10689,17 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.HasKey("Id"); + b.HasIndex("ItemCode"); + b.HasIndex("MasterID"); - b.ToTable("Job_IssueJobDetail", (string)null); + b.HasIndex("Number", "ItemCode", "ToLocationCode") + .IsUnique(); + + b.ToTable("Store_MaterialRequestDetail", (string)null); }); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.IssueNote", b => + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.NoOkConvertOkNote", b => { b.Property("Id") .HasColumnType("uniqueidentifier"); @@ -6687,12 +10713,6 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("nvarchar(40)") .HasColumnName("ConcurrencyStamp"); - b.Property("ConfirmTime") - .HasColumnType("datetime2"); - - b.Property("Confirmed") - .HasColumnType("bit"); - b.Property("CreationTime") .HasColumnType("datetime2") .HasColumnName("CreationTime"); @@ -6705,11 +10725,6 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("nvarchar(max)") .HasColumnName("ExtraProperties"); - b.Property("JobNumber") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("JobNumber"); - b.Property("LastModificationTime") .HasColumnType("datetime2") .HasColumnName("LastModificationTime"); @@ -6729,37 +10744,22 @@ namespace Win_in.Sfs.Wms.Store.Migrations .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); + b.ToTable("Store_NoOkConvertOkNote", (string)null); }); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.IssueNoteDetail", b => + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.NoOkConvertOkNoteDetail", b => { b.Property("Id") .HasColumnType("uniqueidentifier"); @@ -6778,9 +10778,6 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.Property("ExpireDate") .HasColumnType("datetime2"); - b.Property("ExpiredTime") - .HasColumnType("datetime2"); - b.Property("FromContainerCode") .HasColumnType("nvarchar(max)"); @@ -6823,66 +10820,6 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("nvarchar(64)") .HasColumnName("FromWarehouseCode"); - b.Property("HandledArriveDate") - .HasColumnType("datetime2"); - - b.Property("HandledContainerCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("HandledContainerCode"); - - b.Property("HandledExpireDate") - .HasColumnType("datetime2"); - - b.Property("HandledFromLocationArea") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("HandledFromLocationArea"); - - b.Property("HandledFromLocationCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("HandledFromLocationCode"); - - b.Property("HandledFromLocationErpCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("HandledFromLocationErpCode"); - - b.Property("HandledFromLocationGroup") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("HandledFromLocationGroup"); - - b.Property("HandledFromWarehouseCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("HandledFromWarehouseCode"); - - b.Property("HandledLot") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("HandledLot"); - - b.Property("HandledPackingCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("HandledPackingCode"); - - b.Property("HandledProduceDate") - .HasColumnType("datetime2"); - - b.Property("HandledQty") - .HasColumnType("decimal(18,6)"); - - b.Property("HandledSupplierBatch") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("HandledSupplierBatch"); - - b.Property("IssueTime") - .HasColumnType("datetime2"); - b.Property("ItemCode") .IsRequired() .HasMaxLength(64) @@ -6921,14 +10858,6 @@ namespace Win_in.Sfs.Wms.Store.Migrations .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"); @@ -6937,63 +10866,6 @@ namespace Win_in.Sfs.Wms.Store.Migrations .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)") @@ -7059,24 +10931,18 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("nvarchar(64)") .HasColumnName("Uom"); - b.Property("WorkStation") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - b.HasKey("Id"); - b.HasIndex("FromPackingCode"); - b.HasIndex("MasterID"); b.HasIndex("Number", "FromPackingCode", "FromLocationCode", "ToLocationCode") .IsUnique() .HasFilter("[FromPackingCode] IS NOT NULL"); - b.ToTable("Store_IssueNoteDetail", (string)null); + b.ToTable("Store_NoOkConvertOkNoteDetail", (string)null); }); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ItemTransformNote", b => + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.OfflineSettlementNote", b => { b.Property("Id") .HasColumnType("uniqueidentifier"); @@ -7119,15 +10985,16 @@ namespace Win_in.Sfs.Wms.Store.Migrations .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("RequestNumber") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - b.Property("TenantId") .HasColumnType("uniqueidentifier") .HasColumnName("TenantId"); @@ -7140,82 +11007,32 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.HasIndex("Number") .IsUnique(); - b.ToTable("Store_ItemTransformNote", (string)null); + b.ToTable("Store_OfflineSettlementNote", (string)null); }); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ItemTransformNoteDetail", b => + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.OfflineSettlementNoteDetail", 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)"); + .HasColumnType("uniqueidentifier"); - b.Property("FromSupplierBatch") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + b.Property("ArriveDate") + .HasColumnType("datetime2"); - b.Property("FromWarehouseCode") - .IsRequired() + b.Property("ContainerCode") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("FromWarehouseCode"); + .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() @@ -7246,117 +11063,101 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("LastModifierId"); - b.Property("MasterID") - .HasColumnType("uniqueidentifier"); - - b.Property("Number") - .IsRequired() + b.Property("LocationArea") .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)"); + .HasColumnName("LocationArea"); - b.Property("ToItemDesc2") + b.Property("LocationCode") + .IsRequired() .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationCode"); - b.Property("ToItemName") + b.Property("LocationErpCode") + .IsRequired() .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationErpCode"); - b.Property("ToLocationArea") + b.Property("LocationGroup") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("ToLocationArea"); + .HasColumnName("LocationGroup"); - b.Property("ToLocationCode") - .IsRequired() + b.Property("Lot") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("ToLocationCode"); + .HasColumnName("Lot"); - b.Property("ToLocationErpCode") + b.Property("MasterID") + .HasColumnType("uniqueidentifier"); + + b.Property("Number") .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("ToLocationErpCode"); + .HasColumnName("Number"); - b.Property("ToLocationGroup") + b.Property("PackingCode") + .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("ToLocationGroup"); - - b.Property("ToLot") - .HasColumnType("nvarchar(max)"); - - b.Property("ToPackingCode") - .HasColumnType("nvarchar(450)"); + .HasColumnName("PackingCode"); - b.Property("ToProduceDate") + b.Property("ProduceDate") .HasColumnType("datetime2"); - b.Property("ToQty") - .HasColumnType("decimal(18,6)"); + b.Property("Qty") + .HasPrecision(18, 6) + .HasColumnType("decimal(18,6)") + .HasColumnName("Qty"); - b.Property("ToStatus") + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("Status") .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)"); - b.Property("ToSupplierBatch") + b.Property("StdPackQty") + .HasColumnType("decimal(18,6)"); + + b.Property("SupplierBatch") .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + .HasColumnType("nvarchar(64)") + .HasColumnName("SupplierBatch"); - b.Property("ToWarehouseCode") + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Uom") .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("ToWarehouseCode"); + .HasColumnName("Uom"); - b.Property("Uom") + b.Property("WarehouseCode") + .IsRequired() .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + .HasColumnType("nvarchar(64)") + .HasColumnName("WarehouseCode"); 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.HasIndex("Number") + .IsUnique(); - b.ToTable("Store_ItemTransformNoteDetail", (string)null); + b.ToTable("Store_OfflineSettlementNoteDetail", (string)null); }); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ItemTransformRequest", b => + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.PreparationPlan", b => { b.Property("Id") .HasColumnType("uniqueidentifier"); @@ -7364,18 +11165,6 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.Property("ActiveDate") .HasColumnType("datetime2"); - b.Property("AutoAgree") - .HasColumnType("bit"); - - b.Property("AutoCompleteJob") - .HasColumnType("bit"); - - b.Property("AutoHandle") - .HasColumnType("bit"); - - b.Property("AutoSubmit") - .HasColumnType("bit"); - b.Property("ConcurrencyStamp") .IsConcurrencyToken() .HasMaxLength(40) @@ -7390,9 +11179,6 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("CreatorId"); - b.Property("DirectCreateNote") - .HasColumnType("bit"); - b.Property("ExtraProperties") .HasColumnType("nvarchar(max)") .HasColumnName("ExtraProperties"); @@ -7411,16 +11197,39 @@ namespace Win_in.Sfs.Wms.Store.Migrations .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("RequestStatus") + 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"); @@ -7428,84 +11237,30 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.Property("Worker") .HasColumnType("nvarchar(max)"); + b.Property("Workshop") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + b.HasKey("Id"); b.HasIndex("Number") .IsUnique(); - b.ToTable("Store_ItemTransformRequest", (string)null); + b.ToTable("Store_PreparationPlan", (string)null); }); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ItemTransformRequestDetail", b => + 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("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"); + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); b.Property("ItemCode") .IsRequired() @@ -7536,6 +11291,14 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("LastModifierId"); + b.Property("LatestTime") + .HasColumnType("datetime2"); + + b.Property("LineStatus") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + b.Property("MasterID") .HasColumnType("uniqueidentifier"); @@ -7545,93 +11308,36 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("nvarchar(64)") .HasColumnName("Number"); - b.Property("ReasonCode") - .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("StdPackQty") + .HasColumnType("decimal(18,6)"); + 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") + b.Property("Uom") .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("ToWarehouseCode"); + .HasColumnName("Uom"); - b.Property("Uom") + b.Property("WorkStation") + .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)"); @@ -7639,37 +11345,31 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.HasIndex("MasterID"); - b.HasIndex("Number", "FromPackingCode", "FromStatus", "ToPackingCode", "ToStatus") - .IsUnique() - .HasFilter("[FromPackingCode] IS NOT NULL AND [ToPackingCode] IS NOT NULL"); + b.HasIndex("Number", "ItemCode") + .IsUnique(); - b.ToTable("Store_ItemTransformRequestDetail", (string)null); + b.ToTable("Store_PreparationPlanDetail", (string)null); }); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.JisDeliverJob", b => + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ProductionPlan", b => { b.Property("Id") .HasColumnType("uniqueidentifier"); - b.Property("AcceptTime") + b.Property("ActiveDate") .HasColumnType("datetime2"); - b.Property("AcceptUserId") - .HasColumnType("uniqueidentifier"); - - b.Property("AcceptUserName") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + b.Property("AutoAgree") + .HasColumnType("bit"); - b.Property("CompleteTime") - .HasColumnType("datetime2"); + b.Property("AutoCompleteJob") + .HasColumnType("bit"); - b.Property("CompleteUserId") - .HasColumnType("uniqueidentifier"); + b.Property("AutoHandle") + .HasColumnType("bit"); - b.Property("CompleteUserName") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + b.Property("AutoSubmit") + .HasColumnType("bit"); b.Property("ConcurrencyStamp") .IsConcurrencyToken() @@ -7677,9 +11377,6 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("nvarchar(40)") .HasColumnName("ConcurrencyStamp"); - b.Property("ContainerQty") - .HasColumnType("decimal(18,6)"); - b.Property("CreationTime") .HasColumnType("datetime2") .HasColumnName("CreationTime"); @@ -7688,44 +11385,13 @@ namespace Win_in.Sfs.Wms.Store.Migrations .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("DirectCreateNote") + .HasColumnType("bit"); 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"); @@ -7737,71 +11403,71 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.Property("Number") .IsRequired() .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); - b.Property("PlanTime") + b.Property("PlanDate") .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("PlanTime") + .HasColumnType("datetime2"); - b.Property("ProjectCode") - .HasColumnType("nvarchar(max)"); + b.Property("ProdLine") + .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("UpStreamJobNumber") + b.Property("RequestStatus") + .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)"); - b.Property("WarehouseCode") - .HasColumnType("nvarchar(max)"); + b.Property("Shift") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); - b.Property("WorkGroupCode") + 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("Job_JisDeliverJob", (string)null); + b.ToTable("Store_ProductionPlan", (string)null); }); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.JisDeliverJobDetail", b => + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ProductionPlanDetail", b => { b.Property("Id") .HasColumnType("uniqueidentifier"); - b.Property("ContainerCode") - .HasColumnType("nvarchar(max)"); - - b.Property("ContainerDesc") - .HasColumnType("nvarchar(max)"); + b.Property("ArriveDate") + .HasColumnType("datetime2"); - b.Property("ContainerName") - .HasColumnType("nvarchar(max)"); + b.Property("BomVersion") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); b.Property("CreationTime") .HasColumnType("datetime2") @@ -7811,28 +11477,34 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("CreatorId"); - b.Property("FromLocationArea") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + b.Property("ExpireDate") + .HasColumnType("datetime2"); - b.Property("FromLocationCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + b.Property("GoodQty") + .ValueGeneratedOnAdd() + .HasColumnType("decimal(18,6)") + .HasDefaultValue(1m); - b.Property("FromLocationErpCode") + b.Property("ItemCode") + .IsRequired() .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemCode"); - b.Property("FromLocationGroup") + b.Property("ItemDesc1") .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc1"); - b.Property("FromWarehouseCode") + b.Property("ItemDesc2") .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc2"); - b.Property("ItemQty") - .HasColumnType("decimal(18,6)"); + b.Property("ItemName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemName"); b.Property("LastModificationTime") .HasColumnType("datetime2") @@ -7842,42 +11514,49 @@ namespace Win_in.Sfs.Wms.Store.Migrations .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") - .HasColumnType("nvarchar(max)"); + .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("Status") - .IsRequired() - .HasColumnType("nvarchar(max)"); + b.Property("SupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("SupplierBatch"); 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") + b.Property("Uom") .HasMaxLength(64) .HasColumnType("nvarchar(64)"); @@ -7885,29 +11564,43 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.HasIndex("MasterID"); - b.ToTable("Job_JisDeliverJobDetail", (string)null); + b.HasIndex("Number", "ItemCode") + .IsUnique(); + + b.ToTable("Store_ProductionPlanDetail", (string)null); }); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.JisDeliverNote", b => + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ProductionReturnJob", b => { b.Property("Id") .HasColumnType("uniqueidentifier"); - b.Property("ActiveDate") + b.Property("AcceptTime") .HasColumnType("datetime2"); - b.Property("ArrivalTime") + 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"); @@ -7916,31 +11609,29 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("CreatorId"); - b.Property("Customer") + 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("CustomerAddressCode") + b.Property("JobType") .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"); @@ -7952,11 +11643,21 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.Property("Number") .IsRequired() .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("Number"); + .HasColumnType("nvarchar(64)"); - b.Property("ProjectCode") - .HasColumnType("nvarchar(max)"); + 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) @@ -7967,9 +11668,17 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("TenantId"); - b.Property("TotalPackCapacity") + 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)"); @@ -7978,17 +11687,14 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.HasIndex("Number") .IsUnique(); - b.ToTable("Store_JisDeliverNote", (string)null); + b.ToTable("Job_ProductionReturnJob", (string)null); }); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.JisDeliverNoteDetail", b => + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ProductionReturnJobDetail", b => { b.Property("Id") .HasColumnType("uniqueidentifier"); - b.Property("ArriveDate") - .HasColumnType("datetime2"); - b.Property("CreationTime") .HasColumnType("datetime2") .HasColumnName("CreationTime"); @@ -7997,56 +11703,82 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("CreatorId"); - b.Property("DeliverTime") - .HasColumnType("datetime2"); + b.Property("FromLocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); - b.Property("ExpireDate") - .HasColumnType("datetime2"); + b.Property("FromLocationCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); - b.Property("ExpiredTime") + 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("FromContainerCode") - .HasColumnType("nvarchar(max)"); + b.Property("HandledContainerCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledContainerCode"); - b.Property("FromLocationArea") + b.Property("HandledExpireDate") + .HasColumnType("datetime2"); + + b.Property("HandledLot") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("FromLocationArea"); + .HasColumnName("HandledLot"); - b.Property("FromLocationCode") - .IsRequired() + b.Property("HandledPackingCode") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("FromLocationCode"); + .HasColumnName("HandledPackingCode"); - b.Property("FromLocationErpCode") - .IsRequired() + b.Property("HandledProduceDate") + .HasColumnType("datetime2"); + + b.Property("HandledQty") + .HasColumnType("decimal(18,6)"); + + b.Property("HandledSupplierBatch") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("FromLocationErpCode"); + .HasColumnName("HandledSupplierBatch"); - b.Property("FromLocationGroup") + b.Property("HandledToLocationArea") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("FromLocationGroup"); + .HasColumnName("HandledToLocationArea"); - b.Property("FromLot") - .HasColumnType("nvarchar(max)"); + b.Property("HandledToLocationCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledToLocationCode"); - b.Property("FromPackingCode") - .HasColumnType("nvarchar(450)"); + b.Property("HandledToLocationErpCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledToLocationErpCode"); - b.Property("FromStatus") - .IsRequired() + b.Property("HandledToLocationGroup") .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledToLocationGroup"); - b.Property("FromWarehouseCode") - .IsRequired() + b.Property("HandledToWarehouseCode") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("FromWarehouseCode"); + .HasColumnName("HandledToWarehouseCode"); b.Property("ItemCode") .IsRequired() @@ -8078,126 +11810,98 @@ namespace Win_in.Sfs.Wms.Store.Migrations .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)"); + .HasColumnType("uniqueidentifier"); - b.Property("Qty") - .HasPrecision(18, 6) - .HasColumnType("decimal(18,6)") - .HasColumnName("Qty"); + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); - b.Property("Remark") - .HasMaxLength(3072) - .HasColumnType("nvarchar(3072)") - .HasColumnName("Remark"); + b.Property("RecommendArriveDate") + .HasColumnType("datetime2"); - b.Property("SeqNo") - .HasColumnType("nvarchar(max)"); + b.Property("RecommendContainerCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendContainerCode"); - b.Property("Stage") - .HasColumnType("nvarchar(max)"); + b.Property("RecommendExpireDate") + .HasColumnType("datetime2"); - b.Property("StdPackQty") - .HasColumnType("decimal(18,6)"); + b.Property("RecommendLot") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendLot"); - b.Property("SupplierBatch") + b.Property("RecommendPackingCode") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("SupplierBatch"); + .HasColumnName("RecommendPackingCode"); - b.Property("TenantId") - .HasColumnType("uniqueidentifier") - .HasColumnName("TenantId"); + b.Property("RecommendProduceDate") + .HasColumnType("datetime2"); - b.Property("ToContainerCode") - .HasColumnType("nvarchar(max)"); + b.Property("RecommendQty") + .HasColumnType("decimal(18,6)"); - b.Property("ToLocationArea") + b.Property("RecommendSupplierBatch") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("ToLocationArea"); + .HasColumnName("RecommendSupplierBatch"); - b.Property("ToLocationCode") - .IsRequired() + b.Property("RecommendToLocationArea") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("ToLocationCode"); + .HasColumnName("RecommendToLocationArea"); - b.Property("ToLocationErpCode") - .IsRequired() + b.Property("RecommendToLocationCode") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("ToLocationErpCode"); + .HasColumnName("RecommendToLocationCode"); - b.Property("ToLocationGroup") + b.Property("RecommendToLocationErpCode") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("ToLocationGroup"); - - b.Property("ToLot") - .HasColumnType("nvarchar(max)"); - - b.Property("ToPackingCode") - .HasColumnType("nvarchar(max)"); + .HasColumnName("RecommendToLocationErpCode"); - b.Property("ToStatus") - .IsRequired() + b.Property("RecommendToLocationGroup") .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendToLocationGroup"); - b.Property("ToWarehouseCode") - .IsRequired() + b.Property("RecommendToWarehouseCode") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("ToWarehouseCode"); + .HasColumnName("RecommendToWarehouseCode"); - b.Property("Uom") + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("Status") .IsRequired() .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("Uom"); + .HasColumnType("nvarchar(64)"); - b.Property("UsedFor") - .HasColumnType("nvarchar(max)"); + b.Property("StdPackQty") + .HasColumnType("decimal(18,6)"); - b.Property("Year") + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Uom") .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); + b.ToTable("Job_ProductionReturnJobDetail", (string)null); }); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.JisProductReceiptNote", b => + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ProductionReturnNote", b => { b.Property("Id") .HasColumnType("uniqueidentifier"); @@ -8205,18 +11909,12 @@ namespace Win_in.Sfs.Wms.Store.Migrations 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"); @@ -8229,9 +11927,6 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("nvarchar(max)") .HasColumnName("ExtraProperties"); - b.Property("ItemQty") - .HasColumnType("decimal(18,6)"); - b.Property("JobNumber") .HasMaxLength(64) .HasColumnType("nvarchar(64)") @@ -8245,27 +11940,13 @@ namespace Win_in.Sfs.Wms.Store.Migrations .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() + b.Property("ProductionReturnRequestNumber") .HasMaxLength(64) .HasColumnType("nvarchar(64)"); @@ -8274,25 +11955,13 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("nvarchar(3072)") .HasColumnName("Remark"); - b.Property("Shift") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("SourceNumber") - .HasColumnType("nvarchar(max)"); + b.Property("ReturnTime") + .HasColumnType("datetime2"); 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)"); @@ -8301,10 +11970,10 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.HasIndex("Number") .IsUnique(); - b.ToTable("Store_JisProductReceiptNote", (string)null); + b.ToTable("Store_ProductionReturnNote", (string)null); }); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.JisProductReceiptNoteDetail", b => + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ProductionReturnNoteDetail", b => { b.Property("Id") .HasColumnType("uniqueidentifier"); @@ -8312,15 +11981,6 @@ namespace Win_in.Sfs.Wms.Store.Migrations 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"); @@ -8329,8 +11989,107 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("CreatorId"); - b.Property("ExpireDate") - .HasColumnType("datetime2"); + 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() @@ -8361,88 +12120,85 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("LastModifierId"); - b.Property("LocationArea") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("LocationArea"); + b.Property("MasterID") + .HasColumnType("uniqueidentifier"); - b.Property("LocationCode") + b.Property("Number") .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("LocationCode"); + .HasColumnName("Number"); - b.Property("LocationErpCode") - .IsRequired() + 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("LocationErpCode"); + .HasColumnName("RecommendContainerCode"); - b.Property("LocationGroup") + b.Property("RecommendExpireDate") + .HasColumnType("datetime2"); + + b.Property("RecommendLot") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("LocationGroup"); + .HasColumnName("RecommendLot"); - b.Property("Lot") + b.Property("RecommendPackingCode") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("Lot"); + .HasColumnName("RecommendPackingCode"); - b.Property("MasterID") - .HasColumnType("uniqueidentifier"); + b.Property("RecommendProduceDate") + .HasColumnType("datetime2"); - b.Property("Number") - .IsRequired() + b.Property("RecommendQty") + .HasColumnType("decimal(18,6)"); + + b.Property("RecommendSupplierBatch") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("Number"); + .HasColumnName("RecommendSupplierBatch"); - b.Property("PackingCode") - .IsRequired() + b.Property("RecommendToLocationArea") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("PackingCode"); - - b.Property("Position") - .HasColumnType("nvarchar(max)"); + .HasColumnName("RecommendToLocationArea"); - b.Property("ProdLine") - .IsRequired() + b.Property("RecommendToLocationCode") .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("ProduceDate") - .HasColumnType("datetime2"); - - b.Property("ProductNo") - .HasColumnType("nvarchar(max)"); + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendToLocationCode"); - b.Property("ProjectCode") - .HasColumnType("nvarchar(max)"); + b.Property("RecommendToLocationErpCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendToLocationErpCode"); - b.Property("Qty") - .HasPrecision(18, 6) - .HasColumnType("decimal(18,6)") - .HasColumnName("Qty"); + b.Property("RecommendToLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendToLocationGroup"); - b.Property("RawLocationCode") - .IsRequired() + b.Property("RecommendToWarehouseCode") .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendToWarehouseCode"); b.Property("Remark") .HasMaxLength(3072) .HasColumnType("nvarchar(3072)") .HasColumnName("Remark"); - b.Property("SeqNo") - .HasColumnType("nvarchar(max)"); - - b.Property("Status") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - b.Property("StdPackQty") .HasColumnType("decimal(18,6)"); @@ -8455,32 +12211,66 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("TenantId"); - b.Property("Uom") + b.Property("ToContainerCode") + .HasColumnType("nvarchar(max)"); + + b.Property("ToLocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToLocationArea"); + + b.Property("ToLocationCode") .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("Uom"); + .HasColumnName("ToLocationCode"); - b.Property("WarehouseCode") + b.Property("ToLocationErpCode") .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("WarehouseCode"); + .HasColumnName("ToLocationErpCode"); - b.Property("Year") + b.Property("ToLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToLocationGroup"); + + b.Property("ToLot") .HasColumnType("nvarchar(max)"); + b.Property("ToPackingCode") + .HasColumnType("nvarchar(450)"); + + b.Property("ToStatus") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ToWarehouseCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToWarehouseCode"); + + b.Property("Uom") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Uom"); + b.HasKey("Id"); b.HasIndex("MasterID"); - b.HasIndex("Number", "PackingCode") - .IsUnique(); + b.HasIndex("Number", "ItemCode", "FromPackingCode", "ToPackingCode", "FromLocationCode", "ToLocationCode") + .IsUnique() + .HasFilter("[FromPackingCode] IS NOT NULL AND [ToPackingCode] IS NOT NULL"); - b.ToTable("Store_JisProductReceiptNoteDetail", (string)null); + b.ToTable("Store_ProductionReturnNoteDetail", (string)null); }); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.MaterialRequest", b => + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ProductionReturnRequest", b => { b.Property("Id") .HasColumnType("uniqueidentifier"); @@ -8535,14 +12325,6 @@ namespace Win_in.Sfs.Wms.Store.Migrations .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)") @@ -8557,33 +12339,25 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("TenantId"); - b.Property("Type") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("UseOnTheWayLocation") - .HasColumnType("bit"); - b.Property("Worker") .HasColumnType("nvarchar(max)"); - b.Property("Workshop") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - b.HasKey("Id"); b.HasIndex("Number") .IsUnique(); - b.ToTable("Store_MaterialRequest", (string)null); + b.ToTable("Store_ProductionReturnRequest", (string)null); }); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.MaterialRequestDetail", b => + 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"); @@ -8592,15 +12366,53 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("CreatorId"); - b.Property("ExpiredTime") + b.Property("ExpireDate") .HasColumnType("datetime2"); + b.Property("FromContainerCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + b.Property("FromLocationArea") - .HasColumnType("nvarchar(max)"); + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromLocationArea"); - b.Property("IssuedQty") - .HasPrecision(18, 6) - .HasColumnType("decimal(18,6)"); + 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() @@ -8640,52 +12452,66 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("nvarchar(64)") .HasColumnName("Number"); - 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("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("SupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("SupplierBatch"); + b.Property("TenantId") .HasColumnType("uniqueidentifier") .HasColumnName("TenantId"); - b.Property("ToLocationArea") - .IsRequired() + 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)"); + .HasColumnType("nvarchar(64)") + .HasColumnName("ToLocationCode"); b.Property("ToLocationErpCode") .IsRequired() .HasMaxLength(64) - .HasColumnType("nvarchar(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)"); @@ -8693,7 +12519,8 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.Property("ToWarehouseCode") .IsRequired() .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + .HasColumnType("nvarchar(64)") + .HasColumnName("ToWarehouseCode"); b.Property("Uom") .IsRequired() @@ -8701,23 +12528,19 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("nvarchar(64)") .HasColumnName("Uom"); - b.Property("WorkStation") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - b.HasKey("Id"); b.HasIndex("ItemCode"); b.HasIndex("MasterID"); - b.HasIndex("Number", "ItemCode", "ToLocationCode") + b.HasIndex("Number", "ItemCode", "FromLocationCode") .IsUnique(); - b.ToTable("Store_MaterialRequestDetail", (string)null); + b.ToTable("Store_ProductionReturnRequestDetail", (string)null); }); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.NoOkConvertOkNote", b => + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ProductL7PartsNote", b => { b.Property("Id") .HasColumnType("uniqueidentifier"); @@ -8731,6 +12554,15 @@ namespace Win_in.Sfs.Wms.Store.Migrations .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"); @@ -8743,6 +12575,9 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("nvarchar(max)") .HasColumnName("ExtraProperties"); + b.Property("FATA") + .HasColumnType("nvarchar(max)"); + b.Property("LastModificationTime") .HasColumnType("datetime2") .HasColumnName("LastModificationTime"); @@ -8757,11 +12592,29 @@ namespace Win_in.Sfs.Wms.Store.Migrations .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"); @@ -8769,20 +12622,33 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.Property("Worker") .HasColumnType("nvarchar(max)"); + b.Property("Year") + .HasColumnType("nvarchar(max)"); + b.HasKey("Id"); b.HasIndex("Number") .IsUnique(); - b.ToTable("Store_NoOkConvertOkNote", (string)null); + b.ToTable("Store_ProductL7PartsNote", (string)null); }); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.NoOkConvertOkNoteDetail", b => + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ProductL7PartsNoteDetail", b => { b.Property("Id") .HasColumnType("uniqueidentifier"); - b.Property("ArriveDate") + 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") @@ -8793,51 +12659,9 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("CreatorId"); - b.Property("ExpireDate") - .HasColumnType("datetime2"); - - b.Property("FromContainerCode") - .HasColumnType("nvarchar(max)"); - - b.Property("FromLocationArea") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("FromLocationArea"); - - b.Property("FromLocationCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("FromLocationCode"); - - b.Property("FromLocationErpCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("FromLocationErpCode"); - - b.Property("FromLocationGroup") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("FromLocationGroup"); - - b.Property("FromLot") + b.Property("FATA") .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) @@ -8859,6 +12683,10 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("nvarchar(64)") .HasColumnName("ItemName"); + b.Property("L7Part") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + b.Property("LastModificationTime") .HasColumnType("datetime2") .HasColumnName("LastModificationTime"); @@ -8867,6 +12695,9 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("LastModifierId"); + b.Property("LocationCode") + .HasColumnType("nvarchar(max)"); + b.Property("MasterID") .HasColumnType("uniqueidentifier"); @@ -8876,91 +12707,53 @@ namespace Win_in.Sfs.Wms.Store.Migrations .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") + b.Property("Position") .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("SupplierBatch"); - - b.Property("TenantId") - .HasColumnType("uniqueidentifier") - .HasColumnName("TenantId"); + .HasColumnType("nvarchar(64)"); - b.Property("ToContainerCode") + b.Property("ProdLine") .HasColumnType("nvarchar(max)"); - b.Property("ToLocationArea") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ToLocationArea"); - - b.Property("ToLocationCode") - .IsRequired() + b.Property("ProductNo") .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ToLocationCode"); + .HasColumnType("nvarchar(64)"); - b.Property("ToLocationErpCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ToLocationErpCode"); + b.Property("Program") + .HasColumnType("nvarchar(max)"); - b.Property("ToLocationGroup") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ToLocationGroup"); + b.Property("Qty") + .HasColumnType("int"); - b.Property("ToLot") + b.Property("RawLocationCode") .HasColumnType("nvarchar(max)"); - b.Property("ToPackingCode") - .HasColumnType("nvarchar(max)"); + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); - b.Property("ToStatus") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + b.Property("RowID") + .HasColumnType("int"); - b.Property("ToWarehouseCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ToWarehouseCode"); + b.Property("State") + .HasColumnType("int"); - b.Property("Uom") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("Uom"); + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); b.HasKey("Id"); b.HasIndex("MasterID"); - b.HasIndex("Number", "FromPackingCode", "FromLocationCode", "ToLocationCode") + b.HasIndex("Number", "ProductNo", "Position", "Configuration", "L7Part") .IsUnique() - .HasFilter("[FromPackingCode] IS NOT NULL"); + .HasFilter("[ProductNo] IS NOT NULL AND [Position] IS NOT NULL AND [Configuration] IS NOT NULL AND [L7Part] IS NOT NULL"); - b.ToTable("Store_NoOkConvertOkNoteDetail", (string)null); + b.ToTable("Store_ProductL7PartsNoteDetail", (string)null); }); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.OfflineSettlementNote", b => + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ProductReceiptNote", b => { b.Property("Id") .HasColumnType("uniqueidentifier"); @@ -8968,6 +12761,9 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.Property("ActiveDate") .HasColumnType("datetime2"); + b.Property("CompleteTime") + .HasColumnType("datetime2"); + b.Property("ConcurrencyStamp") .IsConcurrencyToken() .HasMaxLength(40) @@ -8987,7 +12783,9 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnName("ExtraProperties"); b.Property("JobNumber") - .HasColumnType("nvarchar(max)"); + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("JobNumber"); b.Property("LastModificationTime") .HasColumnType("datetime2") @@ -9003,7 +12801,15 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("nvarchar(64)") .HasColumnName("Number"); - b.Property("ProductReceiptNumber") + 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)"); @@ -9013,9 +12819,27 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("nvarchar(3072)") .HasColumnName("Remark"); - b.Property("TenantId") - .HasColumnType("uniqueidentifier") - .HasColumnName("TenantId"); + 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)"); @@ -9025,10 +12849,10 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.HasIndex("Number") .IsUnique(); - b.ToTable("Store_OfflineSettlementNote", (string)null); + b.ToTable("Store_ProductReceiptNote", (string)null); }); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.OfflineSettlementNoteDetail", b => + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ProductReceiptNoteDetail", b => { b.Property("Id") .HasColumnType("uniqueidentifier"); @@ -9036,6 +12860,10 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.Property("ArriveDate") .HasColumnType("datetime2"); + b.Property("BomVersion") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + b.Property("ContainerCode") .HasMaxLength(64) .HasColumnType("nvarchar(64)") @@ -9052,6 +12880,63 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.Property("ExpireDate") .HasColumnType("datetime2"); + b.Property("HandledArriveDate") + .HasColumnType("datetime2"); + + b.Property("HandledContainerCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledContainerCode"); + + b.Property("HandledExpireDate") + .HasColumnType("datetime2"); + + b.Property("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) @@ -9123,6 +13008,10 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("nvarchar(64)") .HasColumnName("PackingCode"); + b.Property("ProdLine") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + b.Property("ProduceDate") .HasColumnType("datetime2"); @@ -9131,245 +13020,122 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("decimal(18,6)") .HasColumnName("Qty"); - b.Property("Remark") - .HasMaxLength(3072) - .HasColumnType("nvarchar(3072)") - .HasColumnName("Remark"); - - b.Property("Status") - .IsRequired() + b.Property("RawArea") .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() + b.Property("RawLocationCode") .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"); + .HasColumnType("nvarchar(64)"); - b.Property("ActiveDate") + b.Property("RecommendArriveDate") .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() + b.Property("RecommendContainerCode") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("Number"); - - b.Property("PlanDate") - .HasColumnType("datetime2"); + .HasColumnName("RecommendContainerCode"); - b.Property("PlanTime") + b.Property("RecommendExpireDate") .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() + b.Property("RecommendLot") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("ItemCode"); + .HasColumnName("RecommendLot"); - b.Property("ItemDesc1") + b.Property("RecommendPackingCode") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("ItemDesc1"); + .HasColumnName("RecommendPackingCode"); - b.Property("ItemDesc2") + b.Property("RecommendProduceDate") + .HasColumnType("datetime2"); + + b.Property("RecommendQty") + .HasColumnType("decimal(18,6)"); + + b.Property("RecommendSupplierBatch") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("ItemDesc2"); + .HasColumnName("RecommendSupplierBatch"); - b.Property("ItemName") + b.Property("RecommendToLocationArea") .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"); + .HasColumnName("RecommendToLocationArea"); - b.Property("LineStatus") - .IsRequired() + b.Property("RecommendToLocationCode") .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendToLocationCode"); - b.Property("MasterID") - .HasColumnType("uniqueidentifier"); + b.Property("RecommendToLocationErpCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendToLocationErpCode"); - b.Property("Number") - .IsRequired() + b.Property("RecommendToLocationGroup") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("Number"); + .HasColumnName("RecommendToLocationGroup"); - b.Property("Qty") - .HasPrecision(18, 6) - .HasColumnType("decimal(18,6)") - .HasColumnName("Qty"); + b.Property("RecommendToWarehouseCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendToWarehouseCode"); b.Property("Remark") .HasMaxLength(3072) .HasColumnType("nvarchar(3072)") .HasColumnName("Remark"); + b.Property("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("ToLocationCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - b.Property("Uom") .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)") .HasColumnName("Uom"); - b.Property("WorkStation") + b.Property("WarehouseCode") .IsRequired() .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + .HasColumnType("nvarchar(64)") + .HasColumnName("WarehouseCode"); b.HasKey("Id"); b.HasIndex("MasterID"); - b.HasIndex("Number", "ItemCode") - .IsUnique(); + b.HasIndex("Number", "ItemCode", "PackingCode", "Lot", "Status") + .IsUnique() + .HasFilter("[Lot] IS NOT NULL"); - b.ToTable("Store_PreparationPlanDetail", (string)null); + b.ToTable("Store_ProductReceiptNoteDetail", (string)null); }); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ProductionPlan", b => + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ProductReceiptRequest", b => { b.Property("Id") .HasColumnType("uniqueidentifier"); @@ -9427,14 +13193,13 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.Property("PlanDate") .HasColumnType("datetime2"); - b.Property("PlanTime") - .HasColumnType("datetime2"); - b.Property("ProdLine") - .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)"); + b.Property("ProductionPlanNumber") + .HasColumnType("nvarchar(max)"); + b.Property("Remark") .HasMaxLength(3072) .HasColumnType("nvarchar(3072)") @@ -9446,12 +13211,10 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("nvarchar(64)"); b.Property("Shift") - .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)"); b.Property("Team") - .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)"); @@ -9459,11 +13222,15 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("TenantId"); + b.Property("Type") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + b.Property("Worker") .HasColumnType("nvarchar(max)"); b.Property("Workshop") - .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)"); @@ -9472,10 +13239,10 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.HasIndex("Number") .IsUnique(); - b.ToTable("Store_ProductionPlan", (string)null); + b.ToTable("Store_ProductReceiptRequest", (string)null); }); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ProductionPlanDetail", b => + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ProductReceiptRequestDetail", b => { b.Property("Id") .HasColumnType("uniqueidentifier"); @@ -9498,11 +13265,6 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.Property("ExpireDate") .HasColumnType("datetime2"); - b.Property("GoodQty") - .ValueGeneratedOnAdd() - .HasColumnType("decimal(18,6)") - .HasDefaultValue(1m); - b.Property("ItemCode") .IsRequired() .HasMaxLength(64) @@ -9532,8 +13294,27 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("LastModifierId"); - b.Property("LineStatus") - .HasColumnType("int"); + 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) @@ -9543,28 +13324,37 @@ namespace Win_in.Sfs.Wms.Store.Migrations 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("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)") @@ -9575,20 +13365,28 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnName("TenantId"); b.Property("Uom") + .IsRequired() .HasMaxLength(64) - .HasColumnType("nvarchar(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") + b.HasIndex("Number", "ItemCode", "LocationCode") .IsUnique(); - b.ToTable("Store_ProductionPlanDetail", (string)null); + b.ToTable("Store_ProductReceiptRequestDetail", (string)null); }); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ProductionReturnJob", b => + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ProductReceiveJob", b => { b.Property("Id") .HasColumnType("uniqueidentifier"); @@ -9673,7 +13471,7 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("int") .HasDefaultValue(0); - b.Property("ProductionReturnRequestNumber") + b.Property("ProductionPlanNumber") .HasMaxLength(64) .HasColumnType("nvarchar(64)"); @@ -9682,6 +13480,10 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("nvarchar(3072)") .HasColumnName("Remark"); + b.Property("Shift") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + b.Property("TenantId") .HasColumnType("uniqueidentifier") .HasColumnName("TenantId"); @@ -9700,15 +13502,20 @@ namespace Win_in.Sfs.Wms.Store.Migrations 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_ProductionReturnJob", (string)null); + b.ToTable("Job_ProductReceiveJob", (string)null); }); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ProductionReturnJobDetail", b => + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ProductReceiveJobDetail", b => { b.Property("Id") .HasColumnType("uniqueidentifier"); @@ -9721,26 +13528,6 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("CreatorId"); - b.Property("FromLocationArea") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("FromLocationCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("FromLocationErpCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("FromLocationGroup") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("FromWarehouseCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - b.Property("HandledArriveDate") .HasColumnType("datetime2"); @@ -9835,6 +13622,14 @@ namespace Win_in.Sfs.Wms.Store.Migrations .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"); @@ -9916,17 +13711,34 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.HasIndex("MasterID"); - b.ToTable("Job_ProductionReturnJobDetail", (string)null); + b.ToTable("Job_ProductReceiveJobDetail", (string)null); }); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ProductionReturnNote", b => + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ProductRecycleJob", b => { b.Property("Id") .HasColumnType("uniqueidentifier"); - b.Property("ActiveDate") + b.Property("AcceptTime") + .HasColumnType("datetime2"); + + b.Property("AcceptUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("AcceptUserName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("CompleteTime") .HasColumnType("datetime2"); + b.Property("CompleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CompleteUserName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + b.Property("ConcurrencyStamp") .IsConcurrencyToken() .HasMaxLength(40) @@ -9945,10 +13757,24 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("nvarchar(max)") .HasColumnName("ExtraProperties"); - b.Property("JobNumber") + b.Property("IsAutoComplete") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false); + + b.Property("JobDescription") + .HasMaxLength(1024) + .HasColumnType("nvarchar(1024)"); + + b.Property("JobStatus") + .IsRequired() .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("JobNumber"); + .HasColumnType("nvarchar(64)"); + + b.Property("JobType") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); b.Property("LastModificationTime") .HasColumnType("datetime2") @@ -9960,44 +13786,66 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.Property("Number") .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("Number"); - - b.Property("ProductionReturnRequestNumber") .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("ReturnTime") - .HasColumnType("datetime2"); + 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("Store_ProductionReturnNote", (string)null); + b.ToTable("Job_ProductRecycleJob", (string)null); }); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ProductionReturnNoteDetail", b => + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ProductRecycleJobDetail", b => { b.Property("Id") .HasColumnType("uniqueidentifier"); - b.Property("ArriveDate") - .HasColumnType("datetime2"); + b.Property("BomVersion") + .HasColumnType("nvarchar(max)"); b.Property("CreationTime") .HasColumnType("datetime2") @@ -10007,51 +13855,6 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("CreatorId"); - b.Property("ExpireDate") - .HasColumnType("datetime2"); - - b.Property("FromContainerCode") - .HasColumnType("nvarchar(max)"); - - b.Property("FromLocationArea") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("FromLocationArea"); - - b.Property("FromLocationCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("FromLocationCode"); - - b.Property("FromLocationErpCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("FromLocationErpCode"); - - b.Property("FromLocationGroup") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("FromLocationGroup"); - - b.Property("FromLot") - .HasColumnType("nvarchar(max)"); - - b.Property("FromPackingCode") - .HasColumnType("nvarchar(450)"); - - b.Property("FromStatus") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("FromWarehouseCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("FromWarehouseCode"); - b.Property("HandledArriveDate") .HasColumnType("datetime2"); @@ -10138,22 +13941,43 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("LastModifierId"); + b.Property("LocationArea") + .HasColumnType("nvarchar(max)"); + + b.Property("LocationCode") + .HasColumnType("nvarchar(max)"); + + b.Property("LocationErpCode") + .HasColumnType("nvarchar(max)"); + + b.Property("LocationGroup") + .HasColumnType("nvarchar(max)"); + b.Property("MasterID") .HasColumnType("uniqueidentifier"); b.Property("Number") .IsRequired() .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("Number"); - - b.Property("ProduceDate") - .HasColumnType("datetime2"); + .HasColumnType("nvarchar(64)"); b.Property("Qty") - .HasPrecision(18, 6) - .HasColumnType("decimal(18,6)") - .HasColumnName("Qty"); + .HasColumnType("decimal(18,6)"); + + b.Property("RawLocationArea") + .HasColumnType("nvarchar(max)"); + + b.Property("RawLocationCode") + .HasColumnType("nvarchar(max)"); + + b.Property("RawLocationErpCode") + .HasColumnType("nvarchar(max)"); + + b.Property("RawLocationGroup") + .HasColumnType("nvarchar(max)"); + + b.Property("RawWarehouseCode") + .HasColumnType("nvarchar(max)"); b.Property("RecommendArriveDate") .HasColumnType("datetime2"); @@ -10217,6 +14041,173 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("nvarchar(3072)") .HasColumnName("Remark"); + b.Property("Status") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("StdPackQty") + .HasColumnType("decimal(18,6)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Uom") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("WarehouseCode") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("MasterID"); + + b.ToTable("Job_ProductRecycleJobDetail", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ProductRecycleMaterialDetail", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ArriveDate") + .HasColumnType("datetime2"); + + b.Property("BomVersion") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ContainerCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ContainerCode"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("ExpireDate") + .HasColumnType("datetime2"); + + b.Property("ItemCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemCode"); + + b.Property("ItemDesc1") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc1"); + + b.Property("ItemDesc2") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc2"); + + b.Property("ItemName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemName"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("LocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationArea"); + + b.Property("LocationCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationCode"); + + b.Property("LocationErpCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationErpCode"); + + b.Property("LocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationGroup"); + + b.Property("Lot") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Lot"); + + b.Property("MasterID") + .HasColumnType("uniqueidentifier"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("PackingCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("PackingCode"); + + b.Property("ProduceDate") + .HasColumnType("datetime2"); + + b.Property("ProductItemCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ProductItemDesc1") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ProductItemDesc2") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ProductItemName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ProductLot") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ProductPackingCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Qty") + .HasPrecision(18, 6) + .HasColumnType("decimal(18,6)") + .HasColumnName("Qty"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("Status") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + b.Property("StdPackQty") .HasColumnType("decimal(18,6)"); @@ -10229,66 +14220,28 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("TenantId"); - b.Property("ToContainerCode") - .HasColumnType("nvarchar(max)"); - - b.Property("ToLocationArea") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ToLocationArea"); - - b.Property("ToLocationCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ToLocationCode"); - - b.Property("ToLocationErpCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ToLocationErpCode"); - - b.Property("ToLocationGroup") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ToLocationGroup"); - - b.Property("ToLot") - .HasColumnType("nvarchar(max)"); - - b.Property("ToPackingCode") - .HasColumnType("nvarchar(450)"); - - b.Property("ToStatus") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("ToWarehouseCode") + b.Property("Uom") .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("ToWarehouseCode"); + .HasColumnName("Uom"); - b.Property("Uom") + b.Property("WarehouseCode") .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("Uom"); + .HasColumnName("WarehouseCode"); b.HasKey("Id"); b.HasIndex("MasterID"); - b.HasIndex("Number", "ItemCode", "FromPackingCode", "ToPackingCode", "FromLocationCode", "ToLocationCode") - .IsUnique() - .HasFilter("[FromPackingCode] IS NOT NULL AND [ToPackingCode] IS NOT NULL"); + b.HasIndex("Number", "ProductItemCode", "ItemCode"); - b.ToTable("Store_ProductionReturnNoteDetail", (string)null); + b.ToTable("Store_ProductRecycleMaterialDetail", (string)null); }); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ProductionReturnRequest", b => + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ProductRecycleNote", b => { b.Property("Id") .HasColumnType("uniqueidentifier"); @@ -10296,18 +14249,6 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.Property("ActiveDate") .HasColumnType("datetime2"); - b.Property("AutoAgree") - .HasColumnType("bit"); - - b.Property("AutoCompleteJob") - .HasColumnType("bit"); - - b.Property("AutoHandle") - .HasColumnType("bit"); - - b.Property("AutoSubmit") - .HasColumnType("bit"); - b.Property("ConcurrencyStamp") .IsConcurrencyToken() .HasMaxLength(40) @@ -10322,9 +14263,6 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("CreatorId"); - b.Property("DirectCreateNote") - .HasColumnType("bit"); - b.Property("ExtraProperties") .HasColumnType("nvarchar(max)") .HasColumnName("ExtraProperties"); @@ -10343,13 +14281,18 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("nvarchar(64)") .HasColumnName("Number"); + b.Property("RecycleTime") + .HasColumnType("datetime2"); + b.Property("Remark") .HasMaxLength(3072) .HasColumnType("nvarchar(3072)") .HasColumnName("Remark"); - b.Property("RequestStatus") - .IsRequired() + b.Property("RequestNumber") + .HasColumnType("nvarchar(max)"); + + b.Property("Shift") .HasMaxLength(64) .HasColumnType("nvarchar(64)"); @@ -10360,15 +14303,19 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.Property("Worker") .HasColumnType("nvarchar(max)"); + b.Property("Workshop") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + b.HasKey("Id"); b.HasIndex("Number") .IsUnique(); - b.ToTable("Store_ProductionReturnRequest", (string)null); + b.ToTable("Store_ProductRecycleNote", (string)null); }); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ProductionReturnRequestDetail", b => + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ProductRecycleNoteDetail", b => { b.Property("Id") .HasColumnType("uniqueidentifier"); @@ -10376,6 +14323,11 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.Property("ArriveDate") .HasColumnType("datetime2"); + b.Property("ContainerCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ContainerCode"); + b.Property("CreationTime") .HasColumnType("datetime2") .HasColumnName("CreationTime"); @@ -10387,79 +14339,65 @@ namespace Win_in.Sfs.Wms.Store.Migrations 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("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); - b.Property("FromLocationCode") + b.Property("ItemCode") .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("FromLocationCode"); + .HasColumnName("ItemCode"); - b.Property("FromLocationErpCode") - .IsRequired() + b.Property("ItemDesc1") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("FromLocationErpCode"); + .HasColumnName("ItemDesc1"); - b.Property("FromLocationGroup") + b.Property("ItemDesc2") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("FromLocationGroup"); + .HasColumnName("ItemDesc2"); - b.Property("FromLot") + b.Property("ItemName") .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemName"); - b.Property("FromPackingCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); - b.Property("FromStatus") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); - b.Property("FromWarehouseCode") - .IsRequired() + b.Property("LocationArea") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("FromWarehouseCode"); + .HasColumnName("LocationArea"); - b.Property("ItemCode") + b.Property("LocationCode") .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("ItemCode"); + .HasColumnName("LocationCode"); - b.Property("ItemDesc1") + b.Property("LocationErpCode") + .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("ItemDesc1"); + .HasColumnName("LocationErpCode"); - b.Property("ItemDesc2") + b.Property("LocationGroup") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("ItemDesc2"); + .HasColumnName("LocationGroup"); - b.Property("ItemName") + b.Property("Lot") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("ItemName"); - - b.Property("LastModificationTime") - .HasColumnType("datetime2") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("uniqueidentifier") - .HasColumnName("LastModifierId"); + .HasColumnName("Lot"); b.Property("MasterID") .HasColumnType("uniqueidentifier"); @@ -10470,6 +14408,12 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("nvarchar(64)") .HasColumnName("Number"); + b.Property("PackingCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("PackingCode"); + b.Property("ProduceDate") .HasColumnType("datetime2"); @@ -10478,11 +14422,20 @@ namespace Win_in.Sfs.Wms.Store.Migrations .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)"); @@ -10495,70 +14448,29 @@ namespace Win_in.Sfs.Wms.Store.Migrations .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") + b.Property("Uom") .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("ToWarehouseCode"); + .HasColumnName("Uom"); - b.Property("Uom") + b.Property("WarehouseCode") .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("Uom"); + .HasColumnName("WarehouseCode"); b.HasKey("Id"); - b.HasIndex("ItemCode"); - b.HasIndex("MasterID"); - b.HasIndex("Number", "ItemCode", "FromLocationCode") + b.HasIndex("Number", "ItemCode") .IsUnique(); - b.ToTable("Store_ProductionReturnRequestDetail", (string)null); + b.ToTable("Store_ProductRecycleNoteDetail", (string)null); }); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ProductL7PartsNote", b => + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ProductRecycleRequest", b => { b.Property("Id") .HasColumnType("uniqueidentifier"); @@ -10566,20 +14478,23 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.Property("ActiveDate") .HasColumnType("datetime2"); - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("nvarchar(40)") - .HasColumnName("ConcurrencyStamp"); + b.Property("AutoAgree") + .HasColumnType("bit"); - b.Property("Configuration") - .HasColumnType("nvarchar(max)"); + b.Property("AutoCompleteJob") + .HasColumnType("bit"); - b.Property("ContainerCode") - .HasColumnType("nvarchar(max)"); + b.Property("AutoHandle") + .HasColumnType("bit"); + + b.Property("AutoSubmit") + .HasColumnType("bit"); - b.Property("CreateDate") - .HasColumnType("datetime2"); + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); b.Property("CreationTime") .HasColumnType("datetime2") @@ -10589,13 +14504,13 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("CreatorId"); + b.Property("DirectCreateNote") + .HasColumnType("bit"); + b.Property("ExtraProperties") .HasColumnType("nvarchar(max)") .HasColumnName("ExtraProperties"); - b.Property("FATA") - .HasColumnType("nvarchar(max)"); - b.Property("LastModificationTime") .HasColumnType("datetime2") .HasColumnName("LastModificationTime"); @@ -10610,28 +14525,19 @@ namespace Win_in.Sfs.Wms.Store.Migrations .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("RequestStatus") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); - b.Property("Status") - .HasColumnType("int"); + b.Property("Shift") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); b.Property("TenantId") .HasColumnType("uniqueidentifier") @@ -10640,35 +14546,27 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.Property("Worker") .HasColumnType("nvarchar(max)"); - b.Property("Year") - .HasColumnType("nvarchar(max)"); + b.Property("Workshop") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); b.HasKey("Id"); b.HasIndex("Number") .IsUnique(); - b.ToTable("Store_ProductL7PartsNote", (string)null); + b.ToTable("Store_ProductRecycleRequest", (string)null); }); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ProductL7PartsNoteDetail", b => + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ProductRecycleRequestDetail", b => { b.Property("Id") .HasColumnType("uniqueidentifier"); - b.Property("CanBuy") - .HasColumnType("bit"); - - b.Property("CanMake") - .HasColumnType("bit"); - - b.Property("Configuration") + b.Property("BomVersion") .HasMaxLength(64) .HasColumnType("nvarchar(64)"); - b.Property("CreateDate") - .HasColumnType("datetime2"); - b.Property("CreationTime") .HasColumnType("datetime2") .HasColumnName("CreationTime"); @@ -10677,8 +14575,9 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("CreatorId"); - b.Property("FATA") - .HasColumnType("nvarchar(max)"); + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); b.Property("ItemCode") .IsRequired() @@ -10701,10 +14600,6 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("nvarchar(64)") .HasColumnName("ItemName"); - b.Property("L7Part") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - b.Property("LastModificationTime") .HasColumnType("datetime2") .HasColumnName("LastModificationTime"); @@ -10713,8 +14608,27 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("LastModifierId"); + b.Property("LocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationArea"); + b.Property("LocationCode") - .HasColumnType("nvarchar(max)"); + .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"); @@ -10725,53 +14639,68 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("nvarchar(64)") .HasColumnName("Number"); - b.Property("Position") + b.Property("Qty") + .HasPrecision(18, 6) + .HasColumnType("decimal(18,6)") + .HasColumnName("Qty"); + + b.Property("RawLocationArea") .HasMaxLength(64) .HasColumnType("nvarchar(64)"); - b.Property("ProdLine") - .HasColumnType("nvarchar(max)"); - - b.Property("ProductNo") + b.Property("RawLocationCode") .HasMaxLength(64) .HasColumnType("nvarchar(64)"); - b.Property("Program") - .HasColumnType("nvarchar(max)"); + b.Property("RawLocationErpCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); - b.Property("Qty") - .HasColumnType("int"); + b.Property("RawLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); - b.Property("RawLocationCode") - .HasColumnType("nvarchar(max)"); + b.Property("RawWarehouseCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); b.Property("Remark") .HasMaxLength(3072) .HasColumnType("nvarchar(3072)") .HasColumnName("Remark"); - b.Property("RowID") - .HasColumnType("int"); - - b.Property("State") - .HasColumnType("int"); + 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", "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.HasIndex("Number", "ItemCode") + .IsUnique(); - b.ToTable("Store_ProductL7PartsNoteDetail", (string)null); + b.ToTable("Store_ProductRecycleRequestDetail", (string)null); }); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ProductReceiptNote", b => + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.PurchaseOrder", b => { b.Property("Id") .HasColumnType("uniqueidentifier"); @@ -10779,15 +14708,24 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.Property("ActiveDate") .HasColumnType("datetime2"); - b.Property("CompleteTime") - .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"); @@ -10796,14 +14734,17 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("CreatorId"); + b.Property("DueDate") + .HasColumnType("datetime2"); + b.Property("ExtraProperties") .HasColumnType("nvarchar(max)") .HasColumnName("ExtraProperties"); - b.Property("JobNumber") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("JobNumber"); + b.Property("IsConsignment") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false); b.Property("LastModificationTime") .HasColumnType("datetime2") @@ -10819,16 +14760,15 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("nvarchar(64)") .HasColumnName("Number"); - b.Property("ProductReceiptRequestNumber") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + b.Property("OrderDate") + .HasColumnType("datetime2"); - b.Property("ProductionPlanNumber") + b.Property("OrderStatus") + .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)"); - b.Property("ReceiptType") - .IsRequired() + b.Property("PoType") .HasMaxLength(64) .HasColumnType("nvarchar(64)"); @@ -10837,25 +14777,26 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("nvarchar(3072)") .HasColumnName("Remark"); - b.Property("Shift") + b.Property("SupplierAddress") + .HasColumnType("nvarchar(max)"); + + b.Property("SupplierCode") .HasMaxLength(64) .HasColumnType("nvarchar(64)"); - b.Property("SourceNumber") + 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("Type") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("WarehouseCode") - .HasColumnType("nvarchar(max)"); - - b.Property("WorkShop") + b.Property("Version") .HasMaxLength(64) .HasColumnType("nvarchar(64)"); @@ -10867,93 +14808,37 @@ namespace Win_in.Sfs.Wms.Store.Migrations 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.ToTable("Store_PurchaseOrder", (string)null); + }); - b.Property("HandledQty") - .HasColumnType("decimal(18,6)"); + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.PurchaseOrderDetail", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); - b.Property("HandledSupplierBatch") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("HandledSupplierBatch"); + b.Property("ConvertRate") + .ValueGeneratedOnAdd() + .HasColumnType("decimal(18,6)") + .HasDefaultValue(1m); - b.Property("HandledToLocationArea") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("HandledToLocationArea"); + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); - b.Property("HandledToLocationCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("HandledToLocationCode"); + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); - b.Property("HandledToLocationErpCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("HandledToLocationErpCode"); + b.Property("Ctype") + .HasColumnType("nvarchar(max)"); - b.Property("HandledToLocationGroup") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("HandledToLocationGroup"); + b.Property("ExpireDate") + .HasColumnType("datetime2"); - b.Property("HandledToWarehouseCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("HandledToWarehouseCode"); + b.Property("IsConsignment") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false); b.Property("ItemCode") .IsRequired() @@ -10984,32 +14869,17 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("LastModifierId"); - b.Property("LocationArea") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("LocationArea"); - - b.Property("LocationCode") + b.Property("LineStatus") .IsRequired() .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("LocationCode"); + .HasColumnType("nvarchar(64)"); b.Property("LocationErpCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("LocationErpCode"); - - b.Property("LocationGroup") .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("LocationGroup"); + .HasColumnType("nvarchar(64)"); b.Property("Lot") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("Lot"); + .HasColumnType("nvarchar(max)"); b.Property("MasterID") .HasColumnType("uniqueidentifier"); @@ -11020,111 +14890,56 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("nvarchar(64)") .HasColumnName("Number"); - b.Property("PackingCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("PackingCode"); - - b.Property("ProdLine") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + b.Property("OrderRemark") + .HasColumnType("nvarchar(max)"); - b.Property("ProduceDate") + b.Property("PlanArriveDate") .HasColumnType("datetime2"); - b.Property("Qty") - .HasPrecision(18, 6) - .HasColumnType("decimal(18,6)") - .HasColumnName("Qty"); - - b.Property("RawArea") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + b.Property("PlanUserCode") + .HasColumnType("nvarchar(max)"); - b.Property("RawLocationCode") + b.Property("PoLine") .HasMaxLength(64) .HasColumnType("nvarchar(64)"); - b.Property("RecommendArriveDate") - .HasColumnType("datetime2"); - - b.Property("RecommendContainerCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendContainerCode"); - - b.Property("RecommendExpireDate") + b.Property("ProduceDate") .HasColumnType("datetime2"); - b.Property("RecommendLot") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendLot"); - - b.Property("RecommendPackingCode") + b.Property("ProjectCode") .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendPackingCode"); - - b.Property("RecommendProduceDate") - .HasColumnType("datetime2"); + .HasColumnType("nvarchar(64)"); - b.Property("RecommendQty") + b.Property("PutAwayQty") .HasColumnType("decimal(18,6)"); - b.Property("RecommendSupplierBatch") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendSupplierBatch"); - - b.Property("RecommendToLocationArea") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendToLocationArea"); - - b.Property("RecommendToLocationCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendToLocationCode"); - - b.Property("RecommendToLocationErpCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendToLocationErpCode"); - - b.Property("RecommendToLocationGroup") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendToLocationGroup"); + b.Property("Qty") + .HasPrecision(18, 6) + .HasColumnType("decimal(18,6)") + .HasColumnName("Qty"); - b.Property("RecommendToWarehouseCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendToWarehouseCode"); + b.Property("ReceivedQty") + .HasColumnType("decimal(18,6)"); b.Property("Remark") .HasMaxLength(3072) .HasColumnType("nvarchar(3072)") .HasColumnName("Remark"); - b.Property("ReturnQty") - .ValueGeneratedOnAdd() - .HasColumnType("decimal(18,6)") - .HasDefaultValue(0m); + b.Property("ReturnedQty") + .HasColumnType("decimal(18,6)"); - b.Property("Status") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + b.Property("ShippedQty") + .HasColumnType("decimal(18,6)"); b.Property("StdPackQty") .HasColumnType("decimal(18,6)"); - b.Property("SupplierBatch") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("SupplierBatch"); + b.Property("SupplierPackQty") + .HasColumnType("decimal(18,6)"); + + b.Property("SupplierPackUom") + .HasColumnType("nvarchar(max)"); b.Property("TenantId") .HasColumnType("uniqueidentifier") @@ -11136,42 +14951,45 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("nvarchar(64)") .HasColumnName("Uom"); - b.Property("WarehouseCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("WarehouseCode"); - b.HasKey("Id"); b.HasIndex("MasterID"); - b.HasIndex("Number", "ItemCode", "PackingCode", "Lot", "Status") + b.HasIndex("ItemCode", "Number", "PoLine") .IsUnique() - .HasFilter("[Lot] IS NOT NULL"); + .HasFilter("[PoLine] IS NOT NULL"); - b.ToTable("Store_ProductReceiptNoteDetail", (string)null); + b.ToTable("Store_PurchaseOrderDetail", (string)null); }); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ProductReceiptRequest", b => + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.PurchaseReceiptJob", b => { b.Property("Id") .HasColumnType("uniqueidentifier"); - b.Property("ActiveDate") + b.Property("AcceptTime") .HasColumnType("datetime2"); - b.Property("AutoAgree") - .HasColumnType("bit"); + b.Property("AcceptUserId") + .HasColumnType("uniqueidentifier"); - b.Property("AutoCompleteJob") - .HasColumnType("bit"); + b.Property("AcceptUserName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); - b.Property("AutoHandle") - .HasColumnType("bit"); + b.Property("AsnNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); - b.Property("AutoSubmit") - .HasColumnType("bit"); + b.Property("CompleteTime") + .HasColumnType("datetime2"); + + b.Property("CompleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CompleteUserName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); b.Property("ConcurrencyStamp") .IsConcurrencyToken() @@ -11187,13 +15005,29 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("CreatorId"); - b.Property("DirectCreateNote") - .HasColumnType("bit"); - b.Property("ExtraProperties") .HasColumnType("nvarchar(max)") .HasColumnName("ExtraProperties"); + b.Property("IsAutoComplete") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false); + + b.Property("JobDescription") + .HasMaxLength(1024) + .HasColumnType("nvarchar(1024)"); + + b.Property("JobStatus") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("JobType") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + b.Property("LastModificationTime") .HasColumnType("datetime2") .HasColumnName("LastModificationTime"); @@ -11205,34 +15039,47 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.Property("Number") .IsRequired() .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("Number"); + .HasColumnType("nvarchar(64)"); - b.Property("PlanDate") + b.Property("PlanArriveDate") .HasColumnType("datetime2"); - b.Property("ProdLine") + 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("ProductionPlanNumber") - .HasColumnType("nvarchar(max)"); - b.Property("Remark") .HasMaxLength(3072) .HasColumnType("nvarchar(3072)") .HasColumnName("Remark"); - b.Property("RequestStatus") - .IsRequired() + b.Property("RpNumber") .HasMaxLength(64) .HasColumnType("nvarchar(64)"); - b.Property("Shift") + b.Property("SupplierAddress") + .HasColumnType("nvarchar(max)"); + + b.Property("SupplierCode") + .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)"); - b.Property("Team") + b.Property("SupplierName") .HasMaxLength(64) .HasColumnType("nvarchar(64)"); @@ -11240,27 +15087,38 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("TenantId"); + b.Property("TimeWindow") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + b.Property("Type") .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)"); - b.Property("Worker") + b.Property("UpStreamJobNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("WarehouseCode") .HasColumnType("nvarchar(max)"); - b.Property("Workshop") + b.Property("WorkGroupCode") .HasMaxLength(64) .HasColumnType("nvarchar(64)"); + b.Property("Worker") + .HasColumnType("nvarchar(max)"); + b.HasKey("Id"); b.HasIndex("Number") .IsUnique(); - b.ToTable("Store_ProductReceiptRequest", (string)null); + b.ToTable("Job_PurchaseReceiptJob", (string)null); }); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ProductReceiptRequestDetail", b => + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.PurchaseReceiptJobDetail", b => { b.Property("Id") .HasColumnType("uniqueidentifier"); @@ -11268,10 +15126,6 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.Property("ArriveDate") .HasColumnType("datetime2"); - b.Property("BomVersion") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - b.Property("CreationTime") .HasColumnType("datetime2") .HasColumnName("CreationTime"); @@ -11280,9 +15134,69 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("CreatorId"); - b.Property("ExpireDate") + 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) @@ -11312,120 +15226,129 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("LastModifierId"); - b.Property("LocationArea") + b.Property("MassDefect") + .HasColumnType("nvarchar(max)"); + + b.Property("MasterID") + .HasColumnType("uniqueidentifier"); + + b.Property("Number") + .IsRequired() .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("LocationArea"); + .HasColumnType("nvarchar(64)"); - b.Property("LocationCode") + b.Property("PoLine") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("PoNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("PurchaseReceiptInspectStatus") .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("RecommendArriveDate") + .HasColumnType("datetime2"); + + b.Property("RecommendContainerCode") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("LocationCode"); + .HasColumnName("RecommendContainerCode"); - b.Property("LocationErpCode") - .IsRequired() + b.Property("RecommendExpireDate") + .HasColumnType("datetime2"); + + b.Property("RecommendLot") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("LocationErpCode"); + .HasColumnName("RecommendLot"); - b.Property("LocationGroup") + b.Property("RecommendPackingCode") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("LocationGroup"); + .HasColumnName("RecommendPackingCode"); - b.Property("Lot") + b.Property("RecommendProduceDate") + .HasColumnType("datetime2"); + + b.Property("RecommendQty") + .HasColumnType("decimal(18,6)"); + + b.Property("RecommendSupplierBatch") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("Lot"); + .HasColumnName("RecommendSupplierBatch"); - b.Property("MasterID") - .HasColumnType("uniqueidentifier"); + b.Property("RecommendToLocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendToLocationArea"); - b.Property("Number") - .IsRequired() + b.Property("RecommendToLocationCode") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("Number"); + .HasColumnName("RecommendToLocationCode"); - b.Property("ProduceDate") - .HasColumnType("datetime2"); + b.Property("RecommendToLocationErpCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendToLocationErpCode"); - b.Property("Qty") - .HasPrecision(18, 6) - .HasColumnType("decimal(18,6)") - .HasColumnName("Qty"); + b.Property("RecommendToLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendToLocationGroup"); - b.Property("RawArea") + b.Property("RecommendToWarehouseCode") .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendToWarehouseCode"); b.Property("Remark") .HasMaxLength(3072) .HasColumnType("nvarchar(3072)") .HasColumnName("Remark"); - b.Property("ReturnQty") - .ValueGeneratedOnAdd() - .HasColumnType("decimal(18,6)") - .HasDefaultValue(0m); + b.Property("Status") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); b.Property("StdPackQty") .HasColumnType("decimal(18,6)"); - b.Property("SupplierBatch") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("SupplierBatch"); + b.Property("SupplierPackQty") + .HasColumnType("decimal(18,6)"); + + b.Property("SupplierPackUom") + .HasColumnType("nvarchar(max)"); b.Property("TenantId") .HasColumnType("uniqueidentifier") .HasColumnName("TenantId"); b.Property("Uom") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("Uom"); - - b.Property("WarehouseCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("WarehouseCode"); + .HasColumnType("nvarchar(max)"); b.HasKey("Id"); b.HasIndex("MasterID"); - b.HasIndex("Number", "ItemCode", "LocationCode") - .IsUnique(); - - b.ToTable("Store_ProductReceiptRequestDetail", (string)null); + b.ToTable("Job_PurchaseReceiptJobDetail", (string)null); }); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ProductReceiveJob", b => + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.PurchaseReceiptNote", 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") + b.Property("ActiveDate") .HasColumnType("datetime2"); - b.Property("CompleteUserId") - .HasColumnType("uniqueidentifier"); - - b.Property("CompleteUserName") + b.Property("AsnNumber") .HasMaxLength(64) .HasColumnType("nvarchar(64)"); @@ -11444,27 +15367,13 @@ namespace Win_in.Sfs.Wms.Store.Migrations .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)"); + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); - b.Property("JobType") - .IsRequired() + b.Property("JobNumber") .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + .HasColumnType("nvarchar(64)") + .HasColumnName("JobNumber"); b.Property("LastModificationTime") .HasColumnType("datetime2") @@ -11477,67 +15386,83 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.Property("Number") .IsRequired() .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("Priority") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasDefaultValue(0); + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); - b.Property("PriorityIncrement") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasDefaultValue(0); + b.Property("PoNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); - b.Property("ProductionPlanNumber") + 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("Shift") + b.Property("RpNumber") .HasMaxLength(64) .HasColumnType("nvarchar(64)"); - b.Property("TenantId") - .HasColumnType("uniqueidentifier") - .HasColumnName("TenantId"); - - b.Property("UpStreamJobNumber") + b.Property("Status") + .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)"); - b.Property("WarehouseCode") + b.Property("SupplierAddress") .HasColumnType("nvarchar(max)"); - b.Property("WorkGroupCode") + b.Property("SupplierCode") + .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)"); - b.Property("Worker") + b.Property("SupplierName") .HasColumnType("nvarchar(max)"); - b.Property("Workshop") + 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.ToTable("Job_ProductReceiveJob", (string)null); + b.HasIndex("SupplierCode"); + + b.ToTable("Store_PurchaseReceiptNote", (string)null); }); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ProductReceiveJobDetail", b => + 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"); @@ -11546,6 +15471,12 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("CreatorId"); + b.Property("ExpireDate") + .HasColumnType("datetime2"); + + b.Property("FailedReason") + .HasColumnType("nvarchar(max)"); + b.Property("HandledArriveDate") .HasColumnType("datetime2"); @@ -11603,6 +15534,9 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("nvarchar(64)") .HasColumnName("HandledToWarehouseCode"); + b.Property("InspectPhotoJson") + .HasColumnType("nvarchar(max)"); + b.Property("ItemCode") .IsRequired() .HasMaxLength(64) @@ -11632,21 +15566,73 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("LastModifierId"); + b.Property("LocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationArea"); + + b.Property("LocationCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationCode"); + + b.Property("LocationErpCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationErpCode"); + + b.Property("LocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationGroup"); + + b.Property("Lot") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Lot"); + + b.Property("MassDefect") + .HasColumnType("nvarchar(max)"); + b.Property("MasterID") .HasColumnType("uniqueidentifier"); b.Property("Number") .IsRequired() .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); - b.Property("ProdLine") + 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("RawLocationCode") - .HasColumnType("nvarchar(max)"); + b.Property("Qty") + .HasPrecision(18, 6) + .HasColumnType("decimal(18,6)") + .HasColumnName("Qty"); b.Property("RecommendArriveDate") .HasColumnType("datetime2"); @@ -11700,39 +15686,182 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("nvarchar(64)") .HasColumnName("RecommendToLocationGroup"); - b.Property("RecommendToWarehouseCode") + 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)") - .HasColumnName("RecommendToWarehouseCode"); + .HasColumnType("nvarchar(64)"); b.Property("Remark") .HasMaxLength(3072) .HasColumnType("nvarchar(3072)") .HasColumnName("Remark"); - b.Property("Status") + b.Property("RequestStatus") .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)"); - b.Property("StdPackQty") - .HasColumnType("decimal(18,6)"); + b.Property("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("Uom") + 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("MasterID"); + b.HasIndex("Number") + .IsUnique(); - b.ToTable("Job_ProductReceiveJobDetail", (string)null); + b.HasIndex("SupplierCode"); + + b.ToTable("Store_PurchaseReceiptRequest", (string)null); }); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ProductRecycleMaterialDetail", b => + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.PurchaseReceiptRequestDetail", b => { b.Property("Id") .HasColumnType("uniqueidentifier"); @@ -11740,15 +15869,14 @@ namespace Win_in.Sfs.Wms.Store.Migrations 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("ConvertRate") + .HasColumnType("decimal(18,6)"); + b.Property("CreationTime") .HasColumnType("datetime2") .HasColumnName("CreationTime"); @@ -11789,28 +15917,6 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("LastModifierId"); - b.Property("LocationArea") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("LocationArea"); - - b.Property("LocationCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("LocationCode"); - - b.Property("LocationErpCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("LocationErpCode"); - - b.Property("LocationGroup") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("LocationGroup"); - b.Property("Lot") .HasMaxLength(64) .HasColumnType("nvarchar(64)") @@ -11831,48 +15937,32 @@ namespace Win_in.Sfs.Wms.Store.Migrations .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") + b.Property("PoLine") .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + .HasColumnType("nvarchar(64)") + .HasColumnName("PoLine"); - b.Property("ProductLot") + b.Property("PoNumber") .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + .HasColumnType("nvarchar(64)") + .HasColumnName("PoNumber"); - b.Property("ProductPackingCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + 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("Status") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - b.Property("StdPackQty") .HasColumnType("decimal(18,6)"); @@ -11881,6 +15971,12 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("nvarchar(64)") .HasColumnName("SupplierBatch"); + b.Property("SupplierPackQty") + .HasColumnType("decimal(18,6)"); + + b.Property("SupplierPackUom") + .HasColumnType("nvarchar(max)"); + b.Property("TenantId") .HasColumnType("uniqueidentifier") .HasColumnName("TenantId"); @@ -11891,29 +15987,45 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("nvarchar(64)") .HasColumnName("Uom"); - b.Property("WarehouseCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("WarehouseCode"); - b.HasKey("Id"); b.HasIndex("MasterID"); - b.HasIndex("Number", "ProductItemCode", "ItemCode"); + b.HasIndex("Number", "PackingCode") + .IsUnique(); - b.ToTable("Store_ProductRecycleMaterialDetail", (string)null); + b.ToTable("Store_PurchaseReceiptRequestDetail", (string)null); }); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ProductRecycleNote", b => + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.PurchaseReturnJob", b => { b.Property("Id") .HasColumnType("uniqueidentifier"); - b.Property("ActiveDate") + b.Property("AcceptTime") + .HasColumnType("datetime2"); + + b.Property("AcceptUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("AcceptUserName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("AsnNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("CompleteTime") .HasColumnType("datetime2"); + b.Property("CompleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CompleteUserName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + b.Property("ConcurrencyStamp") .IsConcurrencyToken() .HasMaxLength(40) @@ -11932,6 +16044,25 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("nvarchar(max)") .HasColumnName("ExtraProperties"); + b.Property("IsAutoComplete") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false); + + b.Property("JobDescription") + .HasMaxLength(1024) + .HasColumnType("nvarchar(1024)"); + + b.Property("JobStatus") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("JobType") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + b.Property("LastModificationTime") .HasColumnType("datetime2") .HasColumnName("LastModificationTime"); @@ -11943,21 +16074,47 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.Property("Number") .IsRequired() .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("Number"); + .HasColumnType("nvarchar(64)"); - b.Property("RecycleTime") - .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("PurchaseReturnRequestNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); b.Property("Remark") .HasMaxLength(3072) .HasColumnType("nvarchar(3072)") .HasColumnName("Remark"); - b.Property("RequestNumber") + b.Property("ReturnReason") .HasColumnType("nvarchar(max)"); - b.Property("Shift") + 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)"); @@ -11965,48 +16122,97 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("TenantId"); - b.Property("Worker") + b.Property("UpStreamJobNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("WarehouseCode") .HasColumnType("nvarchar(max)"); - b.Property("Workshop") + b.Property("WorkGroupCode") .HasMaxLength(64) .HasColumnType("nvarchar(64)"); + b.Property("Worker") + .HasColumnType("nvarchar(max)"); + b.HasKey("Id"); b.HasIndex("Number") .IsUnique(); - b.ToTable("Store_ProductRecycleNote", (string)null); + b.ToTable("Job_PurchaseReturnJob", (string)null); }); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ProductRecycleNoteDetail", b => - { - b.Property("Id") - .HasColumnType("uniqueidentifier"); + 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("ArriveDate") - .HasColumnType("datetime2"); + b.Property("HandledFromLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledFromLocationGroup"); - b.Property("ContainerCode") + b.Property("HandledFromWarehouseCode") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("ContainerCode"); + .HasColumnName("HandledFromWarehouseCode"); - b.Property("CreationTime") - .HasColumnType("datetime2") - .HasColumnName("CreationTime"); + b.Property("HandledLot") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledLot"); - b.Property("CreatorId") - .HasColumnType("uniqueidentifier") - .HasColumnName("CreatorId"); + b.Property("HandledPackingCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledPackingCode"); - b.Property("ExpireDate") + b.Property("HandledProduceDate") .HasColumnType("datetime2"); - b.Property("ExtraProperties") - .HasColumnType("nvarchar(max)") - .HasColumnName("ExtraProperties"); + b.Property("HandledQty") + .HasColumnType("decimal(18,6)"); + + b.Property("HandledSupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledSupplierBatch"); b.Property("ItemCode") .IsRequired() @@ -12037,59 +16243,81 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("LastModifierId"); - b.Property("LocationArea") + b.Property("MasterID") + .HasColumnType("uniqueidentifier"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + 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("LocationArea"); + .HasColumnName("RecommendContainerCode"); - b.Property("LocationCode") - .IsRequired() + b.Property("RecommendExpireDate") + .HasColumnType("datetime2"); + + b.Property("RecommendFromLocationArea") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("LocationCode"); + .HasColumnName("RecommendFromLocationArea"); - b.Property("LocationErpCode") - .IsRequired() + b.Property("RecommendFromLocationCode") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("LocationErpCode"); + .HasColumnName("RecommendFromLocationCode"); - b.Property("LocationGroup") + b.Property("RecommendFromLocationErpCode") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("LocationGroup"); + .HasColumnName("RecommendFromLocationErpCode"); - b.Property("Lot") + b.Property("RecommendFromLocationGroup") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("Lot"); + .HasColumnName("RecommendFromLocationGroup"); - b.Property("MasterID") - .HasColumnType("uniqueidentifier"); + b.Property("RecommendFromWarehouseCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendFromWarehouseCode"); - b.Property("Number") - .IsRequired() + b.Property("RecommendLot") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("Number"); + .HasColumnName("RecommendLot"); - b.Property("PackingCode") - .IsRequired() + b.Property("RecommendPackingCode") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("PackingCode"); + .HasColumnName("RecommendPackingCode"); - b.Property("ProduceDate") + b.Property("RecommendProduceDate") .HasColumnType("datetime2"); - b.Property("Qty") - .HasPrecision(18, 6) - .HasColumnType("decimal(18,6)") - .HasColumnName("Qty"); + b.Property("RecommendQty") + .HasColumnType("decimal(18,6)"); - b.Property("ReasonCode") + b.Property("RecommendSupplierBatch") .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendSupplierBatch"); b.Property("Remark") .HasMaxLength(3072) @@ -12104,38 +16332,21 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.Property("StdPackQty") .HasColumnType("decimal(18,6)"); - b.Property("SupplierBatch") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("SupplierBatch"); - b.Property("TenantId") .HasColumnType("uniqueidentifier") .HasColumnName("TenantId"); b.Property("Uom") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("Uom"); - - b.Property("WarehouseCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("WarehouseCode"); + .HasColumnType("nvarchar(max)"); b.HasKey("Id"); b.HasIndex("MasterID"); - b.HasIndex("Number", "ItemCode") - .IsUnique(); - - b.ToTable("Store_ProductRecycleNoteDetail", (string)null); + b.ToTable("Job_PurchaseReturnJobDetail", (string)null); }); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ProductRecycleRequest", b => + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.PurchaseReturnNote", b => { b.Property("Id") .HasColumnType("uniqueidentifier"); @@ -12143,17 +16354,9 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.Property("ActiveDate") .HasColumnType("datetime2"); - b.Property("AutoAgree") - .HasColumnType("bit"); - - b.Property("AutoCompleteJob") - .HasColumnType("bit"); - - b.Property("AutoHandle") - .HasColumnType("bit"); - - b.Property("AutoSubmit") - .HasColumnType("bit"); + b.Property("AsnNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); b.Property("ConcurrencyStamp") .IsConcurrencyToken() @@ -12169,13 +16372,15 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("CreatorId"); - b.Property("DirectCreateNote") - .HasColumnType("bit"); - b.Property("ExtraProperties") .HasColumnType("nvarchar(max)") .HasColumnName("ExtraProperties"); + b.Property("JobNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("JobNumber"); + b.Property("LastModificationTime") .HasColumnType("datetime2") .HasColumnName("LastModificationTime"); @@ -12190,17 +16395,40 @@ namespace Win_in.Sfs.Wms.Store.Migrations .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("RequestStatus") + b.Property("ReturnReason") + .HasColumnType("nvarchar(max)"); + + b.Property("ReturnTime") + .HasColumnType("datetime2"); + + b.Property("ReturnType") .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)"); - b.Property("Shift") + 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)"); @@ -12211,38 +16439,94 @@ namespace Win_in.Sfs.Wms.Store.Migrations 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); + b.ToTable("Store_PurchaseReturnNote", (string)null); }); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ProductRecycleRequestDetail", b => + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.PurchaseReturnNoteDetail", b => { b.Property("Id") .HasColumnType("uniqueidentifier"); - b.Property("BomVersion") + 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)"); + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledLot"); - b.Property("CreationTime") - .HasColumnType("datetime2") - .HasColumnName("CreationTime"); + b.Property("HandledPackingCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledPackingCode"); - b.Property("CreatorId") - .HasColumnType("uniqueidentifier") - .HasColumnName("CreatorId"); + b.Property("HandledProduceDate") + .HasColumnType("datetime2"); - b.Property("ExtraProperties") - .HasColumnType("nvarchar(max)") - .HasColumnName("ExtraProperties"); + b.Property("HandledQty") + .HasColumnType("decimal(18,6)"); + + b.Property("HandledSupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledSupplierBatch"); b.Property("ItemCode") .IsRequired() @@ -12295,6 +16579,11 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("nvarchar(64)") .HasColumnName("LocationGroup"); + b.Property("Lot") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Lot"); + b.Property("MasterID") .HasColumnType("uniqueidentifier"); @@ -12304,30 +16593,90 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("nvarchar(64)") .HasColumnName("Number"); + b.Property("PackingCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("PackingCode"); + + b.Property("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("RawLocationArea") + b.Property("Reason") .HasMaxLength(64) .HasColumnType("nvarchar(64)"); - b.Property("RawLocationCode") + b.Property("RecommendArriveDate") + .HasColumnType("datetime2"); + + b.Property("RecommendContainerCode") .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendContainerCode"); - b.Property("RawLocationErpCode") + b.Property("RecommendExpireDate") + .HasColumnType("datetime2"); + + b.Property("RecommendFromLocationArea") .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendFromLocationArea"); - b.Property("RawLocationGroup") + b.Property("RecommendFromLocationCode") .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendFromLocationCode"); - b.Property("RawWarehouseCode") + b.Property("RecommendFromLocationErpCode") .HasMaxLength(64) - .HasColumnType("nvarchar(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) @@ -12339,6 +16688,14 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasMaxLength(64) .HasColumnType("nvarchar(64)"); + b.Property("StdPackQty") + .HasColumnType("decimal(18,6)"); + + b.Property("SupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("SupplierBatch"); + b.Property("TenantId") .HasColumnType("uniqueidentifier") .HasColumnName("TenantId"); @@ -12359,13 +16716,13 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.HasIndex("MasterID"); - b.HasIndex("Number", "ItemCode") + b.HasIndex("Number", "PackingCode") .IsUnique(); - b.ToTable("Store_ProductRecycleRequestDetail", (string)null); + b.ToTable("Store_PurchaseReturnNoteDetail", (string)null); }); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.PurchaseOrder", b => + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.PurchaseReturnRequest", b => { b.Property("Id") .HasColumnType("uniqueidentifier"); @@ -12373,24 +16730,28 @@ namespace Win_in.Sfs.Wms.Store.Migrations 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("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"); @@ -12399,18 +16760,13 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("CreatorId"); - b.Property("DueDate") - .HasColumnType("datetime2"); + b.Property("DirectCreateNote") + .HasColumnType("bit"); b.Property("ExtraProperties") .HasColumnType("nvarchar(max)") .HasColumnName("ExtraProperties"); - b.Property("IsConsignment") - .ValueGeneratedOnAdd() - .HasColumnType("bit") - .HasDefaultValue(false); - b.Property("LastModificationTime") .HasColumnType("datetime2") .HasColumnName("LastModificationTime"); @@ -12425,15 +16781,7 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("nvarchar(64)") .HasColumnName("Number"); - b.Property("OrderDate") - .HasColumnType("datetime2"); - - b.Property("OrderStatus") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("PoType") + b.Property("PoNumber") .HasMaxLength(64) .HasColumnType("nvarchar(64)"); @@ -12442,29 +16790,31 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("nvarchar(3072)") .HasColumnName("Remark"); - b.Property("SupplierAddress") - .HasColumnType("nvarchar(max)"); + b.Property("RequestStatus") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); - b.Property("SupplierCode") + b.Property("ReturnTime") + .HasColumnType("datetime2"); + + b.Property("ReturnType") + .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)"); - b.Property("SupplierName") - .HasColumnType("nvarchar(max)"); + b.Property("RpNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); - b.Property("TaxRate") - .ValueGeneratedOnAdd() - .HasColumnType("decimal(18,6)") - .HasDefaultValue(0m); + b.Property("SupplierCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); b.Property("TenantId") .HasColumnType("uniqueidentifier") .HasColumnName("TenantId"); - b.Property("Version") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - b.Property("Worker") .HasColumnType("nvarchar(max)"); @@ -12473,18 +16823,21 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.HasIndex("Number") .IsUnique(); - b.ToTable("Store_PurchaseOrder", (string)null); + b.ToTable("Store_PurchaseReturnRequest", (string)null); }); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.PurchaseOrderDetail", b => + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.PurchaseReturnRequestDetail", b => { b.Property("Id") .HasColumnType("uniqueidentifier"); - b.Property("ConvertRate") - .ValueGeneratedOnAdd() - .HasColumnType("decimal(18,6)") - .HasDefaultValue(1m); + b.Property("ArriveDate") + .HasColumnType("datetime2"); + + b.Property("ContainerCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ContainerCode"); b.Property("CreationTime") .HasColumnType("datetime2") @@ -12494,17 +16847,9 @@ namespace Win_in.Sfs.Wms.Store.Migrations .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) @@ -12534,17 +16879,32 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("LastModifierId"); - b.Property("LineStatus") + b.Property("LocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationArea"); + + b.Property("LocationCode") .IsRequired() .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationCode"); b.Property("LocationErpCode") + .IsRequired() .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationErpCode"); + + b.Property("LocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationGroup"); b.Property("Lot") - .HasColumnType("nvarchar(max)"); + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Lot"); b.Property("MasterID") .HasColumnType("uniqueidentifier"); @@ -12555,56 +16915,47 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("nvarchar(64)") .HasColumnName("Number"); - b.Property("OrderRemark") - .HasColumnType("nvarchar(max)"); - - b.Property("PlanArriveDate") - .HasColumnType("datetime2"); - - b.Property("PlanUserCode") - .HasColumnType("nvarchar(max)"); + b.Property("PackingCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("PackingCode"); b.Property("PoLine") .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("ProduceDate") - .HasColumnType("datetime2"); + .HasColumnType("nvarchar(64)") + .HasColumnName("PoLine"); - b.Property("ProjectCode") + b.Property("PoNumber") .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + .HasColumnType("nvarchar(64)") + .HasColumnName("PoNumber"); - b.Property("PutAwayQty") - .HasColumnType("decimal(18,6)"); + b.Property("ProduceDate") + .HasColumnType("datetime2"); 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("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("SupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("SupplierBatch"); b.Property("TenantId") .HasColumnType("uniqueidentifier") @@ -12616,18 +16967,23 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("nvarchar(64)") .HasColumnName("Uom"); + b.Property("WarehouseCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("WarehouseCode"); + b.HasKey("Id"); b.HasIndex("MasterID"); - b.HasIndex("ItemCode", "Number", "PoLine") - .IsUnique() - .HasFilter("[PoLine] IS NOT NULL"); + b.HasIndex("Number", "PackingCode") + .IsUnique(); - b.ToTable("Store_PurchaseOrderDetail", (string)null); + b.ToTable("Store_PurchaseReturnRequestDetail", (string)null); }); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.PurchaseReceiptJob", b => + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.PutawayJob", b => { b.Property("Id") .HasColumnType("uniqueidentifier"); @@ -12674,6 +17030,10 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("nvarchar(max)") .HasColumnName("ExtraProperties"); + b.Property("InspectNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + b.Property("IsAutoComplete") .ValueGeneratedOnAdd() .HasColumnType("bit") @@ -12706,9 +17066,6 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasMaxLength(64) .HasColumnType("nvarchar(64)"); - b.Property("PlanArriveDate") - .HasColumnType("datetime2"); - b.Property("PoNumber") .HasMaxLength(64) .HasColumnType("nvarchar(64)"); @@ -12723,10 +17080,23 @@ namespace Win_in.Sfs.Wms.Store.Migrations .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)") @@ -12736,15 +17106,7 @@ namespace Win_in.Sfs.Wms.Store.Migrations .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)"); @@ -12752,10 +17114,6 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("TenantId"); - b.Property("TimeWindow") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - b.Property("Type") .IsRequired() .HasMaxLength(64) @@ -12780,17 +17138,14 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.HasIndex("Number") .IsUnique(); - b.ToTable("Job_PurchaseReceiptJob", (string)null); + b.ToTable("Job_PutawayJob", (string)null); }); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.PurchaseReceiptJobDetail", b => + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.PutawayJobDetail", b => { b.Property("Id") .HasColumnType("uniqueidentifier"); - b.Property("ArriveDate") - .HasColumnType("datetime2"); - b.Property("CreationTime") .HasColumnType("datetime2") .HasColumnName("CreationTime"); @@ -12799,8 +17154,25 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("CreatorId"); - b.Property("FailedReason") - .HasColumnType("nvarchar(max)"); + 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"); @@ -12859,9 +17231,6 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("nvarchar(64)") .HasColumnName("HandledToWarehouseCode"); - b.Property("InspectPhotoJson") - .HasColumnType("nvarchar(max)"); - b.Property("ItemCode") .IsRequired() .HasMaxLength(64) @@ -12891,9 +17260,6 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("LastModifierId"); - b.Property("MassDefect") - .HasColumnType("nvarchar(max)"); - b.Property("MasterID") .HasColumnType("uniqueidentifier"); @@ -12910,10 +17276,10 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasMaxLength(64) .HasColumnType("nvarchar(64)"); - 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"); @@ -12985,27 +17351,24 @@ namespace Win_in.Sfs.Wms.Store.Migrations 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)"); + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Uom"); b.HasKey("Id"); b.HasIndex("MasterID"); - b.ToTable("Job_PurchaseReceiptJobDetail", (string)null); + b.ToTable("Job_PutawayJobDetail", (string)null); }); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.PurchaseReceiptNote", b => + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.PutawayNote", b => { b.Property("Id") .HasColumnType("uniqueidentifier"); @@ -13035,6 +17398,10 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("nvarchar(max)") .HasColumnName("ExtraProperties"); + b.Property("InspectNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + b.Property("JobNumber") .HasMaxLength(64) .HasColumnType("nvarchar(64)") @@ -13054,7 +17421,7 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("nvarchar(64)") .HasColumnName("Number"); - b.Property("PoNumber") + b.Property("ProductReceiptNumber") .HasMaxLength(64) .HasColumnType("nvarchar(64)"); @@ -13062,8 +17429,9 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasMaxLength(64) .HasColumnType("nvarchar(64)"); - b.Property("ReceiveTime") - .HasColumnType("datetime2"); + b.Property("ReceiptNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); b.Property("Remark") .HasMaxLength(3072) @@ -13074,22 +17442,10 @@ namespace Win_in.Sfs.Wms.Store.Migrations .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"); @@ -13099,9 +17455,6 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasMaxLength(64) .HasColumnType("nvarchar(64)"); - b.Property("WarehouseCode") - .HasColumnType("nvarchar(max)"); - b.Property("Worker") .HasColumnType("nvarchar(max)"); @@ -13110,12 +17463,10 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.HasIndex("Number") .IsUnique(); - b.HasIndex("SupplierCode"); - - b.ToTable("Store_PurchaseReceiptNote", (string)null); + b.ToTable("Store_PutawayNote", (string)null); }); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.PurchaseReceiptNoteDetail", b => + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.PutawayNoteDetail", b => { b.Property("Id") .HasColumnType("uniqueidentifier"); @@ -13123,11 +17474,6 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.Property("ArriveDate") .HasColumnType("datetime2"); - b.Property("ContainerCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ContainerCode"); - b.Property("CreationTime") .HasColumnType("datetime2") .HasColumnName("CreationTime"); @@ -13139,9 +17485,48 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.Property("ExpireDate") .HasColumnType("datetime2"); - b.Property("FailedReason") + 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"); @@ -13199,67 +17584,39 @@ namespace Win_in.Sfs.Wms.Store.Migrations .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() + + b.Property("ItemDesc1") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("LocationCode"); + .HasColumnName("ItemDesc1"); - b.Property("LocationErpCode") - .IsRequired() + b.Property("ItemDesc2") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("LocationErpCode"); + .HasColumnName("ItemDesc2"); - b.Property("LocationGroup") + b.Property("ItemName") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("LocationGroup"); + .HasColumnName("ItemName"); - b.Property("Lot") + b.Property("JobNumber") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("Lot"); + .HasColumnName("JobNumber"); - b.Property("MassDefect") - .HasColumnType("nvarchar(max)"); + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); b.Property("MasterID") .HasColumnType("uniqueidentifier"); @@ -13270,12 +17627,6 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("nvarchar(64)") .HasColumnName("Number"); - b.Property("PackingCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("PackingCode"); - b.Property("PoLine") .HasMaxLength(64) .HasColumnType("nvarchar(64)") @@ -13289,11 +17640,6 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.Property("ProduceDate") .HasColumnType("datetime2"); - b.Property("PurchaseReceiptInspectStatus") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - b.Property("Qty") .HasPrecision(18, 6) .HasColumnType("decimal(18,6)") @@ -13361,290 +17707,59 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("nvarchar(3072)") .HasColumnName("Remark"); - b.Property("Status") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - b.Property("StdPackQty") .HasColumnType("decimal(18,6)"); b.Property("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"); + .HasColumnName("SupplierBatch"); - b.Property("MasterID") - .HasColumnType("uniqueidentifier"); + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); - b.Property("Number") - .IsRequired() + b.Property("ToContainerCode") + .HasColumnType("nvarchar(max)"); + + b.Property("ToLocationArea") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("Number"); + .HasColumnName("ToLocationArea"); - b.Property("PackingCode") + b.Property("ToLocationCode") .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("PackingCode"); + .HasColumnName("ToLocationCode"); - b.Property("PoLine") + b.Property("ToLocationErpCode") + .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("PoLine"); + .HasColumnName("ToLocationErpCode"); - b.Property("PoNumber") + b.Property("ToLocationGroup") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("PoNumber"); - - b.Property("ProduceDate") - .HasColumnType("datetime2"); - - b.Property("Qty") - .HasPrecision(18, 6) - .HasColumnType("decimal(18,6)") - .HasColumnName("Qty"); + .HasColumnName("ToLocationGroup"); - b.Property("RecommendErpCode") + b.Property("ToLot") .HasColumnType("nvarchar(max)"); - b.Property("Remark") - .HasMaxLength(3072) - .HasColumnType("nvarchar(3072)") - .HasColumnName("Remark"); + b.Property("ToPackingCode") + .HasColumnType("nvarchar(450)"); - b.Property("StdPackQty") - .HasColumnType("decimal(18,6)"); + b.Property("ToStatus") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); - b.Property("SupplierBatch") + b.Property("ToWarehouseCode") + .IsRequired() .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"); + .HasColumnName("ToWarehouseCode"); b.Property("Uom") .IsRequired() @@ -13656,40 +17771,35 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.HasIndex("MasterID"); - b.HasIndex("Number", "PackingCode") - .IsUnique(); + b.HasIndex("Number", "FromPackingCode", "FromLocationCode", "ToLocationCode", "ToPackingCode") + .IsUnique() + .HasFilter("[FromPackingCode] IS NOT NULL AND [ToPackingCode] IS NOT NULL"); - b.ToTable("Store_PurchaseReceiptRequestDetail", (string)null); + b.ToTable("Store_PutawayNoteDetail", (string)null); }); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.PurchaseReturnJob", b => + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.PutawayRequest", b => { b.Property("Id") .HasColumnType("uniqueidentifier"); - b.Property("AcceptTime") + b.Property("ActiveDate") .HasColumnType("datetime2"); - b.Property("AcceptUserId") - .HasColumnType("uniqueidentifier"); - - b.Property("AcceptUserName") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - b.Property("AsnNumber") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + .HasColumnType("nvarchar(max)"); - b.Property("CompleteTime") - .HasColumnType("datetime2"); + b.Property("AutoAgree") + .HasColumnType("bit"); - b.Property("CompleteUserId") - .HasColumnType("uniqueidentifier"); + b.Property("AutoCompleteJob") + .HasColumnType("bit"); - b.Property("CompleteUserName") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + b.Property("AutoHandle") + .HasColumnType("bit"); + + b.Property("AutoSubmit") + .HasColumnType("bit"); b.Property("ConcurrencyStamp") .IsConcurrencyToken() @@ -13705,28 +17815,15 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("CreatorId"); + b.Property("DirectCreateNote") + .HasColumnType("bit"); + b.Property("ExtraProperties") .HasColumnType("nvarchar(max)") .HasColumnName("ExtraProperties"); - b.Property("IsAutoComplete") - .ValueGeneratedOnAdd() - .HasColumnType("bit") - .HasDefaultValue(false); - - b.Property("JobDescription") - .HasMaxLength(1024) - .HasColumnType("nvarchar(1024)"); - - b.Property("JobStatus") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("JobType") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + b.Property("InspectNumber") + .HasColumnType("nvarchar(max)"); b.Property("LastModificationTime") .HasColumnType("datetime2") @@ -13739,62 +17836,51 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.Property("Number") .IsRequired() .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); b.Property("PoNumber") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + .HasColumnType("nvarchar(max)"); - b.Property("Priority") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasDefaultValue(0); + b.Property("ProductReceiptNumber") + .HasColumnType("nvarchar(max)"); - b.Property("PriorityIncrement") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasDefaultValue(0); + b.Property("PurchaseReceiptRequestNumber") + .HasColumnType("nvarchar(max)"); - b.Property("PurchaseReturnRequestNumber") + 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("ReturnReason") + b.Property("RequestNumber") .HasColumnType("nvarchar(max)"); - b.Property("ReturnTime") - .HasColumnType("datetime2"); - - b.Property("ReturnType") + b.Property("RequestStatus") .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)"); b.Property("RpNumber") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + .HasColumnType("nvarchar(max)"); b.Property("SupplierCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + .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") + b.Property("Type") + .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)"); @@ -13806,14 +17892,17 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.HasIndex("Number") .IsUnique(); - b.ToTable("Job_PurchaseReturnJob", (string)null); + b.ToTable("Store_PutawayRequest", (string)null); }); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.PurchaseReturnJobDetail", b => + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.PutawayRequestDetail", b => { b.Property("Id") .HasColumnType("uniqueidentifier"); + b.Property("ArriveDate") + .HasColumnType("datetime2"); + b.Property("CreationTime") .HasColumnType("datetime2") .HasColumnName("CreationTime"); @@ -13822,63 +17911,54 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("CreatorId"); - b.Property("HandledArriveDate") + b.Property("ExpireDate") .HasColumnType("datetime2"); - b.Property("HandledContainerCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("HandledContainerCode"); - - b.Property("HandledExpireDate") - .HasColumnType("datetime2"); + b.Property("FromContainerCode") + .HasColumnType("nvarchar(max)"); - b.Property("HandledFromLocationArea") + b.Property("FromLocationArea") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("HandledFromLocationArea"); + .HasColumnName("FromLocationArea"); - b.Property("HandledFromLocationCode") + b.Property("FromLocationCode") + .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("HandledFromLocationCode"); + .HasColumnName("FromLocationCode"); - b.Property("HandledFromLocationErpCode") + b.Property("FromLocationErpCode") + .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("HandledFromLocationErpCode"); + .HasColumnName("FromLocationErpCode"); - b.Property("HandledFromLocationGroup") + b.Property("FromLocationGroup") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("HandledFromLocationGroup"); + .HasColumnName("FromLocationGroup"); - b.Property("HandledFromWarehouseCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("HandledFromWarehouseCode"); + b.Property("FromLot") + .HasColumnType("nvarchar(max)"); - b.Property("HandledLot") + b.Property("FromPackingCode") + .HasColumnType("nvarchar(max)"); + + b.Property("FromStatus") + .IsRequired() .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("HandledLot"); + .HasColumnType("nvarchar(64)"); - b.Property("HandledPackingCode") + b.Property("FromWarehouseCode") + .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("HandledPackingCode"); - - b.Property("HandledProduceDate") - .HasColumnType("datetime2"); + .HasColumnName("FromWarehouseCode"); - b.Property("HandledQty") + b.Property("InventoryQty") .HasColumnType("decimal(18,6)"); - b.Property("HandledSupplierBatch") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("HandledSupplierBatch"); - b.Property("ItemCode") .IsRequired() .HasMaxLength(64) @@ -13914,104 +17994,100 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.Property("Number") .IsRequired() .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); b.Property("PoLine") .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + .HasColumnType("nvarchar(64)") + .HasColumnName("PoLine"); b.Property("PoNumber") .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("Reason") - .HasColumnType("nvarchar(max)"); + .HasColumnType("nvarchar(64)") + .HasColumnName("PoNumber"); - b.Property("RecommendArriveDate") + b.Property("ProduceDate") .HasColumnType("datetime2"); - b.Property("RecommendContainerCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendContainerCode"); + b.Property("Qty") + .HasPrecision(18, 6) + .HasColumnType("decimal(18,6)") + .HasColumnName("Qty"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); - b.Property("RecommendExpireDate") - .HasColumnType("datetime2"); + b.Property("StdPackQty") + .HasColumnType("decimal(18,6)"); - b.Property("RecommendFromLocationArea") + b.Property("SupplierBatch") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendFromLocationArea"); + .HasColumnName("SupplierBatch"); - b.Property("RecommendFromLocationCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendFromLocationCode"); + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); - b.Property("RecommendFromLocationErpCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendFromLocationErpCode"); + b.Property("ToContainerCode") + .HasColumnType("nvarchar(max)"); - b.Property("RecommendFromLocationGroup") + b.Property("ToLocationArea") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendFromLocationGroup"); + .HasColumnName("ToLocationArea"); - b.Property("RecommendFromWarehouseCode") + b.Property("ToLocationCode") + .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendFromWarehouseCode"); + .HasColumnName("ToLocationCode"); - b.Property("RecommendLot") + b.Property("ToLocationErpCode") + .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendLot"); + .HasColumnName("ToLocationErpCode"); - b.Property("RecommendPackingCode") + b.Property("ToLocationGroup") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendPackingCode"); - - b.Property("RecommendProduceDate") - .HasColumnType("datetime2"); - - b.Property("RecommendQty") - .HasColumnType("decimal(18,6)"); + .HasColumnName("ToLocationGroup"); - b.Property("RecommendSupplierBatch") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendSupplierBatch"); + b.Property("ToLot") + .HasColumnType("nvarchar(max)"); - b.Property("Remark") - .HasMaxLength(3072) - .HasColumnType("nvarchar(3072)") - .HasColumnName("Remark"); + b.Property("ToPackingCode") + .HasColumnType("nvarchar(max)"); - b.Property("Status") + b.Property("ToStatus") .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)"); - b.Property("StdPackQty") - .HasColumnType("decimal(18,6)"); - - b.Property("TenantId") - .HasColumnType("uniqueidentifier") - .HasColumnName("TenantId"); + b.Property("ToWarehouseCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToWarehouseCode"); b.Property("Uom") - .HasColumnType("nvarchar(max)"); + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Uom"); b.HasKey("Id"); b.HasIndex("MasterID"); - b.ToTable("Job_PurchaseReturnJobDetail", (string)null); + b.ToTable("Store_PutawayRequestDetail", (string)null); }); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.PurchaseReturnNote", b => + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ReceiptAbnormalNote", b => { b.Property("Id") .HasColumnType("uniqueidentifier"); @@ -14020,6 +18096,7 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("datetime2"); b.Property("AsnNumber") + .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)"); @@ -14041,11 +18118,6 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("nvarchar(max)") .HasColumnName("ExtraProperties"); - b.Property("JobNumber") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("JobNumber"); - b.Property("LastModificationTime") .HasColumnType("datetime2") .HasColumnName("LastModificationTime"); @@ -14060,11 +18132,8 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("nvarchar(64)") .HasColumnName("Number"); - b.Property("PoNumber") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("PurchaseReturnRequestNumber") + b.Property("ReceiptNumber") + .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)"); @@ -14073,27 +18142,8 @@ namespace Win_in.Sfs.Wms.Store.Migrations .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") + .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)"); @@ -14106,17 +18156,24 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.HasKey("Id"); - b.HasIndex("Number") + b.HasIndex("SupplierCode"); + + b.HasIndex("AsnNumber", "Number", "SupplierCode", "ReceiptNumber") .IsUnique(); - b.ToTable("Store_PurchaseReturnNote", (string)null); + b.ToTable("Store_ReceiptAbnormalNote", (string)null); }); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.PurchaseReturnNoteDetail", b => + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ReceiptAbnormalNoteDetail", b => { b.Property("Id") .HasColumnType("uniqueidentifier"); + b.Property("AbnormalType") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + b.Property("ArriveDate") .HasColumnType("datetime2"); @@ -14136,63 +18193,6 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.Property("ExpireDate") .HasColumnType("datetime2"); - b.Property("HandledArriveDate") - .HasColumnType("datetime2"); - - b.Property("HandledContainerCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("HandledContainerCode"); - - b.Property("HandledExpireDate") - .HasColumnType("datetime2"); - - b.Property("HandledFromLocationArea") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("HandledFromLocationArea"); - - b.Property("HandledFromLocationCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("HandledFromLocationCode"); - - b.Property("HandledFromLocationErpCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("HandledFromLocationErpCode"); - - b.Property("HandledFromLocationGroup") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("HandledFromLocationGroup"); - - b.Property("HandledFromWarehouseCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("HandledFromWarehouseCode"); - - b.Property("HandledLot") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("HandledLot"); - - b.Property("HandledPackingCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("HandledPackingCode"); - - b.Property("HandledProduceDate") - .HasColumnType("datetime2"); - - b.Property("HandledQty") - .HasColumnType("decimal(18,6)"); - - b.Property("HandledSupplierBatch") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("HandledSupplierBatch"); - b.Property("ItemCode") .IsRequired() .HasMaxLength(64) @@ -14252,96 +18252,33 @@ namespace Win_in.Sfs.Wms.Store.Migrations 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") + b.Property("Number") + .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendFromWarehouseCode"); + .HasColumnName("Number"); - b.Property("RecommendLot") + b.Property("PackingCode") + .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendLot"); + .HasColumnName("PackingCode"); - b.Property("RecommendPackingCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendPackingCode"); + b.Property("Photos") + .HasColumnType("nvarchar(max)"); - b.Property("RecommendProduceDate") + b.Property("ProduceDate") .HasColumnType("datetime2"); - b.Property("RecommendQty") - .HasColumnType("decimal(18,6)"); + b.Property("Qty") + .HasPrecision(18, 6) + .HasColumnType("decimal(18,6)") + .HasColumnName("Qty"); - b.Property("RecommendSupplierBatch") + b.Property("ReceiptNumber") + .IsRequired() .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendSupplierBatch"); + .HasColumnType("nvarchar(64)"); b.Property("Remark") .HasMaxLength(3072) @@ -14381,13 +18318,13 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.HasIndex("MasterID"); - b.HasIndex("Number", "PackingCode") + b.HasIndex("Number", "PackingCode", "ReceiptNumber") .IsUnique(); - b.ToTable("Store_PurchaseReturnNoteDetail", (string)null); + b.ToTable("Store_ReceiptAbnormalNoteDetail", (string)null); }); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.PurchaseReturnRequest", b => + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.RecycledMaterialReceiptNote", b => { b.Property("Id") .HasColumnType("uniqueidentifier"); @@ -14395,22 +18332,6 @@ namespace Win_in.Sfs.Wms.Store.Migrations 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) @@ -14425,9 +18346,6 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("CreatorId"); - b.Property("DirectCreateNote") - .HasColumnType("bit"); - b.Property("ExtraProperties") .HasColumnType("nvarchar(max)") .HasColumnName("ExtraProperties"); @@ -14446,36 +18364,11 @@ namespace Win_in.Sfs.Wms.Store.Migrations .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"); @@ -14488,10 +18381,10 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.HasIndex("Number") .IsUnique(); - b.ToTable("Store_PurchaseReturnRequest", (string)null); + b.ToTable("Store_RecycledMaterialReceiptNote", (string)null); }); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.PurchaseReturnRequestDetail", b => + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.RecycledMaterialReceiptNoteDetail", b => { b.Property("Id") .HasColumnType("uniqueidentifier"); @@ -14586,16 +18479,6 @@ namespace Win_in.Sfs.Wms.Store.Migrations .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"); @@ -14604,6 +18487,9 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("decimal(18,6)") .HasColumnName("Qty"); + b.Property("ReasonCode") + .HasColumnType("nvarchar(max)"); + b.Property("Remark") .HasMaxLength(3072) .HasColumnType("nvarchar(3072)") @@ -14645,44 +18531,35 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.HasIndex("Number", "PackingCode") .IsUnique(); - b.ToTable("Store_PurchaseReturnRequestDetail", (string)null); + b.ToTable("Store_RecycledMaterialReceiptNoteDetail", (string)null); }); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.PutawayJob", b => + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.SaleOrder", b => { b.Property("Id") .HasColumnType("uniqueidentifier"); - b.Property("AcceptTime") + b.Property("ActiveDate") .HasColumnType("datetime2"); - b.Property("AcceptUserId") - .HasColumnType("uniqueidentifier"); + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); - b.Property("AcceptUserName") + b.Property("ContactEmail") .HasMaxLength(64) .HasColumnType("nvarchar(64)"); - b.Property("AsnNumber") + b.Property("ContactName") .HasMaxLength(64) .HasColumnType("nvarchar(64)"); - b.Property("CompleteTime") - .HasColumnType("datetime2"); - - b.Property("CompleteUserId") - .HasColumnType("uniqueidentifier"); - - b.Property("CompleteUserName") + b.Property("ContactPhone") .HasMaxLength(64) .HasColumnType("nvarchar(64)"); - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("nvarchar(40)") - .HasColumnName("ConcurrencyStamp"); - b.Property("CreationTime") .HasColumnType("datetime2") .HasColumnName("CreationTime"); @@ -14691,32 +18568,16 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("CreatorId"); - b.Property("ExtraProperties") - .HasColumnType("nvarchar(max)") - .HasColumnName("ExtraProperties"); - - b.Property("InspectNumber") + b.Property("CustomerCode") .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("DueDate") + .HasColumnType("datetime2"); - b.Property("JobType") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); b.Property("LastModificationTime") .HasColumnType("datetime2") @@ -14729,172 +18590,75 @@ namespace Win_in.Sfs.Wms.Store.Migrations 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)"); + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); - b.Property("ReceiptNumber") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + b.Property("OrderDate") + .HasColumnType("datetime2"); 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)"); + .HasColumnName("Remark"); - b.Property("FromLocationGroup") + b.Property("SoStatus") + .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)"); - b.Property("FromWarehouseCode") + b.Property("SoType") .HasMaxLength(64) .HasColumnType("nvarchar(64)"); - b.Property("HandledArriveDate") - .HasColumnType("datetime2"); + b.Property("TaxRate") + .ValueGeneratedOnAdd() + .HasColumnType("decimal(18,6)") + .HasDefaultValue(0m); - b.Property("HandledContainerCode") + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Version") .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("HandledContainerCode"); + .HasColumnType("nvarchar(64)"); - b.Property("HandledExpireDate") - .HasColumnType("datetime2"); + b.Property("Worker") + .HasColumnType("nvarchar(max)"); - b.Property("HandledLot") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("HandledLot"); + b.HasKey("Id"); - b.Property("HandledPackingCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("HandledPackingCode"); + b.HasIndex("CustomerCode"); - b.Property("HandledProduceDate") - .HasColumnType("datetime2"); + b.HasIndex("Number") + .IsUnique(); - b.Property("HandledQty") - .HasColumnType("decimal(18,6)"); + b.ToTable("Store_SaleOrder", (string)null); + }); - b.Property("HandledSupplierBatch") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("HandledSupplierBatch"); + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.SaleOrderDetail", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); - b.Property("HandledToLocationArea") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("HandledToLocationArea"); + b.Property("ConvertRate") + .ValueGeneratedOnAdd() + .HasColumnType("decimal(18,6)") + .HasDefaultValue(1m); - b.Property("HandledToLocationCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("HandledToLocationCode"); + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); - b.Property("HandledToLocationErpCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("HandledToLocationErpCode"); + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); - b.Property("HandledToLocationGroup") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("HandledToLocationGroup"); + b.Property("CustomerPackQty") + .HasColumnType("decimal(18,6)"); - b.Property("HandledToWarehouseCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("HandledToWarehouseCode"); + b.Property("CustomerPackUom") + .HasColumnType("nvarchar(max)"); b.Property("ItemCode") .IsRequired() @@ -14925,90 +18689,31 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("LastModifierId"); - b.Property("MasterID") - .HasColumnType("uniqueidentifier"); - - b.Property("Number") + b.Property("LineStatus") .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)"); - b.Property("PoLine") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + b.Property("MasterID") + .HasColumnType("uniqueidentifier"); - b.Property("PoNumber") + b.Property("Number") + .IsRequired() .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); 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") + b.Property("SoLine") .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)"); @@ -15030,10 +18735,13 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.HasIndex("MasterID"); - b.ToTable("Job_PutawayJobDetail", (string)null); + b.HasIndex("Number", "SoLine", "ItemCode") + .IsUnique(); + + b.ToTable("Store_SaleOrderDetail", (string)null); }); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.PutawayNote", b => + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ScrapNote", b => { b.Property("Id") .HasColumnType("uniqueidentifier"); @@ -15041,10 +18749,6 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.Property("ActiveDate") .HasColumnType("datetime2"); - b.Property("AsnNumber") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - b.Property("ConcurrencyStamp") .IsConcurrencyToken() .HasMaxLength(40) @@ -15063,10 +18767,6 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("nvarchar(max)") .HasColumnName("ExtraProperties"); - b.Property("InspectNumber") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - b.Property("JobNumber") .HasMaxLength(64) .HasColumnType("nvarchar(64)") @@ -15086,28 +18786,12 @@ namespace Win_in.Sfs.Wms.Store.Migrations .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") + b.Property("ScrapRequestNumber") .HasMaxLength(64) .HasColumnType("nvarchar(64)"); @@ -15116,7 +18800,6 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnName("TenantId"); b.Property("Type") - .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)"); @@ -15128,10 +18811,10 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.HasIndex("Number") .IsUnique(); - b.ToTable("Store_PutawayNote", (string)null); + b.ToTable("Store_ScrapNote", (string)null); }); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.PutawayNoteDetail", b => + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ScrapNoteDetail", b => { b.Property("Id") .HasColumnType("uniqueidentifier"); @@ -15176,78 +18859,22 @@ namespace Win_in.Sfs.Wms.Store.Migrations .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") + b.Property("FromPackingCode") .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("HandledToLocationErpCode"); + .HasColumnType("nvarchar(64)"); - b.Property("HandledToLocationGroup") + b.Property("FromStatus") + .IsRequired() .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("HandledToLocationGroup"); + .HasColumnType("nvarchar(64)"); - b.Property("HandledToWarehouseCode") + b.Property("FromWarehouseCode") + .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("HandledToWarehouseCode"); + .HasColumnName("FromWarehouseCode"); b.Property("ItemCode") .IsRequired() @@ -15270,11 +18897,6 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("nvarchar(64)") .HasColumnName("ItemName"); - b.Property("JobNumber") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("JobNumber"); - b.Property("LastModificationTime") .HasColumnType("datetime2") .HasColumnName("LastModificationTime"); @@ -15292,16 +18914,6 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("nvarchar(64)") .HasColumnName("Number"); - b.Property("PoLine") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("PoLine"); - - b.Property("PoNumber") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("PoNumber"); - b.Property("ProduceDate") .HasColumnType("datetime2"); @@ -15310,140 +18922,287 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("decimal(18,6)") .HasColumnName("Qty"); - b.Property("RecommendArriveDate") - .HasColumnType("datetime2"); + b.Property("ReasonCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); - b.Property("RecommendContainerCode") + 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("RecommendContainerCode"); + .HasColumnName("SupplierBatch"); - b.Property("RecommendExpireDate") - .HasColumnType("datetime2"); + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); - b.Property("RecommendLot") + b.Property("ToContainerCode") + .HasColumnType("nvarchar(max)"); + + b.Property("ToLocationArea") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendLot"); + .HasColumnName("ToLocationArea"); - b.Property("RecommendPackingCode") + b.Property("ToLocationCode") + .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendPackingCode"); - - b.Property("RecommendProduceDate") - .HasColumnType("datetime2"); - - b.Property("RecommendQty") - .HasColumnType("decimal(18,6)"); + .HasColumnName("ToLocationCode"); - b.Property("RecommendSupplierBatch") + b.Property("ToLocationErpCode") + .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendSupplierBatch"); + .HasColumnName("ToLocationErpCode"); - b.Property("RecommendToLocationArea") + b.Property("ToLocationGroup") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendToLocationArea"); + .HasColumnName("ToLocationGroup"); - b.Property("RecommendToLocationCode") + b.Property("ToLot") + .HasColumnType("nvarchar(max)"); + + b.Property("ToPackingCode") + .HasColumnType("nvarchar(max)"); + + b.Property("ToStatus") + .IsRequired() .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendToLocationCode"); + .HasColumnType("nvarchar(64)"); - b.Property("RecommendToLocationErpCode") + b.Property("ToWarehouseCode") + .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendToLocationErpCode"); + .HasColumnName("ToWarehouseCode"); - b.Property("RecommendToLocationGroup") + b.Property("Uom") + .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendToLocationGroup"); + .HasColumnName("Uom"); - b.Property("RecommendToWarehouseCode") + 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("RecommendToWarehouseCode"); + .HasColumnName("Number"); b.Property("Remark") .HasMaxLength(3072) .HasColumnType("nvarchar(3072)") .HasColumnName("Remark"); - b.Property("StdPackQty") - .HasColumnType("decimal(18,6)"); - - b.Property("SupplierBatch") + b.Property("RequestStatus") + .IsRequired() .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("SupplierBatch"); + .HasColumnType("nvarchar(64)"); b.Property("TenantId") .HasColumnType("uniqueidentifier") .HasColumnName("TenantId"); - b.Property("ToContainerCode") + b.Property("Type") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Worker") .HasColumnType("nvarchar(max)"); - b.Property("ToLocationArea") + 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("ToLocationArea"); + .HasColumnName("ItemCode"); - b.Property("ToLocationCode") + 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("ToLocationCode"); + .HasColumnName("LocationCode"); - b.Property("ToLocationErpCode") + b.Property("LocationErpCode") .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("ToLocationErpCode"); + .HasColumnName("LocationErpCode"); - b.Property("ToLocationGroup") + b.Property("LocationGroup") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("ToLocationGroup"); + .HasColumnName("LocationGroup"); - b.Property("ToLot") - .HasColumnType("nvarchar(max)"); + b.Property("MasterID") + .HasColumnType("uniqueidentifier"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); - b.Property("ToPackingCode") - .HasColumnType("nvarchar(450)"); + b.Property("Qty") + .HasPrecision(18, 6) + .HasColumnType("decimal(18,6)") + .HasColumnName("Qty"); - b.Property("ToStatus") - .IsRequired() + b.Property("ReasonCode") .HasMaxLength(64) .HasColumnType("nvarchar(64)"); - b.Property("ToWarehouseCode") + 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("ToWarehouseCode"); + .HasColumnName("Uom"); - b.Property("Uom") + b.Property("WarehouseCode") .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("Uom"); + .HasColumnName("WarehouseCode"); b.HasKey("Id"); b.HasIndex("MasterID"); - b.HasIndex("Number", "FromPackingCode", "FromLocationCode", "ToLocationCode", "ToPackingCode") - .IsUnique() - .HasFilter("[FromPackingCode] IS NOT NULL AND [ToPackingCode] IS NOT NULL"); + b.HasIndex("Number", "ItemCode", "LocationCode") + .IsUnique(); - b.ToTable("Store_PutawayNoteDetail", (string)null); + b.ToTable("Store_ScrapRequestDetail", (string)null); }); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.PutawayRequest", b => + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.SupplierAsn", b => { b.Property("Id") .HasColumnType("uniqueidentifier"); @@ -15451,27 +19210,29 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.Property("ActiveDate") .HasColumnType("datetime2"); - b.Property("AsnNumber") - .HasColumnType("nvarchar(max)"); - - b.Property("AutoAgree") - .HasColumnType("bit"); - - b.Property("AutoCompleteJob") - .HasColumnType("bit"); - - b.Property("AutoHandle") - .HasColumnType("bit"); - - b.Property("AutoSubmit") - .HasColumnType("bit"); - b.Property("ConcurrencyStamp") .IsConcurrencyToken() .HasMaxLength(40) .HasColumnType("nvarchar(40)") .HasColumnName("ConcurrencyStamp"); + b.Property("ContactEmail") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ContactName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ContactPhone") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("CreateType") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + b.Property("CreationTime") .HasColumnType("datetime2") .HasColumnName("CreationTime"); @@ -15480,16 +19241,21 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("CreatorId"); - b.Property("DirectCreateNote") - .HasColumnType("bit"); + 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("InspectNumber") - .HasColumnType("nvarchar(max)"); - b.Property("LastModificationTime") .HasColumnType("datetime2") .HasColumnName("LastModificationTime"); @@ -15504,48 +19270,54 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("nvarchar(64)") .HasColumnName("Number"); - b.Property("PoNumber") - .HasColumnType("nvarchar(max)"); - - b.Property("ProductReceiptNumber") - .HasColumnType("nvarchar(max)"); + b.Property("PlanArriveDate") + .HasColumnType("datetime2"); - b.Property("PurchaseReceiptRequestNumber") + b.Property("PlanUserCode") .HasColumnType("nvarchar(max)"); - b.Property("PutawayMode") - .IsRequired() + b.Property("PoNumber") .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("RpNumber") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); - b.Property("RequestStatus") + b.Property("ShipDate") + .HasColumnType("datetime2"); + + b.Property("Status") .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)"); - b.Property("RpNumber") + 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() + b.Property("TimeWindow") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("TruckNumber") .HasMaxLength(64) .HasColumnType("nvarchar(64)"); @@ -15557,10 +19329,12 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.HasIndex("Number") .IsUnique(); - b.ToTable("Store_PutawayRequest", (string)null); + b.HasIndex("SupplierCode"); + + b.ToTable("Store_SupplierAsn", (string)null); }); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.PutawayRequestDetail", b => + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.SupplierAsnDetail", b => { b.Property("Id") .HasColumnType("uniqueidentifier"); @@ -15568,6 +19342,14 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.Property("ArriveDate") .HasColumnType("datetime2"); + b.Property("ContainerCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ContainerCode"); + + b.Property("ConvertRate") + .HasColumnType("decimal(18,6)"); + b.Property("CreationTime") .HasColumnType("datetime2") .HasColumnName("CreationTime"); @@ -15576,53 +19358,11 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("CreatorId"); - b.Property("ExpireDate") - .HasColumnType("datetime2"); - - b.Property("FromContainerCode") - .HasColumnType("nvarchar(max)"); - - b.Property("FromLocationArea") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("FromLocationArea"); - - b.Property("FromLocationCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("FromLocationCode"); - - b.Property("FromLocationErpCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("FromLocationErpCode"); - - b.Property("FromLocationGroup") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("FromLocationGroup"); - - b.Property("FromLot") - .HasColumnType("nvarchar(max)"); - - b.Property("FromPackingCode") + b.Property("Ctype") .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("ExpireDate") + .HasColumnType("datetime2"); b.Property("ItemCode") .IsRequired() @@ -15653,6 +19393,11 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("LastModifierId"); + b.Property("Lot") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Lot"); + b.Property("MasterID") .HasColumnType("uniqueidentifier"); @@ -15662,6 +19407,15 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("nvarchar(64)") .HasColumnName("Number"); + b.Property("PackingCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("PackingCode"); + + b.Property("PlanUserCode") + .HasColumnType("nvarchar(max)"); + b.Property("PoLine") .HasMaxLength(64) .HasColumnType("nvarchar(64)") @@ -15675,11 +19429,17 @@ namespace Win_in.Sfs.Wms.Store.Migrations 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)") @@ -15693,51 +19453,15 @@ namespace Win_in.Sfs.Wms.Store.Migrations .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("SupplierPackQty") + .HasColumnType("decimal(18,6)"); - b.Property("ToPackingCode") + b.Property("SupplierPackUom") .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("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); b.Property("Uom") .IsRequired() @@ -15749,19 +19473,34 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.HasIndex("MasterID"); - b.ToTable("Store_PutawayRequestDetail", (string)null); + b.HasIndex("Number", "ItemCode", "PackingCode") + .IsUnique(); + + b.ToTable("Store_SupplierAsnDetail", (string)null); }); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ReceiptAbnormalNote", b => + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.TransferLibJob", b => { b.Property("Id") .HasColumnType("uniqueidentifier"); - b.Property("ActiveDate") + b.Property("AcceptTime") .HasColumnType("datetime2"); - b.Property("AsnNumber") - .IsRequired() + 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)"); @@ -15771,6 +19510,12 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("nvarchar(40)") .HasColumnName("ConcurrencyStamp"); + b.Property("ConfirmTime") + .HasColumnType("datetime2"); + + b.Property("Confirmed") + .HasColumnType("bit"); + b.Property("CreationTime") .HasColumnType("datetime2") .HasColumnName("CreationTime"); @@ -15783,6 +19528,28 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("nvarchar(max)") .HasColumnName("ExtraProperties"); + b.Property("IsAutoComplete") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false); + + b.Property("JobDescription") + .HasMaxLength(1024) + .HasColumnType("nvarchar(1024)"); + + b.Property("JobNumber") + .HasColumnType("nvarchar(max)"); + + b.Property("JobStatus") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("JobType") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + b.Property("LastModificationTime") .HasColumnType("datetime2") .HasColumnName("LastModificationTime"); @@ -15792,61 +19559,69 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnName("LastModifierId"); b.Property("Number") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("Number"); - - b.Property("ReceiptNumber") .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("SupplierCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + b.Property("RequestNumber") + .HasColumnType("nvarchar(max)"); b.Property("TenantId") .HasColumnType("uniqueidentifier") .HasColumnName("TenantId"); + b.Property("Type") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("UpStreamJobNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("UseOnTheWayLocation") + .HasColumnType("bit"); + + b.Property("WarehouseCode") + .HasColumnType("nvarchar(max)"); + + b.Property("WorkGroupCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + b.Property("Worker") .HasColumnType("nvarchar(max)"); b.HasKey("Id"); - b.HasIndex("SupplierCode"); - - b.HasIndex("AsnNumber", "Number", "SupplierCode", "ReceiptNumber") + b.HasIndex("Number") .IsUnique(); - b.ToTable("Store_ReceiptAbnormalNote", (string)null); + b.ToTable("Job_TransferLibJob", (string)null); }); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ReceiptAbnormalNoteDetail", b => + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.TransferLibJobDetail", 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"); @@ -15858,78 +19633,85 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.Property("ExpireDate") .HasColumnType("datetime2"); - b.Property("ItemCode") - .IsRequired() + b.Property("FromContainerCode") + .HasColumnType("nvarchar(max)"); + + b.Property("FromLocationArea") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("ItemCode"); + .HasColumnName("FromLocationArea"); - b.Property("ItemDesc1") + b.Property("FromLocationCode") + .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("ItemDesc1"); + .HasColumnName("FromLocationCode"); - b.Property("ItemDesc2") + b.Property("FromLocationErpCode") + .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("ItemDesc2"); + .HasColumnName("FromLocationErpCode"); - b.Property("ItemName") + b.Property("FromLocationGroup") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("ItemName"); + .HasColumnName("FromLocationGroup"); - b.Property("LastModificationTime") - .HasColumnType("datetime2") - .HasColumnName("LastModificationTime"); + b.Property("FromLot") + .HasColumnType("nvarchar(max)"); - b.Property("LastModifierId") - .HasColumnType("uniqueidentifier") - .HasColumnName("LastModifierId"); + b.Property("FromPackingCode") + .HasColumnType("nvarchar(max)"); - b.Property("LocationArea") + b.Property("FromStatus") + .HasColumnType("int"); + + b.Property("FromWarehouseCode") + .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("LocationArea"); + .HasColumnName("FromWarehouseCode"); - b.Property("LocationCode") + b.Property("ItemCode") .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("LocationCode"); + .HasColumnName("ItemCode"); - b.Property("LocationErpCode") - .IsRequired() + b.Property("ItemDesc1") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("LocationErpCode"); + .HasColumnName("ItemDesc1"); - b.Property("LocationGroup") + b.Property("ItemDesc2") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("LocationGroup"); + .HasColumnName("ItemDesc2"); - b.Property("Lot") + b.Property("ItemName") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("Lot"); + .HasColumnName("ItemName"); + + b.Property("JobStatus") + .HasColumnType("int"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); b.Property("MasterID") .HasColumnType("uniqueidentifier"); b.Property("Number") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("Number"); - - b.Property("PackingCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("PackingCode"); + .HasColumnType("nvarchar(max)"); - b.Property("Photos") + b.Property("OnTheWayLocationCode") .HasColumnType("nvarchar(max)"); b.Property("ProduceDate") @@ -15940,21 +19722,14 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("decimal(18,6)") .HasColumnName("Qty"); - b.Property("ReceiptNumber") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + b.Property("Reason") + .HasColumnType("nvarchar(max)"); b.Property("Remark") .HasMaxLength(3072) .HasColumnType("nvarchar(3072)") .HasColumnName("Remark"); - b.Property("Status") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - b.Property("StdPackQty") .HasColumnType("decimal(18,6)"); @@ -15967,29 +19742,60 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("TenantId"); - b.Property("Uom") + b.Property("ToContainerCode") + .HasColumnType("nvarchar(max)"); + + b.Property("ToLocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToLocationArea"); + + b.Property("ToLocationCode") .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("Uom"); + .HasColumnName("ToLocationCode"); - b.Property("WarehouseCode") + b.Property("ToLocationErpCode") .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("WarehouseCode"); + .HasColumnName("ToLocationErpCode"); + + b.Property("ToLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToLocationGroup"); + + b.Property("ToLot") + .HasColumnType("nvarchar(max)"); + + b.Property("ToPackingCode") + .HasColumnType("nvarchar(max)"); + + b.Property("ToStatus") + .HasColumnType("int"); + + b.Property("ToWarehouseCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToWarehouseCode"); + + b.Property("Uom") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Uom"); b.HasKey("Id"); b.HasIndex("MasterID"); - b.HasIndex("Number", "PackingCode", "ReceiptNumber") - .IsUnique(); - - b.ToTable("Store_ReceiptAbnormalNoteDetail", (string)null); + b.ToTable("Job_TransferLibJobDetail", (string)null); }); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.RecycledMaterialReceiptNote", b => + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.TransferLibNote", b => { b.Property("Id") .HasColumnType("uniqueidentifier"); @@ -16003,6 +19809,12 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("nvarchar(40)") .HasColumnName("ConcurrencyStamp"); + b.Property("ConfirmTime") + .HasColumnType("datetime2"); + + b.Property("Confirmed") + .HasColumnType("bit"); + b.Property("CreationTime") .HasColumnType("datetime2") .HasColumnName("CreationTime"); @@ -16015,6 +19827,11 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("nvarchar(max)") .HasColumnName("ExtraProperties"); + b.Property("JobNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("JobNumber"); + b.Property("LastModificationTime") .HasColumnType("datetime2") .HasColumnName("LastModificationTime"); @@ -16034,10 +19851,21 @@ namespace Win_in.Sfs.Wms.Store.Migrations .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)"); @@ -16046,10 +19874,10 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.HasIndex("Number") .IsUnique(); - b.ToTable("Store_RecycledMaterialReceiptNote", (string)null); + b.ToTable("Store_TransferLibNote", (string)null); }); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.RecycledMaterialReceiptNoteDetail", b => + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.TransferLibNoteDetail", b => { b.Property("Id") .HasColumnType("uniqueidentifier"); @@ -16057,11 +19885,6 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.Property("ArriveDate") .HasColumnType("datetime2"); - b.Property("ContainerCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ContainerCode"); - b.Property("CreationTime") .HasColumnType("datetime2") .HasColumnName("CreationTime"); @@ -16073,61 +19896,79 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.Property("ExpireDate") .HasColumnType("datetime2"); - b.Property("ItemCode") - .IsRequired() + b.Property("FromContainerCode") + .HasColumnType("nvarchar(max)"); + + b.Property("FromLocationArea") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("ItemCode"); + .HasColumnName("FromLocationArea"); - b.Property("ItemDesc1") + b.Property("FromLocationCode") + .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("ItemDesc1"); + .HasColumnName("FromLocationCode"); - b.Property("ItemDesc2") + b.Property("FromLocationErpCode") + .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("ItemDesc2"); + .HasColumnName("FromLocationErpCode"); - b.Property("ItemName") + b.Property("FromLocationGroup") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("ItemName"); + .HasColumnName("FromLocationGroup"); - b.Property("LastModificationTime") - .HasColumnType("datetime2") - .HasColumnName("LastModificationTime"); + b.Property("FromLot") + .HasColumnType("nvarchar(max)"); - b.Property("LastModifierId") - .HasColumnType("uniqueidentifier") - .HasColumnName("LastModifierId"); + b.Property("FromPackingCode") + .HasColumnType("nvarchar(450)"); - b.Property("LocationArea") + b.Property("FromStatus") + .IsRequired() .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("LocationArea"); + .HasColumnType("nvarchar(64)"); - b.Property("LocationCode") + b.Property("FromWarehouseCode") .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("LocationCode"); + .HasColumnName("FromWarehouseCode"); - b.Property("LocationErpCode") + b.Property("ItemCode") .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("LocationErpCode"); + .HasColumnName("ItemCode"); - b.Property("LocationGroup") + b.Property("ItemDesc1") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("LocationGroup"); + .HasColumnName("ItemDesc1"); - b.Property("Lot") + b.Property("ItemDesc2") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("Lot"); + .HasColumnName("ItemDesc2"); + + b.Property("ItemName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemName"); + + b.Property("JobStatus") + .HasColumnType("int"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); b.Property("MasterID") .HasColumnType("uniqueidentifier"); @@ -16138,11 +19979,8 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("nvarchar(64)") .HasColumnName("Number"); - b.Property("PackingCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("PackingCode"); + b.Property("OnTheWayLocationCode") + .HasColumnType("nvarchar(max)"); b.Property("ProduceDate") .HasColumnType("datetime2"); @@ -16152,19 +19990,15 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("decimal(18,6)") .HasColumnName("Qty"); - b.Property("ReasonCode") - .HasColumnType("nvarchar(max)"); + b.Property("Reason") + .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)"); @@ -16177,29 +20011,66 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("TenantId"); - b.Property("Uom") + b.Property("ToContainerCode") + .HasColumnType("nvarchar(max)"); + + b.Property("ToLocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToLocationArea"); + + b.Property("ToLocationCode") .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("Uom"); + .HasColumnName("ToLocationCode"); - b.Property("WarehouseCode") + b.Property("ToLocationErpCode") .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("WarehouseCode"); + .HasColumnName("ToLocationErpCode"); + + b.Property("ToLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToLocationGroup"); + + b.Property("ToLot") + .HasColumnType("nvarchar(max)"); + + b.Property("ToPackingCode") + .HasColumnType("nvarchar(max)"); + + b.Property("ToStatus") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ToWarehouseCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToWarehouseCode"); + + b.Property("Uom") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Uom"); b.HasKey("Id"); b.HasIndex("MasterID"); - b.HasIndex("Number", "PackingCode") - .IsUnique(); + b.HasIndex("Number", "FromPackingCode", "FromLocationCode", "ToLocationCode", "FromStatus", "ToStatus") + .IsUnique() + .HasFilter("[FromPackingCode] IS NOT NULL"); - b.ToTable("Store_RecycledMaterialReceiptNoteDetail", (string)null); + b.ToTable("Store_TransferLibNoteDetail", (string)null); }); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.SaleOrder", b => + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.TransferLibRequest", b => { b.Property("Id") .HasColumnType("uniqueidentifier"); @@ -16207,24 +20078,24 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.Property("ActiveDate") .HasColumnType("datetime2"); + b.Property("AutoAgree") + .HasColumnType("bit"); + + b.Property("AutoCompleteJob") + .HasColumnType("bit"); + + b.Property("AutoHandle") + .HasColumnType("bit"); + + b.Property("AutoSubmit") + .HasColumnType("bit"); + b.Property("ConcurrencyStamp") .IsConcurrencyToken() .HasMaxLength(40) .HasColumnType("nvarchar(40)") .HasColumnName("ConcurrencyStamp"); - b.Property("ContactEmail") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("ContactName") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("ContactPhone") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - b.Property("CreationTime") .HasColumnType("datetime2") .HasColumnName("CreationTime"); @@ -16233,12 +20104,8 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("CreatorId"); - b.Property("CustomerCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("DueDate") - .HasColumnType("datetime2"); + b.Property("DirectCreateNote") + .HasColumnType("bit"); b.Property("ExtraProperties") .HasColumnType("nvarchar(max)") @@ -16258,58 +20125,45 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("nvarchar(64)") .HasColumnName("Number"); - b.Property("OrderDate") - .HasColumnType("datetime2"); - b.Property("Remark") .HasMaxLength(3072) .HasColumnType("nvarchar(3072)") .HasColumnName("Remark"); - b.Property("SoStatus") + b.Property("RequestStatus") .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") + b.Property("Type") .HasMaxLength(64) .HasColumnType("nvarchar(64)"); + b.Property("UseOnTheWayLocation") + .HasColumnType("bit"); + b.Property("Worker") .HasColumnType("nvarchar(max)"); b.HasKey("Id"); - b.HasIndex("CustomerCode"); - b.HasIndex("Number") .IsUnique(); - b.ToTable("Store_SaleOrder", (string)null); + b.ToTable("Store_TransferLibRequest", (string)null); }); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.SaleOrderDetail", b => + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.TransferLibRequestDetail", b => { b.Property("Id") .HasColumnType("uniqueidentifier"); - b.Property("ConvertRate") - .ValueGeneratedOnAdd() - .HasColumnType("decimal(18,6)") - .HasDefaultValue(1m); + b.Property("ArriveDate") + .HasColumnType("datetime2"); b.Property("CreationTime") .HasColumnType("datetime2") @@ -16319,12 +20173,51 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("CreatorId"); - b.Property("CustomerPackQty") - .HasColumnType("decimal(18,6)"); + b.Property("ExpireDate") + .HasColumnType("datetime2"); - b.Property("CustomerPackUom") + 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) @@ -16346,6 +20239,9 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("nvarchar(64)") .HasColumnName("ItemName"); + b.Property("JobStatus") + .HasColumnType("int"); + b.Property("LastModificationTime") .HasColumnType("datetime2") .HasColumnName("LastModificationTime"); @@ -16354,11 +20250,6 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("LastModifierId"); - b.Property("LineStatus") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - b.Property("MasterID") .HasColumnType("uniqueidentifier"); @@ -16368,28 +20259,76 @@ namespace Win_in.Sfs.Wms.Store.Migrations .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("SoLine") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - b.Property("StdPackQty") .HasColumnType("decimal(18,6)"); + b.Property("SupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("SupplierBatch"); + b.Property("TenantId") .HasColumnType("uniqueidentifier") .HasColumnName("TenantId"); + b.Property("ToContainerCode") + .HasColumnType("nvarchar(max)"); + + b.Property("ToLocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToLocationArea"); + + b.Property("ToLocationCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToLocationCode"); + + b.Property("ToLocationErpCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToLocationErpCode"); + + b.Property("ToLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToLocationGroup"); + + b.Property("ToLot") + .HasColumnType("nvarchar(max)"); + + b.Property("ToPackingCode") + .HasColumnType("nvarchar(max)"); + + b.Property("ToStatus") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ToWarehouseCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToWarehouseCode"); + b.Property("Uom") .IsRequired() .HasMaxLength(64) @@ -16400,13 +20339,10 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.HasIndex("MasterID"); - b.HasIndex("Number", "SoLine", "ItemCode") - .IsUnique(); - - b.ToTable("Store_SaleOrderDetail", (string)null); + b.ToTable("Store_TransferLibRequestDetail", (string)null); }); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ScrapNote", b => + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.TransferNote", b => { b.Property("Id") .HasColumnType("uniqueidentifier"); @@ -16420,6 +20356,12 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("nvarchar(40)") .HasColumnName("ConcurrencyStamp"); + b.Property("ConfirmTime") + .HasColumnType("datetime2"); + + b.Property("Confirmed") + .HasColumnType("bit"); + b.Property("CreationTime") .HasColumnType("datetime2") .HasColumnName("CreationTime"); @@ -16456,18 +20398,21 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("nvarchar(3072)") .HasColumnName("Remark"); - b.Property("ScrapRequestNumber") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + b.Property("RequestNumber") + .HasColumnType("nvarchar(max)"); b.Property("TenantId") .HasColumnType("uniqueidentifier") .HasColumnName("TenantId"); b.Property("Type") + .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)"); + b.Property("UseOnTheWayLocation") + .HasColumnType("bit"); + b.Property("Worker") .HasColumnType("nvarchar(max)"); @@ -16476,10 +20421,10 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.HasIndex("Number") .IsUnique(); - b.ToTable("Store_ScrapNote", (string)null); + b.ToTable("Store_TransferNote", (string)null); }); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ScrapNoteDetail", b => + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.TransferNoteDetail", b => { b.Property("Id") .HasColumnType("uniqueidentifier"); @@ -16524,11 +20469,10 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnName("FromLocationGroup"); b.Property("FromLot") - .HasColumnType("nvarchar(450)"); + .HasColumnType("nvarchar(max)"); b.Property("FromPackingCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + .HasColumnType("nvarchar(450)"); b.Property("FromStatus") .IsRequired() @@ -16579,6 +20523,9 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("nvarchar(64)") .HasColumnName("Number"); + b.Property("OnTheWayLocationCode") + .HasColumnType("nvarchar(max)"); + b.Property("ProduceDate") .HasColumnType("datetime2"); @@ -16587,7 +20534,7 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("decimal(18,6)") .HasColumnName("Qty"); - b.Property("ReasonCode") + b.Property("Reason") .HasMaxLength(64) .HasColumnType("nvarchar(64)"); @@ -16660,14 +20607,14 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.HasIndex("MasterID"); - b.HasIndex("Number", "ItemCode", "FromPackingCode", "FromLocationCode", "ToLocationCode", "FromLot", "FromStatus") + b.HasIndex("Number", "FromPackingCode", "FromLocationCode", "ToLocationCode", "FromStatus", "ToStatus") .IsUnique() - .HasFilter("[FromPackingCode] IS NOT NULL AND [FromLot] IS NOT NULL"); + .HasFilter("[FromPackingCode] IS NOT NULL"); - b.ToTable("Store_ScrapNoteDetail", (string)null); + b.ToTable("Store_TransferNoteDetail", (string)null); }); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ScrapRequest", b => + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.TransferRequest", b => { b.Property("Id") .HasColumnType("uniqueidentifier"); @@ -16740,6 +20687,9 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasMaxLength(64) .HasColumnType("nvarchar(64)"); + b.Property("UseOnTheWayLocation") + .HasColumnType("bit"); + b.Property("Worker") .HasColumnType("nvarchar(max)"); @@ -16748,14 +20698,17 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.HasIndex("Number") .IsUnique(); - b.ToTable("Store_ScrapRequest", (string)null); + b.ToTable("Store_TransferRequest", (string)null); }); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ScrapRequestDetail", b => + 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"); @@ -16764,181 +20717,71 @@ namespace Win_in.Sfs.Wms.Store.Migrations .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("ExpireDate") + .HasColumnType("datetime2"); - b.Property("LocationErpCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("LocationErpCode"); + b.Property("FromContainerCode") + .HasColumnType("nvarchar(max)"); - b.Property("LocationGroup") + b.Property("FromLocationArea") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("LocationGroup"); - - b.Property("MasterID") - .HasColumnType("uniqueidentifier"); + .HasColumnName("FromLocationArea"); - b.Property("Number") + b.Property("FromLocationCode") .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"); + .HasColumnName("FromLocationCode"); - b.Property("Uom") + b.Property("FromLocationErpCode") .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("Uom"); + .HasColumnName("FromLocationErpCode"); - b.Property("WarehouseCode") - .IsRequired() + b.Property("FromLocationGroup") .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.SplitPackingRec", b => - { - b.Property("Id") - .HasColumnType("uniqueidentifier"); - - b.Property("ArrivalNoticNumber") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("nvarchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime2") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("uniqueidentifier") - .HasColumnName("CreatorId"); - - b.Property("ExtraProperties") - .HasColumnType("nvarchar(max)") - .HasColumnName("ExtraProperties"); + .HasColumnName("FromLocationGroup"); b.Property("FromLot") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("FromPackingCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("FromQty") - .HasPrecision(18, 6) - .HasColumnType("decimal(18,6)"); + .HasColumnType("nvarchar(max)"); - b.Property("FromStdPackQty") - .HasColumnType("decimal(18,6)"); + b.Property("FromPackingCode") + .HasColumnType("nvarchar(max)"); - b.Property("FromTopPackingCode") + b.Property("FromStatus") .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)"); - b.Property("FromUom") + b.Property("FromWarehouseCode") .IsRequired() .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + .HasColumnType("nvarchar(64)") + .HasColumnName("FromWarehouseCode"); b.Property("ItemCode") .IsRequired() .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemCode"); b.Property("ItemDesc1") - .HasMaxLength(1024) - .HasColumnType("nvarchar(1024)"); + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc1"); b.Property("ItemDesc2") - .HasMaxLength(1024) - .HasColumnType("nvarchar(1024)"); + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc2"); b.Property("ItemName") .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("LabelType") - .HasColumnType("int"); + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemName"); b.Property("LastModificationTime") .HasColumnType("datetime2") @@ -16948,102 +20791,132 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("LastModifierId"); - b.Property("OprType") - .HasColumnType("int"); + b.Property("MasterID") + .HasColumnType("uniqueidentifier"); - b.Property("PurchaseInfo_AsnNumber") + b.Property("Number") + .IsRequired() .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); - b.Property("PurchaseInfo_PoNumber") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + b.Property("ProduceDate") + .HasColumnType("datetime2"); - b.Property("PutOnShelfNumber") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + b.Property("Qty") + .HasPrecision(18, 6) + .HasColumnType("decimal(18,6)") + .HasColumnName("Qty"); - b.Property("ReceiptRecNumber") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + b.Property("Reason") + .HasColumnType("nvarchar(max)"); b.Property("Remark") - .HasColumnType("nvarchar(max)"); + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("StdPackQty") + .HasColumnType("decimal(18,6)"); - b.Property("TaskOrderNumber") + b.Property("SupplierBatch") .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + .HasColumnType("nvarchar(64)") + .HasColumnName("SupplierBatch"); b.Property("TenantId") .HasColumnType("uniqueidentifier") .HasColumnName("TenantId"); - b.Property("ToLot") + b.Property("ToContainerCode") + .HasColumnType("nvarchar(max)"); + + b.Property("ToLocationArea") .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + .HasColumnType("nvarchar(64)") + .HasColumnName("ToLocationArea"); - b.Property("ToPackingCode") + b.Property("ToLocationCode") .IsRequired() .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + .HasColumnType("nvarchar(64)") + .HasColumnName("ToLocationCode"); - b.Property("ToQty") - .HasPrecision(18, 6) - .HasColumnType("decimal(18,6)"); + b.Property("ToLocationErpCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToLocationErpCode"); - b.Property("ToStdPackQty") - .HasColumnType("decimal(18,6)"); + b.Property("ToLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToLocationGroup"); + + b.Property("ToLot") + .HasColumnType("nvarchar(max)"); + + b.Property("ToPackingCode") + .HasColumnType("nvarchar(max)"); - b.Property("ToTopPackingCode") + b.Property("ToStatus") .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)"); - b.Property("ToUom") + b.Property("ToWarehouseCode") .IsRequired() .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + .HasColumnType("nvarchar(64)") + .HasColumnName("ToWarehouseCode"); - b.HasKey("Id"); + b.Property("Uom") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Uom"); - b.HasIndex("ToPackingCode"); + b.HasKey("Id"); - b.HasIndex("FromPackingCode", "ToPackingCode"); + b.HasIndex("MasterID"); - b.ToTable("Store_SplitPackingRec", (string)null); + b.ToTable("Store_TransferRequestDetail", (string)null); }); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.SupplierAsn", b => + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.UnplannedIssueJob", b => { b.Property("Id") .HasColumnType("uniqueidentifier"); - b.Property("ActiveDate") + b.Property("AcceptTime") .HasColumnType("datetime2"); - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("nvarchar(40)") - .HasColumnName("ConcurrencyStamp"); + b.Property("AcceptUserId") + .HasColumnType("uniqueidentifier"); - b.Property("ContactEmail") + b.Property("AcceptUserName") .HasMaxLength(64) .HasColumnType("nvarchar(64)"); - b.Property("ContactName") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + b.Property("BuildDate") + .HasColumnType("datetime2"); - b.Property("ContactPhone") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + b.Property("CompleteTime") + .HasColumnType("datetime2"); - b.Property("CreateType") - .IsRequired() + 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"); @@ -17052,21 +20925,37 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("CreatorId"); - b.Property("Ctype") - .HasColumnType("nvarchar(max)"); - - b.Property("DockCode") - .IsRequired() + b.Property("DeptCode") .HasMaxLength(64) .HasColumnType("nvarchar(64)"); - b.Property("DueDate") - .HasColumnType("datetime2"); + 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"); @@ -17078,102 +20967,138 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.Property("Number") .IsRequired() .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("Number"); - - b.Property("PlanArriveDate") - .HasColumnType("datetime2"); + .HasColumnType("nvarchar(64)"); - b.Property("PlanUserCode") + b.Property("OANumber") .HasColumnType("nvarchar(max)"); - 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("Remark") .HasMaxLength(3072) .HasColumnType("nvarchar(3072)") .HasColumnName("Remark"); - b.Property("RpNumber") - .IsRequired() + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("UnplannedIssueRequestNumber") .HasMaxLength(64) .HasColumnType("nvarchar(64)"); - b.Property("ShipDate") - .HasColumnType("datetime2"); + b.Property("UnplannedIssueType") + .HasColumnType("int"); - b.Property("Status") - .IsRequired() + b.Property("UpStreamJobNumber") .HasMaxLength(64) .HasColumnType("nvarchar(64)"); - b.Property("SupplierAddress") + b.Property("WarehouseCode") .HasColumnType("nvarchar(max)"); - b.Property("SupplierCode") - .IsRequired() + b.Property("WorkGroupCode") .HasMaxLength(64) .HasColumnType("nvarchar(64)"); - b.Property("SupplierName") + b.Property("Worker") .HasColumnType("nvarchar(max)"); - b.Property("TenantId") - .HasColumnType("uniqueidentifier") - .HasColumnName("TenantId"); + b.HasKey("Id"); - b.Property("TimeWindow") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + b.HasIndex("Number") + .IsUnique(); - b.Property("TruckNumber") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + b.ToTable("Job_UnplannedIssueJob", (string)null); + }); - b.Property("Worker") + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.UnplannedIssueJobDetail", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CaseCode") .HasColumnType("nvarchar(max)"); - b.HasKey("Id"); + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("Explain") + .HasColumnType("nvarchar(max)"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("HandledArriveDate") + .HasColumnType("datetime2"); + + b.Property("HandledContainerCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledContainerCode"); - b.HasIndex("Number") - .IsUnique(); + b.Property("HandledExpireDate") + .HasColumnType("datetime2"); - b.HasIndex("SupplierCode"); + b.Property("HandledFromLocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledFromLocationArea"); - b.ToTable("Store_SupplierAsn", (string)null); - }); + b.Property("HandledFromLocationCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledFromLocationCode"); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.SupplierAsnDetail", b => - { - b.Property("Id") - .HasColumnType("uniqueidentifier"); + b.Property("HandledFromLocationErpCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledFromLocationErpCode"); - b.Property("ArriveDate") - .HasColumnType("datetime2"); + b.Property("HandledFromLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledFromLocationGroup"); - b.Property("ContainerCode") + b.Property("HandledFromWarehouseCode") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("ContainerCode"); + .HasColumnName("HandledFromWarehouseCode"); - b.Property("ConvertRate") - .HasColumnType("decimal(18,6)"); + b.Property("HandledLot") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledLot"); - b.Property("CreationTime") - .HasColumnType("datetime2") - .HasColumnName("CreationTime"); + b.Property("HandledPackingCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledPackingCode"); - b.Property("CreatorId") - .HasColumnType("uniqueidentifier") - .HasColumnName("CreatorId"); + b.Property("HandledProduceDate") + .HasColumnType("datetime2"); - b.Property("Ctype") - .HasColumnType("nvarchar(max)"); + b.Property("HandledQty") + .HasColumnType("decimal(18,6)"); - b.Property("ExpireDate") - .HasColumnType("datetime2"); + b.Property("HandledSupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledSupplierBatch"); b.Property("ItemCode") .IsRequired() @@ -17204,93 +21129,108 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("LastModifierId"); - b.Property("Lot") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("Lot"); - b.Property("MasterID") .HasColumnType("uniqueidentifier"); b.Property("Number") .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("OnceBusiCode") + .HasColumnType("nvarchar(max)"); + + b.Property("ProjCapacityCode") + .HasColumnType("nvarchar(max)"); + + b.Property("ReasonCode") + .HasColumnType("nvarchar(max)"); + + b.Property("RecommendArriveDate") + .HasColumnType("datetime2"); + + b.Property("RecommendContainerCode") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("Number"); + .HasColumnName("RecommendContainerCode"); - b.Property("PackingCode") - .IsRequired() + b.Property("RecommendExpireDate") + .HasColumnType("datetime2"); + + b.Property("RecommendFromLocationArea") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("PackingCode"); + .HasColumnName("RecommendFromLocationArea"); - b.Property("PlanUserCode") - .HasColumnType("nvarchar(max)"); + b.Property("RecommendFromLocationCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendFromLocationCode"); - b.Property("PoLine") + b.Property("RecommendFromLocationErpCode") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("PoLine"); + .HasColumnName("RecommendFromLocationErpCode"); - b.Property("PoNumber") + b.Property("RecommendFromLocationGroup") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("PoNumber"); + .HasColumnName("RecommendFromLocationGroup"); - b.Property("ProduceDate") - .HasColumnType("datetime2"); + b.Property("RecommendFromWarehouseCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendFromWarehouseCode"); - b.Property("ProjectCode") - .HasColumnType("nvarchar(max)"); + b.Property("RecommendLot") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendLot"); - b.Property("Qty") - .HasPrecision(18, 6) - .HasColumnType("decimal(18,6)") - .HasColumnName("Qty"); + b.Property("RecommendPackingCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendPackingCode"); - b.Property("RecommendErpCode") - .HasColumnType("nvarchar(max)"); + 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") + b.Property("Status") + .IsRequired() .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("SupplierBatch"); + .HasColumnType("nvarchar(64)"); - b.Property("SupplierPackQty") + b.Property("StdPackQty") .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"); + .HasColumnType("nvarchar(max)"); b.HasKey("Id"); b.HasIndex("MasterID"); - b.HasIndex("Number", "ItemCode", "PackingCode") - .IsUnique(); - - b.ToTable("Store_SupplierAsnDetail", (string)null); + b.ToTable("Job_UnplannedIssueJobDetail", (string)null); }); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.TransferNote", b => + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.UnplannedIssueNote", b => { b.Property("Id") .HasColumnType("uniqueidentifier"); @@ -17298,18 +21238,15 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.Property("ActiveDate") .HasColumnType("datetime2"); + b.Property("BuildDate") + .HasColumnType("datetime2"); + b.Property("ConcurrencyStamp") .IsConcurrencyToken() .HasMaxLength(40) .HasColumnType("nvarchar(40)") .HasColumnName("ConcurrencyStamp"); - b.Property("ConfirmTime") - .HasColumnType("datetime2"); - - b.Property("Confirmed") - .HasColumnType("bit"); - b.Property("CreationTime") .HasColumnType("datetime2") .HasColumnName("CreationTime"); @@ -17318,14 +21255,21 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("CreatorId"); + b.Property("DeptCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("DeptName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + b.Property("ExtraProperties") .HasColumnType("nvarchar(max)") .HasColumnName("ExtraProperties"); b.Property("JobNumber") .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("JobNumber"); + .HasColumnType("nvarchar(64)"); b.Property("LastModificationTime") .HasColumnType("datetime2") @@ -17341,25 +21285,24 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("nvarchar(64)") .HasColumnName("Number"); + b.Property("OANumber") + .HasColumnType("nvarchar(max)"); + b.Property("Remark") .HasMaxLength(3072) .HasColumnType("nvarchar(3072)") .HasColumnName("Remark"); - b.Property("RequestNumber") - .HasColumnType("nvarchar(max)"); - b.Property("TenantId") .HasColumnType("uniqueidentifier") .HasColumnName("TenantId"); - b.Property("Type") - .IsRequired() + b.Property("UnplannedIssueRequestNumber") .HasMaxLength(64) .HasColumnType("nvarchar(64)"); - b.Property("UseOnTheWayLocation") - .HasColumnType("bit"); + b.Property("UnplannedIssueType") + .HasColumnType("int"); b.Property("Worker") .HasColumnType("nvarchar(max)"); @@ -17369,10 +21312,10 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.HasIndex("Number") .IsUnique(); - b.ToTable("Store_TransferNote", (string)null); + b.ToTable("Store_UnplannedIssueNote", (string)null); }); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.TransferNoteDetail", b => + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.UnplannedIssueNoteDetail", b => { b.Property("Id") .HasColumnType("uniqueidentifier"); @@ -17380,6 +21323,14 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.Property("ArriveDate") .HasColumnType("datetime2"); + b.Property("CaseCode") + .HasColumnType("nvarchar(max)"); + + b.Property("ContainerCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ContainerCode"); + b.Property("CreationTime") .HasColumnType("datetime2") .HasColumnName("CreationTime"); @@ -17391,47 +21342,69 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.Property("ExpireDate") .HasColumnType("datetime2"); - b.Property("FromContainerCode") + b.Property("Explain") .HasColumnType("nvarchar(max)"); - b.Property("FromLocationArea") + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("HandledArriveDate") + .HasColumnType("datetime2"); + + b.Property("HandledContainerCode") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("FromLocationArea"); + .HasColumnName("HandledContainerCode"); - b.Property("FromLocationCode") - .IsRequired() + b.Property("HandledExpireDate") + .HasColumnType("datetime2"); + + b.Property("HandledFromLocationArea") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("FromLocationCode"); + .HasColumnName("HandledFromLocationArea"); - b.Property("FromLocationErpCode") - .IsRequired() + b.Property("HandledFromLocationCode") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("FromLocationErpCode"); + .HasColumnName("HandledFromLocationCode"); - b.Property("FromLocationGroup") + b.Property("HandledFromLocationErpCode") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("FromLocationGroup"); + .HasColumnName("HandledFromLocationErpCode"); - b.Property("FromLot") - .HasColumnType("nvarchar(max)"); + b.Property("HandledFromLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledFromLocationGroup"); - b.Property("FromPackingCode") - .HasColumnType("nvarchar(450)"); + b.Property("HandledFromWarehouseCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledFromWarehouseCode"); + + b.Property("HandledLot") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledLot"); - b.Property("FromStatus") - .IsRequired() + b.Property("HandledPackingCode") .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledPackingCode"); - b.Property("FromWarehouseCode") - .IsRequired() + b.Property("HandledProduceDate") + .HasColumnType("datetime2"); + + b.Property("HandledQty") + .HasColumnType("decimal(18,6)"); + + b.Property("HandledSupplierBatch") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("FromWarehouseCode"); + .HasColumnName("HandledSupplierBatch"); b.Property("ItemCode") .IsRequired() @@ -17462,6 +21435,33 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("LastModifierId"); + b.Property("LocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationArea"); + + b.Property("LocationCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationCode"); + + b.Property("LocationErpCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationErpCode"); + + b.Property("LocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationGroup"); + + b.Property("Lot") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Lot"); + b.Property("MasterID") .HasColumnType("uniqueidentifier"); @@ -17471,79 +21471,107 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("nvarchar(64)") .HasColumnName("Number"); - b.Property("OnTheWayLocationCode") + b.Property("OnceBusiCode") .HasColumnType("nvarchar(max)"); + b.Property("PackingCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("PackingCode"); + b.Property("ProduceDate") .HasColumnType("datetime2"); + b.Property("ProjCapacityCode") + .HasColumnType("nvarchar(max)"); + b.Property("Qty") .HasPrecision(18, 6) .HasColumnType("decimal(18,6)") .HasColumnName("Qty"); - b.Property("Reason") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + b.Property("ReasonCode") + .HasColumnType("nvarchar(max)"); - b.Property("Remark") - .HasMaxLength(3072) - .HasColumnType("nvarchar(3072)") - .HasColumnName("Remark"); + b.Property("RecommendArriveDate") + .HasColumnType("datetime2"); - b.Property("StdPackQty") - .HasColumnType("decimal(18,6)"); + b.Property("RecommendContainerCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendContainerCode"); - b.Property("SupplierBatch") + b.Property("RecommendExpireDate") + .HasColumnType("datetime2"); + + b.Property("RecommendFromLocationArea") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("SupplierBatch"); + .HasColumnName("RecommendFromLocationArea"); - b.Property("TenantId") - .HasColumnType("uniqueidentifier") - .HasColumnName("TenantId"); + b.Property("RecommendFromLocationCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendFromLocationCode"); - b.Property("ToContainerCode") - .HasColumnType("nvarchar(max)"); + b.Property("RecommendFromLocationErpCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendFromLocationErpCode"); - b.Property("ToLocationArea") + b.Property("RecommendFromLocationGroup") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("ToLocationArea"); + .HasColumnName("RecommendFromLocationGroup"); - b.Property("ToLocationCode") - .IsRequired() + b.Property("RecommendFromWarehouseCode") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("ToLocationCode"); + .HasColumnName("RecommendFromWarehouseCode"); - b.Property("ToLocationErpCode") - .IsRequired() + b.Property("RecommendLot") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("ToLocationErpCode"); + .HasColumnName("RecommendLot"); - b.Property("ToLocationGroup") + b.Property("RecommendPackingCode") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("ToLocationGroup"); + .HasColumnName("RecommendPackingCode"); - b.Property("ToLot") - .HasColumnType("nvarchar(max)"); + b.Property("RecommendProduceDate") + .HasColumnType("datetime2"); - b.Property("ToPackingCode") - .HasColumnType("nvarchar(max)"); + b.Property("RecommendQty") + .HasColumnType("decimal(18,6)"); - b.Property("ToStatus") + b.Property("RecommendSupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendSupplierBatch"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("Status") .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)"); - b.Property("ToWarehouseCode") - .IsRequired() + b.Property("StdPackQty") + .HasColumnType("decimal(18,6)"); + + b.Property("SupplierBatch") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("ToWarehouseCode"); + .HasColumnName("SupplierBatch"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); b.Property("Uom") .IsRequired() @@ -17551,18 +21579,24 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("nvarchar(64)") .HasColumnName("Uom"); + b.Property("WarehouseCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("WarehouseCode"); + b.HasKey("Id"); b.HasIndex("MasterID"); - b.HasIndex("Number", "FromPackingCode", "FromLocationCode", "ToLocationCode", "FromStatus", "ToStatus") + b.HasIndex("Number", "PackingCode", "ItemCode", "Lot", "Status") .IsUnique() - .HasFilter("[FromPackingCode] IS NOT NULL"); + .HasFilter("[Lot] IS NOT NULL"); - b.ToTable("Store_TransferNoteDetail", (string)null); + b.ToTable("Store_UnplannedIssueNoteDetail", (string)null); }); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.TransferRequest", b => + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.UnplannedIssueRequest", b => { b.Property("Id") .HasColumnType("uniqueidentifier"); @@ -17582,6 +21616,9 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.Property("AutoSubmit") .HasColumnType("bit"); + b.Property("BuildDate") + .HasColumnType("datetime2"); + b.Property("ConcurrencyStamp") .IsConcurrencyToken() .HasMaxLength(40) @@ -17596,6 +21633,14 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("CreatorId"); + b.Property("DeptCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("DeptName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + b.Property("DirectCreateNote") .HasColumnType("bit"); @@ -17617,6 +21662,9 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("nvarchar(64)") .HasColumnName("Number"); + b.Property("OANumber") + .HasColumnType("nvarchar(max)"); + b.Property("Remark") .HasMaxLength(3072) .HasColumnType("nvarchar(3072)") @@ -17631,12 +21679,8 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("TenantId"); - b.Property("Type") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("UseOnTheWayLocation") - .HasColumnType("bit"); + b.Property("UnplannedIssueType") + .HasColumnType("int"); b.Property("Worker") .HasColumnType("nvarchar(max)"); @@ -17646,10 +21690,10 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.HasIndex("Number") .IsUnique(); - b.ToTable("Store_TransferRequest", (string)null); + b.ToTable("Store_UnplannedIssueRequest", (string)null); }); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.TransferRequestDetail", b => + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.UnplannedIssueRequestDetail", b => { b.Property("Id") .HasColumnType("uniqueidentifier"); @@ -17657,6 +21701,14 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.Property("ArriveDate") .HasColumnType("datetime2"); + b.Property("CaseCode") + .HasColumnType("nvarchar(max)"); + + b.Property("ContainerCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ContainerCode"); + b.Property("CreationTime") .HasColumnType("datetime2") .HasColumnName("CreationTime"); @@ -17668,47 +21720,12 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.Property("ExpireDate") .HasColumnType("datetime2"); - b.Property("FromContainerCode") - .HasColumnType("nvarchar(max)"); - - b.Property("FromLocationArea") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("FromLocationArea"); - - b.Property("FromLocationCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("FromLocationCode"); - - b.Property("FromLocationErpCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("FromLocationErpCode"); - - b.Property("FromLocationGroup") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("FromLocationGroup"); - - b.Property("FromLot") - .HasColumnType("nvarchar(max)"); - - b.Property("FromPackingCode") + b.Property("Explain") .HasColumnType("nvarchar(max)"); - b.Property("FromStatus") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("FromWarehouseCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("FromWarehouseCode"); + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); b.Property("ItemCode") .IsRequired() @@ -17739,6 +21756,33 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("LastModifierId"); + b.Property("LocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationArea"); + + b.Property("LocationCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationCode"); + + b.Property("LocationErpCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationErpCode"); + + b.Property("LocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationGroup"); + + b.Property("Lot") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Lot"); + b.Property("MasterID") .HasColumnType("uniqueidentifier"); @@ -17748,22 +21792,36 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("nvarchar(64)") .HasColumnName("Number"); + b.Property("OnceBusiCode") + .HasColumnType("nvarchar(max)"); + + b.Property("PackingCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("PackingCode"); + b.Property("ProduceDate") .HasColumnType("datetime2"); + b.Property("ProjCapacityCode") + .HasColumnType("nvarchar(max)"); + b.Property("Qty") .HasPrecision(18, 6) .HasColumnType("decimal(18,6)") .HasColumnName("Qty"); - b.Property("Reason") - .HasColumnType("nvarchar(max)"); - b.Property("Remark") .HasMaxLength(3072) .HasColumnType("nvarchar(3072)") .HasColumnName("Remark"); + b.Property("Status") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + b.Property("StdPackQty") .HasColumnType("decimal(18,6)"); @@ -17776,62 +21834,30 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("TenantId"); - b.Property("ToContainerCode") - .HasColumnType("nvarchar(max)"); - - b.Property("ToLocationArea") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ToLocationArea"); - - b.Property("ToLocationCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ToLocationCode"); - - b.Property("ToLocationErpCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ToLocationErpCode"); - - b.Property("ToLocationGroup") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ToLocationGroup"); - - b.Property("ToLot") - .HasColumnType("nvarchar(max)"); - - b.Property("ToPackingCode") - .HasColumnType("nvarchar(max)"); - - b.Property("ToStatus") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("ToWarehouseCode") + b.Property("Uom") .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("ToWarehouseCode"); + .HasColumnName("Uom"); - b.Property("Uom") + b.Property("WarehouseCode") .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("Uom"); + .HasColumnName("WarehouseCode"); b.HasKey("Id"); b.HasIndex("MasterID"); - b.ToTable("Store_TransferRequestDetail", (string)null); + b.HasIndex("Number", "PackingCode", "ItemCode", "Lot", "Status") + .IsUnique() + .HasFilter("[Lot] IS NOT NULL"); + + b.ToTable("Store_UnplannedIssueRequestDetail", (string)null); }); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.UnplannedIssueJob", b => + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.UnplannedReceiptJob", b => { b.Property("Id") .HasColumnType("uniqueidentifier"); @@ -17939,11 +21965,11 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("TenantId"); - b.Property("UnplannedIssueRequestNumber") + b.Property("UnplannedReceiptRequestNumber") .HasMaxLength(64) .HasColumnType("nvarchar(64)"); - b.Property("UnplannedIssueType") + b.Property("UnplannedReceiptType") .HasColumnType("int"); b.Property("UpStreamJobNumber") @@ -17965,10 +21991,10 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.HasIndex("Number") .IsUnique(); - b.ToTable("Job_UnplannedIssueJob", (string)null); + b.ToTable("Job_UnplannedReceiptJob", (string)null); }); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.UnplannedIssueJobDetail", b => + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.UnplannedReceiptJobDetail", b => { b.Property("Id") .HasColumnType("uniqueidentifier"); @@ -18002,51 +22028,51 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.Property("HandledExpireDate") .HasColumnType("datetime2"); - b.Property("HandledFromLocationArea") + b.Property("HandledLot") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("HandledFromLocationArea"); + .HasColumnName("HandledLot"); - b.Property("HandledFromLocationCode") + b.Property("HandledPackingCode") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("HandledFromLocationCode"); + .HasColumnName("HandledPackingCode"); - b.Property("HandledFromLocationErpCode") + b.Property("HandledProduceDate") + .HasColumnType("datetime2"); + + b.Property("HandledQty") + .HasColumnType("decimal(18,6)"); + + b.Property("HandledSupplierBatch") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("HandledFromLocationErpCode"); + .HasColumnName("HandledSupplierBatch"); - b.Property("HandledFromLocationGroup") + b.Property("HandledToLocationArea") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("HandledFromLocationGroup"); + .HasColumnName("HandledToLocationArea"); - b.Property("HandledFromWarehouseCode") + b.Property("HandledToLocationCode") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("HandledFromWarehouseCode"); + .HasColumnName("HandledToLocationCode"); - b.Property("HandledLot") + b.Property("HandledToLocationErpCode") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("HandledLot"); + .HasColumnName("HandledToLocationErpCode"); - b.Property("HandledPackingCode") + b.Property("HandledToLocationGroup") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("HandledPackingCode"); - - b.Property("HandledProduceDate") - .HasColumnType("datetime2"); - - b.Property("HandledQty") - .HasColumnType("decimal(18,6)"); + .HasColumnName("HandledToLocationGroup"); - b.Property("HandledSupplierBatch") + b.Property("HandledToWarehouseCode") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("HandledSupplierBatch"); + .HasColumnName("HandledToWarehouseCode"); b.Property("ItemCode") .IsRequired() @@ -18105,51 +22131,51 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.Property("RecommendExpireDate") .HasColumnType("datetime2"); - b.Property("RecommendFromLocationArea") + b.Property("RecommendLot") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendFromLocationArea"); + .HasColumnName("RecommendLot"); - b.Property("RecommendFromLocationCode") + b.Property("RecommendPackingCode") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendFromLocationCode"); + .HasColumnName("RecommendPackingCode"); - b.Property("RecommendFromLocationErpCode") + b.Property("RecommendProduceDate") + .HasColumnType("datetime2"); + + b.Property("RecommendQty") + .HasColumnType("decimal(18,6)"); + + b.Property("RecommendSupplierBatch") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendFromLocationErpCode"); + .HasColumnName("RecommendSupplierBatch"); - b.Property("RecommendFromLocationGroup") + b.Property("RecommendToLocationArea") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendFromLocationGroup"); + .HasColumnName("RecommendToLocationArea"); - b.Property("RecommendFromWarehouseCode") + b.Property("RecommendToLocationCode") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendFromWarehouseCode"); + .HasColumnName("RecommendToLocationCode"); - b.Property("RecommendLot") + b.Property("RecommendToLocationErpCode") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendLot"); + .HasColumnName("RecommendToLocationErpCode"); - b.Property("RecommendPackingCode") + b.Property("RecommendToLocationGroup") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendPackingCode"); - - b.Property("RecommendProduceDate") - .HasColumnType("datetime2"); - - b.Property("RecommendQty") - .HasColumnType("decimal(18,6)"); + .HasColumnName("RecommendToLocationGroup"); - b.Property("RecommendSupplierBatch") + b.Property("RecommendToWarehouseCode") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendSupplierBatch"); + .HasColumnName("RecommendToWarehouseCode"); b.Property("Remark") .HasMaxLength(3072) @@ -18175,10 +22201,10 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.HasIndex("MasterID"); - b.ToTable("Job_UnplannedIssueJobDetail", (string)null); + b.ToTable("Job_UnplannedReceiptJobDetail", (string)null); }); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.UnplannedIssueNote", b => + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.UnplannedReceiptNote", b => { b.Property("Id") .HasColumnType("uniqueidentifier"); @@ -18245,11 +22271,11 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("TenantId"); - b.Property("UnplannedIssueRequestNumber") + b.Property("UnplannedReceiptRequestNumber") .HasMaxLength(64) .HasColumnType("nvarchar(64)"); - b.Property("UnplannedIssueType") + b.Property("UnplannedReceiptType") .HasColumnType("int"); b.Property("Worker") @@ -18260,10 +22286,10 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.HasIndex("Number") .IsUnique(); - b.ToTable("Store_UnplannedIssueNote", (string)null); + b.ToTable("Store_UnplannedReceiptNote", (string)null); }); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.UnplannedIssueNoteDetail", b => + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.UnplannedReceiptNoteDetail", b => { b.Property("Id") .HasColumnType("uniqueidentifier"); @@ -18308,51 +22334,51 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.Property("HandledExpireDate") .HasColumnType("datetime2"); - b.Property("HandledFromLocationArea") + b.Property("HandledLot") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("HandledFromLocationArea"); + .HasColumnName("HandledLot"); - b.Property("HandledFromLocationCode") + b.Property("HandledPackingCode") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("HandledFromLocationCode"); + .HasColumnName("HandledPackingCode"); - b.Property("HandledFromLocationErpCode") + b.Property("HandledProduceDate") + .HasColumnType("datetime2"); + + b.Property("HandledQty") + .HasColumnType("decimal(18,6)"); + + b.Property("HandledSupplierBatch") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("HandledFromLocationErpCode"); + .HasColumnName("HandledSupplierBatch"); - b.Property("HandledFromLocationGroup") + b.Property("HandledToLocationArea") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("HandledFromLocationGroup"); + .HasColumnName("HandledToLocationArea"); - b.Property("HandledFromWarehouseCode") + b.Property("HandledToLocationCode") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("HandledFromWarehouseCode"); + .HasColumnName("HandledToLocationCode"); - b.Property("HandledLot") + b.Property("HandledToLocationErpCode") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("HandledLot"); + .HasColumnName("HandledToLocationErpCode"); - b.Property("HandledPackingCode") + b.Property("HandledToLocationGroup") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("HandledPackingCode"); - - b.Property("HandledProduceDate") - .HasColumnType("datetime2"); - - b.Property("HandledQty") - .HasColumnType("decimal(18,6)"); + .HasColumnName("HandledToLocationGroup"); - b.Property("HandledSupplierBatch") + b.Property("HandledToWarehouseCode") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("HandledSupplierBatch"); + .HasColumnName("HandledToWarehouseCode"); b.Property("ItemCode") .IsRequired() @@ -18439,44 +22465,19 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("decimal(18,6)") .HasColumnName("Qty"); - b.Property("ReasonCode") - .HasColumnType("nvarchar(max)"); - - b.Property("RecommendArriveDate") - .HasColumnType("datetime2"); - - b.Property("RecommendContainerCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendContainerCode"); - - b.Property("RecommendExpireDate") - .HasColumnType("datetime2"); - - b.Property("RecommendFromLocationArea") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendFromLocationArea"); - - b.Property("RecommendFromLocationCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendFromLocationCode"); - - b.Property("RecommendFromLocationErpCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendFromLocationErpCode"); + b.Property("ReasonCode") + .HasColumnType("nvarchar(max)"); - b.Property("RecommendFromLocationGroup") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendFromLocationGroup"); + b.Property("RecommendArriveDate") + .HasColumnType("datetime2"); - b.Property("RecommendFromWarehouseCode") + b.Property("RecommendContainerCode") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendFromWarehouseCode"); + .HasColumnName("RecommendContainerCode"); + + b.Property("RecommendExpireDate") + .HasColumnType("datetime2"); b.Property("RecommendLot") .HasMaxLength(64) @@ -18499,6 +22500,31 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("nvarchar(64)") .HasColumnName("RecommendSupplierBatch"); + b.Property("RecommendToLocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendToLocationArea"); + + b.Property("RecommendToLocationCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendToLocationCode"); + + b.Property("RecommendToLocationErpCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendToLocationErpCode"); + + b.Property("RecommendToLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendToLocationGroup"); + + b.Property("RecommendToWarehouseCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendToWarehouseCode"); + b.Property("Remark") .HasMaxLength(3072) .HasColumnType("nvarchar(3072)") @@ -18541,10 +22567,10 @@ namespace Win_in.Sfs.Wms.Store.Migrations .IsUnique() .HasFilter("[Lot] IS NOT NULL"); - b.ToTable("Store_UnplannedIssueNoteDetail", (string)null); + b.ToTable("Store_UnplannedReceiptNoteDetail", (string)null); }); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.UnplannedIssueRequest", b => + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.UnplannedReceiptRequest", b => { b.Property("Id") .HasColumnType("uniqueidentifier"); @@ -18627,7 +22653,7 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("TenantId"); - b.Property("UnplannedIssueType") + b.Property("UnplannedReceiptType") .HasColumnType("int"); b.Property("Worker") @@ -18638,10 +22664,10 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.HasIndex("Number") .IsUnique(); - b.ToTable("Store_UnplannedIssueRequest", (string)null); + b.ToTable("Store_UnplannedReceiptRequest", (string)null); }); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.UnplannedIssueRequestDetail", b => + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.UnplannedReceiptRequestDetail", b => { b.Property("Id") .HasColumnType("uniqueidentifier"); @@ -18760,6 +22786,9 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("decimal(18,6)") .HasColumnName("Qty"); + b.Property("ReasonCode") + .HasColumnType("nvarchar(max)"); + b.Property("Remark") .HasMaxLength(3072) .HasColumnType("nvarchar(3072)") @@ -18802,37 +22831,17 @@ namespace Win_in.Sfs.Wms.Store.Migrations .IsUnique() .HasFilter("[Lot] IS NOT NULL"); - b.ToTable("Store_UnplannedIssueRequestDetail", (string)null); + b.ToTable("Store_UnplannedReceiptRequestDetail", (string)null); }); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.UnplannedReceiptJob", b => + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.WarehouseTransferNote", b => { b.Property("Id") .HasColumnType("uniqueidentifier"); - b.Property("AcceptTime") - .HasColumnType("datetime2"); - - b.Property("AcceptUserId") - .HasColumnType("uniqueidentifier"); - - b.Property("AcceptUserName") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("BuildDate") - .HasColumnType("datetime2"); - - b.Property("CompleteTime") + b.Property("ActiveDate") .HasColumnType("datetime2"); - b.Property("CompleteUserId") - .HasColumnType("uniqueidentifier"); - - b.Property("CompleteUserName") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - b.Property("ConcurrencyStamp") .IsConcurrencyToken() .HasMaxLength(40) @@ -18847,36 +22856,14 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("CreatorId"); - b.Property("DeptCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("DeptName") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - b.Property("ExtraProperties") .HasColumnType("nvarchar(max)") .HasColumnName("ExtraProperties"); - b.Property("IsAutoComplete") - .ValueGeneratedOnAdd() - .HasColumnType("bit") - .HasDefaultValue(false); - - b.Property("JobDescription") - .HasMaxLength(1024) - .HasColumnType("nvarchar(1024)"); - - b.Property("JobStatus") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("JobType") - .IsRequired() + b.Property("JobNumber") .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + .HasColumnType("nvarchar(64)") + .HasColumnName("JobNumber"); b.Property("LastModificationTime") .HasColumnType("datetime2") @@ -18889,47 +22876,21 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.Property("Number") .IsRequired() .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("OANumber") - .HasColumnType("nvarchar(max)"); - - b.Property("Priority") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasDefaultValue(0); - - b.Property("PriorityIncrement") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasDefaultValue(0); + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); b.Property("Remark") .HasMaxLength(3072) .HasColumnType("nvarchar(3072)") .HasColumnName("Remark"); - b.Property("TenantId") - .HasColumnType("uniqueidentifier") - .HasColumnName("TenantId"); - - b.Property("UnplannedReceiptRequestNumber") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("UnplannedReceiptType") - .HasColumnType("int"); - - b.Property("UpStreamJobNumber") + b.Property("SupplierCode") .HasMaxLength(64) .HasColumnType("nvarchar(64)"); - b.Property("WarehouseCode") - .HasColumnType("nvarchar(max)"); - - b.Property("WorkGroupCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); b.Property("Worker") .HasColumnType("nvarchar(max)"); @@ -18939,16 +22900,16 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.HasIndex("Number") .IsUnique(); - b.ToTable("Job_UnplannedReceiptJob", (string)null); + b.ToTable("Store_WarehouseTransferNote", (string)null); }); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.UnplannedReceiptJobDetail", b => + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.WarehouseTransferNoteDetail", b => { b.Property("Id") .HasColumnType("uniqueidentifier"); - b.Property("CaseCode") - .HasColumnType("nvarchar(max)"); + b.Property("ArriveDate") + .HasColumnType("datetime2"); b.Property("CreationTime") .HasColumnType("datetime2") @@ -18958,69 +22919,50 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("CreatorId"); - b.Property("Explain") - .HasColumnType("nvarchar(max)"); - - b.Property("ExtraProperties") - .HasColumnType("nvarchar(max)") - .HasColumnName("ExtraProperties"); - - b.Property("HandledArriveDate") + b.Property("ExpireDate") .HasColumnType("datetime2"); - b.Property("HandledContainerCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("HandledContainerCode"); - - b.Property("HandledExpireDate") - .HasColumnType("datetime2"); + b.Property("FromContainerCode") + .HasColumnType("nvarchar(max)"); - b.Property("HandledLot") + b.Property("FromLocationArea") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("HandledLot"); + .HasColumnName("FromLocationArea"); - b.Property("HandledPackingCode") + b.Property("FromLocationCode") + .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("HandledPackingCode"); - - b.Property("HandledProduceDate") - .HasColumnType("datetime2"); - - b.Property("HandledQty") - .HasColumnType("decimal(18,6)"); + .HasColumnName("FromLocationCode"); - b.Property("HandledSupplierBatch") + b.Property("FromLocationErpCode") + .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("HandledSupplierBatch"); + .HasColumnName("FromLocationErpCode"); - b.Property("HandledToLocationArea") + b.Property("FromLocationGroup") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("HandledToLocationArea"); + .HasColumnName("FromLocationGroup"); - b.Property("HandledToLocationCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("HandledToLocationCode"); + b.Property("FromLot") + .HasColumnType("nvarchar(max)"); - b.Property("HandledToLocationErpCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("HandledToLocationErpCode"); + b.Property("FromPackingCode") + .HasColumnType("nvarchar(450)"); - b.Property("HandledToLocationGroup") + b.Property("FromStatus") + .IsRequired() .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("HandledToLocationGroup"); + .HasColumnType("nvarchar(64)"); - b.Property("HandledToWarehouseCode") + b.Property("FromWarehouseCode") + .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("HandledToWarehouseCode"); + .HasColumnName("FromWarehouseCode"); b.Property("ItemCode") .IsRequired() @@ -19056,103 +22998,99 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.Property("Number") .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("OnceBusiCode") - .HasColumnType("nvarchar(max)"); - - b.Property("ProjCapacityCode") - .HasColumnType("nvarchar(max)"); - - b.Property("ReasonCode") - .HasColumnType("nvarchar(max)"); - - b.Property("RecommendArriveDate") - .HasColumnType("datetime2"); - - b.Property("RecommendContainerCode") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendContainerCode"); + .HasColumnName("Number"); - b.Property("RecommendExpireDate") + b.Property("ProduceDate") .HasColumnType("datetime2"); - b.Property("RecommendLot") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendLot"); + b.Property("Qty") + .HasPrecision(18, 6) + .HasColumnType("decimal(18,6)") + .HasColumnName("Qty"); - b.Property("RecommendPackingCode") + b.Property("Reason") .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendPackingCode"); + .HasColumnType("nvarchar(64)"); - b.Property("RecommendProduceDate") - .HasColumnType("datetime2"); + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); - b.Property("RecommendQty") + b.Property("StdPackQty") .HasColumnType("decimal(18,6)"); - b.Property("RecommendSupplierBatch") + b.Property("SupplierBatch") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendSupplierBatch"); + .HasColumnName("SupplierBatch"); - b.Property("RecommendToLocationArea") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendToLocationArea"); + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); - b.Property("RecommendToLocationCode") + b.Property("ToContainerCode") + .HasColumnType("nvarchar(max)"); + + b.Property("ToLocationArea") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendToLocationCode"); + .HasColumnName("ToLocationArea"); - b.Property("RecommendToLocationErpCode") + b.Property("ToLocationCode") + .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendToLocationErpCode"); + .HasColumnName("ToLocationCode"); - b.Property("RecommendToLocationGroup") + b.Property("ToLocationErpCode") + .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendToLocationGroup"); + .HasColumnName("ToLocationErpCode"); - b.Property("RecommendToWarehouseCode") + b.Property("ToLocationGroup") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendToWarehouseCode"); + .HasColumnName("ToLocationGroup"); - b.Property("Remark") - .HasMaxLength(3072) - .HasColumnType("nvarchar(3072)") - .HasColumnName("Remark"); + b.Property("ToLot") + .HasColumnType("nvarchar(max)"); - b.Property("Status") + b.Property("ToPackingCode") + .HasColumnType("nvarchar(max)"); + + b.Property("ToStatus") .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)"); - b.Property("StdPackQty") - .HasColumnType("decimal(18,6)"); - - b.Property("TenantId") - .HasColumnType("uniqueidentifier") - .HasColumnName("TenantId"); + b.Property("ToWarehouseCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToWarehouseCode"); b.Property("Uom") - .HasColumnType("nvarchar(max)"); + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Uom"); b.HasKey("Id"); b.HasIndex("MasterID"); - b.ToTable("Job_UnplannedReceiptJobDetail", (string)null); + b.HasIndex("Number", "FromPackingCode", "FromLocationCode", "ToLocationCode") + .IsUnique() + .HasFilter("[FromPackingCode] IS NOT NULL"); + + b.ToTable("Store_WarehouseTransferNoteDetail", (string)null); }); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.UnplannedReceiptNote", b => + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.WipWarehouseAdjustNote", b => { b.Property("Id") .HasColumnType("uniqueidentifier"); @@ -19160,15 +23098,18 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.Property("ActiveDate") .HasColumnType("datetime2"); - b.Property("BuildDate") - .HasColumnType("datetime2"); - b.Property("ConcurrencyStamp") .IsConcurrencyToken() .HasMaxLength(40) .HasColumnType("nvarchar(40)") .HasColumnName("ConcurrencyStamp"); + b.Property("ConfirmTime") + .HasColumnType("datetime2"); + + b.Property("Confirmed") + .HasColumnType("bit"); + b.Property("CreationTime") .HasColumnType("datetime2") .HasColumnName("CreationTime"); @@ -19177,21 +23118,14 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("CreatorId"); - b.Property("DeptCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("DeptName") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - b.Property("ExtraProperties") .HasColumnType("nvarchar(max)") .HasColumnName("ExtraProperties"); b.Property("JobNumber") .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + .HasColumnType("nvarchar(64)") + .HasColumnName("JobNumber"); b.Property("LastModificationTime") .HasColumnType("datetime2") @@ -19207,25 +23141,22 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("nvarchar(64)") .HasColumnName("Number"); - b.Property("OANumber") - .HasColumnType("nvarchar(max)"); - b.Property("Remark") .HasMaxLength(3072) .HasColumnType("nvarchar(3072)") .HasColumnName("Remark"); + b.Property("RequestNumber") + .HasColumnType("nvarchar(max)"); + b.Property("TenantId") .HasColumnType("uniqueidentifier") .HasColumnName("TenantId"); - b.Property("UnplannedReceiptRequestNumber") + b.Property("Type") .HasMaxLength(64) .HasColumnType("nvarchar(64)"); - b.Property("UnplannedReceiptType") - .HasColumnType("int"); - b.Property("Worker") .HasColumnType("nvarchar(max)"); @@ -19234,10 +23165,10 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.HasIndex("Number") .IsUnique(); - b.ToTable("Store_UnplannedReceiptNote", (string)null); + b.ToTable("Store_WipWarehouseAdjustNote", (string)null); }); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.UnplannedReceiptNoteDetail", b => + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.WipWarehouseAdjustNoteDetail", b => { b.Property("Id") .HasColumnType("uniqueidentifier"); @@ -19245,14 +23176,6 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.Property("ArriveDate") .HasColumnType("datetime2"); - b.Property("CaseCode") - .HasColumnType("nvarchar(max)"); - - b.Property("ContainerCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ContainerCode"); - b.Property("CreationTime") .HasColumnType("datetime2") .HasColumnName("CreationTime"); @@ -19264,69 +23187,47 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.Property("ExpireDate") .HasColumnType("datetime2"); - b.Property("Explain") + b.Property("FromContainerCode") .HasColumnType("nvarchar(max)"); - b.Property("ExtraProperties") - .HasColumnType("nvarchar(max)") - .HasColumnName("ExtraProperties"); - - b.Property("HandledArriveDate") - .HasColumnType("datetime2"); - - b.Property("HandledContainerCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("HandledContainerCode"); - - b.Property("HandledExpireDate") - .HasColumnType("datetime2"); - - b.Property("HandledLot") + b.Property("FromLocationArea") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("HandledLot"); + .HasColumnName("FromLocationArea"); - b.Property("HandledPackingCode") + b.Property("FromLocationCode") + .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("HandledPackingCode"); - - b.Property("HandledProduceDate") - .HasColumnType("datetime2"); - - b.Property("HandledQty") - .HasColumnType("decimal(18,6)"); + .HasColumnName("FromLocationCode"); - b.Property("HandledSupplierBatch") + b.Property("FromLocationErpCode") + .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("HandledSupplierBatch"); + .HasColumnName("FromLocationErpCode"); - b.Property("HandledToLocationArea") + b.Property("FromLocationGroup") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("HandledToLocationArea"); + .HasColumnName("FromLocationGroup"); - b.Property("HandledToLocationCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("HandledToLocationCode"); + b.Property("FromLot") + .HasColumnType("nvarchar(max)"); - b.Property("HandledToLocationErpCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("HandledToLocationErpCode"); + b.Property("FromPackingCode") + .HasColumnType("nvarchar(450)"); - b.Property("HandledToLocationGroup") + b.Property("FromStatus") + .IsRequired() .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("HandledToLocationGroup"); + .HasColumnType("nvarchar(64)"); - b.Property("HandledToWarehouseCode") + b.Property("FromWarehouseCode") + .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("HandledToWarehouseCode"); + .HasColumnName("FromWarehouseCode"); b.Property("ItemCode") .IsRequired() @@ -19357,33 +23258,6 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("LastModifierId"); - b.Property("LocationArea") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("LocationArea"); - - b.Property("LocationCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("LocationCode"); - - b.Property("LocationErpCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("LocationErpCode"); - - b.Property("LocationGroup") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("LocationGroup"); - - b.Property("Lot") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("Lot"); - b.Property("MasterID") .HasColumnType("uniqueidentifier"); @@ -19393,107 +23267,80 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("nvarchar(64)") .HasColumnName("Number"); - b.Property("OnceBusiCode") - .HasColumnType("nvarchar(max)"); - - b.Property("PackingCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("PackingCode"); - b.Property("ProduceDate") .HasColumnType("datetime2"); - b.Property("ProjCapacityCode") - .HasColumnType("nvarchar(max)"); - b.Property("Qty") .HasPrecision(18, 6) .HasColumnType("decimal(18,6)") .HasColumnName("Qty"); - b.Property("ReasonCode") - .HasColumnType("nvarchar(max)"); - - b.Property("RecommendArriveDate") - .HasColumnType("datetime2"); - - b.Property("RecommendContainerCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendContainerCode"); - - b.Property("RecommendExpireDate") - .HasColumnType("datetime2"); - - b.Property("RecommendLot") + b.Property("Reason") .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendLot"); + .HasColumnType("nvarchar(64)"); - b.Property("RecommendPackingCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendPackingCode"); + b.Property("ReasonCode") + .HasMaxLength(4096) + .HasColumnType("nvarchar(max)"); - b.Property("RecommendProduceDate") - .HasColumnType("datetime2"); + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); - b.Property("RecommendQty") + b.Property("StdPackQty") .HasColumnType("decimal(18,6)"); - b.Property("RecommendSupplierBatch") + b.Property("SupplierBatch") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendSupplierBatch"); + .HasColumnName("SupplierBatch"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); - b.Property("RecommendToLocationArea") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendToLocationArea"); + b.Property("ToContainerCode") + .HasColumnType("nvarchar(max)"); - b.Property("RecommendToLocationCode") + b.Property("ToLocationArea") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendToLocationCode"); + .HasColumnName("ToLocationArea"); - b.Property("RecommendToLocationErpCode") + b.Property("ToLocationCode") + .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendToLocationErpCode"); + .HasColumnName("ToLocationCode"); - b.Property("RecommendToLocationGroup") + b.Property("ToLocationErpCode") + .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendToLocationGroup"); + .HasColumnName("ToLocationErpCode"); - b.Property("RecommendToWarehouseCode") + b.Property("ToLocationGroup") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendToWarehouseCode"); + .HasColumnName("ToLocationGroup"); - b.Property("Remark") - .HasMaxLength(3072) - .HasColumnType("nvarchar(3072)") - .HasColumnName("Remark"); + b.Property("ToLot") + .HasColumnType("nvarchar(max)"); - b.Property("Status") + b.Property("ToPackingCode") + .HasColumnType("nvarchar(max)"); + + b.Property("ToStatus") .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)"); - b.Property("StdPackQty") - .HasColumnType("decimal(18,6)"); - - b.Property("SupplierBatch") + b.Property("ToWarehouseCode") + .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("SupplierBatch"); - - b.Property("TenantId") - .HasColumnType("uniqueidentifier") - .HasColumnName("TenantId"); + .HasColumnName("ToWarehouseCode"); b.Property("Uom") .IsRequired() @@ -19501,24 +23348,18 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("nvarchar(64)") .HasColumnName("Uom"); - b.Property("WarehouseCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("WarehouseCode"); - b.HasKey("Id"); b.HasIndex("MasterID"); - b.HasIndex("Number", "PackingCode", "ItemCode", "Lot", "Status") + b.HasIndex("Number", "FromPackingCode", "FromLocationCode", "ToLocationCode", "FromStatus", "ToStatus") .IsUnique() - .HasFilter("[Lot] IS NOT NULL"); + .HasFilter("[FromPackingCode] IS NOT NULL"); - b.ToTable("Store_UnplannedReceiptNoteDetail", (string)null); + b.ToTable("Store_WipWarehouseAdjustNoteDetail", (string)null); }); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.UnplannedReceiptRequest", b => + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.WipWarehouseAdjustRequest", b => { b.Property("Id") .HasColumnType("uniqueidentifier"); @@ -19538,9 +23379,6 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.Property("AutoSubmit") .HasColumnType("bit"); - b.Property("BuildDate") - .HasColumnType("datetime2"); - b.Property("ConcurrencyStamp") .IsConcurrencyToken() .HasMaxLength(40) @@ -19555,14 +23393,6 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("CreatorId"); - b.Property("DeptCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("DeptName") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - b.Property("DirectCreateNote") .HasColumnType("bit"); @@ -19584,9 +23414,6 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("nvarchar(64)") .HasColumnName("Number"); - b.Property("OANumber") - .HasColumnType("nvarchar(max)"); - b.Property("Remark") .HasMaxLength(3072) .HasColumnType("nvarchar(3072)") @@ -19601,8 +23428,9 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("TenantId"); - b.Property("UnplannedReceiptType") - .HasColumnType("int"); + b.Property("Type") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); b.Property("Worker") .HasColumnType("nvarchar(max)"); @@ -19612,10 +23440,10 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.HasIndex("Number") .IsUnique(); - b.ToTable("Store_UnplannedReceiptRequest", (string)null); + b.ToTable("Store_WipWarehouseAdjustRequest", (string)null); }); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.UnplannedReceiptRequestDetail", b => + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.WipWarehouseAdjustRequestDetail", b => { b.Property("Id") .HasColumnType("uniqueidentifier"); @@ -19623,14 +23451,6 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.Property("ArriveDate") .HasColumnType("datetime2"); - b.Property("CaseCode") - .HasColumnType("nvarchar(max)"); - - b.Property("ContainerCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ContainerCode"); - b.Property("CreationTime") .HasColumnType("datetime2") .HasColumnName("CreationTime"); @@ -19642,68 +23462,76 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.Property("ExpireDate") .HasColumnType("datetime2"); - b.Property("Explain") + b.Property("FromContainerCode") .HasColumnType("nvarchar(max)"); - b.Property("ExtraProperties") - .HasColumnType("nvarchar(max)") - .HasColumnName("ExtraProperties"); - - b.Property("ItemCode") - .IsRequired() + b.Property("FromLocationArea") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("ItemCode"); + .HasColumnName("FromLocationArea"); - b.Property("ItemDesc1") + b.Property("FromLocationCode") + .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("ItemDesc1"); + .HasColumnName("FromLocationCode"); - b.Property("ItemDesc2") + b.Property("FromLocationErpCode") + .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("ItemDesc2"); + .HasColumnName("FromLocationErpCode"); - b.Property("ItemName") + b.Property("FromLocationGroup") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("ItemName"); + .HasColumnName("FromLocationGroup"); - b.Property("LastModificationTime") - .HasColumnType("datetime2") - .HasColumnName("LastModificationTime"); + b.Property("FromLot") + .HasColumnType("nvarchar(max)"); - b.Property("LastModifierId") - .HasColumnType("uniqueidentifier") - .HasColumnName("LastModifierId"); + b.Property("FromPackingCode") + .HasColumnType("nvarchar(max)"); - b.Property("LocationArea") + b.Property("FromStatus") + .IsRequired() .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("LocationArea"); + .HasColumnType("nvarchar(64)"); - b.Property("LocationCode") + b.Property("FromWarehouseCode") .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("LocationCode"); + .HasColumnName("FromWarehouseCode"); - b.Property("LocationErpCode") + b.Property("ItemCode") .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("LocationErpCode"); + .HasColumnName("ItemCode"); - b.Property("LocationGroup") + b.Property("ItemDesc1") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("LocationGroup"); + .HasColumnName("ItemDesc1"); - b.Property("Lot") + b.Property("ItemDesc2") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("Lot"); + .HasColumnName("ItemDesc2"); + + b.Property("ItemName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemName"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); b.Property("MasterID") .HasColumnType("uniqueidentifier"); @@ -19714,27 +23542,20 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("nvarchar(64)") .HasColumnName("Number"); - b.Property("OnceBusiCode") - .HasColumnType("nvarchar(max)"); - - b.Property("PackingCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("PackingCode"); - b.Property("ProduceDate") .HasColumnType("datetime2"); - b.Property("ProjCapacityCode") - .HasColumnType("nvarchar(max)"); - b.Property("Qty") .HasPrecision(18, 6) .HasColumnType("decimal(18,6)") .HasColumnName("Qty"); + b.Property("Reason") + .HasMaxLength(4096) + .HasColumnType("nvarchar(max)"); + b.Property("ReasonCode") + .HasMaxLength(4096) .HasColumnType("nvarchar(max)"); b.Property("Remark") @@ -19742,11 +23563,6 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("nvarchar(3072)") .HasColumnName("Remark"); - b.Property("Status") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - b.Property("StdPackQty") .HasColumnType("decimal(18,6)"); @@ -19759,30 +23575,62 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("TenantId"); - b.Property("Uom") + b.Property("ToContainerCode") + .HasColumnType("nvarchar(max)"); + + b.Property("ToLocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToLocationArea"); + + b.Property("ToLocationCode") .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("Uom"); + .HasColumnName("ToLocationCode"); - b.Property("WarehouseCode") + b.Property("ToLocationErpCode") .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("WarehouseCode"); + .HasColumnName("ToLocationErpCode"); + + b.Property("ToLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToLocationGroup"); + + b.Property("ToLot") + .HasColumnType("nvarchar(max)"); + + b.Property("ToPackingCode") + .HasColumnType("nvarchar(max)"); + + b.Property("ToStatus") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ToWarehouseCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToWarehouseCode"); + + b.Property("Uom") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Uom"); b.HasKey("Id"); b.HasIndex("MasterID"); - b.HasIndex("Number", "PackingCode", "ItemCode", "Lot", "Status") - .IsUnique() - .HasFilter("[Lot] IS NOT NULL"); - - b.ToTable("Store_UnplannedReceiptRequestDetail", (string)null); + b.ToTable("Store_WipWarehouseAdjustRequestDetail", (string)null); }); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.WarehouseTransferNote", b => + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.WorkOrder", b => { b.Property("Id") .HasColumnType("uniqueidentifier"); @@ -19804,14 +23652,33 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("CreatorId"); + b.Property("EffectiveDate") + .HasColumnType("datetime2"); + b.Property("ExtraProperties") .HasColumnType("nvarchar(max)") .HasColumnName("ExtraProperties"); - b.Property("JobNumber") + 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("JobNumber"); + .HasColumnName("ItemName"); b.Property("LastModificationTime") .HasColumnType("datetime2") @@ -19821,25 +23688,58 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("LastModifierId"); + b.Property("LocationCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + b.Property("Number") .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)") .HasColumnName("Number"); + b.Property("Op") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Qty") + .HasPrecision(18, 6) + .HasColumnType("decimal(18,6)") + .HasColumnName("Qty"); + b.Property("Remark") .HasMaxLength(3072) .HasColumnType("nvarchar(3072)") .HasColumnName("Remark"); - b.Property("SupplierCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - b.Property("TenantId") .HasColumnType("uniqueidentifier") .HasColumnName("TenantId"); + b.Property("Type") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Uom") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Uom"); + + b.Property("WoStatus") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("WorkOrderId") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("WorkStation") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + b.Property("Worker") .HasColumnType("nvarchar(max)"); @@ -19848,17 +23748,14 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.HasIndex("Number") .IsUnique(); - b.ToTable("Store_WarehouseTransferNote", (string)null); + b.ToTable("Store_WorkOrder", (string)null); }); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.WarehouseTransferNoteDetail", b => + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.WorkOrderDetail", b => { b.Property("Id") .HasColumnType("uniqueidentifier"); - b.Property("ArriveDate") - .HasColumnType("datetime2"); - b.Property("CreationTime") .HasColumnType("datetime2") .HasColumnName("CreationTime"); @@ -19867,51 +23764,9 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("CreatorId"); - b.Property("ExpireDate") + b.Property("EffectiveDate") .HasColumnType("datetime2"); - b.Property("FromContainerCode") - .HasColumnType("nvarchar(max)"); - - b.Property("FromLocationArea") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("FromLocationArea"); - - b.Property("FromLocationCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("FromLocationCode"); - - b.Property("FromLocationErpCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("FromLocationErpCode"); - - b.Property("FromLocationGroup") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("FromLocationGroup"); - - b.Property("FromLot") - .HasColumnType("nvarchar(max)"); - - b.Property("FromPackingCode") - .HasColumnType("nvarchar(450)"); - - b.Property("FromStatus") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("FromWarehouseCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("FromWarehouseCode"); - b.Property("ItemCode") .IsRequired() .HasMaxLength(64) @@ -19950,15 +23805,18 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("nvarchar(64)") .HasColumnName("Number"); - b.Property("ProduceDate") - .HasColumnType("datetime2"); + b.Property("Op") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); - b.Property("Qty") - .HasPrecision(18, 6) - .HasColumnType("decimal(18,6)") - .HasColumnName("Qty"); + b.Property("RawLocationCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); - b.Property("Reason") + b.Property("RawQty") + .HasColumnType("decimal(18,6)"); + + b.Property("RawUom") .HasMaxLength(64) .HasColumnType("nvarchar(64)"); @@ -19967,97 +23825,133 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("nvarchar(3072)") .HasColumnName("Remark"); - b.Property("StdPackQty") - .HasColumnType("decimal(18,6)"); - - b.Property("SupplierBatch") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("SupplierBatch"); - b.Property("TenantId") .HasColumnType("uniqueidentifier") .HasColumnName("TenantId"); - b.Property("ToContainerCode") - .HasColumnType("nvarchar(max)"); + b.HasKey("Id"); - b.Property("ToLocationArea") + b.HasIndex("MasterID"); + + b.HasIndex("Number", "ItemCode") + .IsUnique(); + + b.ToTable("Store_WorkOrderDetail", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Equipments.EquipmentRecord", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("BarCode") .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ToLocationArea"); + .HasColumnType("nvarchar(64)"); - b.Property("ToLocationCode") - .IsRequired() + b.Property("Batch") .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ToLocationCode"); + .HasColumnType("nvarchar(64)"); - b.Property("ToLocationErpCode") - .IsRequired() + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("EqptCode") .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ToLocationErpCode"); + .HasColumnType("nvarchar(64)"); - b.Property("ToLocationGroup") + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("FromLocCode") .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ToLocationGroup"); + .HasColumnType("nvarchar(64)"); - b.Property("ToLot") - .HasColumnType("nvarchar(max)"); + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); - b.Property("ToPackingCode") - .HasColumnType("nvarchar(max)"); + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); - b.Property("ToStatus") - .IsRequired() + b.Property("PartCode") .HasMaxLength(64) .HasColumnType("nvarchar(64)"); - b.Property("ToWarehouseCode") - .IsRequired() + b.Property("Qty") + .HasColumnType("decimal(18,6)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("State") + .HasColumnType("int"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("ToLocCode") .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ToWarehouseCode"); + .HasColumnType("nvarchar(64)"); - b.Property("Uom") - .IsRequired() + b.Property("Type") .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("Uom"); + .HasColumnType("int"); b.HasKey("Id"); - b.HasIndex("MasterID"); - - b.HasIndex("Number", "FromPackingCode", "FromLocationCode", "ToLocationCode") - .IsUnique() - .HasFilter("[FromPackingCode] IS NOT NULL"); + b.HasIndex("EqptCode"); - b.ToTable("Store_WarehouseTransferNoteDetail", (string)null); + b.ToTable("Store_EquipmentRecord", (string)null); }); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.WipWarehouseAdjustNote", b => + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Jobs.IssueJobs.CoatingIssueJob", b => { b.Property("Id") + .ValueGeneratedOnAdd() .HasColumnType("uniqueidentifier"); - b.Property("ActiveDate") + b.Property("AcceptTime") + .HasColumnType("datetime2"); + + b.Property("AcceptUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("AcceptUserName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("CompleteTime") .HasColumnType("datetime2"); + b.Property("CompleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CompleteUserName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + b.Property("ConcurrencyStamp") .IsConcurrencyToken() .HasMaxLength(40) .HasColumnType("nvarchar(40)") .HasColumnName("ConcurrencyStamp"); - b.Property("ConfirmTime") - .HasColumnType("datetime2"); - - b.Property("Confirmed") - .HasColumnType("bit"); - b.Property("CreationTime") .HasColumnType("datetime2") .HasColumnName("CreationTime"); @@ -20070,10 +23964,24 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("nvarchar(max)") .HasColumnName("ExtraProperties"); - b.Property("JobNumber") + b.Property("IsAutoComplete") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false); + + b.Property("JobDescription") + .HasMaxLength(1024) + .HasColumnType("nvarchar(1024)"); + + b.Property("JobStatus") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("JobType") + .IsRequired() .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("JobNumber"); + .HasColumnType("nvarchar(64)"); b.Property("LastModificationTime") .HasColumnType("datetime2") @@ -20083,47 +23991,77 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("LastModifierId"); + b.Property("MaterialRequestNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + b.Property("Number") .IsRequired() .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("Number"); + .HasColumnType("nvarchar(64)"); + + b.Property("Priority") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasDefaultValue(0); + + b.Property("PriorityIncrement") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasDefaultValue(0); + + b.Property("ProdLine") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); b.Property("Remark") .HasMaxLength(3072) .HasColumnType("nvarchar(3072)") .HasColumnName("Remark"); - b.Property("RequestNumber") - .HasColumnType("nvarchar(max)"); + b.Property("RequestType") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); b.Property("TenantId") .HasColumnType("uniqueidentifier") .HasColumnName("TenantId"); - b.Property("Type") + b.Property("UpStreamJobNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("UseOnTheWayLocation") + .HasColumnType("bit"); + + b.Property("WarehouseCode") + .HasColumnType("nvarchar(max)"); + + b.Property("WorkGroupCode") .HasMaxLength(64) .HasColumnType("nvarchar(64)"); b.Property("Worker") .HasColumnType("nvarchar(max)"); + b.Property("Workshop") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + b.HasKey("Id"); b.HasIndex("Number") .IsUnique(); - b.ToTable("Store_WipWarehouseAdjustNote", (string)null); + b.ToTable("Job_CoatingIssueJob", (string)null); }); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.WipWarehouseAdjustNoteDetail", b => + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Jobs.IssueJobs.CoatingIssueJobDetail", b => { b.Property("Id") + .ValueGeneratedOnAdd() .HasColumnType("uniqueidentifier"); - b.Property("ArriveDate") - .HasColumnType("datetime2"); - b.Property("CreationTime") .HasColumnType("datetime2") .HasColumnName("CreationTime"); @@ -20132,50 +24070,73 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("CreatorId"); - b.Property("ExpireDate") + b.Property("DeliveryQty") + .HasColumnType("decimal(18,6)"); + + b.Property("DistributionType") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ExpiredTime") .HasColumnType("datetime2"); - b.Property("FromContainerCode") - .HasColumnType("nvarchar(max)"); + b.Property("HandledArriveDate") + .HasColumnType("datetime2"); - b.Property("FromLocationArea") + b.Property("HandledContainerCode") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("FromLocationArea"); + .HasColumnName("HandledContainerCode"); - b.Property("FromLocationCode") - .IsRequired() + b.Property("HandledExpireDate") + .HasColumnType("datetime2"); + + b.Property("HandledFromLocationArea") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("FromLocationCode"); + .HasColumnName("HandledFromLocationArea"); - b.Property("FromLocationErpCode") - .IsRequired() + b.Property("HandledFromLocationCode") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("FromLocationErpCode"); + .HasColumnName("HandledFromLocationCode"); - b.Property("FromLocationGroup") + b.Property("HandledFromLocationErpCode") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("FromLocationGroup"); + .HasColumnName("HandledFromLocationErpCode"); - b.Property("FromLot") - .HasColumnType("nvarchar(max)"); + b.Property("HandledFromLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledFromLocationGroup"); - b.Property("FromPackingCode") - .HasColumnType("nvarchar(450)"); + b.Property("HandledFromWarehouseCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledFromWarehouseCode"); - b.Property("FromStatus") - .IsRequired() + b.Property("HandledLot") .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledLot"); - b.Property("FromWarehouseCode") - .IsRequired() + b.Property("HandledPackingCode") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("FromWarehouseCode"); + .HasColumnName("HandledPackingCode"); + + b.Property("HandledProduceDate") + .HasColumnType("datetime2"); + + b.Property("HandledQty") + .HasColumnType("decimal(18,6)"); + + b.Property("HandledSupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledSupplierBatch"); b.Property("ItemCode") .IsRequired() @@ -20212,127 +24173,178 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.Property("Number") .IsRequired() .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("Number"); + .HasColumnType("nvarchar(64)"); - b.Property("ProduceDate") + b.Property("OnTheWayLocationCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Operation") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("PlanBeginTime") .HasColumnType("datetime2"); - b.Property("Qty") - .HasPrecision(18, 6) - .HasColumnType("decimal(18,6)") - .HasColumnName("Qty"); + b.Property("PlannedSplitRule") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); - b.Property("Reason") + b.Property("PositionCode") .HasMaxLength(64) .HasColumnType("nvarchar(64)"); - b.Property("ReasonCode") - .HasMaxLength(4096) - .HasColumnType("nvarchar(max)"); + b.Property("ProdLine") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("RecommendArriveDate") + .HasColumnType("datetime2"); + + b.Property("RecommendContainerCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendContainerCode"); + + b.Property("RecommendExpireDate") + .HasColumnType("datetime2"); + + b.Property("RecommendFromLocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendFromLocationArea"); + + b.Property("RecommendFromLocationCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendFromLocationCode"); + + b.Property("RecommendFromLocationErpCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendFromLocationErpCode"); + + b.Property("RecommendFromLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendFromLocationGroup"); + + b.Property("RecommendFromWarehouseCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendFromWarehouseCode"); + + b.Property("RecommendLot") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendLot"); + + b.Property("RecommendPackingCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendPackingCode"); + + b.Property("RecommendProduceDate") + .HasColumnType("datetime2"); + + b.Property("RecommendQty") + .HasColumnType("decimal(18,6)"); + + b.Property("RecommendSupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendSupplierBatch"); + + b.Property("RecommendType") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); b.Property("Remark") .HasMaxLength(3072) .HasColumnType("nvarchar(3072)") .HasColumnName("Remark"); - b.Property("StdPackQty") + b.Property("RequestLocationCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("RoundedQty") .HasColumnType("decimal(18,6)"); - b.Property("SupplierBatch") + b.Property("Status") + .IsRequired() .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("SupplierBatch"); + .HasColumnType("nvarchar(64)"); + + b.Property("StdPackQty") + .HasColumnType("decimal(18,6)"); b.Property("TenantId") .HasColumnType("uniqueidentifier") .HasColumnName("TenantId"); - b.Property("ToContainerCode") - .HasColumnType("nvarchar(max)"); - b.Property("ToLocationArea") .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ToLocationArea"); + .HasColumnType("nvarchar(64)"); b.Property("ToLocationCode") - .IsRequired() .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ToLocationCode"); + .HasColumnType("nvarchar(64)"); b.Property("ToLocationErpCode") - .IsRequired() .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ToLocationErpCode"); + .HasColumnType("nvarchar(64)"); b.Property("ToLocationGroup") .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ToLocationGroup"); - - b.Property("ToLot") - .HasColumnType("nvarchar(max)"); - - b.Property("ToPackingCode") - .HasColumnType("nvarchar(max)"); + .HasColumnType("nvarchar(64)"); - b.Property("ToStatus") - .IsRequired() + b.Property("ToWarehouseCode") .HasMaxLength(64) .HasColumnType("nvarchar(64)"); - b.Property("ToWarehouseCode") + b.Property("TruncType") .IsRequired() .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ToWarehouseCode"); + .HasColumnType("nvarchar(64)"); b.Property("Uom") - .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("WorkStation") .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("Uom"); + .HasColumnType("nvarchar(64)"); b.HasKey("Id"); b.HasIndex("MasterID"); - b.HasIndex("Number", "FromPackingCode", "FromLocationCode", "ToLocationCode", "FromStatus", "ToStatus") - .IsUnique() - .HasFilter("[FromPackingCode] IS NOT NULL"); - - b.ToTable("Store_WipWarehouseAdjustNoteDetail", (string)null); + b.ToTable("Job_CoatingIssueJobDetail", (string)null); }); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.WipWarehouseAdjustRequest", b => + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Notes.IssueNotes.CoatingIssueNote", b => { b.Property("Id") + .ValueGeneratedOnAdd() .HasColumnType("uniqueidentifier"); b.Property("ActiveDate") .HasColumnType("datetime2"); - b.Property("AutoAgree") - .HasColumnType("bit"); - - b.Property("AutoCompleteJob") - .HasColumnType("bit"); - - b.Property("AutoHandle") - .HasColumnType("bit"); - - b.Property("AutoSubmit") - .HasColumnType("bit"); - b.Property("ConcurrencyStamp") .IsConcurrencyToken() .HasMaxLength(40) .HasColumnType("nvarchar(40)") .HasColumnName("ConcurrencyStamp"); + b.Property("ConfirmTime") + .HasColumnType("datetime2"); + + b.Property("Confirmed") + .HasColumnType("bit"); + b.Property("CreationTime") .HasColumnType("datetime2") .HasColumnName("CreationTime"); @@ -20341,13 +24353,15 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("CreatorId"); - b.Property("DirectCreateNote") - .HasColumnType("bit"); - b.Property("ExtraProperties") .HasColumnType("nvarchar(max)") .HasColumnName("ExtraProperties"); + b.Property("JobNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("JobNumber"); + b.Property("LastModificationTime") .HasColumnType("datetime2") .HasColumnName("LastModificationTime"); @@ -20367,8 +24381,11 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("nvarchar(3072)") .HasColumnName("Remark"); - b.Property("RequestStatus") - .IsRequired() + b.Property("RequestNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("RequestType") .HasMaxLength(64) .HasColumnType("nvarchar(64)"); @@ -20376,24 +24393,28 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("TenantId"); - b.Property("Type") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + b.Property("UseOnTheWayLocation") + .HasColumnType("bit"); b.Property("Worker") .HasColumnType("nvarchar(max)"); + b.Property("Workshop") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + b.HasKey("Id"); b.HasIndex("Number") .IsUnique(); - b.ToTable("Store_WipWarehouseAdjustRequest", (string)null); + b.ToTable("Store_CoatingIssueNote", (string)null); }); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.WipWarehouseAdjustRequestDetail", b => + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Notes.IssueNotes.CoatingIssueNoteDetail", b => { b.Property("Id") + .ValueGeneratedOnAdd() .HasColumnType("uniqueidentifier"); b.Property("ArriveDate") @@ -20410,6 +24431,9 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.Property("ExpireDate") .HasColumnType("datetime2"); + b.Property("ExpiredTime") + .HasColumnType("datetime2"); + b.Property("FromContainerCode") .HasColumnType("nvarchar(max)"); @@ -20439,7 +24463,7 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("nvarchar(max)"); b.Property("FromPackingCode") - .HasColumnType("nvarchar(max)"); + .HasColumnType("nvarchar(450)"); b.Property("FromStatus") .IsRequired() @@ -20452,6 +24476,66 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("nvarchar(64)") .HasColumnName("FromWarehouseCode"); + b.Property("HandledArriveDate") + .HasColumnType("datetime2"); + + b.Property("HandledContainerCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledContainerCode"); + + b.Property("HandledExpireDate") + .HasColumnType("datetime2"); + + b.Property("HandledFromLocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledFromLocationArea"); + + b.Property("HandledFromLocationCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledFromLocationCode"); + + b.Property("HandledFromLocationErpCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledFromLocationErpCode"); + + b.Property("HandledFromLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledFromLocationGroup"); + + b.Property("HandledFromWarehouseCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledFromWarehouseCode"); + + b.Property("HandledLot") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledLot"); + + b.Property("HandledPackingCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledPackingCode"); + + b.Property("HandledProduceDate") + .HasColumnType("datetime2"); + + b.Property("HandledQty") + .HasColumnType("decimal(18,6)"); + + b.Property("HandledSupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledSupplierBatch"); + + b.Property("IssueTime") + .HasColumnType("datetime2"); + b.Property("ItemCode") .IsRequired() .HasMaxLength(64) @@ -20490,6 +24574,17 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("nvarchar(64)") .HasColumnName("Number"); + b.Property("OnTheWayLocationCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("PositionCode") + .HasColumnType("nvarchar(max)"); + + b.Property("ProdLine") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + b.Property("ProduceDate") .HasColumnType("datetime2"); @@ -20498,13 +24593,67 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("decimal(18,6)") .HasColumnName("Qty"); - b.Property("Reason") - .HasMaxLength(4096) - .HasColumnType("nvarchar(max)"); + b.Property("RecommendArriveDate") + .HasColumnType("datetime2"); - b.Property("ReasonCode") - .HasMaxLength(4096) - .HasColumnType("nvarchar(max)"); + b.Property("RecommendContainerCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendContainerCode"); + + b.Property("RecommendExpireDate") + .HasColumnType("datetime2"); + + b.Property("RecommendFromLocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendFromLocationArea"); + + b.Property("RecommendFromLocationCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendFromLocationCode"); + + b.Property("RecommendFromLocationErpCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendFromLocationErpCode"); + + b.Property("RecommendFromLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendFromLocationGroup"); + + b.Property("RecommendFromWarehouseCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendFromWarehouseCode"); + + b.Property("RecommendLot") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendLot"); + + b.Property("RecommendPackingCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendPackingCode"); + + b.Property("RecommendProduceDate") + .HasColumnType("datetime2"); + + b.Property("RecommendQty") + .HasColumnType("decimal(18,6)"); + + b.Property("RecommendSupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendSupplierBatch"); + + b.Property("RecommendType") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); b.Property("Remark") .HasMaxLength(3072) @@ -20571,21 +24720,44 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("nvarchar(64)") .HasColumnName("Uom"); + b.Property("WorkStation") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + b.HasKey("Id"); + b.HasIndex("FromPackingCode"); + b.HasIndex("MasterID"); - b.ToTable("Store_WipWarehouseAdjustRequestDetail", (string)null); + b.HasIndex("Number", "FromPackingCode", "FromLocationCode", "ToLocationCode") + .IsUnique() + .HasFilter("[FromPackingCode] IS NOT NULL"); + + b.ToTable("Store_CoatingIssueNoteDetail", (string)null); }); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.WorkOrder", b => + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Requests.MaterialRequests.CoatingMaterialRequest", b => { b.Property("Id") + .ValueGeneratedOnAdd() .HasColumnType("uniqueidentifier"); b.Property("ActiveDate") .HasColumnType("datetime2"); + b.Property("AutoAgree") + .HasColumnType("bit"); + + b.Property("AutoCompleteJob") + .HasColumnType("bit"); + + b.Property("AutoHandle") + .HasColumnType("bit"); + + b.Property("AutoSubmit") + .HasColumnType("bit"); + b.Property("ConcurrencyStamp") .IsConcurrencyToken() .HasMaxLength(40) @@ -20600,34 +24772,13 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("CreatorId"); - b.Property("EffectiveDate") - .HasColumnType("datetime2"); + b.Property("DirectCreateNote") + .HasColumnType("bit"); b.Property("ExtraProperties") .HasColumnType("nvarchar(max)") .HasColumnName("ExtraProperties"); - b.Property("ItemCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ItemCode"); - - b.Property("ItemDesc1") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ItemDesc1"); - - b.Property("ItemDesc2") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ItemDesc2"); - - b.Property("ItemName") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ItemName"); - b.Property("LastModificationTime") .HasColumnType("datetime2") .HasColumnName("LastModificationTime"); @@ -20636,72 +24787,60 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("LastModifierId"); - b.Property("LocationCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - b.Property("Number") .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)") .HasColumnName("Number"); - b.Property("Op") + b.Property("PreparationPlanNumber") .HasMaxLength(64) .HasColumnType("nvarchar(64)"); - b.Property("Qty") - .HasPrecision(18, 6) - .HasColumnType("decimal(18,6)") - .HasColumnName("Qty"); + b.Property("ProdLine") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); b.Property("Remark") .HasMaxLength(3072) .HasColumnType("nvarchar(3072)") .HasColumnName("Remark"); + b.Property("RequestStatus") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + b.Property("TenantId") .HasColumnType("uniqueidentifier") .HasColumnName("TenantId"); b.Property("Type") - .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)"); - b.Property("Uom") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("Uom"); - - b.Property("WoStatus") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + b.Property("UseOnTheWayLocation") + .HasColumnType("bit"); - b.Property("WorkOrderId") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + b.Property("Worker") + .HasColumnType("nvarchar(max)"); - b.Property("WorkStation") + b.Property("Workshop") .HasMaxLength(64) .HasColumnType("nvarchar(64)"); - b.Property("Worker") - .HasColumnType("nvarchar(max)"); - b.HasKey("Id"); b.HasIndex("Number") .IsUnique(); - b.ToTable("Store_WorkOrder", (string)null); + b.ToTable("Store_CoatingMaterialRequest", (string)null); }); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.WorkOrderDetail", b => + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Requests.MaterialRequests.CoatingMaterialRequestDetail", b => { b.Property("Id") + .ValueGeneratedOnAdd() .HasColumnType("uniqueidentifier"); b.Property("CreationTime") @@ -20712,9 +24851,16 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("CreatorId"); - b.Property("EffectiveDate") + b.Property("ExpiredTime") .HasColumnType("datetime2"); + b.Property("FromLocationArea") + .HasColumnType("nvarchar(max)"); + + b.Property("IssuedQty") + .HasPrecision(18, 6) + .HasColumnType("decimal(18,6)"); + b.Property("ItemCode") .IsRequired() .HasMaxLength(64) @@ -20753,18 +24899,24 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("nvarchar(64)") .HasColumnName("Number"); - b.Property("Op") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + b.Property("PositionCode") + .HasColumnType("nvarchar(max)"); - b.Property("RawLocationCode") + b.Property("ProdLine") .HasMaxLength(64) .HasColumnType("nvarchar(64)"); - b.Property("RawQty") + b.Property("Qty") + .HasPrecision(18, 6) + .HasColumnType("decimal(18,6)") + .HasColumnName("Qty"); + + b.Property("ReceivedQty") + .HasPrecision(18, 6) .HasColumnType("decimal(18,6)"); - b.Property("RawUom") + b.Property("RecommendType") + .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)"); @@ -20773,18 +24925,63 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("nvarchar(3072)") .HasColumnName("Remark"); + b.Property("Status") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("StdPackQty") + .HasColumnType("decimal(18,6)"); + b.Property("TenantId") .HasColumnType("uniqueidentifier") .HasColumnName("TenantId"); + b.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") + b.HasIndex("Number", "ItemCode", "ToLocationCode") .IsUnique(); - b.ToTable("Store_WorkOrderDetail", (string)null); + b.ToTable("Store_CoatingMaterialRequestDetail", (string)null); }); modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.BackFlushNoteDetail", b => @@ -20814,6 +25011,33 @@ namespace Win_in.Sfs.Wms.Store.Migrations .IsRequired(); }); + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ContainerJobDetail", b => + { + b.HasOne("Win_in.Sfs.Wms.Store.Domain.ContainerJob", null) + .WithMany("Details") + .HasForeignKey("MasterID") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ContainerNoteDetail", b => + { + b.HasOne("Win_in.Sfs.Wms.Store.Domain.ContainerNote", null) + .WithMany("Details") + .HasForeignKey("MasterID") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ContainerRequestDetail", b => + { + b.HasOne("Win_in.Sfs.Wms.Store.Domain.ContainerRequest", null) + .WithMany("Details") + .HasForeignKey("MasterID") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.CountAdjustNoteDetail", b => { b.HasOne("Win_in.Sfs.Wms.Store.Domain.CountAdjustNote", null) @@ -20913,6 +25137,33 @@ namespace Win_in.Sfs.Wms.Store.Migrations .IsRequired(); }); + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.InjectionJobDetail", b => + { + b.HasOne("Win_in.Sfs.Wms.Store.Domain.InjectionJob", null) + .WithMany("Details") + .HasForeignKey("MasterID") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.InjectionNoteDetail", b => + { + b.HasOne("Win_in.Sfs.Wms.Store.Domain.InjectionNote", null) + .WithMany("Details") + .HasForeignKey("MasterID") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.InjectionRequestDetail", b => + { + b.HasOne("Win_in.Sfs.Wms.Store.Domain.InjectionRequest", null) + .WithMany("Details") + .HasForeignKey("MasterID") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.InspectAbnormalNoteDetail", b => { b.HasOne("Win_in.Sfs.Wms.Store.Domain.InspectAbnormalNote", null) @@ -21174,6 +25425,15 @@ namespace Win_in.Sfs.Wms.Store.Migrations .IsRequired(); }); + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ProductRecycleJobDetail", b => + { + b.HasOne("Win_in.Sfs.Wms.Store.Domain.ProductRecycleJob", null) + .WithMany("Details") + .HasForeignKey("MasterID") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ProductRecycleMaterialDetail", b => { b.HasOne("Win_in.Sfs.Wms.Store.Domain.ProductRecycleNote", null) @@ -21345,6 +25605,33 @@ namespace Win_in.Sfs.Wms.Store.Migrations .IsRequired(); }); + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.TransferLibJobDetail", b => + { + b.HasOne("Win_in.Sfs.Wms.Store.Domain.TransferLibJob", null) + .WithMany("Details") + .HasForeignKey("MasterID") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.TransferLibNoteDetail", b => + { + b.HasOne("Win_in.Sfs.Wms.Store.Domain.TransferLibNote", null) + .WithMany("Details") + .HasForeignKey("MasterID") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.TransferLibRequestDetail", b => + { + b.HasOne("Win_in.Sfs.Wms.Store.Domain.TransferLibRequest", null) + .WithMany("Details") + .HasForeignKey("MasterID") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.TransferNoteDetail", b => { b.HasOne("Win_in.Sfs.Wms.Store.Domain.TransferNote", null) @@ -21453,6 +25740,33 @@ namespace Win_in.Sfs.Wms.Store.Migrations .IsRequired(); }); + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Jobs.IssueJobs.CoatingIssueJobDetail", b => + { + b.HasOne("Win_in.Sfs.Wms.Store.Jobs.IssueJobs.CoatingIssueJob", null) + .WithMany("Details") + .HasForeignKey("MasterID") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Notes.IssueNotes.CoatingIssueNoteDetail", b => + { + b.HasOne("Win_in.Sfs.Wms.Store.Notes.IssueNotes.CoatingIssueNote", null) + .WithMany("Details") + .HasForeignKey("MasterID") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Requests.MaterialRequests.CoatingMaterialRequestDetail", b => + { + b.HasOne("Win_in.Sfs.Wms.Store.Requests.MaterialRequests.CoatingMaterialRequest", null) + .WithMany("Details") + .HasForeignKey("MasterID") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.BackFlushNote", b => { b.Navigation("Details"); @@ -21468,6 +25782,21 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.Navigation("Details"); }); + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ContainerJob", b => + { + b.Navigation("Details"); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ContainerNote", b => + { + b.Navigation("Details"); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ContainerRequest", b => + { + b.Navigation("Details"); + }); + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.CountAdjustNote", b => { b.Navigation("Details"); @@ -21523,6 +25852,21 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.Navigation("Details"); }); + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.InjectionJob", b => + { + b.Navigation("Details"); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.InjectionNote", b => + { + b.Navigation("Details"); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.InjectionRequest", b => + { + b.Navigation("Details"); + }); + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.InspectAbnormalNote", b => { b.Navigation("Details"); @@ -21659,6 +26003,11 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.Navigation("Details"); }); + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ProductRecycleJob", b => + { + b.Navigation("Details"); + }); + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ProductRecycleNote", b => { b.Navigation("Details"); @@ -21751,6 +26100,21 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.Navigation("Details"); }); + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.TransferLibJob", b => + { + b.Navigation("Details"); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.TransferLibNote", b => + { + b.Navigation("Details"); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.TransferLibRequest", b => + { + b.Navigation("Details"); + }); + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.TransferNote", b => { b.Navigation("Details"); @@ -21810,6 +26174,21 @@ namespace Win_in.Sfs.Wms.Store.Migrations { b.Navigation("Details"); }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Jobs.IssueJobs.CoatingIssueJob", b => + { + b.Navigation("Details"); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Notes.IssueNotes.CoatingIssueNote", b => + { + b.Navigation("Details"); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Requests.MaterialRequests.CoatingMaterialRequest", b => + { + b.Navigation("Details"); + }); #pragma warning restore 612, 618 } } diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/Migrations/20240328035332_Update_2024_03_28_ProductLine.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/Migrations/20240328035332_Update_2024_03_28_ProductLine.cs new file mode 100644 index 000000000..098d5c63a --- /dev/null +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/Migrations/20240328035332_Update_2024_03_28_ProductLine.cs @@ -0,0 +1,801 @@ +using System; +using Microsoft.EntityFrameworkCore.Migrations; + +#nullable disable + +namespace Win_in.Sfs.Wms.Store.Migrations +{ + public partial class Update_2024_03_28_ProductLine : Migration + { + protected override void Up(MigrationBuilder migrationBuilder) + { + migrationBuilder.AddColumn( + name: "Confirmed", + table: "Job_TransferLibJob", + type: "bit", + nullable: false, + defaultValue: false); + + migrationBuilder.CreateTable( + name: "Job_CoatingIssueJob", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + RequestType = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + ProdLine = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + MaterialRequestNumber = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + Workshop = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + UseOnTheWayLocation = table.Column(type: "bit", nullable: false), + ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true), + ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: true), + CreationTime = table.Column(type: "datetime2", nullable: false), + CreatorId = table.Column(type: "uniqueidentifier", nullable: true), + LastModificationTime = table.Column(type: "datetime2", nullable: true), + LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + Remark = table.Column(type: "nvarchar(3072)", maxLength: 3072, nullable: true), + Worker = table.Column(type: "nvarchar(max)", nullable: true), + Number = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + UpStreamJobNumber = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + JobDescription = table.Column(type: "nvarchar(1024)", maxLength: 1024, nullable: true), + JobType = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + JobStatus = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + Priority = table.Column(type: "int", nullable: false, defaultValue: 0), + PriorityIncrement = table.Column(type: "int", nullable: false, defaultValue: 0), + WorkGroupCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + IsAutoComplete = table.Column(type: "bit", nullable: false, defaultValue: false), + AcceptUserId = table.Column(type: "uniqueidentifier", nullable: true), + AcceptUserName = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + AcceptTime = table.Column(type: "datetime2", nullable: true), + CompleteUserId = table.Column(type: "uniqueidentifier", nullable: true), + CompleteUserName = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + CompleteTime = table.Column(type: "datetime2", nullable: true), + WarehouseCode = table.Column(type: "nvarchar(max)", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_Job_CoatingIssueJob", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "Job_InjectionJob", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + RequestType = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + ProdLine = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + InjectionRequestNumber = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + Workshop = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + UseOnTheWayLocation = table.Column(type: "bit", nullable: false), + ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true), + ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: true), + CreationTime = table.Column(type: "datetime2", nullable: false), + CreatorId = table.Column(type: "uniqueidentifier", nullable: true), + LastModificationTime = table.Column(type: "datetime2", nullable: true), + LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + Remark = table.Column(type: "nvarchar(3072)", maxLength: 3072, nullable: true), + Worker = table.Column(type: "nvarchar(max)", nullable: true), + Number = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + UpStreamJobNumber = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + JobDescription = table.Column(type: "nvarchar(1024)", maxLength: 1024, nullable: true), + JobType = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + JobStatus = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + Priority = table.Column(type: "int", nullable: false, defaultValue: 0), + PriorityIncrement = table.Column(type: "int", nullable: false, defaultValue: 0), + WorkGroupCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + IsAutoComplete = table.Column(type: "bit", nullable: false, defaultValue: false), + AcceptUserId = table.Column(type: "uniqueidentifier", nullable: true), + AcceptUserName = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + AcceptTime = table.Column(type: "datetime2", nullable: true), + CompleteUserId = table.Column(type: "uniqueidentifier", nullable: true), + CompleteUserName = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + CompleteTime = table.Column(type: "datetime2", nullable: true), + WarehouseCode = table.Column(type: "nvarchar(max)", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_Job_InjectionJob", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "Store_CoatingIssueNote", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + JobNumber = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + Workshop = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + RequestNumber = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + RequestType = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + UseOnTheWayLocation = table.Column(type: "bit", nullable: false), + ConfirmTime = table.Column(type: "datetime2", nullable: true), + Confirmed = table.Column(type: "bit", nullable: false), + ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true), + ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: true), + CreationTime = table.Column(type: "datetime2", nullable: false), + CreatorId = table.Column(type: "uniqueidentifier", nullable: true), + LastModificationTime = table.Column(type: "datetime2", nullable: true), + LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + Remark = table.Column(type: "nvarchar(3072)", maxLength: 3072, nullable: true), + Worker = table.Column(type: "nvarchar(max)", nullable: true), + Number = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + ActiveDate = table.Column(type: "datetime2", nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_Store_CoatingIssueNote", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "Store_CoatingMaterialRequest", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + Type = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + PreparationPlanNumber = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + ProdLine = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + Workshop = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + UseOnTheWayLocation = table.Column(type: "bit", nullable: false), + ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true), + ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: true), + CreationTime = table.Column(type: "datetime2", nullable: false), + CreatorId = table.Column(type: "uniqueidentifier", nullable: true), + LastModificationTime = table.Column(type: "datetime2", nullable: true), + LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + Remark = table.Column(type: "nvarchar(3072)", maxLength: 3072, nullable: true), + Worker = table.Column(type: "nvarchar(max)", nullable: true), + Number = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + ActiveDate = table.Column(type: "datetime2", nullable: false), + AutoSubmit = table.Column(type: "bit", nullable: false), + AutoAgree = table.Column(type: "bit", nullable: false), + AutoHandle = table.Column(type: "bit", nullable: false), + AutoCompleteJob = table.Column(type: "bit", nullable: false), + DirectCreateNote = table.Column(type: "bit", nullable: false), + RequestStatus = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_Store_CoatingMaterialRequest", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "Store_InjectionNote", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + JobNumber = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + Workshop = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + RequestNumber = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + RequestType = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + UseOnTheWayLocation = table.Column(type: "bit", nullable: false), + ConfirmTime = table.Column(type: "datetime2", nullable: true), + Confirmed = table.Column(type: "bit", nullable: false), + ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true), + ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: true), + CreationTime = table.Column(type: "datetime2", nullable: false), + CreatorId = table.Column(type: "uniqueidentifier", nullable: true), + LastModificationTime = table.Column(type: "datetime2", nullable: true), + LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + Remark = table.Column(type: "nvarchar(3072)", maxLength: 3072, nullable: true), + Worker = table.Column(type: "nvarchar(max)", nullable: true), + Number = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + ActiveDate = table.Column(type: "datetime2", nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_Store_InjectionNote", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "Store_InjectionRequest", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + Type = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + PreparationPlanNumber = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + ProdLine = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + Workshop = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + UseOnTheWayLocation = table.Column(type: "bit", nullable: false), + ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true), + ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: true), + CreationTime = table.Column(type: "datetime2", nullable: false), + CreatorId = table.Column(type: "uniqueidentifier", nullable: true), + LastModificationTime = table.Column(type: "datetime2", nullable: true), + LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + Remark = table.Column(type: "nvarchar(3072)", maxLength: 3072, nullable: true), + Worker = table.Column(type: "nvarchar(max)", nullable: true), + Number = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + ActiveDate = table.Column(type: "datetime2", nullable: false), + AutoSubmit = table.Column(type: "bit", nullable: false), + AutoAgree = table.Column(type: "bit", nullable: false), + AutoHandle = table.Column(type: "bit", nullable: false), + AutoCompleteJob = table.Column(type: "bit", nullable: false), + DirectCreateNote = table.Column(type: "bit", nullable: false), + RequestStatus = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_Store_InjectionRequest", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "Job_CoatingIssueJobDetail", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + RequestLocationCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + ToLocationCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + ToLocationArea = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + ToLocationGroup = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + ToLocationErpCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + ToWarehouseCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + OnTheWayLocationCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + ProdLine = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + WorkStation = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + ExpiredTime = table.Column(type: "datetime2", nullable: false), + Operation = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + DistributionType = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + TruncType = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + RoundedQty = table.Column(type: "decimal(18,6)", nullable: false), + PlannedSplitRule = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + PlanBeginTime = table.Column(type: "datetime2", nullable: false), + DeliveryQty = table.Column(type: "decimal(18,6)", nullable: false), + PositionCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + RecommendType = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + CreationTime = table.Column(type: "datetime2", nullable: false), + CreatorId = table.Column(type: "uniqueidentifier", nullable: true), + LastModificationTime = table.Column(type: "datetime2", nullable: true), + LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), + MasterID = table.Column(type: "uniqueidentifier", nullable: false), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + Number = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + Remark = table.Column(type: "nvarchar(3072)", maxLength: 3072, nullable: true), + ItemName = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + ItemDesc1 = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + ItemDesc2 = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + ItemCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + StdPackQty = table.Column(type: "decimal(18,6)", nullable: false), + Status = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + RecommendContainerCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + RecommendPackingCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + RecommendSupplierBatch = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + RecommendArriveDate = table.Column(type: "datetime2", nullable: false), + RecommendProduceDate = table.Column(type: "datetime2", nullable: false), + RecommendExpireDate = table.Column(type: "datetime2", nullable: false), + RecommendLot = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + RecommendFromLocationCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + RecommendFromLocationArea = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + RecommendFromLocationGroup = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + RecommendFromLocationErpCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + RecommendFromWarehouseCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + Uom = table.Column(type: "nvarchar(max)", nullable: true), + RecommendQty = table.Column(type: "decimal(18,6)", nullable: false), + HandledContainerCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + HandledPackingCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + HandledSupplierBatch = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + HandledArriveDate = table.Column(type: "datetime2", nullable: false), + HandledProduceDate = table.Column(type: "datetime2", nullable: false), + HandledExpireDate = table.Column(type: "datetime2", nullable: false), + HandledLot = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + HandledFromLocationCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + HandledFromLocationArea = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + HandledFromLocationGroup = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + HandledFromLocationErpCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + HandledFromWarehouseCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + HandledQty = table.Column(type: "decimal(18,6)", nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_Job_CoatingIssueJobDetail", x => x.Id); + table.ForeignKey( + name: "FK_Job_CoatingIssueJobDetail_Job_CoatingIssueJob_MasterID", + column: x => x.MasterID, + principalTable: "Job_CoatingIssueJob", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }); + + migrationBuilder.CreateTable( + name: "Job_InjectionJobDetail", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + RequestLocationCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + ToLocationCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + ToLocationArea = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + ToLocationGroup = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + ToLocationErpCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + ToWarehouseCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + OnTheWayLocationCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + ProdLine = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + WorkStation = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + ExpiredTime = table.Column(type: "datetime2", nullable: false), + Operation = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + DistributionType = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + TruncType = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + RoundedQty = table.Column(type: "decimal(18,6)", nullable: false), + PlannedSplitRule = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + PlanBeginTime = table.Column(type: "datetime2", nullable: false), + DeliveryQty = table.Column(type: "decimal(18,6)", nullable: false), + PositionCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + RecommendType = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + CreationTime = table.Column(type: "datetime2", nullable: false), + CreatorId = table.Column(type: "uniqueidentifier", nullable: true), + LastModificationTime = table.Column(type: "datetime2", nullable: true), + LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), + MasterID = table.Column(type: "uniqueidentifier", nullable: false), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + Number = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + Remark = table.Column(type: "nvarchar(3072)", maxLength: 3072, nullable: true), + ItemName = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + ItemDesc1 = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + ItemDesc2 = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + ItemCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + StdPackQty = table.Column(type: "decimal(18,6)", nullable: false), + Status = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + RecommendContainerCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + RecommendPackingCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + RecommendSupplierBatch = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + RecommendArriveDate = table.Column(type: "datetime2", nullable: false), + RecommendProduceDate = table.Column(type: "datetime2", nullable: false), + RecommendExpireDate = table.Column(type: "datetime2", nullable: false), + RecommendLot = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + RecommendFromLocationCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + RecommendFromLocationArea = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + RecommendFromLocationGroup = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + RecommendFromLocationErpCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + RecommendFromWarehouseCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + Uom = table.Column(type: "nvarchar(max)", nullable: true), + RecommendQty = table.Column(type: "decimal(18,6)", nullable: false), + HandledContainerCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + HandledPackingCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + HandledSupplierBatch = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + HandledArriveDate = table.Column(type: "datetime2", nullable: false), + HandledProduceDate = table.Column(type: "datetime2", nullable: false), + HandledExpireDate = table.Column(type: "datetime2", nullable: false), + HandledLot = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + HandledFromLocationCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + HandledFromLocationArea = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + HandledFromLocationGroup = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + HandledFromLocationErpCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + HandledFromWarehouseCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + HandledQty = table.Column(type: "decimal(18,6)", nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_Job_InjectionJobDetail", x => x.Id); + table.ForeignKey( + name: "FK_Job_InjectionJobDetail_Job_InjectionJob_MasterID", + column: x => x.MasterID, + principalTable: "Job_InjectionJob", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }); + + migrationBuilder.CreateTable( + name: "Store_CoatingIssueNoteDetail", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + IssueTime = table.Column(type: "datetime2", nullable: false), + ExpiredTime = table.Column(type: "datetime2", nullable: false), + ProdLine = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + WorkStation = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + OnTheWayLocationCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + PositionCode = table.Column(type: "nvarchar(max)", nullable: true), + RecommendType = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + CreationTime = table.Column(type: "datetime2", nullable: false), + CreatorId = table.Column(type: "uniqueidentifier", nullable: true), + LastModificationTime = table.Column(type: "datetime2", nullable: true), + LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), + MasterID = table.Column(type: "uniqueidentifier", nullable: false), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + Number = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + Remark = table.Column(type: "nvarchar(3072)", maxLength: 3072, nullable: true), + ItemName = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + ItemDesc1 = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + ItemDesc2 = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + ItemCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + Uom = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + Qty = table.Column(type: "decimal(18,6)", precision: 18, scale: 6, nullable: false), + StdPackQty = table.Column(type: "decimal(18,6)", nullable: false), + FromPackingCode = table.Column(type: "nvarchar(450)", nullable: true), + ToPackingCode = table.Column(type: "nvarchar(max)", nullable: true), + FromContainerCode = table.Column(type: "nvarchar(max)", nullable: true), + ToContainerCode = table.Column(type: "nvarchar(max)", nullable: true), + FromLot = table.Column(type: "nvarchar(max)", nullable: true), + ToLot = table.Column(type: "nvarchar(max)", nullable: true), + SupplierBatch = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + ArriveDate = table.Column(type: "datetime2", nullable: false), + ProduceDate = table.Column(type: "datetime2", nullable: false), + ExpireDate = table.Column(type: "datetime2", nullable: false), + FromLocationCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + FromLocationArea = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + FromLocationGroup = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + FromLocationErpCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + FromWarehouseCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + FromStatus = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + ToLocationCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + ToLocationArea = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + ToLocationGroup = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + ToLocationErpCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + ToWarehouseCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + ToStatus = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + RecommendContainerCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + RecommendPackingCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + RecommendSupplierBatch = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + RecommendArriveDate = table.Column(type: "datetime2", nullable: false), + RecommendProduceDate = table.Column(type: "datetime2", nullable: false), + RecommendExpireDate = table.Column(type: "datetime2", nullable: false), + RecommendLot = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + RecommendFromLocationCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + RecommendFromLocationArea = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + RecommendFromLocationGroup = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + RecommendFromLocationErpCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + RecommendFromWarehouseCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + RecommendQty = table.Column(type: "decimal(18,6)", nullable: false), + HandledContainerCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + HandledPackingCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + HandledSupplierBatch = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + HandledArriveDate = table.Column(type: "datetime2", nullable: false), + HandledProduceDate = table.Column(type: "datetime2", nullable: false), + HandledExpireDate = table.Column(type: "datetime2", nullable: false), + HandledLot = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + HandledFromLocationCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + HandledFromLocationArea = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + HandledFromLocationGroup = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + HandledFromLocationErpCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + HandledFromWarehouseCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + HandledQty = table.Column(type: "decimal(18,6)", nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_Store_CoatingIssueNoteDetail", x => x.Id); + table.ForeignKey( + name: "FK_Store_CoatingIssueNoteDetail_Store_CoatingIssueNote_MasterID", + column: x => x.MasterID, + principalTable: "Store_CoatingIssueNote", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }); + + migrationBuilder.CreateTable( + name: "Store_CoatingMaterialRequestDetail", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + ToLocationCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + ToLocationArea = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + ToLocationGroup = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + ToLocationErpCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + ToWarehouseCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + FromLocationArea = table.Column(type: "nvarchar(max)", nullable: true), + ProdLine = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + WorkStation = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + ExpiredTime = table.Column(type: "datetime2", nullable: false), + IssuedQty = table.Column(type: "decimal(18,6)", precision: 18, scale: 6, nullable: false), + ReceivedQty = table.Column(type: "decimal(18,6)", precision: 18, scale: 6, nullable: false), + Status = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + PositionCode = table.Column(type: "nvarchar(max)", nullable: true), + RecommendType = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + CreationTime = table.Column(type: "datetime2", nullable: false), + CreatorId = table.Column(type: "uniqueidentifier", nullable: true), + LastModificationTime = table.Column(type: "datetime2", nullable: true), + LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), + MasterID = table.Column(type: "uniqueidentifier", nullable: false), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + Number = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + Remark = table.Column(type: "nvarchar(3072)", maxLength: 3072, nullable: true), + ItemName = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + ItemDesc1 = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + ItemDesc2 = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + ItemCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + Uom = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + Qty = table.Column(type: "decimal(18,6)", precision: 18, scale: 6, nullable: false), + StdPackQty = table.Column(type: "decimal(18,6)", nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_Store_CoatingMaterialRequestDetail", x => x.Id); + table.ForeignKey( + name: "FK_Store_CoatingMaterialRequestDetail_Store_CoatingMaterialRequest_MasterID", + column: x => x.MasterID, + principalTable: "Store_CoatingMaterialRequest", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }); + + migrationBuilder.CreateTable( + name: "Store_InjectionNoteDetail", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + IssueTime = table.Column(type: "datetime2", nullable: false), + ExpiredTime = table.Column(type: "datetime2", nullable: false), + ProdLine = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + WorkStation = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + OnTheWayLocationCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + PositionCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + RecommendType = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + CreationTime = table.Column(type: "datetime2", nullable: false), + CreatorId = table.Column(type: "uniqueidentifier", nullable: true), + LastModificationTime = table.Column(type: "datetime2", nullable: true), + LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), + MasterID = table.Column(type: "uniqueidentifier", nullable: false), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + Number = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + Remark = table.Column(type: "nvarchar(3072)", maxLength: 3072, nullable: true), + ItemName = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + ItemDesc1 = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + ItemDesc2 = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + ItemCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + Uom = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + Qty = table.Column(type: "decimal(18,6)", precision: 18, scale: 6, nullable: false), + StdPackQty = table.Column(type: "decimal(18,6)", nullable: false), + FromPackingCode = table.Column(type: "nvarchar(450)", nullable: true), + ToPackingCode = table.Column(type: "nvarchar(max)", nullable: true), + FromContainerCode = table.Column(type: "nvarchar(max)", nullable: true), + ToContainerCode = table.Column(type: "nvarchar(max)", nullable: true), + FromLot = table.Column(type: "nvarchar(max)", nullable: true), + ToLot = table.Column(type: "nvarchar(max)", nullable: true), + SupplierBatch = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + ArriveDate = table.Column(type: "datetime2", nullable: false), + ProduceDate = table.Column(type: "datetime2", nullable: false), + ExpireDate = table.Column(type: "datetime2", nullable: false), + FromLocationCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + FromLocationArea = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + FromLocationGroup = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + FromLocationErpCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + FromWarehouseCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + FromStatus = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + ToLocationCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + ToLocationArea = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + ToLocationGroup = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + ToLocationErpCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + ToWarehouseCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + ToStatus = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + RecommendContainerCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + RecommendPackingCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + RecommendSupplierBatch = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + RecommendArriveDate = table.Column(type: "datetime2", nullable: false), + RecommendProduceDate = table.Column(type: "datetime2", nullable: false), + RecommendExpireDate = table.Column(type: "datetime2", nullable: false), + RecommendLot = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + RecommendFromLocationCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + RecommendFromLocationArea = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + RecommendFromLocationGroup = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + RecommendFromLocationErpCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + RecommendFromWarehouseCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + RecommendQty = table.Column(type: "decimal(18,6)", nullable: false), + HandledContainerCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + HandledPackingCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + HandledSupplierBatch = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + HandledArriveDate = table.Column(type: "datetime2", nullable: false), + HandledProduceDate = table.Column(type: "datetime2", nullable: false), + HandledExpireDate = table.Column(type: "datetime2", nullable: false), + HandledLot = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + HandledFromLocationCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + HandledFromLocationArea = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + HandledFromLocationGroup = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + HandledFromLocationErpCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + HandledFromWarehouseCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + HandledQty = table.Column(type: "decimal(18,6)", nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_Store_InjectionNoteDetail", x => x.Id); + table.ForeignKey( + name: "FK_Store_InjectionNoteDetail_Store_InjectionNote_MasterID", + column: x => x.MasterID, + principalTable: "Store_InjectionNote", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }); + + migrationBuilder.CreateTable( + name: "Store_InjectionRequestDetail", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + ToLocationCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + ToLocationArea = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + ToLocationGroup = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + ToLocationErpCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + ToWarehouseCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + FromLocationArea = table.Column(type: "nvarchar(max)", nullable: true), + ProdLine = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + WorkStation = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + ExpiredTime = table.Column(type: "datetime2", nullable: false), + IssuedQty = table.Column(type: "decimal(18,6)", precision: 18, scale: 6, nullable: false), + ReceivedQty = table.Column(type: "decimal(18,6)", precision: 18, scale: 6, nullable: false), + Status = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + PositionCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + RecommendType = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + CreationTime = table.Column(type: "datetime2", nullable: false), + CreatorId = table.Column(type: "uniqueidentifier", nullable: true), + LastModificationTime = table.Column(type: "datetime2", nullable: true), + LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), + MasterID = table.Column(type: "uniqueidentifier", nullable: false), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + Number = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + Remark = table.Column(type: "nvarchar(3072)", maxLength: 3072, nullable: true), + ItemName = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + ItemDesc1 = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + ItemDesc2 = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), + ItemCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + Uom = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + Qty = table.Column(type: "decimal(18,6)", precision: 18, scale: 6, nullable: false), + StdPackQty = table.Column(type: "decimal(18,6)", nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_Store_InjectionRequestDetail", x => x.Id); + table.ForeignKey( + name: "FK_Store_InjectionRequestDetail_Store_InjectionRequest_MasterID", + column: x => x.MasterID, + principalTable: "Store_InjectionRequest", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }); + + migrationBuilder.CreateIndex( + name: "IX_Job_CoatingIssueJob_Number", + table: "Job_CoatingIssueJob", + column: "Number", + unique: true); + + migrationBuilder.CreateIndex( + name: "IX_Job_CoatingIssueJobDetail_MasterID", + table: "Job_CoatingIssueJobDetail", + column: "MasterID"); + + migrationBuilder.CreateIndex( + name: "IX_Job_InjectionJob_Number", + table: "Job_InjectionJob", + column: "Number", + unique: true); + + migrationBuilder.CreateIndex( + name: "IX_Job_InjectionJobDetail_MasterID", + table: "Job_InjectionJobDetail", + column: "MasterID"); + + migrationBuilder.CreateIndex( + name: "IX_Store_CoatingIssueNote_Number", + table: "Store_CoatingIssueNote", + column: "Number", + unique: true); + + migrationBuilder.CreateIndex( + name: "IX_Store_CoatingIssueNoteDetail_FromPackingCode", + table: "Store_CoatingIssueNoteDetail", + column: "FromPackingCode"); + + migrationBuilder.CreateIndex( + name: "IX_Store_CoatingIssueNoteDetail_MasterID", + table: "Store_CoatingIssueNoteDetail", + column: "MasterID"); + + migrationBuilder.CreateIndex( + name: "IX_Store_CoatingIssueNoteDetail_Number_FromPackingCode_FromLocationCode_ToLocationCode", + table: "Store_CoatingIssueNoteDetail", + columns: new[] { "Number", "FromPackingCode", "FromLocationCode", "ToLocationCode" }, + unique: true, + filter: "[FromPackingCode] IS NOT NULL"); + + migrationBuilder.CreateIndex( + name: "IX_Store_CoatingMaterialRequest_Number", + table: "Store_CoatingMaterialRequest", + column: "Number", + unique: true); + + migrationBuilder.CreateIndex( + name: "IX_Store_CoatingMaterialRequestDetail_ItemCode", + table: "Store_CoatingMaterialRequestDetail", + column: "ItemCode"); + + migrationBuilder.CreateIndex( + name: "IX_Store_CoatingMaterialRequestDetail_MasterID", + table: "Store_CoatingMaterialRequestDetail", + column: "MasterID"); + + migrationBuilder.CreateIndex( + name: "IX_Store_CoatingMaterialRequestDetail_Number_ItemCode_ToLocationCode", + table: "Store_CoatingMaterialRequestDetail", + columns: new[] { "Number", "ItemCode", "ToLocationCode" }, + unique: true); + + migrationBuilder.CreateIndex( + name: "IX_Store_InjectionNote_Number", + table: "Store_InjectionNote", + column: "Number", + unique: true); + + migrationBuilder.CreateIndex( + name: "IX_Store_InjectionNoteDetail_FromPackingCode", + table: "Store_InjectionNoteDetail", + column: "FromPackingCode"); + + migrationBuilder.CreateIndex( + name: "IX_Store_InjectionNoteDetail_MasterID", + table: "Store_InjectionNoteDetail", + column: "MasterID"); + + migrationBuilder.CreateIndex( + name: "IX_Store_InjectionNoteDetail_Number_FromPackingCode_FromLocationCode_ToLocationCode", + table: "Store_InjectionNoteDetail", + columns: new[] { "Number", "FromPackingCode", "FromLocationCode", "ToLocationCode" }, + unique: true, + filter: "[FromPackingCode] IS NOT NULL"); + + migrationBuilder.CreateIndex( + name: "IX_Store_InjectionRequest_Number", + table: "Store_InjectionRequest", + column: "Number", + unique: true); + + migrationBuilder.CreateIndex( + name: "IX_Store_InjectionRequestDetail_ItemCode", + table: "Store_InjectionRequestDetail", + column: "ItemCode"); + + migrationBuilder.CreateIndex( + name: "IX_Store_InjectionRequestDetail_MasterID", + table: "Store_InjectionRequestDetail", + column: "MasterID"); + + migrationBuilder.CreateIndex( + name: "IX_Store_InjectionRequestDetail_Number_ItemCode_ToLocationCode", + table: "Store_InjectionRequestDetail", + columns: new[] { "Number", "ItemCode", "ToLocationCode" }, + unique: true); + } + + protected override void Down(MigrationBuilder migrationBuilder) + { + migrationBuilder.DropTable( + name: "Job_CoatingIssueJobDetail"); + + migrationBuilder.DropTable( + name: "Job_InjectionJobDetail"); + + migrationBuilder.DropTable( + name: "Store_CoatingIssueNoteDetail"); + + migrationBuilder.DropTable( + name: "Store_CoatingMaterialRequestDetail"); + + migrationBuilder.DropTable( + name: "Store_InjectionNoteDetail"); + + migrationBuilder.DropTable( + name: "Store_InjectionRequestDetail"); + + migrationBuilder.DropTable( + name: "Job_CoatingIssueJob"); + + migrationBuilder.DropTable( + name: "Job_InjectionJob"); + + migrationBuilder.DropTable( + name: "Store_CoatingIssueNote"); + + migrationBuilder.DropTable( + name: "Store_CoatingMaterialRequest"); + + migrationBuilder.DropTable( + name: "Store_InjectionNote"); + + migrationBuilder.DropTable( + name: "Store_InjectionRequest"); + + migrationBuilder.DropColumn( + name: "Confirmed", + table: "Job_TransferLibJob"); + } + } +} diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/Migrations/StoreDbContextModelSnapshot.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/Migrations/StoreDbContextModelSnapshot.cs index 4976f8be9..30df48541 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/Migrations/StoreDbContextModelSnapshot.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/Migrations/StoreDbContextModelSnapshot.cs @@ -822,27 +822,42 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.ToTable("Store_ContainerBindNoteDetail", (string)null); }); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.CountAdjustNote", b => + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ContainerJob", b => { b.Property("Id") .HasColumnType("uniqueidentifier"); - b.Property("ActiveDate") + b.Property("AcceptTime") + .HasColumnType("datetime2"); + + b.Property("AcceptUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("AcceptUserName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("CompleteTime") .HasColumnType("datetime2"); + b.Property("CompleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CompleteUserName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + b.Property("ConcurrencyStamp") .IsConcurrencyToken() .HasMaxLength(40) .HasColumnType("nvarchar(40)") .HasColumnName("ConcurrencyStamp"); - b.Property("CountAdjustRequestNumber") - .HasColumnType("nvarchar(max)"); - - b.Property("CountNoteNumber") - .HasColumnType("nvarchar(max)"); + b.Property("ContainerRequestNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); - b.Property("CountPlanNumber") + b.Property("ContainerType") .HasMaxLength(64) .HasColumnType("nvarchar(64)"); @@ -858,11 +873,24 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("nvarchar(max)") .HasColumnName("ExtraProperties"); - b.Property("IsAdjusted") - .HasColumnType("bit"); + b.Property("IsAutoComplete") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false); - b.Property("JobNumber") - .HasColumnType("nvarchar(max)"); + 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") @@ -875,19 +903,43 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.Property("Number") .IsRequired() .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("Number"); + .HasColumnType("nvarchar(64)"); + + b.Property("Priority") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasDefaultValue(0); + + b.Property("PriorityIncrement") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasDefaultValue(0); b.Property("Remark") .HasMaxLength(3072) .HasColumnType("nvarchar(3072)") .HasColumnName("Remark"); + b.Property("RequestLocationCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("SpecificationsType") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + b.Property("TenantId") .HasColumnType("uniqueidentifier") .HasColumnName("TenantId"); - b.Property("Type") + b.Property("UpStreamJobNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("WarehouseCode") + .HasColumnType("nvarchar(max)"); + + b.Property("WorkGroupCode") .HasMaxLength(64) .HasColumnType("nvarchar(64)"); @@ -899,47 +951,83 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.HasIndex("Number") .IsUnique(); - b.ToTable("Store_CountAdjustNote", (string)null); + b.ToTable("Job_ContainerJob", (string)null); }); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.CountAdjustNoteDetail", b => + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ContainerJobDetail", b => { b.Property("Id") .HasColumnType("uniqueidentifier"); - b.Property("AdjustQty") - .HasColumnType("decimal(18,6)"); + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); - b.Property("ArriveDate") + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("FromLocationCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("HandledArriveDate") .HasColumnType("datetime2"); - b.Property("ContainerCode") + b.Property("HandledContainerCode") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("ContainerCode"); + .HasColumnName("HandledContainerCode"); - b.Property("CountLabel") - .IsRequired() + b.Property("HandledExpireDate") + .HasColumnType("datetime2"); + + b.Property("HandledFromLocationArea") .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledFromLocationArea"); - b.Property("CountQty") - .HasColumnType("decimal(18,6)"); + b.Property("HandledFromLocationCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledFromLocationCode"); - b.Property("CreationTime") - .HasColumnType("datetime2") - .HasColumnName("CreationTime"); + b.Property("HandledFromLocationErpCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledFromLocationErpCode"); - b.Property("CreatorId") - .HasColumnType("uniqueidentifier") - .HasColumnName("CreatorId"); + b.Property("HandledFromLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledFromLocationGroup"); - b.Property("ExpireDate") + 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("InventoryQty") + b.Property("HandledQty") .HasColumnType("decimal(18,6)"); + b.Property("HandledSupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledSupplierBatch"); + b.Property("ItemCode") .IsRequired() .HasMaxLength(64) @@ -969,54 +1057,70 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("LastModifierId"); - b.Property("LocationArea") + b.Property("MasterID") + .HasColumnType("uniqueidentifier"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("RecommendArriveDate") + .HasColumnType("datetime2"); + + b.Property("RecommendContainerCode") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("LocationArea"); + .HasColumnName("RecommendContainerCode"); - b.Property("LocationCode") - .IsRequired() + b.Property("RecommendExpireDate") + .HasColumnType("datetime2"); + + b.Property("RecommendFromLocationArea") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("LocationCode"); + .HasColumnName("RecommendFromLocationArea"); - b.Property("LocationErpCode") - .IsRequired() + b.Property("RecommendFromLocationCode") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("LocationErpCode"); + .HasColumnName("RecommendFromLocationCode"); - b.Property("LocationGroup") + b.Property("RecommendFromLocationErpCode") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("LocationGroup"); + .HasColumnName("RecommendFromLocationErpCode"); - b.Property("Lot") + b.Property("RecommendFromLocationGroup") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("Lot"); + .HasColumnName("RecommendFromLocationGroup"); - b.Property("MasterID") - .HasColumnType("uniqueidentifier"); + b.Property("RecommendFromWarehouseCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendFromWarehouseCode"); - b.Property("Number") - .IsRequired() + b.Property("RecommendLot") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("Number"); + .HasColumnName("RecommendLot"); - b.Property("PackingCode") - .IsRequired() + b.Property("RecommendPackingCode") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("PackingCode"); + .HasColumnName("RecommendPackingCode"); - b.Property("ProduceDate") + b.Property("RecommendProduceDate") .HasColumnType("datetime2"); - b.Property("ReasonCode") + b.Property("RecommendQty") + .HasColumnType("decimal(18,6)"); + + b.Property("RecommendSupplierBatch") .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendSupplierBatch"); b.Property("Remark") .HasMaxLength(3072) @@ -1031,42 +1135,25 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.Property("StdPackQty") .HasColumnType("decimal(18,6)"); - b.Property("SupplierBatch") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("SupplierBatch"); - b.Property("TenantId") .HasColumnType("uniqueidentifier") .HasColumnName("TenantId"); - b.Property("TransInOut") - .IsRequired() + b.Property("ToLocationCode") .HasMaxLength(64) .HasColumnType("nvarchar(64)"); b.Property("Uom") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("WarehouseCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("WarehouseCode"); + .HasColumnType("nvarchar(max)"); 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); + b.ToTable("Job_ContainerJobDetail", (string)null); }); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.CountAdjustRequest", b => + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ContainerNote", b => { b.Property("Id") .HasColumnType("uniqueidentifier"); @@ -1074,30 +1161,23 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.Property("ActiveDate") .HasColumnType("datetime2"); - b.Property("AutoAgree") - .HasColumnType("bit"); - - b.Property("AutoCompleteJob") - .HasColumnType("bit"); - - b.Property("AutoHandle") - .HasColumnType("bit"); - - b.Property("AutoSubmit") - .HasColumnType("bit"); - b.Property("ConcurrencyStamp") .IsConcurrencyToken() .HasMaxLength(40) .HasColumnType("nvarchar(40)") .HasColumnName("ConcurrencyStamp"); - b.Property("CountNoteNumber") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + b.Property("ConfirmTime") + .HasColumnType("datetime2"); - b.Property("CountPlanNumber") - .HasMaxLength(64) + b.Property("Confirmed") + .HasColumnType("bit"); + + b.Property("ContainerRequestNumber") + .HasColumnType("nvarchar(max)"); + + b.Property("ContainerType") + .HasMaxLength(64) .HasColumnType("nvarchar(64)"); b.Property("CreationTime") @@ -1108,13 +1188,15 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("CreatorId"); - b.Property("DirectCreateNote") - .HasColumnType("bit"); - b.Property("ExtraProperties") .HasColumnType("nvarchar(max)") .HasColumnName("ExtraProperties"); + b.Property("JobNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("JobNumber"); + b.Property("LastModificationTime") .HasColumnType("datetime2") .HasColumnName("LastModificationTime"); @@ -1134,8 +1216,11 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("nvarchar(3072)") .HasColumnName("Remark"); - b.Property("RequestStatus") - .IsRequired() + b.Property("RequestLocationCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("SpecificationsType") .HasMaxLength(64) .HasColumnType("nvarchar(64)"); @@ -1151,10 +1236,10 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.HasIndex("Number") .IsUnique(); - b.ToTable("Store_CountAdjustRequest", (string)null); + b.ToTable("Store_ContainerNote", (string)null); }); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.CountAdjustRequestDetail", b => + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ContainerNoteDetail", b => { b.Property("Id") .HasColumnType("uniqueidentifier"); @@ -1162,14 +1247,6 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.Property("ArriveDate") .HasColumnType("datetime2"); - b.Property("ContainerCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ContainerCode"); - - b.Property("CountQty") - .HasColumnType("decimal(18,6)"); - b.Property("CreationTime") .HasColumnType("datetime2") .HasColumnName("CreationTime"); @@ -1181,9 +1258,107 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.Property("ExpireDate") .HasColumnType("datetime2"); - b.Property("InventoryQty") + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("FromContainerCode") + .HasColumnType("nvarchar(max)"); + + b.Property("FromLocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromLocationArea"); + + b.Property("FromLocationCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromLocationCode"); + + b.Property("FromLocationErpCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromLocationErpCode"); + + b.Property("FromLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromLocationGroup"); + + b.Property("FromLot") + .HasColumnType("nvarchar(max)"); + + b.Property("FromPackingCode") + .HasColumnType("nvarchar(max)"); + + b.Property("FromStatus") + .HasColumnType("int"); + + b.Property("FromWarehouseCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromWarehouseCode"); + + b.Property("HandledArriveDate") + .HasColumnType("datetime2"); + + b.Property("HandledContainerCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledContainerCode"); + + b.Property("HandledExpireDate") + .HasColumnType("datetime2"); + + b.Property("HandledFromLocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledFromLocationArea"); + + b.Property("HandledFromLocationCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledFromLocationCode"); + + b.Property("HandledFromLocationErpCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledFromLocationErpCode"); + + b.Property("HandledFromLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledFromLocationGroup"); + + b.Property("HandledFromWarehouseCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledFromWarehouseCode"); + + b.Property("HandledLot") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledLot"); + + b.Property("HandledPackingCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledPackingCode"); + + b.Property("HandledProduceDate") + .HasColumnType("datetime2"); + + b.Property("HandledQty") .HasColumnType("decimal(18,6)"); + b.Property("HandledSupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledSupplierBatch"); + b.Property("ItemCode") .IsRequired() .HasMaxLength(64) @@ -1213,69 +1388,85 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("LastModifierId"); - b.Property("LocationArea") + b.Property("MasterID") + .HasColumnType("uniqueidentifier"); + + b.Property("Number") + .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("LocationArea"); + .HasColumnName("Number"); - b.Property("LocationCode") - .IsRequired() + b.Property("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("LocationCode"); + .HasColumnName("RecommendContainerCode"); - b.Property("LocationErpCode") - .IsRequired() + b.Property("RecommendExpireDate") + .HasColumnType("datetime2"); + + b.Property("RecommendFromLocationArea") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("LocationErpCode"); + .HasColumnName("RecommendFromLocationArea"); - b.Property("LocationGroup") + b.Property("RecommendFromLocationCode") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("LocationGroup"); + .HasColumnName("RecommendFromLocationCode"); - b.Property("Lot") + b.Property("RecommendFromLocationErpCode") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("Lot"); + .HasColumnName("RecommendFromLocationErpCode"); - b.Property("MasterID") - .HasColumnType("uniqueidentifier"); + b.Property("RecommendFromLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendFromLocationGroup"); - b.Property("Number") - .IsRequired() + b.Property("RecommendFromWarehouseCode") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("Number"); + .HasColumnName("RecommendFromWarehouseCode"); - b.Property("PackingCode") - .IsRequired() + b.Property("RecommendLot") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("PackingCode"); + .HasColumnName("RecommendLot"); - b.Property("ProduceDate") + b.Property("RecommendPackingCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendPackingCode"); + + b.Property("RecommendProduceDate") .HasColumnType("datetime2"); - b.Property("Qty") - .HasPrecision(18, 6) - .HasColumnType("decimal(18,6)") - .HasColumnName("Qty"); + b.Property("RecommendQty") + .HasColumnType("decimal(18,6)"); - b.Property("ReasonCode") - .HasColumnType("nvarchar(max)"); + b.Property("RecommendSupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendSupplierBatch"); b.Property("Remark") .HasMaxLength(3072) .HasColumnType("nvarchar(3072)") .HasColumnName("Remark"); - b.Property("Status") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - b.Property("StdPackQty") .HasColumnType("decimal(18,6)"); @@ -1288,53 +1479,81 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("TenantId"); - b.Property("Uom") + b.Property("ToContainerCode") + .HasColumnType("nvarchar(max)"); + + b.Property("ToLocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToLocationArea"); + + b.Property("ToLocationCode") .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("Uom"); + .HasColumnName("ToLocationCode"); - b.Property("WarehouseCode") + b.Property("ToLocationErpCode") .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("WarehouseCode"); + .HasColumnName("ToLocationErpCode"); + + b.Property("ToLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToLocationGroup"); + + b.Property("ToLot") + .HasColumnType("nvarchar(max)"); + + b.Property("ToPackingCode") + .HasColumnType("nvarchar(max)"); + + b.Property("ToStatus") + .HasColumnType("int"); + + b.Property("ToWarehouseCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToWarehouseCode"); + + b.Property("Uom") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Uom"); b.HasKey("Id"); b.HasIndex("MasterID"); - b.HasIndex("Number", "ItemCode", "LocationCode", "Lot", "Status", "PackingCode") - .IsUnique() - .HasFilter("[Lot] IS NOT NULL"); + b.HasIndex("Number") + .IsUnique(); - b.ToTable("Store_CountAdjustRequestDetail", (string)null); + b.ToTable("Store_ContainerNoteDetail", (string)null); }); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.CountJob", b => + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ContainerRequest", b => { b.Property("Id") .HasColumnType("uniqueidentifier"); - b.Property("AcceptTime") + b.Property("ActiveDate") .HasColumnType("datetime2"); - b.Property("AcceptUserId") - .HasColumnType("uniqueidentifier"); - - b.Property("AcceptUserName") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + b.Property("AutoAgree") + .HasColumnType("bit"); - b.Property("CompleteTime") - .HasColumnType("datetime2"); + b.Property("AutoCompleteJob") + .HasColumnType("bit"); - b.Property("CompleteUserId") - .HasColumnType("uniqueidentifier"); + b.Property("AutoHandle") + .HasColumnType("bit"); - b.Property("CompleteUserName") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + b.Property("AutoSubmit") + .HasColumnType("bit"); b.Property("ConcurrencyStamp") .IsConcurrencyToken() @@ -1342,17 +1561,7 @@ namespace Win_in.Sfs.Wms.Store.Migrations .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() + b.Property("ContainerType") .HasMaxLength(64) .HasColumnType("nvarchar(64)"); @@ -1364,36 +1573,13 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("CreatorId"); - b.Property("Description") - .HasColumnType("nvarchar(max)"); + b.Property("DirectCreateNote") + .HasColumnType("bit"); 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"); @@ -1402,50 +1588,35 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("LastModifierId"); - b.Property("LocationCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - b.Property("Number") .IsRequired() .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("Priority") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasDefaultValue(0); - - b.Property("PriorityIncrement") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasDefaultValue(0); + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); b.Property("Remark") .HasMaxLength(3072) .HasColumnType("nvarchar(3072)") .HasColumnName("Remark"); - b.Property("TenantId") - .HasColumnType("uniqueidentifier") - .HasColumnName("TenantId"); - - b.Property("Type") + b.Property("RequestLocationCode") .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)"); - b.Property("UpStreamJobNumber") + b.Property("RequestStatus") + .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)"); - b.Property("WarehouseCode") - .HasColumnType("nvarchar(max)"); - - b.Property("WorkGroupCode") + b.Property("SpecificationsType") .HasMaxLength(64) .HasColumnType("nvarchar(64)"); + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + b.Property("Worker") .HasColumnType("nvarchar(max)"); @@ -1454,41 +1625,14 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.HasIndex("Number") .IsUnique(); - b.ToTable("Job_CountJob", (string)null); + b.ToTable("Store_ContainerRequest", (string)null); }); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.CountJobDetail", b => + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ContainerRequestDetail", 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"); @@ -1497,15 +1641,9 @@ namespace Win_in.Sfs.Wms.Store.Migrations .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("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); b.Property("ItemCode") .IsRequired() @@ -1536,90 +1674,52 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("LastModifierId"); - b.Property("LocationArea") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("LocationArea"); - - b.Property("LocationCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("LocationCode"); - - b.Property("LocationErpCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("LocationErpCode"); - - b.Property("LocationGroup") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("LocationGroup"); - - b.Property("Lot") - .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"); + .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("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") + b.Property("ToLocationCode") .HasColumnType("nvarchar(max)"); - b.Property("WarehouseCode") + b.Property("Uom") .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("WarehouseCode"); + .HasColumnName("Uom"); b.HasKey("Id"); b.HasIndex("MasterID"); - b.ToTable("Job_CountJobDetail", (string)null); + b.HasIndex("Number") + .IsUnique(); + + b.ToTable("Store_ContainerRequestDetail", (string)null); }); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.CountNote", b => + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.CountAdjustNote", b => { b.Property("Id") .HasColumnType("uniqueidentifier"); @@ -1627,21 +1727,22 @@ namespace Win_in.Sfs.Wms.Store.Migrations 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") + 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"); @@ -1650,17 +1751,16 @@ namespace Win_in.Sfs.Wms.Store.Migrations .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("IsAdjusted") + .HasColumnType("bit"); + + b.Property("JobNumber") + .HasColumnType("nvarchar(max)"); + b.Property("LastModificationTime") .HasColumnType("datetime2") .HasColumnName("LastModificationTime"); @@ -1680,17 +1780,11 @@ namespace Win_in.Sfs.Wms.Store.Migrations .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)"); @@ -1702,49 +1796,33 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.HasIndex("Number") .IsUnique(); - b.ToTable("Store_CountNote", (string)null); + b.ToTable("Store_CountAdjustNote", (string)null); }); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.CountNoteDetail", b => + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.CountAdjustNoteDetail", b => { b.Property("Id") .HasColumnType("uniqueidentifier"); - b.Property("Adjusted") - .HasColumnType("bit"); + b.Property("AdjustQty") + .HasColumnType("decimal(18,6)"); b.Property("ArriveDate") .HasColumnType("datetime2"); - b.Property("AuditCountDescription") + b.Property("ContainerCode") .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + .HasColumnType("nvarchar(64)") + .HasColumnName("ContainerCode"); - b.Property("AuditCountOperator") + b.Property("CountLabel") + .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)"); - b.Property("AuditCountQty") - .HasPrecision(18, 6) + b.Property("CountQty") .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"); @@ -1753,33 +1831,9 @@ namespace Win_in.Sfs.Wms.Store.Migrations .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)"); @@ -1857,31 +1911,15 @@ namespace Win_in.Sfs.Wms.Store.Migrations 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("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) @@ -1899,8 +1937,14 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("TenantId"); + b.Property("TransInOut") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + b.Property("Uom") - .HasColumnType("nvarchar(max)"); + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); b.Property("WarehouseCode") .IsRequired() @@ -1912,13 +1956,14 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.HasIndex("MasterID"); - b.HasIndex("Number", "CountLabel") - .IsUnique(); + b.HasIndex("Number", "CountLabel", "ItemCode", "LocationCode", "Lot", "Status", "PackingCode") + .IsUnique() + .HasFilter("[Lot] IS NOT NULL"); - b.ToTable("Store_CountNoteDetail", (string)null); + b.ToTable("Store_CountAdjustNoteDetail", (string)null); }); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.CountPlan", b => + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.CountAdjustRequest", b => { b.Property("Id") .HasColumnType("uniqueidentifier"); @@ -1938,17 +1983,17 @@ namespace Win_in.Sfs.Wms.Store.Migrations 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() + b.Property("CountNoteNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("CountPlanNumber") .HasMaxLength(64) .HasColumnType("nvarchar(64)"); @@ -1960,29 +2005,13 @@ namespace Win_in.Sfs.Wms.Store.Migrations .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"); @@ -1997,9 +2026,6 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("nvarchar(64)") .HasColumnName("Number"); - b.Property("PlanTime") - .HasColumnType("datetime2"); - b.Property("Remark") .HasMaxLength(3072) .HasColumnType("nvarchar(3072)") @@ -2010,25 +2036,10 @@ namespace Win_in.Sfs.Wms.Store.Migrations .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)"); @@ -2037,10 +2048,10 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.HasIndex("Number") .IsUnique(); - b.ToTable("Store_CountPlan", (string)null); + b.ToTable("Store_CountAdjustRequest", (string)null); }); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.CountPlanDetail", b => + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.CountAdjustRequestDetail", b => { b.Property("Id") .HasColumnType("uniqueidentifier"); @@ -2048,30 +2059,13 @@ namespace Win_in.Sfs.Wms.Store.Migrations 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("CountQty") + .HasColumnType("decimal(18,6)"); b.Property("CreationTime") .HasColumnType("datetime2") @@ -2081,31 +2075,9 @@ namespace Win_in.Sfs.Wms.Store.Migrations .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)"); @@ -2183,31 +2155,19 @@ namespace Win_in.Sfs.Wms.Store.Migrations 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("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) @@ -2226,8 +2186,10 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnName("TenantId"); b.Property("Uom") + .IsRequired() .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + .HasColumnType("nvarchar(64)") + .HasColumnName("Uom"); b.Property("WarehouseCode") .IsRequired() @@ -2239,38 +2201,55 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.HasIndex("MasterID"); - b.HasIndex("Number", "CountLabel") - .IsUnique(); + b.HasIndex("Number", "ItemCode", "LocationCode", "Lot", "Status", "PackingCode") + .IsUnique() + .HasFilter("[Lot] IS NOT NULL"); - b.ToTable("Store_CountPlanDetail", (string)null); + b.ToTable("Store_CountAdjustRequestDetail", (string)null); }); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.CustomerAsn", b => + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.CountJob", b => { b.Property("Id") .HasColumnType("uniqueidentifier"); - b.Property("ActiveDate") + b.Property("AcceptTime") .HasColumnType("datetime2"); - b.Property("BeginTime") + 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("ContactEmail") + b.Property("CountMethod") + .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)"); - b.Property("ContactName") + b.Property("CountPlanNumber") .HasMaxLength(64) .HasColumnType("nvarchar(64)"); - b.Property("ContactPhone") + b.Property("CountStage") + .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)"); @@ -2282,71 +2261,131 @@ namespace Win_in.Sfs.Wms.Store.Migrations .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("Description") + .HasColumnType("nvarchar(max)"); b.Property("ExtraProperties") .HasColumnType("nvarchar(max)") .HasColumnName("ExtraProperties"); - b.Property("LastModificationTime") - .HasColumnType("datetime2") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("uniqueidentifier") + 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)") - .HasColumnName("Number"); + .HasColumnType("nvarchar(64)"); + + b.Property("Priority") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasDefaultValue(0); + + b.Property("PriorityIncrement") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasDefaultValue(0); b.Property("Remark") .HasMaxLength(3072) .HasColumnType("nvarchar(3072)") .HasColumnName("Remark"); - b.Property("SoNumber") + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Type") .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)"); - b.Property("Status") - .HasColumnType("int"); + b.Property("UpStreamJobNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); - b.Property("TenantId") - .HasColumnType("uniqueidentifier") - .HasColumnName("TenantId"); + 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("CustomerCode"); - b.HasIndex("Number") .IsUnique(); - b.ToTable("Store_CustomerAsn", (string)null); + b.ToTable("Job_CountJob", (string)null); }); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.CustomerAsnDetail", b => + 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"); @@ -2355,6 +2394,16 @@ namespace Win_in.Sfs.Wms.Store.Migrations .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) @@ -2384,57 +2433,90 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("LastModifierId"); + b.Property("LocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationArea"); + + b.Property("LocationCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationCode"); + + b.Property("LocationErpCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationErpCode"); + + b.Property("LocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationGroup"); + + b.Property("Lot") + .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("Number"); + .HasColumnName("PackingCode"); - b.Property("Qty") - .HasPrecision(18, 6) - .HasColumnType("decimal(18,6)") - .HasColumnName("Qty"); + b.Property("ProduceDate") + .HasColumnType("datetime2"); b.Property("Remark") .HasMaxLength(3072) .HasColumnType("nvarchar(3072)") .HasColumnName("Remark"); - b.Property("SoLine") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("SoNumber") + 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("Uom"); + .HasColumnName("WarehouseCode"); b.HasKey("Id"); b.HasIndex("MasterID"); - b.HasIndex("Number", "ItemCode") - .IsUnique(); - - b.ToTable("Store_CustomerAsnDetail", (string)null); + b.ToTable("Job_CountJobDetail", (string)null); }); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.CustomerReturnNote", b => + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.CountNote", b => { b.Property("Id") .HasColumnType("uniqueidentifier"); @@ -2442,12 +2524,21 @@ namespace Win_in.Sfs.Wms.Store.Migrations 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"); @@ -2456,19 +2547,17 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("CreatorId"); - b.Property("Customer") + b.Property("Description") .HasMaxLength(64) .HasColumnType("nvarchar(64)"); + b.Property("EndTime") + .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"); @@ -2488,13 +2577,20 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("nvarchar(3072)") .HasColumnName("Remark"); - b.Property("ReturnTime") - .HasColumnType("datetime2"); + 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)"); @@ -2503,17 +2599,49 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.HasIndex("Number") .IsUnique(); - b.ToTable("Store_CustomerReturnNote", (string)null); + b.ToTable("Store_CountNote", (string)null); }); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.CustomerReturnNoteDetail", b => + 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"); @@ -2522,50 +2650,35 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("CreatorId"); + b.Property("DetailStatus") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + b.Property("ExpireDate") .HasColumnType("datetime2"); - b.Property("FromContainerCode") - .HasColumnType("nvarchar(max)"); + b.Property("FinalCountQty") + .HasPrecision(18, 6) + .HasColumnType("decimal(18,6)"); - b.Property("FromLocationArea") + b.Property("FirstCountDescription") .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("FromLocationArea"); + .HasColumnType("nvarchar(64)"); - 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") + b.Property("FirstCountOperator") .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("FromLocationGroup"); - - b.Property("FromLot") - .HasColumnType("nvarchar(max)"); + .HasColumnType("nvarchar(64)"); - b.Property("FromPackingCode") - .HasColumnType("nvarchar(450)"); + b.Property("FirstCountQty") + .HasPrecision(18, 6) + .HasColumnType("decimal(18,6)"); - b.Property("FromStatus") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + b.Property("FirstCountTime") + .HasColumnType("datetime2"); - b.Property("FromWarehouseCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("FromWarehouseCode"); + b.Property("InventoryQty") + .HasColumnType("decimal(18,6)"); b.Property("ItemCode") .IsRequired() @@ -2596,6 +2709,33 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("LastModifierId"); + b.Property("LocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationArea"); + + b.Property("LocationCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationCode"); + + b.Property("LocationErpCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationErpCode"); + + b.Property("LocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationGroup"); + + b.Property("Lot") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Lot"); + b.Property("MasterID") .HasColumnType("uniqueidentifier"); @@ -2605,114 +2745,98 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("nvarchar(64)") .HasColumnName("Number"); + b.Property("PackingCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("PackingCode"); + b.Property("ProduceDate") .HasColumnType("datetime2"); - b.Property("Qty") - .HasPrecision(18, 6) - .HasColumnType("decimal(18,6)") - .HasColumnName("Qty"); - b.Property("Remark") .HasMaxLength(3072) .HasColumnType("nvarchar(3072)") .HasColumnName("Remark"); - b.Property("StdPackQty") - .HasColumnType("decimal(18,6)"); - - b.Property("SupplierBatch") + b.Property("RepeatCountDescription") .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("SupplierBatch"); + .HasColumnType("nvarchar(64)"); - b.Property("TenantId") - .HasColumnType("uniqueidentifier") - .HasColumnName("TenantId"); + b.Property("RepeatCountOperator") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); - b.Property("ToContainerCode") - .HasColumnType("nvarchar(max)"); + b.Property("RepeatCountQty") + .HasPrecision(18, 6) + .HasColumnType("decimal(18,6)"); - b.Property("ToLocationArea") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ToLocationArea"); + b.Property("RepeatCountTime") + .HasColumnType("datetime2"); - b.Property("ToLocationCode") + b.Property("Stage") .IsRequired() .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ToLocationCode"); + .HasColumnType("nvarchar(64)"); - b.Property("ToLocationErpCode") + b.Property("Status") .IsRequired() .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ToLocationErpCode"); + .HasColumnType("nvarchar(64)"); - b.Property("ToLocationGroup") + b.Property("StdPackQty") + .HasColumnType("decimal(18,6)"); + + b.Property("SupplierBatch") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("ToLocationGroup"); + .HasColumnName("SupplierBatch"); - b.Property("ToLot") - .HasColumnType("nvarchar(max)"); + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); - b.Property("ToPackingCode") + b.Property("Uom") .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") + b.Property("WarehouseCode") .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("Uom"); + .HasColumnName("WarehouseCode"); b.HasKey("Id"); b.HasIndex("MasterID"); - b.HasIndex("Number", "FromPackingCode", "FromLocationCode", "ToLocationCode") - .IsUnique() - .HasFilter("[FromPackingCode] IS NOT NULL"); + b.HasIndex("Number", "CountLabel") + .IsUnique(); - b.ToTable("Store_CustomerReturnNoteDetail", (string)null); + b.ToTable("Store_CountNoteDetail", (string)null); }); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.DeliverJob", b => + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.CountPlan", b => { b.Property("Id") .HasColumnType("uniqueidentifier"); - b.Property("AcceptTime") + b.Property("ActiveDate") .HasColumnType("datetime2"); - b.Property("AcceptUserId") - .HasColumnType("uniqueidentifier"); + b.Property("AutoAgree") + .HasColumnType("bit"); - b.Property("AcceptUserName") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + b.Property("AutoCompleteJob") + .HasColumnType("bit"); - b.Property("CompleteTime") - .HasColumnType("datetime2"); + b.Property("AutoHandle") + .HasColumnType("bit"); - b.Property("CompleteUserId") - .HasColumnType("uniqueidentifier"); + b.Property("AutoSubmit") + .HasColumnType("bit"); - b.Property("CompleteUserName") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + b.Property("BeginTime") + .HasColumnType("datetime2"); b.Property("ConcurrencyStamp") .IsConcurrencyToken() @@ -2720,6 +2844,11 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("nvarchar(40)") .HasColumnName("ConcurrencyStamp"); + b.Property("CountMethod") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + b.Property("CreationTime") .HasColumnType("datetime2") .HasColumnName("CreationTime"); @@ -2728,47 +2857,28 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("CreatorId"); - b.Property("CustomerAddressCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("CustomerCode") - .IsRequired() + b.Property("Description") .HasMaxLength(64) .HasColumnType("nvarchar(64)"); - b.Property("DeliverPlanNumber") - .HasColumnType("nvarchar(max)"); - - b.Property("DeliverRequestNumber") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + b.Property("DirectCreateNote") + .HasColumnType("bit"); - b.Property("DeliverTime") + b.Property("EndTime") .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("JsonInventoryStatus") + .HasColumnType("nvarchar(max)"); - b.Property("JobStatus") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + b.Property("JsonItemCodes") + .HasColumnType("nvarchar(max)"); - b.Property("JobType") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + b.Property("JsonLocationCodes") + .HasColumnType("nvarchar(max)"); b.Property("LastModificationTime") .HasColumnType("datetime2") @@ -2781,35 +2891,38 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.Property("Number") .IsRequired() .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("Priority") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasDefaultValue(0); + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); - b.Property("PriorityIncrement") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasDefaultValue(0); + b.Property("PlanTime") + .HasColumnType("datetime2"); b.Property("Remark") .HasMaxLength(3072) .HasColumnType("nvarchar(3072)") .HasColumnName("Remark"); - b.Property("TenantId") - .HasColumnType("uniqueidentifier") - .HasColumnName("TenantId"); + b.Property("RequestStatus") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); - b.Property("UpStreamJobNumber") + b.Property("RequestType") + .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)"); - b.Property("WarehouseCode") - .HasColumnType("nvarchar(max)"); + b.Property("Stage") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); - b.Property("WorkGroupCode") + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Type") + .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)"); @@ -2821,79 +2934,78 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.HasIndex("Number") .IsUnique(); - b.ToTable("Job_DeliverJob", (string)null); + b.ToTable("Store_CountPlan", (string)null); }); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.DeliverJobDetail", b => + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.CountPlanDetail", b => { b.Property("Id") .HasColumnType("uniqueidentifier"); - b.Property("CreationTime") - .HasColumnType("datetime2") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("uniqueidentifier") - .HasColumnName("CreatorId"); - - b.Property("HandledArriveDate") + b.Property("ArriveDate") .HasColumnType("datetime2"); - b.Property("HandledContainerCode") + b.Property("AuditCountDescription") .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("HandledContainerCode"); + .HasColumnType("nvarchar(64)"); - b.Property("HandledExpireDate") + 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("HandledFromLocationArea") + b.Property("ContainerCode") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("HandledFromLocationArea"); + .HasColumnName("ContainerCode"); - b.Property("HandledFromLocationCode") + b.Property("CountLabel") + .IsRequired() .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("HandledFromLocationCode"); + .HasColumnType("nvarchar(64)"); - b.Property("HandledFromLocationErpCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("HandledFromLocationErpCode"); + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); - b.Property("HandledFromLocationGroup") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("HandledFromLocationGroup"); + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); - b.Property("HandledFromWarehouseCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("HandledFromWarehouseCode"); + b.Property("DetailStatus") + .HasColumnType("int"); - b.Property("HandledLot") + b.Property("ExpireDate") + .HasColumnType("datetime2"); + + b.Property("FinalCountQty") + .HasPrecision(18, 6) + .HasColumnType("decimal(18,6)"); + + b.Property("FirstCountDescription") .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("HandledLot"); + .HasColumnType("nvarchar(64)"); - b.Property("HandledPackingCode") + b.Property("FirstCountOperator") .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("HandledPackingCode"); + .HasColumnType("nvarchar(64)"); - b.Property("HandledProduceDate") + b.Property("FirstCountQty") + .HasPrecision(18, 6) + .HasColumnType("decimal(18,6)"); + + b.Property("FirstCountTime") .HasColumnType("datetime2"); - b.Property("HandledQty") + b.Property("InventoryQty") .HasColumnType("decimal(18,6)"); - b.Property("HandledSupplierBatch") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("HandledSupplierBatch"); - b.Property("ItemCode") .IsRequired() .HasMaxLength(64) @@ -2923,121 +3035,114 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("LastModifierId"); - b.Property("MasterID") - .HasColumnType("uniqueidentifier"); - - b.Property("Number") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("OnTheWayLocationCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("RecommendArriveDate") - .HasColumnType("datetime2"); - - b.Property("RecommendContainerCode") + b.Property("LocationArea") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendContainerCode"); - - b.Property("RecommendExpireDate") - .HasColumnType("datetime2"); + .HasColumnName("LocationArea"); - b.Property("RecommendFromLocationArea") + b.Property("LocationCode") + .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendFromLocationArea"); + .HasColumnName("LocationCode"); - b.Property("RecommendFromLocationCode") + b.Property("LocationErpCode") + .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendFromLocationCode"); + .HasColumnName("LocationErpCode"); - b.Property("RecommendFromLocationErpCode") + b.Property("LocationGroup") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendFromLocationErpCode"); + .HasColumnName("LocationGroup"); - b.Property("RecommendFromLocationGroup") + b.Property("Lot") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendFromLocationGroup"); + .HasColumnName("Lot"); - b.Property("RecommendFromWarehouseCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendFromWarehouseCode"); + b.Property("MasterID") + .HasColumnType("uniqueidentifier"); - b.Property("RecommendLot") + b.Property("Number") + .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendLot"); + .HasColumnName("Number"); - b.Property("RecommendPackingCode") + b.Property("PackingCode") + .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendPackingCode"); + .HasColumnName("PackingCode"); - b.Property("RecommendProduceDate") + b.Property("ProduceDate") .HasColumnType("datetime2"); - b.Property("RecommendQty") - .HasColumnType("decimal(18,6)"); - - b.Property("RecommendSupplierBatch") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendSupplierBatch"); - b.Property("Remark") .HasMaxLength(3072) .HasColumnType("nvarchar(3072)") .HasColumnName("Remark"); - b.Property("Status") - .IsRequired() + b.Property("RepeatCountDescription") .HasMaxLength(64) .HasColumnType("nvarchar(64)"); - b.Property("StdPackQty") - .HasColumnType("decimal(18,6)"); + b.Property("RepeatCountOperator") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); - b.Property("TenantId") - .HasColumnType("uniqueidentifier") - .HasColumnName("TenantId"); + b.Property("RepeatCountQty") + .HasPrecision(18, 6) + .HasColumnType("decimal(18,6)"); - b.Property("ToLocationArea") - .HasColumnType("nvarchar(max)"); + b.Property("RepeatCountTime") + .HasColumnType("datetime2"); - b.Property("ToLocationCode") + b.Property("Stage") + .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)"); - b.Property("ToLocationErpCode") + b.Property("Status") + .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)"); - b.Property("ToLocationGroup") - .HasColumnType("nvarchar(max)"); + b.Property("StdPackQty") + .HasColumnType("decimal(18,6)"); - b.Property("ToWarehouseCode") + b.Property("SupplierBatch") .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + .HasColumnType("nvarchar(64)") + .HasColumnName("SupplierBatch"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); b.Property("Uom") - .HasColumnType("nvarchar(max)"); + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("WarehouseCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("WarehouseCode"); b.HasKey("Id"); b.HasIndex("MasterID"); - b.ToTable("Job_DeliverJobDetail", (string)null); + b.HasIndex("Number", "CountLabel") + .IsUnique(); + + b.ToTable("Store_CountPlanDetail", (string)null); }); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.DeliverNote", b => + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.CustomerAsn", b => { b.Property("Id") .HasColumnType("uniqueidentifier"); @@ -3045,14 +3150,26 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.Property("ActiveDate") .HasColumnType("datetime2"); + b.Property("BeginTime") + .HasColumnType("datetime2"); + b.Property("ConcurrencyStamp") .IsConcurrencyToken() .HasMaxLength(40) .HasColumnType("nvarchar(40)") .HasColumnName("ConcurrencyStamp"); - b.Property("CountPrint") - .HasColumnType("int"); + 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") @@ -3062,38 +3179,22 @@ namespace Win_in.Sfs.Wms.Store.Migrations .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() + b.Property("DockCode") .HasMaxLength(64) .HasColumnType("nvarchar(64)"); - b.Property("DeliverTime") + b.Property("EndTime") .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"); @@ -3113,6 +3214,14 @@ namespace Win_in.Sfs.Wms.Store.Migrations .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"); @@ -3122,20 +3231,19 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.HasKey("Id"); + b.HasIndex("CustomerCode"); + b.HasIndex("Number") .IsUnique(); - b.ToTable("Store_DeliverNote", (string)null); + b.ToTable("Store_CustomerAsn", (string)null); }); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.DeliverNoteDetail", b => + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.CustomerAsnDetail", b => { b.Property("Id") .HasColumnType("uniqueidentifier"); - b.Property("ArriveDate") - .HasColumnType("datetime2"); - b.Property("CreationTime") .HasColumnType("datetime2") .HasColumnName("CreationTime"); @@ -3144,115 +3252,217 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("CreatorId"); - b.Property("ExpireDate") - .HasColumnType("datetime2"); - - b.Property("ExtraProperties") - .HasColumnType("nvarchar(max)") - .HasColumnName("ExtraProperties"); - - b.Property("FromContainerCode") - .HasColumnType("nvarchar(max)"); - - b.Property("FromLocationArea") + b.Property("ItemCode") + .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("FromLocationArea"); + .HasColumnName("ItemCode"); - b.Property("FromLocationCode") - .IsRequired() + b.Property("ItemDesc1") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("FromLocationCode"); + .HasColumnName("ItemDesc1"); - b.Property("FromLocationErpCode") - .IsRequired() + b.Property("ItemDesc2") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("FromLocationErpCode"); + .HasColumnName("ItemDesc2"); - b.Property("FromLocationGroup") + b.Property("ItemName") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("FromLocationGroup"); + .HasColumnName("ItemName"); - b.Property("FromLot") + 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)"); + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); - b.Property("FromPackingCode") - .IsRequired() + 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("FromStatus") - .IsRequired() + b.Property("SoNumber") .HasMaxLength(64) .HasColumnType("nvarchar(64)"); - b.Property("FromWarehouseCode") + b.Property("StdPackQty") + .HasColumnType("decimal(18,6)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Uom") .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("FromWarehouseCode"); + .HasColumnName("Uom"); - b.Property("HandledArriveDate") - .HasColumnType("datetime2"); + b.HasKey("Id"); - b.Property("HandledContainerCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("HandledContainerCode"); + b.HasIndex("MasterID"); - b.Property("HandledExpireDate") + 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("HandledFromLocationArea") + b.Property("ConcurrencyStamp") + .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)") - .HasColumnName("HandledFromLocationArea"); + .HasColumnType("nvarchar(64)"); - b.Property("HandledFromLocationCode") + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("JobNumber") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("HandledFromLocationCode"); + .HasColumnName("JobNumber"); - b.Property("HandledFromLocationErpCode") + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Number") + .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("HandledFromLocationErpCode"); + .HasColumnName("Number"); - b.Property("HandledFromLocationGroup") + 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("HandledFromLocationGroup"); + .HasColumnName("FromLocationArea"); - b.Property("HandledFromWarehouseCode") + b.Property("FromLocationCode") + .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("HandledFromWarehouseCode"); + .HasColumnName("FromLocationCode"); - b.Property("HandledLot") + b.Property("FromLocationErpCode") + .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("HandledLot"); + .HasColumnName("FromLocationErpCode"); - b.Property("HandledPackingCode") + b.Property("FromLocationGroup") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("HandledPackingCode"); + .HasColumnName("FromLocationGroup"); - b.Property("HandledProduceDate") - .HasColumnType("datetime2"); + b.Property("FromLot") + .HasColumnType("nvarchar(max)"); - b.Property("HandledQty") - .HasColumnType("decimal(18,6)"); + b.Property("FromPackingCode") + .HasColumnType("nvarchar(450)"); - b.Property("HandledSupplierBatch") + b.Property("FromStatus") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("FromWarehouseCode") + .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("HandledSupplierBatch"); + .HasColumnName("FromWarehouseCode"); b.Property("ItemCode") .IsRequired() @@ -3300,114 +3510,53 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("decimal(18,6)") .HasColumnName("Qty"); - b.Property("RecommendArriveDate") - .HasColumnType("datetime2"); + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); - b.Property("RecommendContainerCode") + b.Property("StdPackQty") + .HasColumnType("decimal(18,6)"); + + b.Property("SupplierBatch") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendContainerCode"); + .HasColumnName("SupplierBatch"); - b.Property("RecommendExpireDate") - .HasColumnType("datetime2"); + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); - b.Property("RecommendFromLocationArea") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendFromLocationArea"); + b.Property("ToContainerCode") + .HasColumnType("nvarchar(max)"); - b.Property("RecommendFromLocationCode") + b.Property("ToLocationArea") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendFromLocationCode"); + .HasColumnName("ToLocationArea"); - b.Property("RecommendFromLocationErpCode") + b.Property("ToLocationCode") + .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendFromLocationErpCode"); + .HasColumnName("ToLocationCode"); - b.Property("RecommendFromLocationGroup") + b.Property("ToLocationErpCode") + .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendFromLocationGroup"); + .HasColumnName("ToLocationErpCode"); - 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") + b.Property("ToLocationGroup") .HasMaxLength(64) .HasColumnType("nvarchar(64)") .HasColumnName("ToLocationGroup"); b.Property("ToLot") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + .HasColumnType("nvarchar(max)"); b.Property("ToPackingCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + .HasColumnType("nvarchar(max)"); b.Property("ToStatus") .IsRequired() @@ -3430,31 +3579,37 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.HasIndex("MasterID"); - b.HasIndex("Number", "ItemCode", "FromPackingCode", "FromLot", "FromLocationCode", "ToLocationCode") - .IsUnique(); + b.HasIndex("Number", "FromPackingCode", "FromLocationCode", "ToLocationCode") + .IsUnique() + .HasFilter("[FromPackingCode] IS NOT NULL"); - b.ToTable("Store_DeliverNoteDetail", (string)null); + b.ToTable("Store_CustomerReturnNoteDetail", (string)null); }); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.DeliverPlan", b => + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.DeliverJob", b => { b.Property("Id") .HasColumnType("uniqueidentifier"); - b.Property("ActiveDate") + b.Property("AcceptTime") .HasColumnType("datetime2"); - b.Property("AutoAgree") - .HasColumnType("bit"); + b.Property("AcceptUserId") + .HasColumnType("uniqueidentifier"); - b.Property("AutoCompleteJob") - .HasColumnType("bit"); + b.Property("AcceptUserName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); - b.Property("AutoHandle") - .HasColumnType("bit"); + b.Property("CompleteTime") + .HasColumnType("datetime2"); - b.Property("AutoSubmit") - .HasColumnType("bit"); + b.Property("CompleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CompleteUserName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); b.Property("ConcurrencyStamp") .IsConcurrencyToken() @@ -3471,7 +3626,6 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnName("CreatorId"); b.Property("CustomerAddressCode") - .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)"); @@ -3480,13 +3634,39 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasMaxLength(64) .HasColumnType("nvarchar(64)"); - b.Property("DirectCreateNote") - .HasColumnType("bit"); + 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"); @@ -3498,39 +3678,38 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.Property("Number") .IsRequired() .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("Number"); - - b.Property("PlanDate") - .HasColumnType("datetime2"); + .HasColumnType("nvarchar(64)"); - b.Property("PlanTime") - .HasColumnType("datetime2"); + b.Property("Priority") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasDefaultValue(0); - b.Property("Project") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + b.Property("PriorityIncrement") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasDefaultValue(0); b.Property("Remark") .HasMaxLength(3072) .HasColumnType("nvarchar(3072)") .HasColumnName("Remark"); - b.Property("RequestStatus") - .IsRequired() + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("UpStreamJobNumber") .HasMaxLength(64) .HasColumnType("nvarchar(64)"); - b.Property("SoNumber") - .IsRequired() + b.Property("WarehouseCode") + .HasColumnType("nvarchar(max)"); + + b.Property("WorkGroupCode") .HasMaxLength(64) .HasColumnType("nvarchar(64)"); - b.Property("TenantId") - .HasColumnType("uniqueidentifier") - .HasColumnName("TenantId"); - b.Property("Worker") .HasColumnType("nvarchar(max)"); @@ -3539,10 +3718,10 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.HasIndex("Number") .IsUnique(); - b.ToTable("Store_DeliverPlan", (string)null); + b.ToTable("Job_DeliverJob", (string)null); }); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.DeliverPlanDetail", b => + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.DeliverJobDetail", b => { b.Property("Id") .HasColumnType("uniqueidentifier"); @@ -3555,6 +3734,63 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("CreatorId"); + b.Property("HandledArriveDate") + .HasColumnType("datetime2"); + + b.Property("HandledContainerCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledContainerCode"); + + b.Property("HandledExpireDate") + .HasColumnType("datetime2"); + + b.Property("HandledFromLocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledFromLocationArea"); + + b.Property("HandledFromLocationCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledFromLocationCode"); + + b.Property("HandledFromLocationErpCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledFromLocationErpCode"); + + b.Property("HandledFromLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledFromLocationGroup"); + + b.Property("HandledFromWarehouseCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledFromWarehouseCode"); + + b.Property("HandledLot") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledLot"); + + b.Property("HandledPackingCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledPackingCode"); + + b.Property("HandledProduceDate") + .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) @@ -3589,53 +3825,116 @@ namespace Win_in.Sfs.Wms.Store.Migrations 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") + b.Property("OnTheWayLocationCode") .HasMaxLength(64) .HasColumnType("nvarchar(64)"); - b.Property("StdPackQty") - .HasColumnType("decimal(18,6)"); + b.Property("RecommendArriveDate") + .HasColumnType("datetime2"); - b.Property("TenantId") - .HasColumnType("uniqueidentifier") - .HasColumnName("TenantId"); + b.Property("RecommendContainerCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendContainerCode"); - b.Property("Uom") - .IsRequired() + b.Property("RecommendExpireDate") + .HasColumnType("datetime2"); + + b.Property("RecommendFromLocationArea") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("Uom"); + .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.HasIndex("Number", "SoNumber", "SoLine") - .IsUnique() - .HasFilter("[SoNumber] IS NOT NULL AND [SoLine] IS NOT NULL"); - - b.ToTable("Store_DeliverPlanDetail", (string)null); + b.ToTable("Job_DeliverJobDetail", (string)null); }); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.DeliverRequest", b => + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.DeliverNote", b => { b.Property("Id") .HasColumnType("uniqueidentifier"); @@ -3643,24 +3942,15 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.Property("ActiveDate") .HasColumnType("datetime2"); - b.Property("AutoAgree") - .HasColumnType("bit"); - - b.Property("AutoCompleteJob") - .HasColumnType("bit"); - - b.Property("AutoHandle") - .HasColumnType("bit"); - - b.Property("AutoSubmit") - .HasColumnType("bit"); - b.Property("ConcurrencyStamp") .IsConcurrencyToken() .HasMaxLength(40) .HasColumnType("nvarchar(40)") .HasColumnName("ConcurrencyStamp"); + b.Property("CountPrint") + .HasColumnType("int"); + b.Property("CreationTime") .HasColumnType("datetime2") .HasColumnName("CreationTime"); @@ -3679,8 +3969,10 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("nvarchar(64)"); b.Property("DeliverPlanNumber") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + .HasColumnType("nvarchar(max)"); + + b.Property("DeliverRequestNumber") + .HasColumnType("nvarchar(max)"); b.Property("DeliverRequestType") .IsRequired() @@ -3690,13 +3982,15 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.Property("DeliverTime") .HasColumnType("datetime2"); - b.Property("DirectCreateNote") - .HasColumnType("bit"); - b.Property("ExtraProperties") .HasColumnType("nvarchar(max)") .HasColumnName("ExtraProperties"); + b.Property("JobNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("JobNumber"); + b.Property("LastModificationTime") .HasColumnType("datetime2") .HasColumnName("LastModificationTime"); @@ -3716,11 +4010,6 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("nvarchar(3072)") .HasColumnName("Remark"); - b.Property("RequestStatus") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - b.Property("TenantId") .HasColumnType("uniqueidentifier") .HasColumnName("TenantId"); @@ -3733,16 +4022,16 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.HasIndex("Number") .IsUnique(); - b.ToTable("Store_DeliverRequest", (string)null); + b.ToTable("Store_DeliverNote", (string)null); }); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.DeliverRequestDetail", b => + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.DeliverNoteDetail", b => { b.Property("Id") .HasColumnType("uniqueidentifier"); - b.Property("AreaCode") - .HasColumnType("nvarchar(max)"); + b.Property("ArriveDate") + .HasColumnType("datetime2"); b.Property("CreationTime") .HasColumnType("datetime2") @@ -3752,10 +4041,116 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("CreatorId"); + b.Property("ExpireDate") + .HasColumnType("datetime2"); + b.Property("ExtraProperties") .HasColumnType("nvarchar(max)") .HasColumnName("ExtraProperties"); + b.Property("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) @@ -3794,150 +4189,151 @@ namespace Win_in.Sfs.Wms.Store.Migrations .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("RecommendArriveDate") + .HasColumnType("datetime2"); - b.Property("StdPackQty") - .HasColumnType("decimal(18,6)"); - - b.Property("TenantId") - .HasColumnType("uniqueidentifier") - .HasColumnName("TenantId"); - - b.Property("Uom") - .IsRequired() + b.Property("RecommendContainerCode") .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"); + .HasColumnName("RecommendContainerCode"); - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("nvarchar(40)") - .HasColumnName("ConcurrencyStamp"); + b.Property("RecommendExpireDate") + .HasColumnType("datetime2"); - b.Property("CreationTime") - .HasColumnType("datetime2") - .HasColumnName("CreationTime"); + b.Property("RecommendFromLocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendFromLocationArea"); - b.Property("CreatorId") - .HasColumnType("uniqueidentifier") - .HasColumnName("CreatorId"); + b.Property("RecommendFromLocationCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendFromLocationCode"); - b.Property("DataAction") - .HasColumnType("int"); + b.Property("RecommendFromLocationErpCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendFromLocationErpCode"); - b.Property("DataContent") - .HasColumnType("nvarchar(max)"); + b.Property("RecommendFromLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendFromLocationGroup"); - b.Property("DataIdentityCode") - .IsRequired() + b.Property("RecommendFromWarehouseCode") .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendFromWarehouseCode"); - b.Property("DataType") - .IsRequired() + b.Property("RecommendLot") .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendLot"); - b.Property("DestinationSystem") - .IsRequired() + b.Property("RecommendPackingCode") .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendPackingCode"); - b.Property("EffectiveDate") + b.Property("RecommendProduceDate") .HasColumnType("datetime2"); - b.Property("ErrorCode") - .IsRequired() + b.Property("RecommendQty") + .HasColumnType("decimal(18,6)"); + + b.Property("RecommendSupplierBatch") .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendSupplierBatch"); - b.Property("ErrorMessage") + b.Property("Remark") .HasMaxLength(3072) - .HasColumnType("nvarchar(3072)"); + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); - b.Property("ExtraProperties") - .HasColumnType("nvarchar(max)") - .HasColumnName("ExtraProperties"); + b.Property("StdPackQty") + .HasColumnType("decimal(18,6)"); - b.Property("LastModificationTime") - .HasColumnType("datetime2") - .HasColumnName("LastModificationTime"); + b.Property("SupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("SupplierBatch"); - b.Property("LastModifierId") + b.Property("TenantId") .HasColumnType("uniqueidentifier") - .HasColumnName("LastModifierId"); + .HasColumnName("TenantId"); - b.Property("Number") - .HasColumnType("bigint"); + b.Property("ToContainerCode") + .HasColumnType("nvarchar(max)"); - b.Property("ReadTime") - .HasColumnType("datetime2"); + b.Property("ToLocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToLocationArea"); - b.Property("Reader") - .HasColumnType("nvarchar(max)"); + b.Property("ToLocationCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToLocationCode"); - b.Property("Remark") - .HasMaxLength(3072) - .HasColumnType("nvarchar(3072)") - .HasColumnName("Remark"); + b.Property("ToLocationErpCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToLocationErpCode"); - b.Property("RetryTimes") - .HasColumnType("int"); + b.Property("ToLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToLocationGroup"); - b.Property("SourceSystem") + b.Property("ToLot") .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)"); - b.Property("Status") + b.Property("ToPackingCode") .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)"); - b.Property("TenantId") - .HasColumnType("uniqueidentifier") - .HasColumnName("TenantId"); - - b.Property("TyrpNumber") + b.Property("ToStatus") .IsRequired() - .HasColumnType("nvarchar(max)"); + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); - b.Property("WriteTime") - .HasColumnType("datetime2"); + b.Property("ToWarehouseCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToWarehouseCode"); - b.Property("Writer") - .HasColumnType("nvarchar(max)"); + b.Property("Uom") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Uom"); b.HasKey("Id"); - b.ToTable("Store_ExchangeData", (string)null); + 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.InspectAbnormalNote", b => + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.DeliverPlan", b => { b.Property("Id") .HasColumnType("uniqueidentifier"); @@ -3945,6 +4341,18 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.Property("ActiveDate") .HasColumnType("datetime2"); + b.Property("AutoAgree") + .HasColumnType("bit"); + + b.Property("AutoCompleteJob") + .HasColumnType("bit"); + + b.Property("AutoHandle") + .HasColumnType("bit"); + + b.Property("AutoSubmit") + .HasColumnType("bit"); + b.Property("ConcurrencyStamp") .IsConcurrencyToken() .HasMaxLength(40) @@ -3959,14 +4367,23 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("CreatorId"); - b.Property("ExtraProperties") - .HasColumnType("nvarchar(max)") - .HasColumnName("ExtraProperties"); + b.Property("CustomerAddressCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); - b.Property("InspectNumber") + 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"); @@ -3981,7 +4398,14 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("nvarchar(64)") .HasColumnName("Number"); - b.Property("ReceiptNumber") + b.Property("PlanDate") + .HasColumnType("datetime2"); + + b.Property("PlanTime") + .HasColumnType("datetime2"); + + b.Property("Project") + .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)"); @@ -3990,7 +4414,12 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("nvarchar(3072)") .HasColumnName("Remark"); - b.Property("SupplierCode") + b.Property("RequestStatus") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("SoNumber") .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)"); @@ -4007,27 +4436,14 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.HasIndex("Number") .IsUnique(); - b.ToTable("Store_InspectAbnormalNote", (string)null); + b.ToTable("Store_DeliverPlan", (string)null); }); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.InspectAbnormalNoteDetail", b => + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.DeliverPlanDetail", 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"); @@ -4036,9 +4452,6 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("CreatorId"); - b.Property("ExpireDate") - .HasColumnType("datetime2"); - b.Property("ItemCode") .IsRequired() .HasMaxLength(64) @@ -4068,11 +4481,6 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("LastModifierId"); - b.Property("Lot") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("Lot"); - b.Property("MasterID") .HasColumnType("uniqueidentifier"); @@ -4082,18 +4490,6 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("nvarchar(64)") .HasColumnName("Number"); - b.Property("PackingCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("PackingCode"); - - b.Property("Photos") - .HasColumnType("nvarchar(max)"); - - b.Property("ProduceDate") - .HasColumnType("datetime2"); - b.Property("Qty") .HasPrecision(18, 6) .HasColumnType("decimal(18,6)") @@ -4104,13 +4500,16 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("nvarchar(3072)") .HasColumnName("Remark"); - b.Property("StdPackQty") - .HasColumnType("decimal(18,6)"); + b.Property("SoLine") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); - b.Property("SupplierBatch") + b.Property("SoNumber") .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("SupplierBatch"); + .HasColumnType("nvarchar(64)"); + + b.Property("StdPackQty") + .HasColumnType("decimal(18,6)"); b.Property("TenantId") .HasColumnType("uniqueidentifier") @@ -4126,40 +4525,32 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.HasIndex("MasterID"); - b.HasIndex("Number", "PackingCode") - .IsUnique(); + b.HasIndex("Number", "SoNumber", "SoLine") + .IsUnique() + .HasFilter("[SoNumber] IS NOT NULL AND [SoLine] IS NOT NULL"); - b.ToTable("Store_InspectAbnormalNoteDetail", (string)null); + b.ToTable("Store_DeliverPlanDetail", (string)null); }); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.InspectJob", b => + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.DeliverRequest", b => { b.Property("Id") .HasColumnType("uniqueidentifier"); - b.Property("AcceptTime") + b.Property("ActiveDate") .HasColumnType("datetime2"); - b.Property("AcceptUserId") - .HasColumnType("uniqueidentifier"); - - b.Property("AcceptUserName") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("AsnNumber") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + b.Property("AutoAgree") + .HasColumnType("bit"); - b.Property("CompleteTime") - .HasColumnType("datetime2"); + b.Property("AutoCompleteJob") + .HasColumnType("bit"); - b.Property("CompleteUserId") - .HasColumnType("uniqueidentifier"); + b.Property("AutoHandle") + .HasColumnType("bit"); - b.Property("CompleteUserName") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + b.Property("AutoSubmit") + .HasColumnType("bit"); b.Property("ConcurrencyStamp") .IsConcurrencyToken() @@ -4175,33 +4566,34 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("CreatorId"); - b.Property("ExtraProperties") - .HasColumnType("nvarchar(max)") - .HasColumnName("ExtraProperties"); - - b.Property("InspectNumber") + b.Property("CustomerAddressCode") .HasMaxLength(64) .HasColumnType("nvarchar(64)"); - b.Property("IsAutoComplete") - .ValueGeneratedOnAdd() - .HasColumnType("bit") - .HasDefaultValue(false); - - b.Property("JobDescription") - .HasMaxLength(1024) - .HasColumnType("nvarchar(1024)"); - - b.Property("JobStatus") + b.Property("CustomerCode") .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)"); - b.Property("JobType") + 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"); @@ -4210,65 +4602,26 @@ namespace Win_in.Sfs.Wms.Store.Migrations .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)"); + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); b.Property("Remark") .HasMaxLength(3072) .HasColumnType("nvarchar(3072)") .HasColumnName("Remark"); - b.Property("RpNumber") + b.Property("RequestStatus") + .IsRequired() .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)"); @@ -4277,33 +4630,17 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.HasIndex("Number") .IsUnique(); - b.ToTable("Job_InspectJob", (string)null); + b.ToTable("Store_DeliverRequest", (string)null); }); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.InspectJobDetail", b => + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.DeliverRequestDetail", b => { b.Property("Id") .HasColumnType("uniqueidentifier"); - b.Property("AbcClass") - .HasColumnType("nvarchar(max)"); - - b.Property("Appearance") + b.Property("AreaCode") .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"); @@ -4312,39 +4649,9 @@ namespace Win_in.Sfs.Wms.Store.Migrations .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("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); b.Property("ItemCode") .IsRequired() @@ -4375,133 +4682,58 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("LastModifierId"); - b.Property("LocationArea") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("LocationArea"); - - b.Property("LocationCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("LocationCode"); - - b.Property("LocationErpCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("LocationErpCode"); - - b.Property("LocationGroup") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("LocationGroup"); - - b.Property("Lot") - .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"); + .HasColumnName("Number"); - b.Property("ReceiveQty") - .HasColumnType("decimal(18,6)"); + b.Property("Qty") + .HasPrecision(18, 6) + .HasColumnType("decimal(18,6)") + .HasColumnName("Qty"); b.Property("Remark") .HasMaxLength(3072) .HasColumnType("nvarchar(3072)") .HasColumnName("Remark"); - b.Property("SamplePercent") + b.Property("StdPackQty") .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)"); + .HasColumnName("Uom"); b.HasKey("Id"); b.HasIndex("MasterID"); - b.ToTable("Job_InspectJobDetail", (string)null); + b.HasIndex("Number", "ItemCode") + .IsUnique(); + + b.ToTable("Store_DeliverRequestDetail", (string)null); }); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.InspectJobSummaryDetail", b => + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ExchangeData", 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("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); b.Property("CreationTime") .HasColumnType("datetime2") @@ -4511,58 +4743,42 @@ namespace Win_in.Sfs.Wms.Store.Migrations .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("DataAction") + .HasColumnType("int"); - b.Property("InspectReport") + b.Property("DataContent") .HasColumnType("nvarchar(max)"); - b.Property("InspectType") + b.Property("DataIdentityCode") .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)"); - b.Property("InspectUser") + b.Property("DataType") + .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)"); - b.Property("ItemCode") + b.Property("DestinationSystem") .IsRequired() .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ItemCode"); + .HasColumnType("nvarchar(64)"); - b.Property("ItemDesc1") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ItemDesc1"); + b.Property("EffectiveDate") + .HasColumnType("datetime2"); - b.Property("ItemDesc2") + b.Property("ErrorCode") + .IsRequired() .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ItemDesc2"); + .HasColumnType("nvarchar(64)"); - b.Property("ItemName") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ItemName"); + b.Property("ErrorMessage") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); b.Property("LastModificationTime") .HasColumnType("datetime2") @@ -4572,83 +4788,74 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("LastModifierId"); - b.Property("Lot") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("Lot"); - - b.Property("MasterID") - .HasColumnType("uniqueidentifier"); - - b.Property("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("Number") + .HasColumnType("bigint"); - b.Property("ProduceDate") + b.Property("ReadTime") .HasColumnType("datetime2"); - b.Property("ReceiveQty") - .HasColumnType("decimal(18,6)"); + b.Property("Reader") + .HasColumnType("nvarchar(max)"); 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("RetryTimes") + .HasColumnType("int"); - b.Property("SummaryInspectStatus") + b.Property("SourceSystem") .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)"); - b.Property("SupplierBatch") + b.Property("Status") + .IsRequired() .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("SupplierBatch"); + .HasColumnType("nvarchar(64)"); b.Property("TenantId") .HasColumnType("uniqueidentifier") .HasColumnName("TenantId"); - b.Property("Uom") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + b.Property("TyrpNumber") + .IsRequired() + .HasColumnType("nvarchar(max)"); - b.HasKey("Id"); + b.Property("WriteTime") + .HasColumnType("datetime2"); - b.HasIndex("MasterID"); + b.Property("Writer") + .HasColumnType("nvarchar(max)"); - b.ToTable("Job_InspectJobSummaryDetail", (string)null); + b.HasKey("Id"); + + b.ToTable("Store_ExchangeData", (string)null); }); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.InspectNote", b => + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.InjectionJob", b => { b.Property("Id") .HasColumnType("uniqueidentifier"); - b.Property("ActiveDate") + b.Property("AcceptTime") .HasColumnType("datetime2"); - b.Property("AsnNumber") + 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)"); @@ -4670,14 +4877,28 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("nvarchar(max)") .HasColumnName("ExtraProperties"); - b.Property("InspectNumber") + b.Property("InjectionRequestNumber") .HasMaxLength(64) .HasColumnType("nvarchar(64)"); - b.Property("JobNumber") + b.Property("IsAutoComplete") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false); + + b.Property("JobDescription") + .HasMaxLength(1024) + .HasColumnType("nvarchar(1024)"); + + b.Property("JobStatus") + .IsRequired() .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("JobNumber"); + .HasColumnType("nvarchar(64)"); + + b.Property("JobType") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); b.Property("LastModificationTime") .HasColumnType("datetime2") @@ -4687,26 +4908,22 @@ namespace Win_in.Sfs.Wms.Store.Migrations .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("Priority") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasDefaultValue(0); - b.Property("ReceiptNumber") + b.Property("PriorityIncrement") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasDefaultValue(0); + + b.Property("ProdLine") .HasMaxLength(64) .HasColumnType("nvarchar(64)"); @@ -4715,12 +4932,7 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("nvarchar(3072)") .HasColumnName("Remark"); - b.Property("RpNumber") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("SupplierCode") - .IsRequired() + b.Property("RequestType") .HasMaxLength(64) .HasColumnType("nvarchar(64)"); @@ -4728,41 +4940,40 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("TenantId"); + b.Property("UpStreamJobNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("UseOnTheWayLocation") + .HasColumnType("bit"); + + b.Property("WarehouseCode") + .HasColumnType("nvarchar(max)"); + + b.Property("WorkGroupCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + b.Property("Worker") .HasColumnType("nvarchar(max)"); + b.Property("Workshop") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + b.HasKey("Id"); b.HasIndex("Number") .IsUnique(); - b.ToTable("Store_InspectNote", (string)null); + b.ToTable("Job_InjectionJob", (string)null); }); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.InspectNoteDetail", b => + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.InjectionJobDetail", 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"); @@ -4771,44 +4982,73 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("CreatorId"); - b.Property("DetailInspectStatus") + b.Property("DeliveryQty") + .HasColumnType("decimal(18,6)"); + + b.Property("DistributionType") .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)"); - b.Property("ExpireDate") + b.Property("ExpiredTime") .HasColumnType("datetime2"); - b.Property("FailedQty") - .ValueGeneratedOnAdd() - .HasColumnType("decimal(18,6)") - .HasDefaultValue(0m); + b.Property("HandledArriveDate") + .HasColumnType("datetime2"); - b.Property("FailedReason") + b.Property("HandledContainerCode") .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("GoodQty") - .ValueGeneratedOnAdd() - .HasColumnType("decimal(18,6)") - .HasDefaultValue(0m); + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledContainerCode"); - b.Property("InspectDate") + b.Property("HandledExpireDate") .HasColumnType("datetime2"); - b.Property("InspectQty") - .ValueGeneratedOnAdd() - .HasColumnType("decimal(18,6)") - .HasDefaultValue(0m); + b.Property("HandledFromLocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledFromLocationArea"); - b.Property("InspectType") - .IsRequired() + b.Property("HandledFromLocationCode") .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledFromLocationCode"); - b.Property("InspectUser") + b.Property("HandledFromLocationErpCode") .HasMaxLength(64) - .HasColumnType("nvarchar(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() @@ -4839,82 +5079,111 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("LastModifierId"); - b.Property("LocationArea") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("LocationArea"); + b.Property("MasterID") + .HasColumnType("uniqueidentifier"); - b.Property("LocationCode") + b.Property("Number") .IsRequired() .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("LocationCode"); + .HasColumnType("nvarchar(64)"); - b.Property("LocationErpCode") + 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)") - .HasColumnName("LocationErpCode"); + .HasColumnType("nvarchar(64)"); - b.Property("LocationGroup") + b.Property("PositionCode") .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("LocationGroup"); + .HasColumnType("nvarchar(64)"); - b.Property("Lot") + b.Property("ProdLine") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("RecommendArriveDate") + .HasColumnType("datetime2"); + + b.Property("RecommendContainerCode") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("Lot"); + .HasColumnName("RecommendContainerCode"); - b.Property("MasterID") - .HasColumnType("uniqueidentifier"); + b.Property("RecommendExpireDate") + .HasColumnType("datetime2"); - b.Property("NotPassedQty") - .HasColumnType("decimal(18,6)"); + b.Property("RecommendFromLocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendFromLocationArea"); - b.Property("Number") - .IsRequired() + b.Property("RecommendFromLocationCode") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("Number"); + .HasColumnName("RecommendFromLocationCode"); - b.Property("OtherPropertyJson") - .HasColumnType("nvarchar(max)"); + b.Property("RecommendFromLocationErpCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendFromLocationErpCode"); - b.Property("PackingCode") - .IsRequired() + b.Property("RecommendFromLocationGroup") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("PackingCode"); + .HasColumnName("RecommendFromLocationGroup"); - b.Property("Photos") - .HasColumnType("nvarchar(max)"); + b.Property("RecommendFromWarehouseCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendFromWarehouseCode"); - b.Property("PoLine") + b.Property("RecommendLot") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("PoLine"); + .HasColumnName("RecommendLot"); - b.Property("PoNumber") + b.Property("RecommendPackingCode") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("PoNumber"); + .HasColumnName("RecommendPackingCode"); - b.Property("ProduceDate") + b.Property("RecommendProduceDate") .HasColumnType("datetime2"); - b.Property("ReceiveQty") + b.Property("RecommendQty") .HasColumnType("decimal(18,6)"); + b.Property("RecommendSupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendSupplierBatch"); + + b.Property("RecommendType") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + b.Property("Remark") .HasMaxLength(3072) .HasColumnType("nvarchar(3072)") .HasColumnName("Remark"); - b.Property("SamplePercent") - .ValueGeneratedOnAdd() - .HasColumnType("decimal(18,6)") - .HasDefaultValue(0m); + b.Property("RequestLocationCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("RoundedQty") + .HasColumnType("decimal(18,6)"); b.Property("Status") .IsRequired() @@ -4924,56 +5193,68 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.Property("StdPackQty") .HasColumnType("decimal(18,6)"); - b.Property("SupplierBatch") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("SupplierBatch"); - b.Property("TenantId") .HasColumnType("uniqueidentifier") .HasColumnName("TenantId"); - b.Property("Uom") + b.Property("ToLocationArea") .HasMaxLength(64) .HasColumnType("nvarchar(64)"); - b.Property("Volume") - .HasColumnType("nvarchar(max)"); + b.Property("ToLocationCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); - b.Property("WarehouseCode") + 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)") - .HasColumnName("WarehouseCode"); + .HasColumnType("nvarchar(64)"); - b.Property("Weight") + b.Property("Uom") .HasColumnType("nvarchar(max)"); + b.Property("WorkStation") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + b.HasKey("Id"); b.HasIndex("MasterID"); - b.HasIndex("Number", "PackingCode") - .IsUnique(); - - b.ToTable("Store_InspectNoteDetail", (string)null); + b.ToTable("Job_InjectionJobDetail", (string)null); }); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.InspectNoteSummaryDetail", b => + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.InjectionNote", b => { b.Property("Id") .HasColumnType("uniqueidentifier"); - b.Property("AbcClass") - .HasColumnType("nvarchar(max)"); + b.Property("ActiveDate") + .HasColumnType("datetime2"); - b.Property("ArriveDate") + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("ConfirmTime") .HasColumnType("datetime2"); - b.Property("CrackQty") - .ValueGeneratedOnAdd() - .HasColumnType("decimal(18,6)") - .HasDefaultValue(0m); + b.Property("Confirmed") + .HasColumnType("bit"); b.Property("CreationTime") .HasColumnType("datetime2") @@ -4983,37 +5264,3931 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("CreatorId"); - b.Property("ExpireDate") + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("JobNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("JobNumber"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("RequestNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("RequestType") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("UseOnTheWayLocation") + .HasColumnType("bit"); + + b.Property("Worker") + .HasColumnType("nvarchar(max)"); + + b.Property("Workshop") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.HasKey("Id"); + + b.HasIndex("Number") + .IsUnique(); + + b.ToTable("Store_InjectionNote", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.InjectionNoteDetail", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ArriveDate") .HasColumnType("datetime2"); - b.Property("FailedQty") - .ValueGeneratedOnAdd() - .HasColumnType("decimal(18,6)") - .HasDefaultValue(0m); + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); - b.Property("FailedReason") + 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("GoodQty") - .ValueGeneratedOnAdd() - .HasColumnType("decimal(18,6)") - .HasDefaultValue(0m); + b.Property("FromWarehouseCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromWarehouseCode"); - b.Property("InspectQty") - .ValueGeneratedOnAdd() + b.Property("HandledArriveDate") + .HasColumnType("datetime2"); + + b.Property("HandledContainerCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledContainerCode"); + + b.Property("HandledExpireDate") + .HasColumnType("datetime2"); + + b.Property("HandledFromLocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledFromLocationArea"); + + b.Property("HandledFromLocationCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledFromLocationCode"); + + b.Property("HandledFromLocationErpCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledFromLocationErpCode"); + + b.Property("HandledFromLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledFromLocationGroup"); + + b.Property("HandledFromWarehouseCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledFromWarehouseCode"); + + b.Property("HandledLot") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledLot"); + + b.Property("HandledPackingCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledPackingCode"); + + b.Property("HandledProduceDate") + .HasColumnType("datetime2"); + + b.Property("HandledQty") + .HasColumnType("decimal(18,6)"); + + b.Property("HandledSupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledSupplierBatch"); + + b.Property("IssueTime") + .HasColumnType("datetime2"); + + b.Property("ItemCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemCode"); + + b.Property("ItemDesc1") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc1"); + + b.Property("ItemDesc2") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc2"); + + b.Property("ItemName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemName"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("MasterID") + .HasColumnType("uniqueidentifier"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("OnTheWayLocationCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("PositionCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ProdLine") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ProduceDate") + .HasColumnType("datetime2"); + + b.Property("Qty") + .HasPrecision(18, 6) .HasColumnType("decimal(18,6)") - .HasDefaultValue(0m); + .HasColumnName("Qty"); + + b.Property("RecommendArriveDate") + .HasColumnType("datetime2"); + + b.Property("RecommendContainerCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendContainerCode"); + + b.Property("RecommendExpireDate") + .HasColumnType("datetime2"); + + b.Property("RecommendFromLocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendFromLocationArea"); + + b.Property("RecommendFromLocationCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendFromLocationCode"); + + b.Property("RecommendFromLocationErpCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendFromLocationErpCode"); + + b.Property("RecommendFromLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendFromLocationGroup"); + + b.Property("RecommendFromWarehouseCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendFromWarehouseCode"); + + b.Property("RecommendLot") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendLot"); + + b.Property("RecommendPackingCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendPackingCode"); + + b.Property("RecommendProduceDate") + .HasColumnType("datetime2"); + + b.Property("RecommendQty") + .HasColumnType("decimal(18,6)"); + + b.Property("RecommendSupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendSupplierBatch"); + + b.Property("RecommendType") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("StdPackQty") + .HasColumnType("decimal(18,6)"); + + b.Property("SupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("SupplierBatch"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("ToContainerCode") + .HasColumnType("nvarchar(max)"); + + b.Property("ToLocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToLocationArea"); + + b.Property("ToLocationCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToLocationCode"); + + b.Property("ToLocationErpCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToLocationErpCode"); + + b.Property("ToLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToLocationGroup"); + + b.Property("ToLot") + .HasColumnType("nvarchar(max)"); + + b.Property("ToPackingCode") + .HasColumnType("nvarchar(max)"); + + b.Property("ToStatus") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ToWarehouseCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToWarehouseCode"); + + b.Property("Uom") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Uom"); + + b.Property("WorkStation") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.HasKey("Id"); + + b.HasIndex("FromPackingCode"); + + b.HasIndex("MasterID"); + + b.HasIndex("Number", "FromPackingCode", "FromLocationCode", "ToLocationCode") + .IsUnique() + .HasFilter("[FromPackingCode] IS NOT NULL"); + + b.ToTable("Store_InjectionNoteDetail", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.InjectionRequest", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ActiveDate") + .HasColumnType("datetime2"); + + b.Property("AutoAgree") + .HasColumnType("bit"); + + b.Property("AutoCompleteJob") + .HasColumnType("bit"); + + b.Property("AutoHandle") + .HasColumnType("bit"); + + b.Property("AutoSubmit") + .HasColumnType("bit"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DirectCreateNote") + .HasColumnType("bit"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("PreparationPlanNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ProdLine") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("RequestStatus") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Type") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("UseOnTheWayLocation") + .HasColumnType("bit"); + + b.Property("Worker") + .HasColumnType("nvarchar(max)"); + + b.Property("Workshop") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.HasKey("Id"); + + b.HasIndex("Number") + .IsUnique(); + + b.ToTable("Store_InjectionRequest", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.InjectionRequestDetail", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("ExpiredTime") + .HasColumnType("datetime2"); + + b.Property("FromLocationArea") + .HasColumnType("nvarchar(max)"); + + b.Property("IssuedQty") + .HasPrecision(18, 6) + .HasColumnType("decimal(18,6)"); + + b.Property("ItemCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemCode"); + + b.Property("ItemDesc1") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc1"); + + b.Property("ItemDesc2") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc2"); + + b.Property("ItemName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemName"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("MasterID") + .HasColumnType("uniqueidentifier"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("PositionCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ProdLine") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Qty") + .HasPrecision(18, 6) + .HasColumnType("decimal(18,6)") + .HasColumnName("Qty"); + + b.Property("ReceivedQty") + .HasPrecision(18, 6) + .HasColumnType("decimal(18,6)"); + + b.Property("RecommendType") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("Status") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("StdPackQty") + .HasColumnType("decimal(18,6)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("ToLocationArea") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ToLocationCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ToLocationErpCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ToLocationGroup") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ToWarehouseCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Uom") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Uom"); + + b.Property("WorkStation") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.HasKey("Id"); + + b.HasIndex("ItemCode"); + + b.HasIndex("MasterID"); + + b.HasIndex("Number", "ItemCode", "ToLocationCode") + .IsUnique(); + + b.ToTable("Store_InjectionRequestDetail", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.InspectAbnormalNote", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ActiveDate") + .HasColumnType("datetime2"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("InspectNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("ReceiptNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("SupplierCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Worker") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("Number") + .IsUnique(); + + b.ToTable("Store_InspectAbnormalNote", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.InspectAbnormalNoteDetail", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AbnormalType") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ArriveDate") + .HasColumnType("datetime2"); + + b.Property("ContainerCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ContainerCode"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("ExpireDate") + .HasColumnType("datetime2"); + + b.Property("ItemCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemCode"); + + b.Property("ItemDesc1") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc1"); + + b.Property("ItemDesc2") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc2"); + + b.Property("ItemName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemName"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Lot") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Lot"); + + b.Property("MasterID") + .HasColumnType("uniqueidentifier"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("PackingCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("PackingCode"); + + b.Property("Photos") + .HasColumnType("nvarchar(max)"); + + b.Property("ProduceDate") + .HasColumnType("datetime2"); + + b.Property("Qty") + .HasPrecision(18, 6) + .HasColumnType("decimal(18,6)") + .HasColumnName("Qty"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("StdPackQty") + .HasColumnType("decimal(18,6)"); + + b.Property("SupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("SupplierBatch"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Uom") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Uom"); + + b.HasKey("Id"); + + b.HasIndex("MasterID"); + + b.HasIndex("Number", "PackingCode") + .IsUnique(); + + b.ToTable("Store_InspectAbnormalNoteDetail", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.InspectJob", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AcceptTime") + .HasColumnType("datetime2"); + + b.Property("AcceptUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("AcceptUserName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("AsnNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("CompleteTime") + .HasColumnType("datetime2"); + + b.Property("CompleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CompleteUserName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("InspectNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("IsAutoComplete") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false); + + b.Property("JobDescription") + .HasMaxLength(1024) + .HasColumnType("nvarchar(1024)"); + + b.Property("JobStatus") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("JobType") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("NextAction") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("PoNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Priority") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasDefaultValue(0); + + b.Property("PriorityIncrement") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasDefaultValue(0); + + b.Property("PurchaseReceiptRequestNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ReceiptNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("RpNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("SupplierCode") + .HasColumnType("nvarchar(max)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("UpStreamJobNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("WarehouseCode") + .HasColumnType("nvarchar(max)"); + + b.Property("WorkGroupCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Worker") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("Number") + .IsUnique(); + + b.ToTable("Job_InspectJob", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.InspectJobDetail", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AbcClass") + .HasColumnType("nvarchar(max)"); + + b.Property("Appearance") + .HasColumnType("nvarchar(max)"); + + b.Property("ArriveDate") + .HasColumnType("datetime2"); + + b.Property("ContainerCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ContainerCode"); + + b.Property("CrackQty") + .ValueGeneratedOnAdd() + .HasColumnType("decimal(18,6)") + .HasDefaultValue(0m); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DetailInspectStatus") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ExpireDate") + .HasColumnType("datetime2"); + + b.Property("FailedQty") + .ValueGeneratedOnAdd() + .HasColumnType("decimal(18,6)") + .HasDefaultValue(0m); + + b.Property("FailedReason") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("GoodQty") + .ValueGeneratedOnAdd() + .HasColumnType("decimal(18,6)") + .HasDefaultValue(0m); + + b.Property("InspectQty") + .HasColumnType("decimal(18,6)"); + + b.Property("InspectType") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("InspectUser") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ItemCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemCode"); + + b.Property("ItemDesc1") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc1"); + + b.Property("ItemDesc2") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc2"); + + b.Property("ItemName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemName"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("LocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationArea"); + + b.Property("LocationCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationCode"); + + b.Property("LocationErpCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationErpCode"); + + b.Property("LocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationGroup"); + + b.Property("Lot") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Lot"); + + b.Property("MasterID") + .HasColumnType("uniqueidentifier"); + + b.Property("NotPassedQty") + .ValueGeneratedOnAdd() + .HasColumnType("decimal(18,6)") + .HasDefaultValue(0m); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("OtherPropertyJson") + .HasColumnType("nvarchar(max)"); + + b.Property("PackingCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("PackingCode"); + + b.Property("PoLine") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("PoNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ProduceDate") + .HasColumnType("datetime2"); + + b.Property("ReceiveQty") + .HasColumnType("decimal(18,6)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("SamplePercent") + .HasColumnType("decimal(18,6)"); + + b.Property("Status") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("StdPackQty") + .HasColumnType("decimal(18,6)"); + + b.Property("SupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("SupplierBatch"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Uom") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Volume") + .HasColumnType("nvarchar(max)"); + + b.Property("WarehouseCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("WarehouseCode"); + + b.Property("Weight") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("MasterID"); + + b.ToTable("Job_InspectJobDetail", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.InspectJobSummaryDetail", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AbcClass") + .HasColumnType("nvarchar(max)"); + + b.Property("ArriveDate") + .HasColumnType("datetime2"); + + b.Property("CrackQty") + .ValueGeneratedOnAdd() + .HasColumnType("decimal(18,6)") + .HasDefaultValue(0m); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("ExpireDate") + .HasColumnType("datetime2"); + + b.Property("FailedQty") + .ValueGeneratedOnAdd() + .HasColumnType("decimal(18,6)") + .HasDefaultValue(0m); + + b.Property("FailedReason") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("GoodQty") + .ValueGeneratedOnAdd() + .HasColumnType("decimal(18,6)") + .HasDefaultValue(0m); + + b.Property("InspectQty") + .HasColumnType("decimal(18,6)"); + + b.Property("InspectReport") + .HasColumnType("nvarchar(max)"); + + b.Property("InspectType") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("InspectUser") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ItemCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemCode"); + + b.Property("ItemDesc1") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc1"); + + b.Property("ItemDesc2") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc2"); + + b.Property("ItemName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemName"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Lot") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Lot"); + + b.Property("MasterID") + .HasColumnType("uniqueidentifier"); + + b.Property("NotPassedQty") + .ValueGeneratedOnAdd() + .HasColumnType("decimal(18,6)") + .HasDefaultValue(0m); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("PoLine") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("PoNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ProduceDate") + .HasColumnType("datetime2"); + + b.Property("ReceiveQty") + .HasColumnType("decimal(18,6)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("SamplePercent") + .HasColumnType("decimal(18,6)"); + + b.Property("StdPackQty") + .HasColumnType("decimal(18,6)"); + + b.Property("SummaryInspectStatus") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("SupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("SupplierBatch"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Uom") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.HasKey("Id"); + + b.HasIndex("MasterID"); + + b.ToTable("Job_InspectJobSummaryDetail", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.InspectNote", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ActiveDate") + .HasColumnType("datetime2"); + + b.Property("AsnNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("InspectNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("JobNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("JobNumber"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("NextAction") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("PoNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("PurchaseReceiptRequestNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ReceiptNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("RpNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("SupplierCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Worker") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("Number") + .IsUnique(); + + b.ToTable("Store_InspectNote", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.InspectNoteDetail", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AbcClass") + .HasColumnType("nvarchar(max)"); + + b.Property("Appearance") + .HasColumnType("nvarchar(max)"); + + b.Property("ArriveDate") + .HasColumnType("datetime2"); + + b.Property("ContainerCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ContainerCode"); + + b.Property("CrackQty") + .ValueGeneratedOnAdd() + .HasColumnType("decimal(18,6)") + .HasDefaultValue(0m); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DetailInspectStatus") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ExpireDate") + .HasColumnType("datetime2"); + + b.Property("FailedQty") + .ValueGeneratedOnAdd() + .HasColumnType("decimal(18,6)") + .HasDefaultValue(0m); + + b.Property("FailedReason") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("GoodQty") + .ValueGeneratedOnAdd() + .HasColumnType("decimal(18,6)") + .HasDefaultValue(0m); + + b.Property("InspectDate") + .HasColumnType("datetime2"); + + b.Property("InspectQty") + .ValueGeneratedOnAdd() + .HasColumnType("decimal(18,6)") + .HasDefaultValue(0m); + + b.Property("InspectType") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("InspectUser") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ItemCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemCode"); + + b.Property("ItemDesc1") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc1"); + + b.Property("ItemDesc2") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc2"); + + b.Property("ItemName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemName"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("LocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationArea"); + + b.Property("LocationCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationCode"); + + b.Property("LocationErpCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationErpCode"); + + b.Property("LocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationGroup"); + + b.Property("Lot") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Lot"); + + b.Property("MasterID") + .HasColumnType("uniqueidentifier"); + + b.Property("NotPassedQty") + .HasColumnType("decimal(18,6)"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("OtherPropertyJson") + .HasColumnType("nvarchar(max)"); + + b.Property("PackingCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("PackingCode"); + + b.Property("Photos") + .HasColumnType("nvarchar(max)"); + + b.Property("PoLine") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("PoLine"); + + b.Property("PoNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("PoNumber"); + + b.Property("ProduceDate") + .HasColumnType("datetime2"); + + b.Property("ReceiveQty") + .HasColumnType("decimal(18,6)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("SamplePercent") + .ValueGeneratedOnAdd() + .HasColumnType("decimal(18,6)") + .HasDefaultValue(0m); + + b.Property("Status") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("StdPackQty") + .HasColumnType("decimal(18,6)"); + + b.Property("SupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("SupplierBatch"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Uom") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Volume") + .HasColumnType("nvarchar(max)"); + + b.Property("WarehouseCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("WarehouseCode"); + + b.Property("Weight") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("MasterID"); + + b.HasIndex("Number", "PackingCode") + .IsUnique(); + + b.ToTable("Store_InspectNoteDetail", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.InspectNoteSummaryDetail", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AbcClass") + .HasColumnType("nvarchar(max)"); + + b.Property("ArriveDate") + .HasColumnType("datetime2"); + + b.Property("CrackQty") + .ValueGeneratedOnAdd() + .HasColumnType("decimal(18,6)") + .HasDefaultValue(0m); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("ExpireDate") + .HasColumnType("datetime2"); + + b.Property("FailedQty") + .ValueGeneratedOnAdd() + .HasColumnType("decimal(18,6)") + .HasDefaultValue(0m); + + b.Property("FailedReason") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("GoodQty") + .ValueGeneratedOnAdd() + .HasColumnType("decimal(18,6)") + .HasDefaultValue(0m); + + b.Property("InspectQty") + .ValueGeneratedOnAdd() + .HasColumnType("decimal(18,6)") + .HasDefaultValue(0m); + + b.Property("InspectType") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("InspectUser") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ItemCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemCode"); + + b.Property("ItemDesc1") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc1"); + + b.Property("ItemDesc2") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc2"); + + b.Property("ItemName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemName"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Lot") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Lot"); + + b.Property("MasterID") + .HasColumnType("uniqueidentifier"); + + b.Property("NotPassedQty") + .HasColumnType("decimal(18,6)"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("PoLine") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("PoLine"); + + b.Property("PoNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("PoNumber"); + + b.Property("ProduceDate") + .HasColumnType("datetime2"); + + b.Property("ReceiveQty") + .HasColumnType("decimal(18,6)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("SamplePercent") + .ValueGeneratedOnAdd() + .HasColumnType("decimal(18,6)") + .HasDefaultValue(0m); + + b.Property("StdPackQty") + .HasColumnType("decimal(18,6)"); + + b.Property("SummaryInspectStatus") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("SupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("SupplierBatch"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Uom") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.HasKey("Id"); + + b.HasIndex("MasterID"); + + b.HasIndex("Number", "ItemCode") + .IsUnique(); + + b.ToTable("Store_InspectNoteSummaryDetail", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.InspectRequest", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ActiveDate") + .HasColumnType("datetime2"); + + b.Property("AsnNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("AutoAgree") + .HasColumnType("bit"); + + b.Property("AutoCompleteJob") + .HasColumnType("bit"); + + b.Property("AutoHandle") + .HasColumnType("bit"); + + b.Property("AutoSubmit") + .HasColumnType("bit"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DirectCreateNote") + .HasColumnType("bit"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("PoNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("PurchaseReceiptRequestNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ReceiptNumber") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("RequestStatus") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("RpNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("SupplierCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("WarehouseCode") + .HasColumnType("nvarchar(max)"); + + b.Property("Worker") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("Number") + .IsUnique(); + + b.ToTable("Store_InspectRequest", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.InspectRequestDetail", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AbcClass") + .HasColumnType("nvarchar(max)"); + + b.Property("ArriveDate") + .HasColumnType("datetime2"); + + b.Property("Attributes") + .HasColumnType("nvarchar(max)"); + + b.Property("ContainerCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ContainerCode"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DetailInspectStatus") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ExpireDate") + .HasColumnType("datetime2"); + + b.Property("InspectQty") + .ValueGeneratedOnAdd() + .HasColumnType("decimal(18,6)") + .HasDefaultValue(0m); + + b.Property("InspectType") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ItemCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemCode"); + + b.Property("ItemDesc1") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc1"); + + b.Property("ItemDesc2") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc2"); + + b.Property("ItemName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemName"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("LocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationArea"); + + b.Property("LocationCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationCode"); + + b.Property("LocationErpCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationErpCode"); + + b.Property("LocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationGroup"); + + b.Property("Lot") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Lot"); + + b.Property("MasterID") + .HasColumnType("uniqueidentifier"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("PackingCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("PackingCode"); + + b.Property("PoLine") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("PoLine"); + + b.Property("PoNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("PoNumber"); + + b.Property("ProduceDate") + .HasColumnType("datetime2"); + + b.Property("ReceiveQty") + .HasColumnType("decimal(18,6)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("SamplePercent") + .ValueGeneratedOnAdd() + .HasColumnType("decimal(18,6)") + .HasDefaultValue(0m); + + b.Property("Status") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("StdPackQty") + .HasColumnType("decimal(18,6)"); + + b.Property("SupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("SupplierBatch"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Uom") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("WarehouseCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("WarehouseCode"); + + b.HasKey("Id"); + + b.HasIndex("MasterID"); + + b.HasIndex("Number", "PackingCode") + .IsUnique(); + + b.ToTable("Store_InspectRequestDetail", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.InspectRequestSummaryDetail", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AbcClass") + .HasColumnType("nvarchar(max)"); + + b.Property("ArriveDate") + .HasColumnType("datetime2"); + + b.Property("CrackQty") + .HasColumnType("decimal(18,6)"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("ExpireDate") + .HasColumnType("datetime2"); + + b.Property("FailedQty") + .HasColumnType("decimal(18,6)"); + + b.Property("GoodQty") + .HasColumnType("decimal(18,6)"); + + b.Property("InspectQty") + .ValueGeneratedOnAdd() + .HasColumnType("decimal(18,6)") + .HasDefaultValue(0m); + + b.Property("InspectReport") + .HasColumnType("nvarchar(max)"); + + b.Property("InspectType") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ItemCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemCode"); + + b.Property("ItemDesc1") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc1"); + + b.Property("ItemDesc2") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc2"); + + b.Property("ItemName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemName"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Lot") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Lot"); + + b.Property("MasterID") + .HasColumnType("uniqueidentifier"); + + b.Property("NotPassedQty") + .HasColumnType("decimal(18,6)"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("PoLine") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("PoLine"); + + b.Property("PoNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("PoNumber"); + + b.Property("ProduceDate") + .HasColumnType("datetime2"); + + b.Property("ReceiveQty") + .HasColumnType("decimal(18,6)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("SamplePercent") + .ValueGeneratedOnAdd() + .HasColumnType("decimal(18,6)") + .HasDefaultValue(0m); + + b.Property("StdPackQty") + .HasColumnType("decimal(18,6)"); + + b.Property("SummaryInspectStatus") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("SupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("SupplierBatch"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Uom") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.HasKey("Id"); + + b.HasIndex("MasterID"); + + b.HasIndex("Number", "ItemCode", "Lot") + .IsUnique() + .HasFilter("[Lot] IS NOT NULL"); + + b.ToTable("Store_InspectRequestSummaryDetail", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.InventoryInitialNote", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("ActiveDate") + .HasColumnType("datetime2"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("RequestNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Worker") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("Number") + .IsUnique(); + + b.ToTable("Store_InventoryInitialNote", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.InventoryInitialNoteDetail", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("ArriveDate") + .HasColumnType("datetime2"); + + b.Property("ContainerCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ContainerCode"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("ExpireDate") + .HasColumnType("datetime2"); + + b.Property("ItemCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemCode"); + + b.Property("ItemDesc1") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc1"); + + b.Property("ItemDesc2") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc2"); + + b.Property("ItemName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemName"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("LocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationArea"); + + b.Property("LocationCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationCode"); + + b.Property("LocationErpCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationErpCode"); + + b.Property("LocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationGroup"); + + b.Property("Lot") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Lot"); + + b.Property("MasterID") + .HasColumnType("uniqueidentifier"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("PackingCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("PackingCode"); + + b.Property("ProduceDate") + .HasColumnType("datetime2"); + + b.Property("Qty") + .HasPrecision(18, 6) + .HasColumnType("decimal(18,6)") + .HasColumnName("Qty"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("Status") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("StdPackQty") + .HasColumnType("decimal(18,6)"); + + b.Property("SupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("SupplierBatch"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Uom") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Uom"); + + b.Property("WarehouseCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("WarehouseCode"); + + b.HasKey("Id"); + + b.HasIndex("MasterID"); + + b.HasIndex("Number", "PackingCode", "ItemCode", "Lot", "Status") + .IsUnique() + .HasFilter("[Lot] IS NOT NULL"); + + b.ToTable("Store_InventoryInitialNoteDetail", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.InventoryTransferNote", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ActiveDate") + .HasColumnType("datetime2"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("JobNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("JobNumber"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("SupplierCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("TransferType") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Worker") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("Number") + .IsUnique(); + + b.ToTable("Store_InventoryTransferNote", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.InventoryTransferNoteDetail", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ArriveDate") + .HasColumnType("datetime2"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("ExpireDate") + .HasColumnType("datetime2"); + + b.Property("FromContainerCode") + .HasColumnType("nvarchar(max)"); + + b.Property("FromLocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromLocationArea"); + + b.Property("FromLocationCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromLocationCode"); + + b.Property("FromLocationErpCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromLocationErpCode"); + + b.Property("FromLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromLocationGroup"); + + b.Property("FromLot") + .HasColumnType("nvarchar(max)"); + + b.Property("FromPackingCode") + .HasColumnType("nvarchar(450)"); + + b.Property("FromStatus") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("FromWarehouseCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromWarehouseCode"); + + b.Property("ItemCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemCode"); + + b.Property("ItemDesc1") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc1"); + + b.Property("ItemDesc2") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc2"); + + b.Property("ItemName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemName"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("MasterID") + .HasColumnType("uniqueidentifier"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("ProduceDate") + .HasColumnType("datetime2"); + + b.Property("Qty") + .HasPrecision(18, 6) + .HasColumnType("decimal(18,6)") + .HasColumnName("Qty"); + + b.Property("Reason") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("StdPackQty") + .HasColumnType("decimal(18,6)"); + + b.Property("SupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("SupplierBatch"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("ToContainerCode") + .HasColumnType("nvarchar(max)"); + + b.Property("ToLocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToLocationArea"); + + b.Property("ToLocationCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToLocationCode"); + + b.Property("ToLocationErpCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToLocationErpCode"); + + b.Property("ToLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToLocationGroup"); + + b.Property("ToLot") + .HasColumnType("nvarchar(max)"); + + b.Property("ToPackingCode") + .HasColumnType("nvarchar(max)"); + + b.Property("ToStatus") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ToWarehouseCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToWarehouseCode"); + + b.Property("Uom") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Uom"); + + b.HasKey("Id"); + + b.HasIndex("MasterID"); + + b.HasIndex("Number", "FromPackingCode", "FromLocationCode", "ToLocationCode") + .IsUnique() + .HasFilter("[FromPackingCode] IS NOT NULL"); + + b.ToTable("Store_InventoryTransferNoteDetail", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.IsolationNote", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ActiveDate") + .HasColumnType("datetime2"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("JobNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("JobNumber"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Worker") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("Number") + .IsUnique(); + + b.ToTable("Store_IsolationNote", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.IsolationNoteDetail", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ArriveDate") + .HasColumnType("datetime2"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("ExpireDate") + .HasColumnType("datetime2"); + + b.Property("FromContainerCode") + .HasColumnType("nvarchar(max)"); + + b.Property("FromLocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromLocationArea"); + + b.Property("FromLocationCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromLocationCode"); + + b.Property("FromLocationErpCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromLocationErpCode"); + + b.Property("FromLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromLocationGroup"); + + b.Property("FromLot") + .HasColumnType("nvarchar(max)"); + + b.Property("FromPackingCode") + .HasColumnType("nvarchar(450)"); + + b.Property("FromStatus") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("FromWarehouseCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromWarehouseCode"); + + b.Property("ItemCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemCode"); + + b.Property("ItemDesc1") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc1"); + + b.Property("ItemDesc2") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc2"); + + b.Property("ItemName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemName"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("MasterID") + .HasColumnType("uniqueidentifier"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("ProduceDate") + .HasColumnType("datetime2"); + + b.Property("Qty") + .HasPrecision(18, 6) + .HasColumnType("decimal(18,6)") + .HasColumnName("Qty"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("StdPackQty") + .HasColumnType("decimal(18,6)"); + + b.Property("SupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("SupplierBatch"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("ToContainerCode") + .HasColumnType("nvarchar(max)"); + + b.Property("ToLocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToLocationArea"); + + b.Property("ToLocationCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToLocationCode"); + + b.Property("ToLocationErpCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToLocationErpCode"); + + b.Property("ToLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToLocationGroup"); + + b.Property("ToLot") + .HasColumnType("nvarchar(max)"); + + b.Property("ToPackingCode") + .HasColumnType("nvarchar(max)"); + + b.Property("ToStatus") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ToWarehouseCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToWarehouseCode"); + + b.Property("Uom") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Uom"); + + b.HasKey("Id"); + + b.HasIndex("FromPackingCode"); + + b.HasIndex("MasterID"); + + b.HasIndex("Number", "FromPackingCode", "FromLocationCode", "ToLocationCode") + .IsUnique() + .HasFilter("[FromPackingCode] IS NOT NULL"); + + b.ToTable("Store_IsolationNoteDetail", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.IssueJob", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AcceptTime") + .HasColumnType("datetime2"); + + b.Property("AcceptUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("AcceptUserName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("CompleteTime") + .HasColumnType("datetime2"); + + b.Property("CompleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CompleteUserName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("IsAutoComplete") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false); + + b.Property("JobDescription") + .HasMaxLength(1024) + .HasColumnType("nvarchar(1024)"); + + b.Property("JobStatus") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("JobType") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("MaterialRequestNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Priority") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasDefaultValue(0); + + b.Property("PriorityIncrement") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasDefaultValue(0); + + b.Property("ProdLine") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("RequestType") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("UpStreamJobNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("UseOnTheWayLocation") + .HasColumnType("bit"); + + b.Property("WarehouseCode") + .HasColumnType("nvarchar(max)"); + + b.Property("WorkGroupCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Worker") + .HasColumnType("nvarchar(max)"); + + b.Property("Workshop") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.HasKey("Id"); + + b.HasIndex("Number") + .IsUnique(); + + b.ToTable("Job_IssueJob", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.IssueJobDetail", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DeliveryQty") + .HasColumnType("decimal(18,6)"); + + b.Property("DistributionType") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ExpiredTime") + .HasColumnType("datetime2"); + + b.Property("HandledArriveDate") + .HasColumnType("datetime2"); + + b.Property("HandledContainerCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledContainerCode"); + + b.Property("HandledExpireDate") + .HasColumnType("datetime2"); + + b.Property("HandledFromLocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledFromLocationArea"); + + b.Property("HandledFromLocationCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledFromLocationCode"); + + b.Property("HandledFromLocationErpCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledFromLocationErpCode"); + + b.Property("HandledFromLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledFromLocationGroup"); + + b.Property("HandledFromWarehouseCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledFromWarehouseCode"); + + b.Property("HandledLot") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledLot"); + + b.Property("HandledPackingCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledPackingCode"); + + b.Property("HandledProduceDate") + .HasColumnType("datetime2"); + + b.Property("HandledQty") + .HasColumnType("decimal(18,6)"); + + b.Property("HandledSupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledSupplierBatch"); + + b.Property("ItemCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemCode"); + + b.Property("ItemDesc1") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc1"); + + b.Property("ItemDesc2") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc2"); + + b.Property("ItemName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemName"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("MasterID") + .HasColumnType("uniqueidentifier"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("OnTheWayLocationCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Operation") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("PlanBeginTime") + .HasColumnType("datetime2"); + + b.Property("PlannedSplitRule") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("PositionCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ProdLine") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("RecommendArriveDate") + .HasColumnType("datetime2"); + + b.Property("RecommendContainerCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendContainerCode"); + + b.Property("RecommendExpireDate") + .HasColumnType("datetime2"); + + b.Property("RecommendFromLocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendFromLocationArea"); + + b.Property("RecommendFromLocationCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendFromLocationCode"); + + b.Property("RecommendFromLocationErpCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendFromLocationErpCode"); + + b.Property("RecommendFromLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendFromLocationGroup"); + + b.Property("RecommendFromWarehouseCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendFromWarehouseCode"); + + b.Property("RecommendLot") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendLot"); + + b.Property("RecommendPackingCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendPackingCode"); + + b.Property("RecommendProduceDate") + .HasColumnType("datetime2"); + + b.Property("RecommendQty") + .HasColumnType("decimal(18,6)"); + + b.Property("RecommendSupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendSupplierBatch"); + + b.Property("RecommendType") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("RequestLocationCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("RoundedQty") + .HasColumnType("decimal(18,6)"); + + b.Property("Status") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("StdPackQty") + .HasColumnType("decimal(18,6)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("ToLocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ToLocationCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ToLocationErpCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ToLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ToWarehouseCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("TruncType") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Uom") + .HasColumnType("nvarchar(max)"); + + b.Property("WorkStation") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.HasKey("Id"); + + b.HasIndex("MasterID"); + + b.ToTable("Job_IssueJobDetail", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.IssueNote", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ActiveDate") + .HasColumnType("datetime2"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("ConfirmTime") + .HasColumnType("datetime2"); + + b.Property("Confirmed") + .HasColumnType("bit"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("JobNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("JobNumber"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("RequestNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("RequestType") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("UseOnTheWayLocation") + .HasColumnType("bit"); + + b.Property("Worker") + .HasColumnType("nvarchar(max)"); + + b.Property("Workshop") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.HasKey("Id"); + + b.HasIndex("Number") + .IsUnique(); + + b.ToTable("Store_IssueNote", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.IssueNoteDetail", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ArriveDate") + .HasColumnType("datetime2"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("ExpireDate") + .HasColumnType("datetime2"); + + b.Property("ExpiredTime") + .HasColumnType("datetime2"); + + b.Property("FromContainerCode") + .HasColumnType("nvarchar(max)"); + + b.Property("FromLocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromLocationArea"); + + b.Property("FromLocationCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromLocationCode"); + + b.Property("FromLocationErpCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromLocationErpCode"); + + b.Property("FromLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromLocationGroup"); + + b.Property("FromLot") + .HasColumnType("nvarchar(max)"); + + b.Property("FromPackingCode") + .HasColumnType("nvarchar(450)"); + + b.Property("FromStatus") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("FromWarehouseCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromWarehouseCode"); + + b.Property("HandledArriveDate") + .HasColumnType("datetime2"); + + b.Property("HandledContainerCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledContainerCode"); + + b.Property("HandledExpireDate") + .HasColumnType("datetime2"); + + b.Property("HandledFromLocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledFromLocationArea"); + + b.Property("HandledFromLocationCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledFromLocationCode"); + + b.Property("HandledFromLocationErpCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledFromLocationErpCode"); + + b.Property("HandledFromLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledFromLocationGroup"); + + b.Property("HandledFromWarehouseCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledFromWarehouseCode"); + + b.Property("HandledLot") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledLot"); + + b.Property("HandledPackingCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledPackingCode"); + + b.Property("HandledProduceDate") + .HasColumnType("datetime2"); + + b.Property("HandledQty") + .HasColumnType("decimal(18,6)"); + + b.Property("HandledSupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledSupplierBatch"); + + b.Property("IssueTime") + .HasColumnType("datetime2"); + + b.Property("ItemCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemCode"); + + b.Property("ItemDesc1") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc1"); + + b.Property("ItemDesc2") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc2"); + + b.Property("ItemName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemName"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("MasterID") + .HasColumnType("uniqueidentifier"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("OnTheWayLocationCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("PositionCode") + .HasColumnType("nvarchar(max)"); + + b.Property("ProdLine") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ProduceDate") + .HasColumnType("datetime2"); + + b.Property("Qty") + .HasPrecision(18, 6) + .HasColumnType("decimal(18,6)") + .HasColumnName("Qty"); + + b.Property("RecommendArriveDate") + .HasColumnType("datetime2"); + + b.Property("RecommendContainerCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendContainerCode"); + + b.Property("RecommendExpireDate") + .HasColumnType("datetime2"); + + b.Property("RecommendFromLocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendFromLocationArea"); + + b.Property("RecommendFromLocationCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendFromLocationCode"); + + b.Property("RecommendFromLocationErpCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendFromLocationErpCode"); + + b.Property("RecommendFromLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendFromLocationGroup"); + + b.Property("RecommendFromWarehouseCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendFromWarehouseCode"); + + b.Property("RecommendLot") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendLot"); + + b.Property("RecommendPackingCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendPackingCode"); + + b.Property("RecommendProduceDate") + .HasColumnType("datetime2"); + + b.Property("RecommendQty") + .HasColumnType("decimal(18,6)"); + + b.Property("RecommendSupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendSupplierBatch"); + + b.Property("RecommendType") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("StdPackQty") + .HasColumnType("decimal(18,6)"); + + b.Property("SupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("SupplierBatch"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("ToContainerCode") + .HasColumnType("nvarchar(max)"); + + b.Property("ToLocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToLocationArea"); + + b.Property("ToLocationCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToLocationCode"); + + b.Property("ToLocationErpCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToLocationErpCode"); + + b.Property("ToLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToLocationGroup"); + + b.Property("ToLot") + .HasColumnType("nvarchar(max)"); + + b.Property("ToPackingCode") + .HasColumnType("nvarchar(max)"); + + b.Property("ToStatus") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ToWarehouseCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToWarehouseCode"); + + b.Property("Uom") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Uom"); + + b.Property("WorkStation") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.HasKey("Id"); + + b.HasIndex("FromPackingCode"); + + b.HasIndex("MasterID"); + + b.HasIndex("Number", "FromPackingCode", "FromLocationCode", "ToLocationCode") + .IsUnique() + .HasFilter("[FromPackingCode] IS NOT NULL"); + + b.ToTable("Store_IssueNoteDetail", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ItemTransformNote", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ActiveDate") + .HasColumnType("datetime2"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("JobNumber") + .HasColumnType("nvarchar(max)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("RequestNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Worker") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("Number") + .IsUnique(); + + b.ToTable("Store_ItemTransformNote", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ItemTransformNoteDetail", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ConcurrencyStamp") + .HasColumnType("nvarchar(max)"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("FromArriveDate") + .HasColumnType("datetime2"); + + b.Property("FromContainerCode") + .HasColumnType("nvarchar(max)"); + + b.Property("FromExpireDate") + .HasColumnType("datetime2"); + + b.Property("FromLocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromLocationArea"); + + b.Property("FromLocationCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromLocationCode"); + + b.Property("FromLocationErpCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromLocationErpCode"); + + b.Property("FromLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromLocationGroup"); + + b.Property("FromLot") + .HasColumnType("nvarchar(max)"); + + b.Property("FromPackingCode") + .HasColumnType("nvarchar(450)"); + + b.Property("FromProduceDate") + .HasColumnType("datetime2"); + + b.Property("FromQty") + .HasColumnType("decimal(18,6)"); - b.Property("InspectType") + b.Property("FromStatus") .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)"); - b.Property("InspectUser") + 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) @@ -5043,65 +9218,100 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("LastModifierId"); - b.Property("Lot") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("Lot"); - b.Property("MasterID") .HasColumnType("uniqueidentifier"); - b.Property("NotPassedQty") - .HasColumnType("decimal(18,6)"); - b.Property("Number") .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)") .HasColumnName("Number"); - b.Property("PoLine") + 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("PoLine"); + .HasColumnName("ToLocationArea"); - b.Property("PoNumber") + b.Property("ToLocationCode") + .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("PoNumber"); + .HasColumnName("ToLocationCode"); - b.Property("ProduceDate") - .HasColumnType("datetime2"); + b.Property("ToLocationErpCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToLocationErpCode"); - b.Property("ReceiveQty") - .HasColumnType("decimal(18,6)"); + b.Property("ToLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToLocationGroup"); - b.Property("Remark") - .HasMaxLength(3072) - .HasColumnType("nvarchar(3072)") - .HasColumnName("Remark"); + b.Property("ToLot") + .HasColumnType("nvarchar(max)"); - b.Property("SamplePercent") - .ValueGeneratedOnAdd() - .HasColumnType("decimal(18,6)") - .HasDefaultValue(0m); + b.Property("ToPackingCode") + .HasColumnType("nvarchar(450)"); - b.Property("StdPackQty") + b.Property("ToProduceDate") + .HasColumnType("datetime2"); + + b.Property("ToQty") .HasColumnType("decimal(18,6)"); - b.Property("SummaryInspectStatus") + b.Property("ToStatus") .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)"); - b.Property("SupplierBatch") + b.Property("ToSupplierBatch") .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("SupplierBatch"); + .HasColumnType("nvarchar(64)"); - b.Property("TenantId") - .HasColumnType("uniqueidentifier") - .HasColumnName("TenantId"); + b.Property("ToWarehouseCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToWarehouseCode"); b.Property("Uom") .HasMaxLength(64) @@ -5111,13 +9321,14 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.HasIndex("MasterID"); - b.HasIndex("Number", "ItemCode") - .IsUnique(); + b.HasIndex("Number", "FromPackingCode", "FromStatus", "ToPackingCode", "ToStatus") + .IsUnique() + .HasFilter("[FromPackingCode] IS NOT NULL AND [ToPackingCode] IS NOT NULL"); - b.ToTable("Store_InspectNoteSummaryDetail", (string)null); + b.ToTable("Store_ItemTransformNoteDetail", (string)null); }); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.InspectRequest", b => + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ItemTransformRequest", b => { b.Property("Id") .HasColumnType("uniqueidentifier"); @@ -5125,10 +9336,6 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.Property("ActiveDate") .HasColumnType("datetime2"); - b.Property("AsnNumber") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - b.Property("AutoAgree") .HasColumnType("bit"); @@ -5159,138 +9366,8 @@ namespace Win_in.Sfs.Wms.Store.Migrations .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"); + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); b.Property("LastModificationTime") .HasColumnType("datetime2") @@ -5300,125 +9377,42 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("LastModifierId"); - b.Property("LocationArea") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("LocationArea"); - - b.Property("LocationCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("LocationCode"); - - b.Property("LocationErpCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("LocationErpCode"); - - b.Property("LocationGroup") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("LocationGroup"); - - b.Property("Lot") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("Lot"); - - b.Property("MasterID") - .HasColumnType("uniqueidentifier"); - b.Property("Number") .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)") .HasColumnName("Number"); - b.Property("PackingCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("PackingCode"); - - b.Property("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") + b.Property("RequestStatus") .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.Property("Worker") + .HasColumnType("nvarchar(max)"); b.HasKey("Id"); - b.HasIndex("MasterID"); - - b.HasIndex("Number", "PackingCode") + b.HasIndex("Number") .IsUnique(); - b.ToTable("Store_InspectRequestDetail", (string)null); + b.ToTable("Store_ItemTransformRequest", (string)null); }); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.InspectRequestSummaryDetail", b => + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ItemTransformRequestDetail", 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"); @@ -5427,28 +9421,64 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("CreatorId"); - b.Property("ExpireDate") + b.Property("FromArriveDate") .HasColumnType("datetime2"); - b.Property("FailedQty") - .HasColumnType("decimal(18,6)"); + b.Property("FromContainerCode") + .HasColumnType("nvarchar(max)"); - b.Property("GoodQty") - .HasColumnType("decimal(18,6)"); + b.Property("FromExpireDate") + .HasColumnType("datetime2"); - b.Property("InspectQty") - .ValueGeneratedOnAdd() - .HasColumnType("decimal(18,6)") - .HasDefaultValue(0m); + b.Property("FromLocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromLocationArea"); - b.Property("InspectReport") + 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("InspectType") + 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) @@ -5478,65 +9508,100 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("LastModifierId"); - b.Property("Lot") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("Lot"); - b.Property("MasterID") .HasColumnType("uniqueidentifier"); - b.Property("NotPassedQty") - .HasColumnType("decimal(18,6)"); - b.Property("Number") .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)") .HasColumnName("Number"); - b.Property("PoLine") + 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("PoLine"); + .HasColumnName("ToLocationArea"); - b.Property("PoNumber") + b.Property("ToLocationCode") + .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("PoNumber"); + .HasColumnName("ToLocationCode"); - b.Property("ProduceDate") - .HasColumnType("datetime2"); + b.Property("ToLocationErpCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToLocationErpCode"); - b.Property("ReceiveQty") - .HasColumnType("decimal(18,6)"); + b.Property("ToLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToLocationGroup"); - b.Property("Remark") - .HasMaxLength(3072) - .HasColumnType("nvarchar(3072)") - .HasColumnName("Remark"); + b.Property("ToLot") + .HasColumnType("nvarchar(max)"); - b.Property("SamplePercent") - .ValueGeneratedOnAdd() - .HasColumnType("decimal(18,6)") - .HasDefaultValue(0m); + b.Property("ToPackingCode") + .HasColumnType("nvarchar(450)"); - b.Property("StdPackQty") + b.Property("ToProduceDate") + .HasColumnType("datetime2"); + + b.Property("ToQty") .HasColumnType("decimal(18,6)"); - b.Property("SummaryInspectStatus") + b.Property("ToStatus") .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)"); - b.Property("SupplierBatch") + b.Property("ToSupplierBatch") .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("SupplierBatch"); + .HasColumnType("nvarchar(64)"); - b.Property("TenantId") - .HasColumnType("uniqueidentifier") - .HasColumnName("TenantId"); + b.Property("ToWarehouseCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToWarehouseCode"); b.Property("Uom") .HasMaxLength(64) @@ -5546,28 +9611,47 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.HasIndex("MasterID"); - b.HasIndex("Number", "ItemCode", "Lot") + b.HasIndex("Number", "FromPackingCode", "FromStatus", "ToPackingCode", "ToStatus") .IsUnique() - .HasFilter("[Lot] IS NOT NULL"); + .HasFilter("[FromPackingCode] IS NOT NULL AND [ToPackingCode] IS NOT NULL"); - b.ToTable("Store_InspectRequestSummaryDetail", (string)null); + b.ToTable("Store_ItemTransformRequestDetail", (string)null); }); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.InventoryInitialNote", b => + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.JisDeliverJob", b => { b.Property("Id") - .ValueGeneratedOnAdd() .HasColumnType("uniqueidentifier"); - b.Property("ActiveDate") + b.Property("AcceptTime") + .HasColumnType("datetime2"); + + b.Property("AcceptUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("AcceptUserName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("CompleteTime") .HasColumnType("datetime2"); + b.Property("CompleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CompleteUserName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + b.Property("ConcurrencyStamp") .IsConcurrencyToken() .HasMaxLength(40) .HasColumnType("nvarchar(40)") .HasColumnName("ConcurrencyStamp"); + b.Property("ContainerQty") + .HasColumnType("decimal(18,6)"); + b.Property("CreationTime") .HasColumnType("datetime2") .HasColumnName("CreationTime"); @@ -5576,10 +9660,44 @@ namespace Win_in.Sfs.Wms.Store.Migrations .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"); @@ -5591,22 +9709,47 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.Property("Number") .IsRequired() .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("Number"); + .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("RequestNumber") - .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)"); @@ -5615,22 +9758,22 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.HasIndex("Number") .IsUnique(); - b.ToTable("Store_InventoryInitialNote", (string)null); + b.ToTable("Job_JisDeliverJob", (string)null); }); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.InventoryInitialNoteDetail", b => + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.JisDeliverJobDetail", b => { b.Property("Id") - .ValueGeneratedOnAdd() .HasColumnType("uniqueidentifier"); - b.Property("ArriveDate") - .HasColumnType("datetime2"); - b.Property("ContainerCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ContainerCode"); + .HasColumnType("nvarchar(max)"); + + b.Property("ContainerDesc") + .HasColumnType("nvarchar(max)"); + + b.Property("ContainerName") + .HasColumnType("nvarchar(max)"); b.Property("CreationTime") .HasColumnType("datetime2") @@ -5640,29 +9783,28 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("CreatorId"); - b.Property("ExpireDate") - .HasColumnType("datetime2"); + b.Property("FromLocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); - b.Property("ItemCode") - .IsRequired() + b.Property("FromLocationCode") .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ItemCode"); + .HasColumnType("nvarchar(64)"); - b.Property("ItemDesc1") + b.Property("FromLocationErpCode") .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ItemDesc1"); + .HasColumnType("nvarchar(64)"); - b.Property("ItemDesc2") + b.Property("FromLocationGroup") .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ItemDesc2"); + .HasColumnType("nvarchar(64)"); - b.Property("ItemName") + b.Property("FromWarehouseCode") .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ItemName"); + .HasColumnType("nvarchar(64)"); + + b.Property("ItemQty") + .HasColumnType("decimal(18,6)"); b.Property("LastModificationTime") .HasColumnType("datetime2") @@ -5672,55 +9814,11 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("LastModifierId"); - b.Property("LocationArea") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("LocationArea"); - - b.Property("LocationCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("LocationCode"); - - b.Property("LocationErpCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("LocationErpCode"); - - b.Property("LocationGroup") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("LocationGroup"); - - b.Property("Lot") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("Lot"); - b.Property("MasterID") .HasColumnType("uniqueidentifier"); b.Property("Number") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("Number"); - - b.Property("PackingCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("PackingCode"); - - b.Property("ProduceDate") - .HasColumnType("datetime2"); - - b.Property("Qty") - .HasPrecision(18, 6) - .HasColumnType("decimal(18,6)") - .HasColumnName("Qty"); + .HasColumnType("nvarchar(max)"); b.Property("Remark") .HasMaxLength(3072) @@ -5729,45 +9827,40 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.Property("Status") .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("ToLocationArea") .HasMaxLength(64) .HasColumnType("nvarchar(64)"); - b.Property("StdPackQty") - .HasColumnType("decimal(18,6)"); - - b.Property("SupplierBatch") + b.Property("ToLocationCode") .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("SupplierBatch"); + .HasColumnType("nvarchar(64)"); - b.Property("TenantId") - .HasColumnType("uniqueidentifier") - .HasColumnName("TenantId"); + b.Property("ToLocationErpCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); - b.Property("Uom") - .IsRequired() + b.Property("ToLocationGroup") .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("Uom"); + .HasColumnType("nvarchar(64)"); - b.Property("WarehouseCode") - .IsRequired() + b.Property("ToWarehouseCode") .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("WarehouseCode"); + .HasColumnType("nvarchar(64)"); 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); + b.ToTable("Job_JisDeliverJobDetail", (string)null); }); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.InventoryTransferNote", b => + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.JisDeliverNote", b => { b.Property("Id") .HasColumnType("uniqueidentifier"); @@ -5775,12 +9868,18 @@ namespace Win_in.Sfs.Wms.Store.Migrations 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"); @@ -5789,10 +9888,26 @@ namespace Win_in.Sfs.Wms.Store.Migrations .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)") @@ -5812,23 +9927,20 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("nvarchar(64)") .HasColumnName("Number"); + b.Property("ProjectCode") + .HasColumnType("nvarchar(max)"); + 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("TotalPackCapacity") + .HasColumnType("nvarchar(max)"); b.Property("Worker") .HasColumnType("nvarchar(max)"); @@ -5838,10 +9950,10 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.HasIndex("Number") .IsUnique(); - b.ToTable("Store_InventoryTransferNote", (string)null); + b.ToTable("Store_JisDeliverNote", (string)null); }); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.InventoryTransferNoteDetail", b => + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.JisDeliverNoteDetail", b => { b.Property("Id") .HasColumnType("uniqueidentifier"); @@ -5857,9 +9969,15 @@ namespace Win_in.Sfs.Wms.Store.Migrations .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)"); @@ -5940,23 +10058,40 @@ namespace Win_in.Sfs.Wms.Store.Migrations .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("Reason") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - 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)"); @@ -6017,6 +10152,12 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("nvarchar(64)") .HasColumnName("Uom"); + b.Property("UsedFor") + .HasColumnType("nvarchar(max)"); + + b.Property("Year") + .HasColumnType("nvarchar(max)"); + b.HasKey("Id"); b.HasIndex("MasterID"); @@ -6025,10 +10166,10 @@ namespace Win_in.Sfs.Wms.Store.Migrations .IsUnique() .HasFilter("[FromPackingCode] IS NOT NULL"); - b.ToTable("Store_InventoryTransferNoteDetail", (string)null); + b.ToTable("Store_JisDeliverNoteDetail", (string)null); }); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.IsolationNote", b => + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.JisProductReceiptNote", b => { b.Property("Id") .HasColumnType("uniqueidentifier"); @@ -6036,12 +10177,18 @@ namespace Win_in.Sfs.Wms.Store.Migrations 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"); @@ -6054,6 +10201,9 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("nvarchar(max)") .HasColumnName("ExtraProperties"); + b.Property("ItemQty") + .HasColumnType("decimal(18,6)"); + b.Property("JobNumber") .HasMaxLength(64) .HasColumnType("nvarchar(64)") @@ -6067,21 +10217,54 @@ namespace Win_in.Sfs.Wms.Store.Migrations .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)"); @@ -6090,10 +10273,10 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.HasIndex("Number") .IsUnique(); - b.ToTable("Store_IsolationNote", (string)null); + b.ToTable("Store_JisProductReceiptNote", (string)null); }); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.IsolationNoteDetail", b => + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.JisProductReceiptNoteDetail", b => { b.Property("Id") .HasColumnType("uniqueidentifier"); @@ -6101,6 +10284,15 @@ namespace Win_in.Sfs.Wms.Store.Migrations 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"); @@ -6112,76 +10304,61 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.Property("ExpireDate") .HasColumnType("datetime2"); - b.Property("FromContainerCode") - .HasColumnType("nvarchar(max)"); - - b.Property("FromLocationArea") + b.Property("ItemCode") + .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("FromLocationArea"); + .HasColumnName("ItemCode"); - b.Property("FromLocationCode") - .IsRequired() + b.Property("ItemDesc1") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("FromLocationCode"); + .HasColumnName("ItemDesc1"); - b.Property("FromLocationErpCode") - .IsRequired() + b.Property("ItemDesc2") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("FromLocationErpCode"); + .HasColumnName("ItemDesc2"); - b.Property("FromLocationGroup") + b.Property("ItemName") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("FromLocationGroup"); - - b.Property("FromLot") - .HasColumnType("nvarchar(max)"); + .HasColumnName("ItemName"); - b.Property("FromPackingCode") - .HasColumnType("nvarchar(450)"); + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); - b.Property("FromStatus") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); - b.Property("FromWarehouseCode") - .IsRequired() + b.Property("LocationArea") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("FromWarehouseCode"); + .HasColumnName("LocationArea"); - b.Property("ItemCode") + b.Property("LocationCode") .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("ItemCode"); + .HasColumnName("LocationCode"); - b.Property("ItemDesc1") + b.Property("LocationErpCode") + .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("ItemDesc1"); + .HasColumnName("LocationErpCode"); - b.Property("ItemDesc2") + b.Property("LocationGroup") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("ItemDesc2"); + .HasColumnName("LocationGroup"); - b.Property("ItemName") + b.Property("Lot") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("ItemName"); - - b.Property("LastModificationTime") - .HasColumnType("datetime2") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("uniqueidentifier") - .HasColumnName("LastModifierId"); + .HasColumnName("Lot"); b.Property("MasterID") .HasColumnType("uniqueidentifier"); @@ -6192,19 +10369,52 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("nvarchar(64)") .HasColumnName("Number"); + b.Property("PackingCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("PackingCode"); + + b.Property("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)"); @@ -6217,91 +10427,50 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("TenantId"); - b.Property("ToContainerCode") - .HasColumnType("nvarchar(max)"); - - b.Property("ToLocationArea") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ToLocationArea"); - - b.Property("ToLocationCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ToLocationCode"); - - b.Property("ToLocationErpCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ToLocationErpCode"); - - b.Property("ToLocationGroup") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ToLocationGroup"); - - b.Property("ToLot") - .HasColumnType("nvarchar(max)"); - - b.Property("ToPackingCode") - .HasColumnType("nvarchar(max)"); - - b.Property("ToStatus") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("ToWarehouseCode") + b.Property("Uom") .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("ToWarehouseCode"); + .HasColumnName("Uom"); - b.Property("Uom") + b.Property("WarehouseCode") .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("Uom"); + .HasColumnName("WarehouseCode"); - b.HasKey("Id"); + b.Property("Year") + .HasColumnType("nvarchar(max)"); - b.HasIndex("FromPackingCode"); + b.HasKey("Id"); b.HasIndex("MasterID"); - b.HasIndex("Number", "FromPackingCode", "FromLocationCode", "ToLocationCode") - .IsUnique() - .HasFilter("[FromPackingCode] IS NOT NULL"); + b.HasIndex("Number", "PackingCode") + .IsUnique(); - b.ToTable("Store_IsolationNoteDetail", (string)null); + b.ToTable("Store_JisProductReceiptNoteDetail", (string)null); }); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.IssueJob", b => + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.MaterialRequest", b => { b.Property("Id") .HasColumnType("uniqueidentifier"); - b.Property("AcceptTime") + b.Property("ActiveDate") .HasColumnType("datetime2"); - b.Property("AcceptUserId") - .HasColumnType("uniqueidentifier"); - - b.Property("AcceptUserName") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + b.Property("AutoAgree") + .HasColumnType("bit"); - b.Property("CompleteTime") - .HasColumnType("datetime2"); + b.Property("AutoCompleteJob") + .HasColumnType("bit"); - b.Property("CompleteUserId") - .HasColumnType("uniqueidentifier"); + b.Property("AutoHandle") + .HasColumnType("bit"); - b.Property("CompleteUserName") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + b.Property("AutoSubmit") + .HasColumnType("bit"); b.Property("ConcurrencyStamp") .IsConcurrencyToken() @@ -6317,29 +10486,13 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("CreatorId"); + b.Property("DirectCreateNote") + .HasColumnType("bit"); + b.Property("ExtraProperties") .HasColumnType("nvarchar(max)") .HasColumnName("ExtraProperties"); - b.Property("IsAutoComplete") - .ValueGeneratedOnAdd() - .HasColumnType("bit") - .HasDefaultValue(false); - - b.Property("JobDescription") - .HasMaxLength(1024) - .HasColumnType("nvarchar(1024)"); - - b.Property("JobStatus") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("JobType") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - b.Property("LastModificationTime") .HasColumnType("datetime2") .HasColumnName("LastModificationTime"); @@ -6348,24 +10501,15 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("LastModifierId"); - b.Property("MaterialRequestNumber") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - b.Property("Number") .IsRequired() .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("Priority") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasDefaultValue(0); + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); - b.Property("PriorityIncrement") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasDefaultValue(0); + b.Property("PreparationPlanNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); b.Property("ProdLine") .HasMaxLength(64) @@ -6376,7 +10520,8 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("nvarchar(3072)") .HasColumnName("Remark"); - b.Property("RequestType") + b.Property("RequestStatus") + .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)"); @@ -6384,20 +10529,13 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("TenantId"); - b.Property("UpStreamJobNumber") + b.Property("Type") .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)"); @@ -6410,10 +10548,10 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.HasIndex("Number") .IsUnique(); - b.ToTable("Job_IssueJob", (string)null); + b.ToTable("Store_MaterialRequest", (string)null); }); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.IssueJobDetail", b => + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.MaterialRequestDetail", b => { b.Property("Id") .HasColumnType("uniqueidentifier"); @@ -6426,74 +10564,16 @@ namespace Win_in.Sfs.Wms.Store.Migrations .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("FromLocationArea") + .HasColumnType("nvarchar(max)"); - b.Property("HandledQty") + b.Property("IssuedQty") + .HasPrecision(18, 6) .HasColumnType("decimal(18,6)"); - b.Property("HandledSupplierBatch") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("HandledSupplierBatch"); - b.Property("ItemCode") .IsRequired() .HasMaxLength(64) @@ -6529,97 +10609,35 @@ namespace Win_in.Sfs.Wms.Store.Migrations 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"); + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); - b.Property("PlannedSplitRule") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + b.Property("PositionCode") + .HasColumnType("nvarchar(max)"); b.Property("ProdLine") .HasMaxLength(64) .HasColumnType("nvarchar(64)"); - b.Property("RecommendArriveDate") - .HasColumnType("datetime2"); - - b.Property("RecommendContainerCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendContainerCode"); - - b.Property("RecommendExpireDate") - .HasColumnType("datetime2"); - - b.Property("RecommendFromLocationArea") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendFromLocationArea"); - - b.Property("RecommendFromLocationCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendFromLocationCode"); - - b.Property("RecommendFromLocationErpCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendFromLocationErpCode"); - - b.Property("RecommendFromLocationGroup") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendFromLocationGroup"); - - b.Property("RecommendFromWarehouseCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendFromWarehouseCode"); - - b.Property("RecommendLot") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendLot"); - - b.Property("RecommendPackingCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendPackingCode"); - - b.Property("RecommendProduceDate") - .HasColumnType("datetime2"); + b.Property("Qty") + .HasPrecision(18, 6) + .HasColumnType("decimal(18,6)") + .HasColumnName("Qty"); - b.Property("RecommendQty") + b.Property("ReceivedQty") + .HasPrecision(18, 6) .HasColumnType("decimal(18,6)"); - b.Property("RecommendSupplierBatch") + b.Property("RecommendType") + .IsRequired() .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendSupplierBatch"); + .HasColumnType("nvarchar(64)"); b.Property("Remark") .HasMaxLength(3072) .HasColumnType("nvarchar(3072)") .HasColumnName("Remark"); - b.Property("RequestLocationCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("RoundedQty") - .HasColumnType("decimal(18,6)"); - b.Property("Status") .IsRequired() .HasMaxLength(64) @@ -6633,32 +10651,35 @@ namespace Win_in.Sfs.Wms.Store.Migrations .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") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("TruncType") + b.Property("ToWarehouseCode") .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)"); b.Property("Uom") - .HasColumnType("nvarchar(max)"); + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Uom"); b.Property("WorkStation") .HasMaxLength(64) @@ -6666,12 +10687,17 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.HasKey("Id"); + b.HasIndex("ItemCode"); + b.HasIndex("MasterID"); - b.ToTable("Job_IssueJobDetail", (string)null); + b.HasIndex("Number", "ItemCode", "ToLocationCode") + .IsUnique(); + + b.ToTable("Store_MaterialRequestDetail", (string)null); }); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.IssueNote", b => + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.NoOkConvertOkNote", b => { b.Property("Id") .HasColumnType("uniqueidentifier"); @@ -6685,12 +10711,6 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("nvarchar(40)") .HasColumnName("ConcurrencyStamp"); - b.Property("ConfirmTime") - .HasColumnType("datetime2"); - - b.Property("Confirmed") - .HasColumnType("bit"); - b.Property("CreationTime") .HasColumnType("datetime2") .HasColumnName("CreationTime"); @@ -6703,11 +10723,6 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("nvarchar(max)") .HasColumnName("ExtraProperties"); - b.Property("JobNumber") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("JobNumber"); - b.Property("LastModificationTime") .HasColumnType("datetime2") .HasColumnName("LastModificationTime"); @@ -6727,37 +10742,22 @@ namespace Win_in.Sfs.Wms.Store.Migrations .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); + b.ToTable("Store_NoOkConvertOkNote", (string)null); }); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.IssueNoteDetail", b => + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.NoOkConvertOkNoteDetail", b => { b.Property("Id") .HasColumnType("uniqueidentifier"); @@ -6776,9 +10776,6 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.Property("ExpireDate") .HasColumnType("datetime2"); - b.Property("ExpiredTime") - .HasColumnType("datetime2"); - b.Property("FromContainerCode") .HasColumnType("nvarchar(max)"); @@ -6821,66 +10818,6 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("nvarchar(64)") .HasColumnName("FromWarehouseCode"); - b.Property("HandledArriveDate") - .HasColumnType("datetime2"); - - b.Property("HandledContainerCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("HandledContainerCode"); - - b.Property("HandledExpireDate") - .HasColumnType("datetime2"); - - b.Property("HandledFromLocationArea") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("HandledFromLocationArea"); - - b.Property("HandledFromLocationCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("HandledFromLocationCode"); - - b.Property("HandledFromLocationErpCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("HandledFromLocationErpCode"); - - b.Property("HandledFromLocationGroup") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("HandledFromLocationGroup"); - - b.Property("HandledFromWarehouseCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("HandledFromWarehouseCode"); - - b.Property("HandledLot") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("HandledLot"); - - b.Property("HandledPackingCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("HandledPackingCode"); - - b.Property("HandledProduceDate") - .HasColumnType("datetime2"); - - b.Property("HandledQty") - .HasColumnType("decimal(18,6)"); - - b.Property("HandledSupplierBatch") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("HandledSupplierBatch"); - - b.Property("IssueTime") - .HasColumnType("datetime2"); - b.Property("ItemCode") .IsRequired() .HasMaxLength(64) @@ -6919,14 +10856,6 @@ namespace Win_in.Sfs.Wms.Store.Migrations .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"); @@ -6935,63 +10864,6 @@ namespace Win_in.Sfs.Wms.Store.Migrations .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)") @@ -7057,24 +10929,18 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("nvarchar(64)") .HasColumnName("Uom"); - b.Property("WorkStation") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - b.HasKey("Id"); - b.HasIndex("FromPackingCode"); - b.HasIndex("MasterID"); b.HasIndex("Number", "FromPackingCode", "FromLocationCode", "ToLocationCode") .IsUnique() .HasFilter("[FromPackingCode] IS NOT NULL"); - b.ToTable("Store_IssueNoteDetail", (string)null); + b.ToTable("Store_NoOkConvertOkNoteDetail", (string)null); }); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ItemTransformNote", b => + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.OfflineSettlementNote", b => { b.Property("Id") .HasColumnType("uniqueidentifier"); @@ -7117,15 +10983,16 @@ namespace Win_in.Sfs.Wms.Store.Migrations .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("RequestNumber") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - b.Property("TenantId") .HasColumnType("uniqueidentifier") .HasColumnName("TenantId"); @@ -7138,82 +11005,32 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.HasIndex("Number") .IsUnique(); - b.ToTable("Store_ItemTransformNote", (string)null); + b.ToTable("Store_OfflineSettlementNote", (string)null); }); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ItemTransformNoteDetail", b => + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.OfflineSettlementNoteDetail", 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)"); + .HasColumnType("uniqueidentifier"); - b.Property("FromSupplierBatch") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + b.Property("ArriveDate") + .HasColumnType("datetime2"); - b.Property("FromWarehouseCode") - .IsRequired() + b.Property("ContainerCode") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("FromWarehouseCode"); + .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() @@ -7244,117 +11061,101 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("LastModifierId"); - b.Property("MasterID") - .HasColumnType("uniqueidentifier"); - - b.Property("Number") - .IsRequired() + b.Property("LocationArea") .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)"); + .HasColumnName("LocationArea"); - b.Property("ToItemDesc2") + b.Property("LocationCode") + .IsRequired() .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationCode"); - b.Property("ToItemName") + b.Property("LocationErpCode") + .IsRequired() .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationErpCode"); - b.Property("ToLocationArea") + b.Property("LocationGroup") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("ToLocationArea"); + .HasColumnName("LocationGroup"); - b.Property("ToLocationCode") - .IsRequired() + b.Property("Lot") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("ToLocationCode"); + .HasColumnName("Lot"); - b.Property("ToLocationErpCode") + b.Property("MasterID") + .HasColumnType("uniqueidentifier"); + + b.Property("Number") .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("ToLocationErpCode"); + .HasColumnName("Number"); - b.Property("ToLocationGroup") + b.Property("PackingCode") + .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("ToLocationGroup"); - - b.Property("ToLot") - .HasColumnType("nvarchar(max)"); - - b.Property("ToPackingCode") - .HasColumnType("nvarchar(450)"); + .HasColumnName("PackingCode"); - b.Property("ToProduceDate") + b.Property("ProduceDate") .HasColumnType("datetime2"); - b.Property("ToQty") - .HasColumnType("decimal(18,6)"); + b.Property("Qty") + .HasPrecision(18, 6) + .HasColumnType("decimal(18,6)") + .HasColumnName("Qty"); - b.Property("ToStatus") + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("Status") .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)"); - b.Property("ToSupplierBatch") + b.Property("StdPackQty") + .HasColumnType("decimal(18,6)"); + + b.Property("SupplierBatch") .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + .HasColumnType("nvarchar(64)") + .HasColumnName("SupplierBatch"); - b.Property("ToWarehouseCode") + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Uom") .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("ToWarehouseCode"); + .HasColumnName("Uom"); - b.Property("Uom") + b.Property("WarehouseCode") + .IsRequired() .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + .HasColumnType("nvarchar(64)") + .HasColumnName("WarehouseCode"); 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.HasIndex("Number") + .IsUnique(); - b.ToTable("Store_ItemTransformNoteDetail", (string)null); + b.ToTable("Store_OfflineSettlementNoteDetail", (string)null); }); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ItemTransformRequest", b => + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.PreparationPlan", b => { b.Property("Id") .HasColumnType("uniqueidentifier"); @@ -7362,18 +11163,6 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.Property("ActiveDate") .HasColumnType("datetime2"); - b.Property("AutoAgree") - .HasColumnType("bit"); - - b.Property("AutoCompleteJob") - .HasColumnType("bit"); - - b.Property("AutoHandle") - .HasColumnType("bit"); - - b.Property("AutoSubmit") - .HasColumnType("bit"); - b.Property("ConcurrencyStamp") .IsConcurrencyToken() .HasMaxLength(40) @@ -7388,9 +11177,6 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("CreatorId"); - b.Property("DirectCreateNote") - .HasColumnType("bit"); - b.Property("ExtraProperties") .HasColumnType("nvarchar(max)") .HasColumnName("ExtraProperties"); @@ -7409,16 +11195,39 @@ namespace Win_in.Sfs.Wms.Store.Migrations .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("RequestStatus") + 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"); @@ -7426,84 +11235,30 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.Property("Worker") .HasColumnType("nvarchar(max)"); + b.Property("Workshop") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + b.HasKey("Id"); b.HasIndex("Number") .IsUnique(); - b.ToTable("Store_ItemTransformRequest", (string)null); + b.ToTable("Store_PreparationPlan", (string)null); }); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ItemTransformRequestDetail", b => + 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("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"); + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); b.Property("ItemCode") .IsRequired() @@ -7534,6 +11289,14 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("LastModifierId"); + b.Property("LatestTime") + .HasColumnType("datetime2"); + + b.Property("LineStatus") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + b.Property("MasterID") .HasColumnType("uniqueidentifier"); @@ -7543,93 +11306,36 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("nvarchar(64)") .HasColumnName("Number"); - b.Property("ReasonCode") - .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("StdPackQty") + .HasColumnType("decimal(18,6)"); + 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") + b.Property("Uom") .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("ToWarehouseCode"); + .HasColumnName("Uom"); - b.Property("Uom") + b.Property("WorkStation") + .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)"); @@ -7637,37 +11343,31 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.HasIndex("MasterID"); - b.HasIndex("Number", "FromPackingCode", "FromStatus", "ToPackingCode", "ToStatus") - .IsUnique() - .HasFilter("[FromPackingCode] IS NOT NULL AND [ToPackingCode] IS NOT NULL"); + b.HasIndex("Number", "ItemCode") + .IsUnique(); - b.ToTable("Store_ItemTransformRequestDetail", (string)null); + b.ToTable("Store_PreparationPlanDetail", (string)null); }); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.JisDeliverJob", b => + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ProductionPlan", b => { b.Property("Id") .HasColumnType("uniqueidentifier"); - b.Property("AcceptTime") + b.Property("ActiveDate") .HasColumnType("datetime2"); - b.Property("AcceptUserId") - .HasColumnType("uniqueidentifier"); - - b.Property("AcceptUserName") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + b.Property("AutoAgree") + .HasColumnType("bit"); - b.Property("CompleteTime") - .HasColumnType("datetime2"); + b.Property("AutoCompleteJob") + .HasColumnType("bit"); - b.Property("CompleteUserId") - .HasColumnType("uniqueidentifier"); + b.Property("AutoHandle") + .HasColumnType("bit"); - b.Property("CompleteUserName") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + b.Property("AutoSubmit") + .HasColumnType("bit"); b.Property("ConcurrencyStamp") .IsConcurrencyToken() @@ -7675,9 +11375,6 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("nvarchar(40)") .HasColumnName("ConcurrencyStamp"); - b.Property("ContainerQty") - .HasColumnType("decimal(18,6)"); - b.Property("CreationTime") .HasColumnType("datetime2") .HasColumnName("CreationTime"); @@ -7686,44 +11383,13 @@ namespace Win_in.Sfs.Wms.Store.Migrations .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("DirectCreateNote") + .HasColumnType("bit"); 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"); @@ -7735,71 +11401,71 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.Property("Number") .IsRequired() .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); - b.Property("PlanTime") + b.Property("PlanDate") .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("PlanTime") + .HasColumnType("datetime2"); - b.Property("ProjectCode") - .HasColumnType("nvarchar(max)"); + b.Property("ProdLine") + .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("UpStreamJobNumber") + b.Property("RequestStatus") + .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)"); - b.Property("WarehouseCode") - .HasColumnType("nvarchar(max)"); + b.Property("Shift") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); - b.Property("WorkGroupCode") + 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("Job_JisDeliverJob", (string)null); + b.ToTable("Store_ProductionPlan", (string)null); }); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.JisDeliverJobDetail", b => + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ProductionPlanDetail", b => { b.Property("Id") .HasColumnType("uniqueidentifier"); - b.Property("ContainerCode") - .HasColumnType("nvarchar(max)"); - - b.Property("ContainerDesc") - .HasColumnType("nvarchar(max)"); + b.Property("ArriveDate") + .HasColumnType("datetime2"); - b.Property("ContainerName") - .HasColumnType("nvarchar(max)"); + b.Property("BomVersion") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); b.Property("CreationTime") .HasColumnType("datetime2") @@ -7809,28 +11475,34 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("CreatorId"); - b.Property("FromLocationArea") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + b.Property("ExpireDate") + .HasColumnType("datetime2"); - b.Property("FromLocationCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + b.Property("GoodQty") + .ValueGeneratedOnAdd() + .HasColumnType("decimal(18,6)") + .HasDefaultValue(1m); - b.Property("FromLocationErpCode") + b.Property("ItemCode") + .IsRequired() .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemCode"); - b.Property("FromLocationGroup") + b.Property("ItemDesc1") .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc1"); - b.Property("FromWarehouseCode") + b.Property("ItemDesc2") .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc2"); - b.Property("ItemQty") - .HasColumnType("decimal(18,6)"); + b.Property("ItemName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemName"); b.Property("LastModificationTime") .HasColumnType("datetime2") @@ -7840,42 +11512,49 @@ namespace Win_in.Sfs.Wms.Store.Migrations .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") - .HasColumnType("nvarchar(max)"); + .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("Status") - .IsRequired() - .HasColumnType("nvarchar(max)"); + b.Property("SupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("SupplierBatch"); 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") + b.Property("Uom") .HasMaxLength(64) .HasColumnType("nvarchar(64)"); @@ -7883,29 +11562,43 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.HasIndex("MasterID"); - b.ToTable("Job_JisDeliverJobDetail", (string)null); + b.HasIndex("Number", "ItemCode") + .IsUnique(); + + b.ToTable("Store_ProductionPlanDetail", (string)null); }); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.JisDeliverNote", b => + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ProductionReturnJob", b => { b.Property("Id") .HasColumnType("uniqueidentifier"); - b.Property("ActiveDate") + b.Property("AcceptTime") .HasColumnType("datetime2"); - b.Property("ArrivalTime") + 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"); @@ -7914,31 +11607,29 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("CreatorId"); - b.Property("Customer") + 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("CustomerAddressCode") + b.Property("JobType") .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"); @@ -7950,11 +11641,21 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.Property("Number") .IsRequired() .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("Number"); + .HasColumnType("nvarchar(64)"); - b.Property("ProjectCode") - .HasColumnType("nvarchar(max)"); + 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) @@ -7965,9 +11666,17 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("TenantId"); - b.Property("TotalPackCapacity") + 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)"); @@ -7976,17 +11685,14 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.HasIndex("Number") .IsUnique(); - b.ToTable("Store_JisDeliverNote", (string)null); + b.ToTable("Job_ProductionReturnJob", (string)null); }); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.JisDeliverNoteDetail", b => + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ProductionReturnJobDetail", b => { b.Property("Id") .HasColumnType("uniqueidentifier"); - b.Property("ArriveDate") - .HasColumnType("datetime2"); - b.Property("CreationTime") .HasColumnType("datetime2") .HasColumnName("CreationTime"); @@ -7995,56 +11701,82 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("CreatorId"); - b.Property("DeliverTime") - .HasColumnType("datetime2"); + b.Property("FromLocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); - b.Property("ExpireDate") - .HasColumnType("datetime2"); + b.Property("FromLocationCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); - b.Property("ExpiredTime") + 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("FromContainerCode") - .HasColumnType("nvarchar(max)"); + b.Property("HandledContainerCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledContainerCode"); - b.Property("FromLocationArea") + b.Property("HandledExpireDate") + .HasColumnType("datetime2"); + + b.Property("HandledLot") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("FromLocationArea"); + .HasColumnName("HandledLot"); - b.Property("FromLocationCode") - .IsRequired() + b.Property("HandledPackingCode") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("FromLocationCode"); + .HasColumnName("HandledPackingCode"); - b.Property("FromLocationErpCode") - .IsRequired() + b.Property("HandledProduceDate") + .HasColumnType("datetime2"); + + b.Property("HandledQty") + .HasColumnType("decimal(18,6)"); + + b.Property("HandledSupplierBatch") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("FromLocationErpCode"); + .HasColumnName("HandledSupplierBatch"); - b.Property("FromLocationGroup") + b.Property("HandledToLocationArea") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("FromLocationGroup"); + .HasColumnName("HandledToLocationArea"); - b.Property("FromLot") - .HasColumnType("nvarchar(max)"); + b.Property("HandledToLocationCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledToLocationCode"); - b.Property("FromPackingCode") - .HasColumnType("nvarchar(450)"); + b.Property("HandledToLocationErpCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledToLocationErpCode"); - b.Property("FromStatus") - .IsRequired() + b.Property("HandledToLocationGroup") .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledToLocationGroup"); - b.Property("FromWarehouseCode") - .IsRequired() + b.Property("HandledToWarehouseCode") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("FromWarehouseCode"); + .HasColumnName("HandledToWarehouseCode"); b.Property("ItemCode") .IsRequired() @@ -8076,126 +11808,98 @@ namespace Win_in.Sfs.Wms.Store.Migrations .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)"); + .HasColumnType("uniqueidentifier"); - b.Property("Qty") - .HasPrecision(18, 6) - .HasColumnType("decimal(18,6)") - .HasColumnName("Qty"); + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); - b.Property("Remark") - .HasMaxLength(3072) - .HasColumnType("nvarchar(3072)") - .HasColumnName("Remark"); + b.Property("RecommendArriveDate") + .HasColumnType("datetime2"); - b.Property("SeqNo") - .HasColumnType("nvarchar(max)"); + b.Property("RecommendContainerCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendContainerCode"); - b.Property("Stage") - .HasColumnType("nvarchar(max)"); + b.Property("RecommendExpireDate") + .HasColumnType("datetime2"); - b.Property("StdPackQty") - .HasColumnType("decimal(18,6)"); + b.Property("RecommendLot") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendLot"); - b.Property("SupplierBatch") + b.Property("RecommendPackingCode") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("SupplierBatch"); + .HasColumnName("RecommendPackingCode"); - b.Property("TenantId") - .HasColumnType("uniqueidentifier") - .HasColumnName("TenantId"); + b.Property("RecommendProduceDate") + .HasColumnType("datetime2"); - b.Property("ToContainerCode") - .HasColumnType("nvarchar(max)"); + b.Property("RecommendQty") + .HasColumnType("decimal(18,6)"); - b.Property("ToLocationArea") + b.Property("RecommendSupplierBatch") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("ToLocationArea"); + .HasColumnName("RecommendSupplierBatch"); - b.Property("ToLocationCode") - .IsRequired() + b.Property("RecommendToLocationArea") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("ToLocationCode"); + .HasColumnName("RecommendToLocationArea"); - b.Property("ToLocationErpCode") - .IsRequired() + b.Property("RecommendToLocationCode") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("ToLocationErpCode"); + .HasColumnName("RecommendToLocationCode"); - b.Property("ToLocationGroup") + b.Property("RecommendToLocationErpCode") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("ToLocationGroup"); - - b.Property("ToLot") - .HasColumnType("nvarchar(max)"); - - b.Property("ToPackingCode") - .HasColumnType("nvarchar(max)"); + .HasColumnName("RecommendToLocationErpCode"); - b.Property("ToStatus") - .IsRequired() + b.Property("RecommendToLocationGroup") .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendToLocationGroup"); - b.Property("ToWarehouseCode") - .IsRequired() + b.Property("RecommendToWarehouseCode") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("ToWarehouseCode"); + .HasColumnName("RecommendToWarehouseCode"); - b.Property("Uom") + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("Status") .IsRequired() .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("Uom"); + .HasColumnType("nvarchar(64)"); - b.Property("UsedFor") - .HasColumnType("nvarchar(max)"); + b.Property("StdPackQty") + .HasColumnType("decimal(18,6)"); - b.Property("Year") + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Uom") .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); + b.ToTable("Job_ProductionReturnJobDetail", (string)null); }); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.JisProductReceiptNote", b => + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ProductionReturnNote", b => { b.Property("Id") .HasColumnType("uniqueidentifier"); @@ -8203,18 +11907,12 @@ namespace Win_in.Sfs.Wms.Store.Migrations 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"); @@ -8227,9 +11925,6 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("nvarchar(max)") .HasColumnName("ExtraProperties"); - b.Property("ItemQty") - .HasColumnType("decimal(18,6)"); - b.Property("JobNumber") .HasMaxLength(64) .HasColumnType("nvarchar(64)") @@ -8243,27 +11938,13 @@ namespace Win_in.Sfs.Wms.Store.Migrations .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() + b.Property("ProductionReturnRequestNumber") .HasMaxLength(64) .HasColumnType("nvarchar(64)"); @@ -8272,25 +11953,13 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("nvarchar(3072)") .HasColumnName("Remark"); - b.Property("Shift") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("SourceNumber") - .HasColumnType("nvarchar(max)"); + b.Property("ReturnTime") + .HasColumnType("datetime2"); 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)"); @@ -8299,10 +11968,10 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.HasIndex("Number") .IsUnique(); - b.ToTable("Store_JisProductReceiptNote", (string)null); + b.ToTable("Store_ProductionReturnNote", (string)null); }); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.JisProductReceiptNoteDetail", b => + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ProductionReturnNoteDetail", b => { b.Property("Id") .HasColumnType("uniqueidentifier"); @@ -8310,15 +11979,6 @@ namespace Win_in.Sfs.Wms.Store.Migrations 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"); @@ -8327,8 +11987,107 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("CreatorId"); - b.Property("ExpireDate") - .HasColumnType("datetime2"); + 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() @@ -8359,88 +12118,85 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("LastModifierId"); - b.Property("LocationArea") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("LocationArea"); + b.Property("MasterID") + .HasColumnType("uniqueidentifier"); - b.Property("LocationCode") + b.Property("Number") .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("LocationCode"); + .HasColumnName("Number"); - b.Property("LocationErpCode") - .IsRequired() + 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("LocationErpCode"); + .HasColumnName("RecommendContainerCode"); - b.Property("LocationGroup") + b.Property("RecommendExpireDate") + .HasColumnType("datetime2"); + + b.Property("RecommendLot") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("LocationGroup"); + .HasColumnName("RecommendLot"); - b.Property("Lot") + b.Property("RecommendPackingCode") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("Lot"); + .HasColumnName("RecommendPackingCode"); - b.Property("MasterID") - .HasColumnType("uniqueidentifier"); + b.Property("RecommendProduceDate") + .HasColumnType("datetime2"); - b.Property("Number") - .IsRequired() + b.Property("RecommendQty") + .HasColumnType("decimal(18,6)"); + + b.Property("RecommendSupplierBatch") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("Number"); + .HasColumnName("RecommendSupplierBatch"); - b.Property("PackingCode") - .IsRequired() + b.Property("RecommendToLocationArea") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("PackingCode"); - - b.Property("Position") - .HasColumnType("nvarchar(max)"); + .HasColumnName("RecommendToLocationArea"); - b.Property("ProdLine") - .IsRequired() + b.Property("RecommendToLocationCode") .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("ProduceDate") - .HasColumnType("datetime2"); - - b.Property("ProductNo") - .HasColumnType("nvarchar(max)"); + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendToLocationCode"); - b.Property("ProjectCode") - .HasColumnType("nvarchar(max)"); + b.Property("RecommendToLocationErpCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendToLocationErpCode"); - b.Property("Qty") - .HasPrecision(18, 6) - .HasColumnType("decimal(18,6)") - .HasColumnName("Qty"); + b.Property("RecommendToLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendToLocationGroup"); - b.Property("RawLocationCode") - .IsRequired() + b.Property("RecommendToWarehouseCode") .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendToWarehouseCode"); b.Property("Remark") .HasMaxLength(3072) .HasColumnType("nvarchar(3072)") .HasColumnName("Remark"); - b.Property("SeqNo") - .HasColumnType("nvarchar(max)"); - - b.Property("Status") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - b.Property("StdPackQty") .HasColumnType("decimal(18,6)"); @@ -8453,32 +12209,66 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("TenantId"); - b.Property("Uom") + b.Property("ToContainerCode") + .HasColumnType("nvarchar(max)"); + + b.Property("ToLocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToLocationArea"); + + b.Property("ToLocationCode") .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("Uom"); + .HasColumnName("ToLocationCode"); - b.Property("WarehouseCode") + b.Property("ToLocationErpCode") .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("WarehouseCode"); + .HasColumnName("ToLocationErpCode"); - b.Property("Year") + b.Property("ToLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToLocationGroup"); + + b.Property("ToLot") .HasColumnType("nvarchar(max)"); + b.Property("ToPackingCode") + .HasColumnType("nvarchar(450)"); + + b.Property("ToStatus") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ToWarehouseCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToWarehouseCode"); + + b.Property("Uom") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Uom"); + b.HasKey("Id"); b.HasIndex("MasterID"); - b.HasIndex("Number", "PackingCode") - .IsUnique(); + b.HasIndex("Number", "ItemCode", "FromPackingCode", "ToPackingCode", "FromLocationCode", "ToLocationCode") + .IsUnique() + .HasFilter("[FromPackingCode] IS NOT NULL AND [ToPackingCode] IS NOT NULL"); - b.ToTable("Store_JisProductReceiptNoteDetail", (string)null); + b.ToTable("Store_ProductionReturnNoteDetail", (string)null); }); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.MaterialRequest", b => + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ProductionReturnRequest", b => { b.Property("Id") .HasColumnType("uniqueidentifier"); @@ -8533,14 +12323,6 @@ namespace Win_in.Sfs.Wms.Store.Migrations .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)") @@ -8555,33 +12337,25 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("TenantId"); - b.Property("Type") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("UseOnTheWayLocation") - .HasColumnType("bit"); - b.Property("Worker") .HasColumnType("nvarchar(max)"); - b.Property("Workshop") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - b.HasKey("Id"); b.HasIndex("Number") .IsUnique(); - b.ToTable("Store_MaterialRequest", (string)null); + b.ToTable("Store_ProductionReturnRequest", (string)null); }); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.MaterialRequestDetail", b => + 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"); @@ -8590,15 +12364,53 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("CreatorId"); - b.Property("ExpiredTime") + b.Property("ExpireDate") .HasColumnType("datetime2"); + b.Property("FromContainerCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + b.Property("FromLocationArea") - .HasColumnType("nvarchar(max)"); + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("FromLocationArea"); - b.Property("IssuedQty") - .HasPrecision(18, 6) - .HasColumnType("decimal(18,6)"); + 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() @@ -8638,52 +12450,66 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("nvarchar(64)") .HasColumnName("Number"); - 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("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("SupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("SupplierBatch"); + b.Property("TenantId") .HasColumnType("uniqueidentifier") .HasColumnName("TenantId"); - b.Property("ToLocationArea") - .IsRequired() + 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)"); + .HasColumnType("nvarchar(64)") + .HasColumnName("ToLocationCode"); b.Property("ToLocationErpCode") .IsRequired() .HasMaxLength(64) - .HasColumnType("nvarchar(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)"); @@ -8691,7 +12517,8 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.Property("ToWarehouseCode") .IsRequired() .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + .HasColumnType("nvarchar(64)") + .HasColumnName("ToWarehouseCode"); b.Property("Uom") .IsRequired() @@ -8699,23 +12526,19 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("nvarchar(64)") .HasColumnName("Uom"); - b.Property("WorkStation") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - b.HasKey("Id"); b.HasIndex("ItemCode"); b.HasIndex("MasterID"); - b.HasIndex("Number", "ItemCode", "ToLocationCode") + b.HasIndex("Number", "ItemCode", "FromLocationCode") .IsUnique(); - b.ToTable("Store_MaterialRequestDetail", (string)null); + b.ToTable("Store_ProductionReturnRequestDetail", (string)null); }); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.NoOkConvertOkNote", b => + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ProductL7PartsNote", b => { b.Property("Id") .HasColumnType("uniqueidentifier"); @@ -8729,6 +12552,15 @@ namespace Win_in.Sfs.Wms.Store.Migrations .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"); @@ -8741,6 +12573,9 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("nvarchar(max)") .HasColumnName("ExtraProperties"); + b.Property("FATA") + .HasColumnType("nvarchar(max)"); + b.Property("LastModificationTime") .HasColumnType("datetime2") .HasColumnName("LastModificationTime"); @@ -8755,11 +12590,29 @@ namespace Win_in.Sfs.Wms.Store.Migrations .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"); @@ -8767,20 +12620,33 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.Property("Worker") .HasColumnType("nvarchar(max)"); + b.Property("Year") + .HasColumnType("nvarchar(max)"); + b.HasKey("Id"); b.HasIndex("Number") .IsUnique(); - b.ToTable("Store_NoOkConvertOkNote", (string)null); + b.ToTable("Store_ProductL7PartsNote", (string)null); }); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.NoOkConvertOkNoteDetail", b => + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ProductL7PartsNoteDetail", b => { b.Property("Id") .HasColumnType("uniqueidentifier"); - b.Property("ArriveDate") + 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") @@ -8791,51 +12657,9 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("CreatorId"); - b.Property("ExpireDate") - .HasColumnType("datetime2"); - - b.Property("FromContainerCode") - .HasColumnType("nvarchar(max)"); - - b.Property("FromLocationArea") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("FromLocationArea"); - - b.Property("FromLocationCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("FromLocationCode"); - - b.Property("FromLocationErpCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("FromLocationErpCode"); - - b.Property("FromLocationGroup") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("FromLocationGroup"); - - b.Property("FromLot") + b.Property("FATA") .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) @@ -8857,6 +12681,10 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("nvarchar(64)") .HasColumnName("ItemName"); + b.Property("L7Part") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + b.Property("LastModificationTime") .HasColumnType("datetime2") .HasColumnName("LastModificationTime"); @@ -8865,6 +12693,9 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("LastModifierId"); + b.Property("LocationCode") + .HasColumnType("nvarchar(max)"); + b.Property("MasterID") .HasColumnType("uniqueidentifier"); @@ -8874,91 +12705,53 @@ namespace Win_in.Sfs.Wms.Store.Migrations .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") + b.Property("Position") .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("SupplierBatch"); - - b.Property("TenantId") - .HasColumnType("uniqueidentifier") - .HasColumnName("TenantId"); + .HasColumnType("nvarchar(64)"); - b.Property("ToContainerCode") + b.Property("ProdLine") .HasColumnType("nvarchar(max)"); - b.Property("ToLocationArea") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ToLocationArea"); - - b.Property("ToLocationCode") - .IsRequired() + b.Property("ProductNo") .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ToLocationCode"); + .HasColumnType("nvarchar(64)"); - b.Property("ToLocationErpCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ToLocationErpCode"); + b.Property("Program") + .HasColumnType("nvarchar(max)"); - b.Property("ToLocationGroup") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ToLocationGroup"); + b.Property("Qty") + .HasColumnType("int"); - b.Property("ToLot") + b.Property("RawLocationCode") .HasColumnType("nvarchar(max)"); - b.Property("ToPackingCode") - .HasColumnType("nvarchar(max)"); + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); - b.Property("ToStatus") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + b.Property("RowID") + .HasColumnType("int"); - b.Property("ToWarehouseCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ToWarehouseCode"); + b.Property("State") + .HasColumnType("int"); - b.Property("Uom") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("Uom"); + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); b.HasKey("Id"); b.HasIndex("MasterID"); - b.HasIndex("Number", "FromPackingCode", "FromLocationCode", "ToLocationCode") + b.HasIndex("Number", "ProductNo", "Position", "Configuration", "L7Part") .IsUnique() - .HasFilter("[FromPackingCode] IS NOT NULL"); + .HasFilter("[ProductNo] IS NOT NULL AND [Position] IS NOT NULL AND [Configuration] IS NOT NULL AND [L7Part] IS NOT NULL"); - b.ToTable("Store_NoOkConvertOkNoteDetail", (string)null); + b.ToTable("Store_ProductL7PartsNoteDetail", (string)null); }); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.OfflineSettlementNote", b => + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ProductReceiptNote", b => { b.Property("Id") .HasColumnType("uniqueidentifier"); @@ -8966,6 +12759,9 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.Property("ActiveDate") .HasColumnType("datetime2"); + b.Property("CompleteTime") + .HasColumnType("datetime2"); + b.Property("ConcurrencyStamp") .IsConcurrencyToken() .HasMaxLength(40) @@ -8985,7 +12781,9 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnName("ExtraProperties"); b.Property("JobNumber") - .HasColumnType("nvarchar(max)"); + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("JobNumber"); b.Property("LastModificationTime") .HasColumnType("datetime2") @@ -9001,7 +12799,15 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("nvarchar(64)") .HasColumnName("Number"); - b.Property("ProductReceiptNumber") + 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)"); @@ -9011,9 +12817,27 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("nvarchar(3072)") .HasColumnName("Remark"); - b.Property("TenantId") - .HasColumnType("uniqueidentifier") - .HasColumnName("TenantId"); + 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)"); @@ -9023,10 +12847,10 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.HasIndex("Number") .IsUnique(); - b.ToTable("Store_OfflineSettlementNote", (string)null); + b.ToTable("Store_ProductReceiptNote", (string)null); }); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.OfflineSettlementNoteDetail", b => + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ProductReceiptNoteDetail", b => { b.Property("Id") .HasColumnType("uniqueidentifier"); @@ -9034,6 +12858,10 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.Property("ArriveDate") .HasColumnType("datetime2"); + b.Property("BomVersion") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + b.Property("ContainerCode") .HasMaxLength(64) .HasColumnType("nvarchar(64)") @@ -9050,6 +12878,63 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.Property("ExpireDate") .HasColumnType("datetime2"); + b.Property("HandledArriveDate") + .HasColumnType("datetime2"); + + b.Property("HandledContainerCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledContainerCode"); + + b.Property("HandledExpireDate") + .HasColumnType("datetime2"); + + b.Property("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) @@ -9121,6 +13006,10 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("nvarchar(64)") .HasColumnName("PackingCode"); + b.Property("ProdLine") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + b.Property("ProduceDate") .HasColumnType("datetime2"); @@ -9129,245 +13018,122 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("decimal(18,6)") .HasColumnName("Qty"); - b.Property("Remark") - .HasMaxLength(3072) - .HasColumnType("nvarchar(3072)") - .HasColumnName("Remark"); - - b.Property("Status") - .IsRequired() + b.Property("RawArea") .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() + b.Property("RawLocationCode") .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"); + .HasColumnType("nvarchar(64)"); - b.Property("ActiveDate") + b.Property("RecommendArriveDate") .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() + b.Property("RecommendContainerCode") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("Number"); - - b.Property("PlanDate") - .HasColumnType("datetime2"); + .HasColumnName("RecommendContainerCode"); - b.Property("PlanTime") + b.Property("RecommendExpireDate") .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() + b.Property("RecommendLot") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("ItemCode"); + .HasColumnName("RecommendLot"); - b.Property("ItemDesc1") + b.Property("RecommendPackingCode") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("ItemDesc1"); + .HasColumnName("RecommendPackingCode"); - b.Property("ItemDesc2") + b.Property("RecommendProduceDate") + .HasColumnType("datetime2"); + + b.Property("RecommendQty") + .HasColumnType("decimal(18,6)"); + + b.Property("RecommendSupplierBatch") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("ItemDesc2"); + .HasColumnName("RecommendSupplierBatch"); - b.Property("ItemName") + b.Property("RecommendToLocationArea") .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"); + .HasColumnName("RecommendToLocationArea"); - b.Property("LineStatus") - .IsRequired() + b.Property("RecommendToLocationCode") .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendToLocationCode"); - b.Property("MasterID") - .HasColumnType("uniqueidentifier"); + b.Property("RecommendToLocationErpCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendToLocationErpCode"); - b.Property("Number") - .IsRequired() + b.Property("RecommendToLocationGroup") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("Number"); + .HasColumnName("RecommendToLocationGroup"); - b.Property("Qty") - .HasPrecision(18, 6) - .HasColumnType("decimal(18,6)") - .HasColumnName("Qty"); + b.Property("RecommendToWarehouseCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendToWarehouseCode"); b.Property("Remark") .HasMaxLength(3072) .HasColumnType("nvarchar(3072)") .HasColumnName("Remark"); + b.Property("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("ToLocationCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - b.Property("Uom") .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)") .HasColumnName("Uom"); - b.Property("WorkStation") + b.Property("WarehouseCode") .IsRequired() .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + .HasColumnType("nvarchar(64)") + .HasColumnName("WarehouseCode"); b.HasKey("Id"); b.HasIndex("MasterID"); - b.HasIndex("Number", "ItemCode") - .IsUnique(); + b.HasIndex("Number", "ItemCode", "PackingCode", "Lot", "Status") + .IsUnique() + .HasFilter("[Lot] IS NOT NULL"); - b.ToTable("Store_PreparationPlanDetail", (string)null); + b.ToTable("Store_ProductReceiptNoteDetail", (string)null); }); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ProductionPlan", b => + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ProductReceiptRequest", b => { b.Property("Id") .HasColumnType("uniqueidentifier"); @@ -9425,14 +13191,13 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.Property("PlanDate") .HasColumnType("datetime2"); - b.Property("PlanTime") - .HasColumnType("datetime2"); - b.Property("ProdLine") - .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)"); + b.Property("ProductionPlanNumber") + .HasColumnType("nvarchar(max)"); + b.Property("Remark") .HasMaxLength(3072) .HasColumnType("nvarchar(3072)") @@ -9444,12 +13209,10 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("nvarchar(64)"); b.Property("Shift") - .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)"); b.Property("Team") - .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)"); @@ -9457,11 +13220,15 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("TenantId"); + b.Property("Type") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + b.Property("Worker") .HasColumnType("nvarchar(max)"); b.Property("Workshop") - .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)"); @@ -9470,10 +13237,10 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.HasIndex("Number") .IsUnique(); - b.ToTable("Store_ProductionPlan", (string)null); + b.ToTable("Store_ProductReceiptRequest", (string)null); }); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ProductionPlanDetail", b => + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ProductReceiptRequestDetail", b => { b.Property("Id") .HasColumnType("uniqueidentifier"); @@ -9496,11 +13263,6 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.Property("ExpireDate") .HasColumnType("datetime2"); - b.Property("GoodQty") - .ValueGeneratedOnAdd() - .HasColumnType("decimal(18,6)") - .HasDefaultValue(1m); - b.Property("ItemCode") .IsRequired() .HasMaxLength(64) @@ -9530,8 +13292,27 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("LastModifierId"); - b.Property("LineStatus") - .HasColumnType("int"); + 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) @@ -9541,28 +13322,37 @@ namespace Win_in.Sfs.Wms.Store.Migrations 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("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)") @@ -9573,20 +13363,28 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnName("TenantId"); b.Property("Uom") + .IsRequired() .HasMaxLength(64) - .HasColumnType("nvarchar(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") + b.HasIndex("Number", "ItemCode", "LocationCode") .IsUnique(); - b.ToTable("Store_ProductionPlanDetail", (string)null); + b.ToTable("Store_ProductReceiptRequestDetail", (string)null); }); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ProductionReturnJob", b => + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ProductReceiveJob", b => { b.Property("Id") .HasColumnType("uniqueidentifier"); @@ -9671,7 +13469,7 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("int") .HasDefaultValue(0); - b.Property("ProductionReturnRequestNumber") + b.Property("ProductionPlanNumber") .HasMaxLength(64) .HasColumnType("nvarchar(64)"); @@ -9680,6 +13478,10 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("nvarchar(3072)") .HasColumnName("Remark"); + b.Property("Shift") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + b.Property("TenantId") .HasColumnType("uniqueidentifier") .HasColumnName("TenantId"); @@ -9698,15 +13500,20 @@ namespace Win_in.Sfs.Wms.Store.Migrations 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_ProductionReturnJob", (string)null); + b.ToTable("Job_ProductReceiveJob", (string)null); }); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ProductionReturnJobDetail", b => + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ProductReceiveJobDetail", b => { b.Property("Id") .HasColumnType("uniqueidentifier"); @@ -9719,26 +13526,6 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("CreatorId"); - b.Property("FromLocationArea") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("FromLocationCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("FromLocationErpCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("FromLocationGroup") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("FromWarehouseCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - b.Property("HandledArriveDate") .HasColumnType("datetime2"); @@ -9833,6 +13620,14 @@ namespace Win_in.Sfs.Wms.Store.Migrations .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"); @@ -9914,17 +13709,34 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.HasIndex("MasterID"); - b.ToTable("Job_ProductionReturnJobDetail", (string)null); + b.ToTable("Job_ProductReceiveJobDetail", (string)null); }); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ProductionReturnNote", b => + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ProductRecycleJob", b => { b.Property("Id") .HasColumnType("uniqueidentifier"); - b.Property("ActiveDate") + b.Property("AcceptTime") + .HasColumnType("datetime2"); + + b.Property("AcceptUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("AcceptUserName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("CompleteTime") .HasColumnType("datetime2"); + b.Property("CompleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CompleteUserName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + b.Property("ConcurrencyStamp") .IsConcurrencyToken() .HasMaxLength(40) @@ -9943,10 +13755,24 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("nvarchar(max)") .HasColumnName("ExtraProperties"); - b.Property("JobNumber") + b.Property("IsAutoComplete") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false); + + b.Property("JobDescription") + .HasMaxLength(1024) + .HasColumnType("nvarchar(1024)"); + + b.Property("JobStatus") + .IsRequired() .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("JobNumber"); + .HasColumnType("nvarchar(64)"); + + b.Property("JobType") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); b.Property("LastModificationTime") .HasColumnType("datetime2") @@ -9958,44 +13784,66 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.Property("Number") .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("Number"); - - b.Property("ProductionReturnRequestNumber") .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("ReturnTime") - .HasColumnType("datetime2"); + 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("Store_ProductionReturnNote", (string)null); + b.ToTable("Job_ProductRecycleJob", (string)null); }); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ProductionReturnNoteDetail", b => + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ProductRecycleJobDetail", b => { b.Property("Id") .HasColumnType("uniqueidentifier"); - b.Property("ArriveDate") - .HasColumnType("datetime2"); + b.Property("BomVersion") + .HasColumnType("nvarchar(max)"); b.Property("CreationTime") .HasColumnType("datetime2") @@ -10005,51 +13853,6 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("CreatorId"); - b.Property("ExpireDate") - .HasColumnType("datetime2"); - - b.Property("FromContainerCode") - .HasColumnType("nvarchar(max)"); - - b.Property("FromLocationArea") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("FromLocationArea"); - - b.Property("FromLocationCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("FromLocationCode"); - - b.Property("FromLocationErpCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("FromLocationErpCode"); - - b.Property("FromLocationGroup") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("FromLocationGroup"); - - b.Property("FromLot") - .HasColumnType("nvarchar(max)"); - - b.Property("FromPackingCode") - .HasColumnType("nvarchar(450)"); - - b.Property("FromStatus") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("FromWarehouseCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("FromWarehouseCode"); - b.Property("HandledArriveDate") .HasColumnType("datetime2"); @@ -10136,22 +13939,43 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("LastModifierId"); + b.Property("LocationArea") + .HasColumnType("nvarchar(max)"); + + b.Property("LocationCode") + .HasColumnType("nvarchar(max)"); + + b.Property("LocationErpCode") + .HasColumnType("nvarchar(max)"); + + b.Property("LocationGroup") + .HasColumnType("nvarchar(max)"); + b.Property("MasterID") .HasColumnType("uniqueidentifier"); b.Property("Number") .IsRequired() .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("Number"); - - b.Property("ProduceDate") - .HasColumnType("datetime2"); + .HasColumnType("nvarchar(64)"); b.Property("Qty") - .HasPrecision(18, 6) - .HasColumnType("decimal(18,6)") - .HasColumnName("Qty"); + .HasColumnType("decimal(18,6)"); + + b.Property("RawLocationArea") + .HasColumnType("nvarchar(max)"); + + b.Property("RawLocationCode") + .HasColumnType("nvarchar(max)"); + + b.Property("RawLocationErpCode") + .HasColumnType("nvarchar(max)"); + + b.Property("RawLocationGroup") + .HasColumnType("nvarchar(max)"); + + b.Property("RawWarehouseCode") + .HasColumnType("nvarchar(max)"); b.Property("RecommendArriveDate") .HasColumnType("datetime2"); @@ -10215,6 +14039,173 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("nvarchar(3072)") .HasColumnName("Remark"); + b.Property("Status") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("StdPackQty") + .HasColumnType("decimal(18,6)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Uom") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("WarehouseCode") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("MasterID"); + + b.ToTable("Job_ProductRecycleJobDetail", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ProductRecycleMaterialDetail", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ArriveDate") + .HasColumnType("datetime2"); + + b.Property("BomVersion") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ContainerCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ContainerCode"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("ExpireDate") + .HasColumnType("datetime2"); + + b.Property("ItemCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemCode"); + + b.Property("ItemDesc1") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc1"); + + b.Property("ItemDesc2") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc2"); + + b.Property("ItemName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemName"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("LocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationArea"); + + b.Property("LocationCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationCode"); + + b.Property("LocationErpCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationErpCode"); + + b.Property("LocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationGroup"); + + b.Property("Lot") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Lot"); + + b.Property("MasterID") + .HasColumnType("uniqueidentifier"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); + + b.Property("PackingCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("PackingCode"); + + b.Property("ProduceDate") + .HasColumnType("datetime2"); + + b.Property("ProductItemCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ProductItemDesc1") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ProductItemDesc2") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ProductItemName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ProductLot") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ProductPackingCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Qty") + .HasPrecision(18, 6) + .HasColumnType("decimal(18,6)") + .HasColumnName("Qty"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("Status") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + b.Property("StdPackQty") .HasColumnType("decimal(18,6)"); @@ -10227,66 +14218,28 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("TenantId"); - b.Property("ToContainerCode") - .HasColumnType("nvarchar(max)"); - - b.Property("ToLocationArea") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ToLocationArea"); - - b.Property("ToLocationCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ToLocationCode"); - - b.Property("ToLocationErpCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ToLocationErpCode"); - - b.Property("ToLocationGroup") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ToLocationGroup"); - - b.Property("ToLot") - .HasColumnType("nvarchar(max)"); - - b.Property("ToPackingCode") - .HasColumnType("nvarchar(450)"); - - b.Property("ToStatus") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("ToWarehouseCode") + b.Property("Uom") .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("ToWarehouseCode"); + .HasColumnName("Uom"); - b.Property("Uom") + b.Property("WarehouseCode") .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("Uom"); + .HasColumnName("WarehouseCode"); b.HasKey("Id"); b.HasIndex("MasterID"); - b.HasIndex("Number", "ItemCode", "FromPackingCode", "ToPackingCode", "FromLocationCode", "ToLocationCode") - .IsUnique() - .HasFilter("[FromPackingCode] IS NOT NULL AND [ToPackingCode] IS NOT NULL"); + b.HasIndex("Number", "ProductItemCode", "ItemCode"); - b.ToTable("Store_ProductionReturnNoteDetail", (string)null); + b.ToTable("Store_ProductRecycleMaterialDetail", (string)null); }); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ProductionReturnRequest", b => + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ProductRecycleNote", b => { b.Property("Id") .HasColumnType("uniqueidentifier"); @@ -10294,18 +14247,6 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.Property("ActiveDate") .HasColumnType("datetime2"); - b.Property("AutoAgree") - .HasColumnType("bit"); - - b.Property("AutoCompleteJob") - .HasColumnType("bit"); - - b.Property("AutoHandle") - .HasColumnType("bit"); - - b.Property("AutoSubmit") - .HasColumnType("bit"); - b.Property("ConcurrencyStamp") .IsConcurrencyToken() .HasMaxLength(40) @@ -10320,9 +14261,6 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("CreatorId"); - b.Property("DirectCreateNote") - .HasColumnType("bit"); - b.Property("ExtraProperties") .HasColumnType("nvarchar(max)") .HasColumnName("ExtraProperties"); @@ -10341,13 +14279,18 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("nvarchar(64)") .HasColumnName("Number"); + b.Property("RecycleTime") + .HasColumnType("datetime2"); + b.Property("Remark") .HasMaxLength(3072) .HasColumnType("nvarchar(3072)") .HasColumnName("Remark"); - b.Property("RequestStatus") - .IsRequired() + b.Property("RequestNumber") + .HasColumnType("nvarchar(max)"); + + b.Property("Shift") .HasMaxLength(64) .HasColumnType("nvarchar(64)"); @@ -10358,15 +14301,19 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.Property("Worker") .HasColumnType("nvarchar(max)"); + b.Property("Workshop") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + b.HasKey("Id"); b.HasIndex("Number") .IsUnique(); - b.ToTable("Store_ProductionReturnRequest", (string)null); + b.ToTable("Store_ProductRecycleNote", (string)null); }); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ProductionReturnRequestDetail", b => + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ProductRecycleNoteDetail", b => { b.Property("Id") .HasColumnType("uniqueidentifier"); @@ -10374,6 +14321,11 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.Property("ArriveDate") .HasColumnType("datetime2"); + b.Property("ContainerCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ContainerCode"); + b.Property("CreationTime") .HasColumnType("datetime2") .HasColumnName("CreationTime"); @@ -10385,79 +14337,65 @@ namespace Win_in.Sfs.Wms.Store.Migrations 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("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); - b.Property("FromLocationCode") + b.Property("ItemCode") .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("FromLocationCode"); + .HasColumnName("ItemCode"); - b.Property("FromLocationErpCode") - .IsRequired() + b.Property("ItemDesc1") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("FromLocationErpCode"); + .HasColumnName("ItemDesc1"); - b.Property("FromLocationGroup") + b.Property("ItemDesc2") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("FromLocationGroup"); + .HasColumnName("ItemDesc2"); - b.Property("FromLot") + b.Property("ItemName") .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemName"); - b.Property("FromPackingCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); - b.Property("FromStatus") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); - b.Property("FromWarehouseCode") - .IsRequired() + b.Property("LocationArea") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("FromWarehouseCode"); + .HasColumnName("LocationArea"); - b.Property("ItemCode") + b.Property("LocationCode") .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("ItemCode"); + .HasColumnName("LocationCode"); - b.Property("ItemDesc1") + b.Property("LocationErpCode") + .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("ItemDesc1"); + .HasColumnName("LocationErpCode"); - b.Property("ItemDesc2") + b.Property("LocationGroup") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("ItemDesc2"); + .HasColumnName("LocationGroup"); - b.Property("ItemName") + b.Property("Lot") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("ItemName"); - - b.Property("LastModificationTime") - .HasColumnType("datetime2") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("uniqueidentifier") - .HasColumnName("LastModifierId"); + .HasColumnName("Lot"); b.Property("MasterID") .HasColumnType("uniqueidentifier"); @@ -10468,6 +14406,12 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("nvarchar(64)") .HasColumnName("Number"); + b.Property("PackingCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("PackingCode"); + b.Property("ProduceDate") .HasColumnType("datetime2"); @@ -10476,11 +14420,20 @@ namespace Win_in.Sfs.Wms.Store.Migrations .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)"); @@ -10493,70 +14446,29 @@ namespace Win_in.Sfs.Wms.Store.Migrations .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") + b.Property("Uom") .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("ToWarehouseCode"); + .HasColumnName("Uom"); - b.Property("Uom") + b.Property("WarehouseCode") .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("Uom"); + .HasColumnName("WarehouseCode"); b.HasKey("Id"); - b.HasIndex("ItemCode"); - b.HasIndex("MasterID"); - b.HasIndex("Number", "ItemCode", "FromLocationCode") + b.HasIndex("Number", "ItemCode") .IsUnique(); - b.ToTable("Store_ProductionReturnRequestDetail", (string)null); + b.ToTable("Store_ProductRecycleNoteDetail", (string)null); }); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ProductL7PartsNote", b => + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ProductRecycleRequest", b => { b.Property("Id") .HasColumnType("uniqueidentifier"); @@ -10564,20 +14476,23 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.Property("ActiveDate") .HasColumnType("datetime2"); - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("nvarchar(40)") - .HasColumnName("ConcurrencyStamp"); + b.Property("AutoAgree") + .HasColumnType("bit"); - b.Property("Configuration") - .HasColumnType("nvarchar(max)"); + b.Property("AutoCompleteJob") + .HasColumnType("bit"); - b.Property("ContainerCode") - .HasColumnType("nvarchar(max)"); + b.Property("AutoHandle") + .HasColumnType("bit"); + + b.Property("AutoSubmit") + .HasColumnType("bit"); - b.Property("CreateDate") - .HasColumnType("datetime2"); + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); b.Property("CreationTime") .HasColumnType("datetime2") @@ -10587,13 +14502,13 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("CreatorId"); + b.Property("DirectCreateNote") + .HasColumnType("bit"); + b.Property("ExtraProperties") .HasColumnType("nvarchar(max)") .HasColumnName("ExtraProperties"); - b.Property("FATA") - .HasColumnType("nvarchar(max)"); - b.Property("LastModificationTime") .HasColumnType("datetime2") .HasColumnName("LastModificationTime"); @@ -10608,28 +14523,19 @@ namespace Win_in.Sfs.Wms.Store.Migrations .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("RequestStatus") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); - b.Property("Status") - .HasColumnType("int"); + b.Property("Shift") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); b.Property("TenantId") .HasColumnType("uniqueidentifier") @@ -10638,35 +14544,27 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.Property("Worker") .HasColumnType("nvarchar(max)"); - b.Property("Year") - .HasColumnType("nvarchar(max)"); + b.Property("Workshop") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); b.HasKey("Id"); b.HasIndex("Number") .IsUnique(); - b.ToTable("Store_ProductL7PartsNote", (string)null); + b.ToTable("Store_ProductRecycleRequest", (string)null); }); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ProductL7PartsNoteDetail", b => + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ProductRecycleRequestDetail", b => { b.Property("Id") .HasColumnType("uniqueidentifier"); - b.Property("CanBuy") - .HasColumnType("bit"); - - b.Property("CanMake") - .HasColumnType("bit"); - - b.Property("Configuration") + b.Property("BomVersion") .HasMaxLength(64) .HasColumnType("nvarchar(64)"); - b.Property("CreateDate") - .HasColumnType("datetime2"); - b.Property("CreationTime") .HasColumnType("datetime2") .HasColumnName("CreationTime"); @@ -10675,8 +14573,9 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("CreatorId"); - b.Property("FATA") - .HasColumnType("nvarchar(max)"); + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); b.Property("ItemCode") .IsRequired() @@ -10699,10 +14598,6 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("nvarchar(64)") .HasColumnName("ItemName"); - b.Property("L7Part") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - b.Property("LastModificationTime") .HasColumnType("datetime2") .HasColumnName("LastModificationTime"); @@ -10711,8 +14606,27 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("LastModifierId"); + b.Property("LocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationArea"); + b.Property("LocationCode") - .HasColumnType("nvarchar(max)"); + .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"); @@ -10723,53 +14637,68 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("nvarchar(64)") .HasColumnName("Number"); - b.Property("Position") + b.Property("Qty") + .HasPrecision(18, 6) + .HasColumnType("decimal(18,6)") + .HasColumnName("Qty"); + + b.Property("RawLocationArea") .HasMaxLength(64) .HasColumnType("nvarchar(64)"); - b.Property("ProdLine") - .HasColumnType("nvarchar(max)"); - - b.Property("ProductNo") + b.Property("RawLocationCode") .HasMaxLength(64) .HasColumnType("nvarchar(64)"); - b.Property("Program") - .HasColumnType("nvarchar(max)"); + b.Property("RawLocationErpCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); - b.Property("Qty") - .HasColumnType("int"); + b.Property("RawLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); - b.Property("RawLocationCode") - .HasColumnType("nvarchar(max)"); + b.Property("RawWarehouseCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); b.Property("Remark") .HasMaxLength(3072) .HasColumnType("nvarchar(3072)") .HasColumnName("Remark"); - b.Property("RowID") - .HasColumnType("int"); - - b.Property("State") - .HasColumnType("int"); + 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", "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.HasIndex("Number", "ItemCode") + .IsUnique(); - b.ToTable("Store_ProductL7PartsNoteDetail", (string)null); + b.ToTable("Store_ProductRecycleRequestDetail", (string)null); }); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ProductReceiptNote", b => + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.PurchaseOrder", b => { b.Property("Id") .HasColumnType("uniqueidentifier"); @@ -10777,15 +14706,24 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.Property("ActiveDate") .HasColumnType("datetime2"); - b.Property("CompleteTime") - .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"); @@ -10794,14 +14732,17 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("CreatorId"); + b.Property("DueDate") + .HasColumnType("datetime2"); + b.Property("ExtraProperties") .HasColumnType("nvarchar(max)") .HasColumnName("ExtraProperties"); - b.Property("JobNumber") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("JobNumber"); + b.Property("IsConsignment") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false); b.Property("LastModificationTime") .HasColumnType("datetime2") @@ -10817,16 +14758,15 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("nvarchar(64)") .HasColumnName("Number"); - b.Property("ProductReceiptRequestNumber") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + b.Property("OrderDate") + .HasColumnType("datetime2"); - b.Property("ProductionPlanNumber") + b.Property("OrderStatus") + .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)"); - b.Property("ReceiptType") - .IsRequired() + b.Property("PoType") .HasMaxLength(64) .HasColumnType("nvarchar(64)"); @@ -10835,25 +14775,26 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("nvarchar(3072)") .HasColumnName("Remark"); - b.Property("Shift") + b.Property("SupplierAddress") + .HasColumnType("nvarchar(max)"); + + b.Property("SupplierCode") .HasMaxLength(64) .HasColumnType("nvarchar(64)"); - b.Property("SourceNumber") + 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("Type") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("WarehouseCode") - .HasColumnType("nvarchar(max)"); - - b.Property("WorkShop") + b.Property("Version") .HasMaxLength(64) .HasColumnType("nvarchar(64)"); @@ -10865,93 +14806,37 @@ namespace Win_in.Sfs.Wms.Store.Migrations 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.ToTable("Store_PurchaseOrder", (string)null); + }); - b.Property("HandledQty") - .HasColumnType("decimal(18,6)"); + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.PurchaseOrderDetail", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); - b.Property("HandledSupplierBatch") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("HandledSupplierBatch"); + b.Property("ConvertRate") + .ValueGeneratedOnAdd() + .HasColumnType("decimal(18,6)") + .HasDefaultValue(1m); - b.Property("HandledToLocationArea") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("HandledToLocationArea"); + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); - b.Property("HandledToLocationCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("HandledToLocationCode"); + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); - b.Property("HandledToLocationErpCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("HandledToLocationErpCode"); + b.Property("Ctype") + .HasColumnType("nvarchar(max)"); - b.Property("HandledToLocationGroup") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("HandledToLocationGroup"); + b.Property("ExpireDate") + .HasColumnType("datetime2"); - b.Property("HandledToWarehouseCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("HandledToWarehouseCode"); + b.Property("IsConsignment") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false); b.Property("ItemCode") .IsRequired() @@ -10982,32 +14867,17 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("LastModifierId"); - b.Property("LocationArea") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("LocationArea"); - - b.Property("LocationCode") + b.Property("LineStatus") .IsRequired() .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("LocationCode"); + .HasColumnType("nvarchar(64)"); b.Property("LocationErpCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("LocationErpCode"); - - b.Property("LocationGroup") .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("LocationGroup"); + .HasColumnType("nvarchar(64)"); b.Property("Lot") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("Lot"); + .HasColumnType("nvarchar(max)"); b.Property("MasterID") .HasColumnType("uniqueidentifier"); @@ -11018,111 +14888,56 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("nvarchar(64)") .HasColumnName("Number"); - b.Property("PackingCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("PackingCode"); - - b.Property("ProdLine") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + b.Property("OrderRemark") + .HasColumnType("nvarchar(max)"); - b.Property("ProduceDate") + b.Property("PlanArriveDate") .HasColumnType("datetime2"); - b.Property("Qty") - .HasPrecision(18, 6) - .HasColumnType("decimal(18,6)") - .HasColumnName("Qty"); - - b.Property("RawArea") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + b.Property("PlanUserCode") + .HasColumnType("nvarchar(max)"); - b.Property("RawLocationCode") + b.Property("PoLine") .HasMaxLength(64) .HasColumnType("nvarchar(64)"); - b.Property("RecommendArriveDate") - .HasColumnType("datetime2"); - - b.Property("RecommendContainerCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendContainerCode"); - - b.Property("RecommendExpireDate") + b.Property("ProduceDate") .HasColumnType("datetime2"); - b.Property("RecommendLot") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendLot"); - - b.Property("RecommendPackingCode") + b.Property("ProjectCode") .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendPackingCode"); - - b.Property("RecommendProduceDate") - .HasColumnType("datetime2"); + .HasColumnType("nvarchar(64)"); - b.Property("RecommendQty") + b.Property("PutAwayQty") .HasColumnType("decimal(18,6)"); - b.Property("RecommendSupplierBatch") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendSupplierBatch"); - - b.Property("RecommendToLocationArea") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendToLocationArea"); - - b.Property("RecommendToLocationCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendToLocationCode"); - - b.Property("RecommendToLocationErpCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendToLocationErpCode"); - - b.Property("RecommendToLocationGroup") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendToLocationGroup"); + b.Property("Qty") + .HasPrecision(18, 6) + .HasColumnType("decimal(18,6)") + .HasColumnName("Qty"); - b.Property("RecommendToWarehouseCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendToWarehouseCode"); + b.Property("ReceivedQty") + .HasColumnType("decimal(18,6)"); b.Property("Remark") .HasMaxLength(3072) .HasColumnType("nvarchar(3072)") .HasColumnName("Remark"); - b.Property("ReturnQty") - .ValueGeneratedOnAdd() - .HasColumnType("decimal(18,6)") - .HasDefaultValue(0m); + b.Property("ReturnedQty") + .HasColumnType("decimal(18,6)"); - b.Property("Status") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + b.Property("ShippedQty") + .HasColumnType("decimal(18,6)"); b.Property("StdPackQty") .HasColumnType("decimal(18,6)"); - b.Property("SupplierBatch") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("SupplierBatch"); + b.Property("SupplierPackQty") + .HasColumnType("decimal(18,6)"); + + b.Property("SupplierPackUom") + .HasColumnType("nvarchar(max)"); b.Property("TenantId") .HasColumnType("uniqueidentifier") @@ -11134,42 +14949,45 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("nvarchar(64)") .HasColumnName("Uom"); - b.Property("WarehouseCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("WarehouseCode"); - b.HasKey("Id"); b.HasIndex("MasterID"); - b.HasIndex("Number", "ItemCode", "PackingCode", "Lot", "Status") + b.HasIndex("ItemCode", "Number", "PoLine") .IsUnique() - .HasFilter("[Lot] IS NOT NULL"); + .HasFilter("[PoLine] IS NOT NULL"); - b.ToTable("Store_ProductReceiptNoteDetail", (string)null); + b.ToTable("Store_PurchaseOrderDetail", (string)null); }); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ProductReceiptRequest", b => + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.PurchaseReceiptJob", b => { b.Property("Id") .HasColumnType("uniqueidentifier"); - b.Property("ActiveDate") + b.Property("AcceptTime") .HasColumnType("datetime2"); - b.Property("AutoAgree") - .HasColumnType("bit"); + b.Property("AcceptUserId") + .HasColumnType("uniqueidentifier"); - b.Property("AutoCompleteJob") - .HasColumnType("bit"); + b.Property("AcceptUserName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); - b.Property("AutoHandle") - .HasColumnType("bit"); + b.Property("AsnNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); - b.Property("AutoSubmit") - .HasColumnType("bit"); + b.Property("CompleteTime") + .HasColumnType("datetime2"); + + b.Property("CompleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CompleteUserName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); b.Property("ConcurrencyStamp") .IsConcurrencyToken() @@ -11185,13 +15003,29 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("CreatorId"); - b.Property("DirectCreateNote") - .HasColumnType("bit"); - b.Property("ExtraProperties") .HasColumnType("nvarchar(max)") .HasColumnName("ExtraProperties"); + b.Property("IsAutoComplete") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false); + + b.Property("JobDescription") + .HasMaxLength(1024) + .HasColumnType("nvarchar(1024)"); + + b.Property("JobStatus") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("JobType") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + b.Property("LastModificationTime") .HasColumnType("datetime2") .HasColumnName("LastModificationTime"); @@ -11203,34 +15037,47 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.Property("Number") .IsRequired() .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("Number"); + .HasColumnType("nvarchar(64)"); - b.Property("PlanDate") + b.Property("PlanArriveDate") .HasColumnType("datetime2"); - b.Property("ProdLine") + 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("ProductionPlanNumber") - .HasColumnType("nvarchar(max)"); - b.Property("Remark") .HasMaxLength(3072) .HasColumnType("nvarchar(3072)") .HasColumnName("Remark"); - b.Property("RequestStatus") - .IsRequired() + b.Property("RpNumber") .HasMaxLength(64) .HasColumnType("nvarchar(64)"); - b.Property("Shift") + b.Property("SupplierAddress") + .HasColumnType("nvarchar(max)"); + + b.Property("SupplierCode") + .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)"); - b.Property("Team") + b.Property("SupplierName") .HasMaxLength(64) .HasColumnType("nvarchar(64)"); @@ -11238,27 +15085,38 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("TenantId"); + b.Property("TimeWindow") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + b.Property("Type") .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)"); - b.Property("Worker") + b.Property("UpStreamJobNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("WarehouseCode") .HasColumnType("nvarchar(max)"); - b.Property("Workshop") + b.Property("WorkGroupCode") .HasMaxLength(64) .HasColumnType("nvarchar(64)"); + b.Property("Worker") + .HasColumnType("nvarchar(max)"); + b.HasKey("Id"); b.HasIndex("Number") .IsUnique(); - b.ToTable("Store_ProductReceiptRequest", (string)null); + b.ToTable("Job_PurchaseReceiptJob", (string)null); }); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ProductReceiptRequestDetail", b => + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.PurchaseReceiptJobDetail", b => { b.Property("Id") .HasColumnType("uniqueidentifier"); @@ -11266,10 +15124,6 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.Property("ArriveDate") .HasColumnType("datetime2"); - b.Property("BomVersion") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - b.Property("CreationTime") .HasColumnType("datetime2") .HasColumnName("CreationTime"); @@ -11278,9 +15132,69 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("CreatorId"); - b.Property("ExpireDate") + 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) @@ -11310,120 +15224,129 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("LastModifierId"); - b.Property("LocationArea") + b.Property("MassDefect") + .HasColumnType("nvarchar(max)"); + + b.Property("MasterID") + .HasColumnType("uniqueidentifier"); + + b.Property("Number") + .IsRequired() .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("LocationArea"); + .HasColumnType("nvarchar(64)"); - b.Property("LocationCode") + b.Property("PoLine") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("PoNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("PurchaseReceiptInspectStatus") .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("RecommendArriveDate") + .HasColumnType("datetime2"); + + b.Property("RecommendContainerCode") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("LocationCode"); + .HasColumnName("RecommendContainerCode"); - b.Property("LocationErpCode") - .IsRequired() + b.Property("RecommendExpireDate") + .HasColumnType("datetime2"); + + b.Property("RecommendLot") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("LocationErpCode"); + .HasColumnName("RecommendLot"); - b.Property("LocationGroup") + b.Property("RecommendPackingCode") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("LocationGroup"); + .HasColumnName("RecommendPackingCode"); - b.Property("Lot") + b.Property("RecommendProduceDate") + .HasColumnType("datetime2"); + + b.Property("RecommendQty") + .HasColumnType("decimal(18,6)"); + + b.Property("RecommendSupplierBatch") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("Lot"); + .HasColumnName("RecommendSupplierBatch"); - b.Property("MasterID") - .HasColumnType("uniqueidentifier"); + b.Property("RecommendToLocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendToLocationArea"); - b.Property("Number") - .IsRequired() + b.Property("RecommendToLocationCode") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("Number"); + .HasColumnName("RecommendToLocationCode"); - b.Property("ProduceDate") - .HasColumnType("datetime2"); + b.Property("RecommendToLocationErpCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendToLocationErpCode"); - b.Property("Qty") - .HasPrecision(18, 6) - .HasColumnType("decimal(18,6)") - .HasColumnName("Qty"); + b.Property("RecommendToLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendToLocationGroup"); - b.Property("RawArea") + b.Property("RecommendToWarehouseCode") .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendToWarehouseCode"); b.Property("Remark") .HasMaxLength(3072) .HasColumnType("nvarchar(3072)") .HasColumnName("Remark"); - b.Property("ReturnQty") - .ValueGeneratedOnAdd() - .HasColumnType("decimal(18,6)") - .HasDefaultValue(0m); + b.Property("Status") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); b.Property("StdPackQty") .HasColumnType("decimal(18,6)"); - b.Property("SupplierBatch") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("SupplierBatch"); + b.Property("SupplierPackQty") + .HasColumnType("decimal(18,6)"); + + b.Property("SupplierPackUom") + .HasColumnType("nvarchar(max)"); b.Property("TenantId") .HasColumnType("uniqueidentifier") .HasColumnName("TenantId"); b.Property("Uom") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("Uom"); - - b.Property("WarehouseCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("WarehouseCode"); + .HasColumnType("nvarchar(max)"); b.HasKey("Id"); b.HasIndex("MasterID"); - b.HasIndex("Number", "ItemCode", "LocationCode") - .IsUnique(); - - b.ToTable("Store_ProductReceiptRequestDetail", (string)null); + b.ToTable("Job_PurchaseReceiptJobDetail", (string)null); }); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ProductReceiveJob", b => + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.PurchaseReceiptNote", 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") + b.Property("ActiveDate") .HasColumnType("datetime2"); - b.Property("CompleteUserId") - .HasColumnType("uniqueidentifier"); - - b.Property("CompleteUserName") + b.Property("AsnNumber") .HasMaxLength(64) .HasColumnType("nvarchar(64)"); @@ -11442,27 +15365,13 @@ namespace Win_in.Sfs.Wms.Store.Migrations .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)"); + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); - b.Property("JobType") - .IsRequired() + b.Property("JobNumber") .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + .HasColumnType("nvarchar(64)") + .HasColumnName("JobNumber"); b.Property("LastModificationTime") .HasColumnType("datetime2") @@ -11475,67 +15384,83 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.Property("Number") .IsRequired() .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("Priority") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasDefaultValue(0); + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); - b.Property("PriorityIncrement") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasDefaultValue(0); + b.Property("PoNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); - b.Property("ProductionPlanNumber") + 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("Shift") + b.Property("RpNumber") .HasMaxLength(64) .HasColumnType("nvarchar(64)"); - b.Property("TenantId") - .HasColumnType("uniqueidentifier") - .HasColumnName("TenantId"); - - b.Property("UpStreamJobNumber") + b.Property("Status") + .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)"); - b.Property("WarehouseCode") + b.Property("SupplierAddress") .HasColumnType("nvarchar(max)"); - b.Property("WorkGroupCode") + b.Property("SupplierCode") + .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)"); - b.Property("Worker") + b.Property("SupplierName") .HasColumnType("nvarchar(max)"); - b.Property("Workshop") + 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.ToTable("Job_ProductReceiveJob", (string)null); + b.HasIndex("SupplierCode"); + + b.ToTable("Store_PurchaseReceiptNote", (string)null); }); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ProductReceiveJobDetail", b => + 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"); @@ -11544,6 +15469,12 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("CreatorId"); + b.Property("ExpireDate") + .HasColumnType("datetime2"); + + b.Property("FailedReason") + .HasColumnType("nvarchar(max)"); + b.Property("HandledArriveDate") .HasColumnType("datetime2"); @@ -11601,6 +15532,9 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("nvarchar(64)") .HasColumnName("HandledToWarehouseCode"); + b.Property("InspectPhotoJson") + .HasColumnType("nvarchar(max)"); + b.Property("ItemCode") .IsRequired() .HasMaxLength(64) @@ -11630,21 +15564,73 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("LastModifierId"); + b.Property("LocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationArea"); + + b.Property("LocationCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationCode"); + + b.Property("LocationErpCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationErpCode"); + + b.Property("LocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationGroup"); + + b.Property("Lot") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Lot"); + + b.Property("MassDefect") + .HasColumnType("nvarchar(max)"); + b.Property("MasterID") .HasColumnType("uniqueidentifier"); b.Property("Number") .IsRequired() .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); - b.Property("ProdLine") + 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("RawLocationCode") - .HasColumnType("nvarchar(max)"); + b.Property("Qty") + .HasPrecision(18, 6) + .HasColumnType("decimal(18,6)") + .HasColumnName("Qty"); b.Property("RecommendArriveDate") .HasColumnType("datetime2"); @@ -11698,39 +15684,182 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("nvarchar(64)") .HasColumnName("RecommendToLocationGroup"); - b.Property("RecommendToWarehouseCode") + 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)") - .HasColumnName("RecommendToWarehouseCode"); + .HasColumnType("nvarchar(64)"); b.Property("Remark") .HasMaxLength(3072) .HasColumnType("nvarchar(3072)") .HasColumnName("Remark"); - b.Property("Status") + b.Property("RequestStatus") .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)"); - b.Property("StdPackQty") - .HasColumnType("decimal(18,6)"); + b.Property("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("Uom") + 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("MasterID"); + b.HasIndex("Number") + .IsUnique(); - b.ToTable("Job_ProductReceiveJobDetail", (string)null); + b.HasIndex("SupplierCode"); + + b.ToTable("Store_PurchaseReceiptRequest", (string)null); }); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ProductRecycleMaterialDetail", b => + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.PurchaseReceiptRequestDetail", b => { b.Property("Id") .HasColumnType("uniqueidentifier"); @@ -11738,15 +15867,14 @@ namespace Win_in.Sfs.Wms.Store.Migrations 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("ConvertRate") + .HasColumnType("decimal(18,6)"); + b.Property("CreationTime") .HasColumnType("datetime2") .HasColumnName("CreationTime"); @@ -11787,28 +15915,6 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("LastModifierId"); - b.Property("LocationArea") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("LocationArea"); - - b.Property("LocationCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("LocationCode"); - - b.Property("LocationErpCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("LocationErpCode"); - - b.Property("LocationGroup") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("LocationGroup"); - b.Property("Lot") .HasMaxLength(64) .HasColumnType("nvarchar(64)") @@ -11829,48 +15935,32 @@ namespace Win_in.Sfs.Wms.Store.Migrations .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") + b.Property("PoLine") .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + .HasColumnType("nvarchar(64)") + .HasColumnName("PoLine"); - b.Property("ProductLot") + b.Property("PoNumber") .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + .HasColumnType("nvarchar(64)") + .HasColumnName("PoNumber"); - b.Property("ProductPackingCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + 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("Status") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - b.Property("StdPackQty") .HasColumnType("decimal(18,6)"); @@ -11879,6 +15969,12 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("nvarchar(64)") .HasColumnName("SupplierBatch"); + b.Property("SupplierPackQty") + .HasColumnType("decimal(18,6)"); + + b.Property("SupplierPackUom") + .HasColumnType("nvarchar(max)"); + b.Property("TenantId") .HasColumnType("uniqueidentifier") .HasColumnName("TenantId"); @@ -11889,29 +15985,45 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("nvarchar(64)") .HasColumnName("Uom"); - b.Property("WarehouseCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("WarehouseCode"); - b.HasKey("Id"); b.HasIndex("MasterID"); - b.HasIndex("Number", "ProductItemCode", "ItemCode"); + b.HasIndex("Number", "PackingCode") + .IsUnique(); - b.ToTable("Store_ProductRecycleMaterialDetail", (string)null); + b.ToTable("Store_PurchaseReceiptRequestDetail", (string)null); }); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ProductRecycleNote", b => + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.PurchaseReturnJob", b => { b.Property("Id") .HasColumnType("uniqueidentifier"); - b.Property("ActiveDate") + b.Property("AcceptTime") + .HasColumnType("datetime2"); + + b.Property("AcceptUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("AcceptUserName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("AsnNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("CompleteTime") .HasColumnType("datetime2"); + b.Property("CompleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CompleteUserName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + b.Property("ConcurrencyStamp") .IsConcurrencyToken() .HasMaxLength(40) @@ -11930,6 +16042,25 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("nvarchar(max)") .HasColumnName("ExtraProperties"); + b.Property("IsAutoComplete") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false); + + b.Property("JobDescription") + .HasMaxLength(1024) + .HasColumnType("nvarchar(1024)"); + + b.Property("JobStatus") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("JobType") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + b.Property("LastModificationTime") .HasColumnType("datetime2") .HasColumnName("LastModificationTime"); @@ -11941,21 +16072,47 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.Property("Number") .IsRequired() .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("Number"); + .HasColumnType("nvarchar(64)"); - b.Property("RecycleTime") - .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("PurchaseReturnRequestNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); b.Property("Remark") .HasMaxLength(3072) .HasColumnType("nvarchar(3072)") .HasColumnName("Remark"); - b.Property("RequestNumber") + b.Property("ReturnReason") .HasColumnType("nvarchar(max)"); - b.Property("Shift") + 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)"); @@ -11963,48 +16120,97 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("TenantId"); - b.Property("Worker") + b.Property("UpStreamJobNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("WarehouseCode") .HasColumnType("nvarchar(max)"); - b.Property("Workshop") + b.Property("WorkGroupCode") .HasMaxLength(64) .HasColumnType("nvarchar(64)"); + b.Property("Worker") + .HasColumnType("nvarchar(max)"); + b.HasKey("Id"); b.HasIndex("Number") .IsUnique(); - b.ToTable("Store_ProductRecycleNote", (string)null); + b.ToTable("Job_PurchaseReturnJob", (string)null); }); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ProductRecycleNoteDetail", b => - { - b.Property("Id") - .HasColumnType("uniqueidentifier"); + 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("ArriveDate") - .HasColumnType("datetime2"); + b.Property("HandledFromLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledFromLocationGroup"); - b.Property("ContainerCode") + b.Property("HandledFromWarehouseCode") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("ContainerCode"); + .HasColumnName("HandledFromWarehouseCode"); - b.Property("CreationTime") - .HasColumnType("datetime2") - .HasColumnName("CreationTime"); + b.Property("HandledLot") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledLot"); - b.Property("CreatorId") - .HasColumnType("uniqueidentifier") - .HasColumnName("CreatorId"); + b.Property("HandledPackingCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledPackingCode"); - b.Property("ExpireDate") + b.Property("HandledProduceDate") .HasColumnType("datetime2"); - b.Property("ExtraProperties") - .HasColumnType("nvarchar(max)") - .HasColumnName("ExtraProperties"); + b.Property("HandledQty") + .HasColumnType("decimal(18,6)"); + + b.Property("HandledSupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledSupplierBatch"); b.Property("ItemCode") .IsRequired() @@ -12035,59 +16241,81 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("LastModifierId"); - b.Property("LocationArea") + b.Property("MasterID") + .HasColumnType("uniqueidentifier"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + 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("LocationArea"); + .HasColumnName("RecommendContainerCode"); - b.Property("LocationCode") - .IsRequired() + b.Property("RecommendExpireDate") + .HasColumnType("datetime2"); + + b.Property("RecommendFromLocationArea") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("LocationCode"); + .HasColumnName("RecommendFromLocationArea"); - b.Property("LocationErpCode") - .IsRequired() + b.Property("RecommendFromLocationCode") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("LocationErpCode"); + .HasColumnName("RecommendFromLocationCode"); - b.Property("LocationGroup") + b.Property("RecommendFromLocationErpCode") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("LocationGroup"); + .HasColumnName("RecommendFromLocationErpCode"); - b.Property("Lot") + b.Property("RecommendFromLocationGroup") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("Lot"); + .HasColumnName("RecommendFromLocationGroup"); - b.Property("MasterID") - .HasColumnType("uniqueidentifier"); + b.Property("RecommendFromWarehouseCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendFromWarehouseCode"); - b.Property("Number") - .IsRequired() + b.Property("RecommendLot") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("Number"); + .HasColumnName("RecommendLot"); - b.Property("PackingCode") - .IsRequired() + b.Property("RecommendPackingCode") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("PackingCode"); + .HasColumnName("RecommendPackingCode"); - b.Property("ProduceDate") + b.Property("RecommendProduceDate") .HasColumnType("datetime2"); - b.Property("Qty") - .HasPrecision(18, 6) - .HasColumnType("decimal(18,6)") - .HasColumnName("Qty"); + b.Property("RecommendQty") + .HasColumnType("decimal(18,6)"); - b.Property("ReasonCode") + b.Property("RecommendSupplierBatch") .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendSupplierBatch"); b.Property("Remark") .HasMaxLength(3072) @@ -12102,38 +16330,21 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.Property("StdPackQty") .HasColumnType("decimal(18,6)"); - b.Property("SupplierBatch") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("SupplierBatch"); - b.Property("TenantId") .HasColumnType("uniqueidentifier") .HasColumnName("TenantId"); b.Property("Uom") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("Uom"); - - b.Property("WarehouseCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("WarehouseCode"); + .HasColumnType("nvarchar(max)"); b.HasKey("Id"); b.HasIndex("MasterID"); - b.HasIndex("Number", "ItemCode") - .IsUnique(); - - b.ToTable("Store_ProductRecycleNoteDetail", (string)null); + b.ToTable("Job_PurchaseReturnJobDetail", (string)null); }); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ProductRecycleRequest", b => + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.PurchaseReturnNote", b => { b.Property("Id") .HasColumnType("uniqueidentifier"); @@ -12141,17 +16352,9 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.Property("ActiveDate") .HasColumnType("datetime2"); - b.Property("AutoAgree") - .HasColumnType("bit"); - - b.Property("AutoCompleteJob") - .HasColumnType("bit"); - - b.Property("AutoHandle") - .HasColumnType("bit"); - - b.Property("AutoSubmit") - .HasColumnType("bit"); + b.Property("AsnNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); b.Property("ConcurrencyStamp") .IsConcurrencyToken() @@ -12167,13 +16370,15 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("CreatorId"); - b.Property("DirectCreateNote") - .HasColumnType("bit"); - b.Property("ExtraProperties") .HasColumnType("nvarchar(max)") .HasColumnName("ExtraProperties"); + b.Property("JobNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("JobNumber"); + b.Property("LastModificationTime") .HasColumnType("datetime2") .HasColumnName("LastModificationTime"); @@ -12188,17 +16393,40 @@ namespace Win_in.Sfs.Wms.Store.Migrations .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("RequestStatus") + b.Property("ReturnReason") + .HasColumnType("nvarchar(max)"); + + b.Property("ReturnTime") + .HasColumnType("datetime2"); + + b.Property("ReturnType") .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)"); - b.Property("Shift") + 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)"); @@ -12209,38 +16437,94 @@ namespace Win_in.Sfs.Wms.Store.Migrations 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); + b.ToTable("Store_PurchaseReturnNote", (string)null); }); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ProductRecycleRequestDetail", b => + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.PurchaseReturnNoteDetail", b => { b.Property("Id") .HasColumnType("uniqueidentifier"); - b.Property("BomVersion") + 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)"); + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledLot"); - b.Property("CreationTime") - .HasColumnType("datetime2") - .HasColumnName("CreationTime"); + b.Property("HandledPackingCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledPackingCode"); - b.Property("CreatorId") - .HasColumnType("uniqueidentifier") - .HasColumnName("CreatorId"); + b.Property("HandledProduceDate") + .HasColumnType("datetime2"); - b.Property("ExtraProperties") - .HasColumnType("nvarchar(max)") - .HasColumnName("ExtraProperties"); + b.Property("HandledQty") + .HasColumnType("decimal(18,6)"); + + b.Property("HandledSupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledSupplierBatch"); b.Property("ItemCode") .IsRequired() @@ -12293,6 +16577,11 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("nvarchar(64)") .HasColumnName("LocationGroup"); + b.Property("Lot") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Lot"); + b.Property("MasterID") .HasColumnType("uniqueidentifier"); @@ -12302,30 +16591,90 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("nvarchar(64)") .HasColumnName("Number"); + b.Property("PackingCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("PackingCode"); + + b.Property("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("RawLocationArea") + b.Property("Reason") .HasMaxLength(64) .HasColumnType("nvarchar(64)"); - b.Property("RawLocationCode") + b.Property("RecommendArriveDate") + .HasColumnType("datetime2"); + + b.Property("RecommendContainerCode") .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendContainerCode"); - b.Property("RawLocationErpCode") + b.Property("RecommendExpireDate") + .HasColumnType("datetime2"); + + b.Property("RecommendFromLocationArea") .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendFromLocationArea"); - b.Property("RawLocationGroup") + b.Property("RecommendFromLocationCode") .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendFromLocationCode"); - b.Property("RawWarehouseCode") + b.Property("RecommendFromLocationErpCode") .HasMaxLength(64) - .HasColumnType("nvarchar(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) @@ -12337,6 +16686,14 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasMaxLength(64) .HasColumnType("nvarchar(64)"); + b.Property("StdPackQty") + .HasColumnType("decimal(18,6)"); + + b.Property("SupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("SupplierBatch"); + b.Property("TenantId") .HasColumnType("uniqueidentifier") .HasColumnName("TenantId"); @@ -12357,13 +16714,13 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.HasIndex("MasterID"); - b.HasIndex("Number", "ItemCode") + b.HasIndex("Number", "PackingCode") .IsUnique(); - b.ToTable("Store_ProductRecycleRequestDetail", (string)null); + b.ToTable("Store_PurchaseReturnNoteDetail", (string)null); }); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.PurchaseOrder", b => + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.PurchaseReturnRequest", b => { b.Property("Id") .HasColumnType("uniqueidentifier"); @@ -12371,24 +16728,28 @@ namespace Win_in.Sfs.Wms.Store.Migrations 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("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"); @@ -12397,18 +16758,13 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("CreatorId"); - b.Property("DueDate") - .HasColumnType("datetime2"); + b.Property("DirectCreateNote") + .HasColumnType("bit"); b.Property("ExtraProperties") .HasColumnType("nvarchar(max)") .HasColumnName("ExtraProperties"); - b.Property("IsConsignment") - .ValueGeneratedOnAdd() - .HasColumnType("bit") - .HasDefaultValue(false); - b.Property("LastModificationTime") .HasColumnType("datetime2") .HasColumnName("LastModificationTime"); @@ -12423,15 +16779,7 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("nvarchar(64)") .HasColumnName("Number"); - b.Property("OrderDate") - .HasColumnType("datetime2"); - - b.Property("OrderStatus") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("PoType") + b.Property("PoNumber") .HasMaxLength(64) .HasColumnType("nvarchar(64)"); @@ -12440,29 +16788,31 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("nvarchar(3072)") .HasColumnName("Remark"); - b.Property("SupplierAddress") - .HasColumnType("nvarchar(max)"); + b.Property("RequestStatus") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); - b.Property("SupplierCode") + b.Property("ReturnTime") + .HasColumnType("datetime2"); + + b.Property("ReturnType") + .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)"); - b.Property("SupplierName") - .HasColumnType("nvarchar(max)"); + b.Property("RpNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); - b.Property("TaxRate") - .ValueGeneratedOnAdd() - .HasColumnType("decimal(18,6)") - .HasDefaultValue(0m); + b.Property("SupplierCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); b.Property("TenantId") .HasColumnType("uniqueidentifier") .HasColumnName("TenantId"); - b.Property("Version") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - b.Property("Worker") .HasColumnType("nvarchar(max)"); @@ -12471,18 +16821,21 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.HasIndex("Number") .IsUnique(); - b.ToTable("Store_PurchaseOrder", (string)null); + b.ToTable("Store_PurchaseReturnRequest", (string)null); }); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.PurchaseOrderDetail", b => + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.PurchaseReturnRequestDetail", b => { b.Property("Id") .HasColumnType("uniqueidentifier"); - b.Property("ConvertRate") - .ValueGeneratedOnAdd() - .HasColumnType("decimal(18,6)") - .HasDefaultValue(1m); + b.Property("ArriveDate") + .HasColumnType("datetime2"); + + b.Property("ContainerCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ContainerCode"); b.Property("CreationTime") .HasColumnType("datetime2") @@ -12492,17 +16845,9 @@ namespace Win_in.Sfs.Wms.Store.Migrations .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) @@ -12532,17 +16877,32 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("LastModifierId"); - b.Property("LineStatus") + b.Property("LocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationArea"); + + b.Property("LocationCode") .IsRequired() .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationCode"); b.Property("LocationErpCode") + .IsRequired() .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationErpCode"); + + b.Property("LocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationGroup"); b.Property("Lot") - .HasColumnType("nvarchar(max)"); + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Lot"); b.Property("MasterID") .HasColumnType("uniqueidentifier"); @@ -12553,56 +16913,47 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("nvarchar(64)") .HasColumnName("Number"); - b.Property("OrderRemark") - .HasColumnType("nvarchar(max)"); - - b.Property("PlanArriveDate") - .HasColumnType("datetime2"); - - b.Property("PlanUserCode") - .HasColumnType("nvarchar(max)"); + b.Property("PackingCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("PackingCode"); b.Property("PoLine") .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("ProduceDate") - .HasColumnType("datetime2"); + .HasColumnType("nvarchar(64)") + .HasColumnName("PoLine"); - b.Property("ProjectCode") + b.Property("PoNumber") .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + .HasColumnType("nvarchar(64)") + .HasColumnName("PoNumber"); - b.Property("PutAwayQty") - .HasColumnType("decimal(18,6)"); + b.Property("ProduceDate") + .HasColumnType("datetime2"); 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("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("SupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("SupplierBatch"); b.Property("TenantId") .HasColumnType("uniqueidentifier") @@ -12614,18 +16965,23 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("nvarchar(64)") .HasColumnName("Uom"); + b.Property("WarehouseCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("WarehouseCode"); + b.HasKey("Id"); b.HasIndex("MasterID"); - b.HasIndex("ItemCode", "Number", "PoLine") - .IsUnique() - .HasFilter("[PoLine] IS NOT NULL"); + b.HasIndex("Number", "PackingCode") + .IsUnique(); - b.ToTable("Store_PurchaseOrderDetail", (string)null); + b.ToTable("Store_PurchaseReturnRequestDetail", (string)null); }); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.PurchaseReceiptJob", b => + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.PutawayJob", b => { b.Property("Id") .HasColumnType("uniqueidentifier"); @@ -12672,6 +17028,10 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("nvarchar(max)") .HasColumnName("ExtraProperties"); + b.Property("InspectNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + b.Property("IsAutoComplete") .ValueGeneratedOnAdd() .HasColumnType("bit") @@ -12704,9 +17064,6 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasMaxLength(64) .HasColumnType("nvarchar(64)"); - b.Property("PlanArriveDate") - .HasColumnType("datetime2"); - b.Property("PoNumber") .HasMaxLength(64) .HasColumnType("nvarchar(64)"); @@ -12721,10 +17078,23 @@ namespace Win_in.Sfs.Wms.Store.Migrations .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)") @@ -12734,15 +17104,7 @@ namespace Win_in.Sfs.Wms.Store.Migrations .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)"); @@ -12750,10 +17112,6 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("TenantId"); - b.Property("TimeWindow") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - b.Property("Type") .IsRequired() .HasMaxLength(64) @@ -12778,17 +17136,14 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.HasIndex("Number") .IsUnique(); - b.ToTable("Job_PurchaseReceiptJob", (string)null); + b.ToTable("Job_PutawayJob", (string)null); }); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.PurchaseReceiptJobDetail", b => + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.PutawayJobDetail", b => { b.Property("Id") .HasColumnType("uniqueidentifier"); - b.Property("ArriveDate") - .HasColumnType("datetime2"); - b.Property("CreationTime") .HasColumnType("datetime2") .HasColumnName("CreationTime"); @@ -12797,8 +17152,25 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("CreatorId"); - b.Property("FailedReason") - .HasColumnType("nvarchar(max)"); + 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"); @@ -12857,9 +17229,6 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("nvarchar(64)") .HasColumnName("HandledToWarehouseCode"); - b.Property("InspectPhotoJson") - .HasColumnType("nvarchar(max)"); - b.Property("ItemCode") .IsRequired() .HasMaxLength(64) @@ -12889,9 +17258,6 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("LastModifierId"); - b.Property("MassDefect") - .HasColumnType("nvarchar(max)"); - b.Property("MasterID") .HasColumnType("uniqueidentifier"); @@ -12908,10 +17274,10 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasMaxLength(64) .HasColumnType("nvarchar(64)"); - 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"); @@ -12983,27 +17349,24 @@ namespace Win_in.Sfs.Wms.Store.Migrations 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)"); + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Uom"); b.HasKey("Id"); b.HasIndex("MasterID"); - b.ToTable("Job_PurchaseReceiptJobDetail", (string)null); + b.ToTable("Job_PutawayJobDetail", (string)null); }); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.PurchaseReceiptNote", b => + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.PutawayNote", b => { b.Property("Id") .HasColumnType("uniqueidentifier"); @@ -13033,6 +17396,10 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("nvarchar(max)") .HasColumnName("ExtraProperties"); + b.Property("InspectNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + b.Property("JobNumber") .HasMaxLength(64) .HasColumnType("nvarchar(64)") @@ -13052,7 +17419,7 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("nvarchar(64)") .HasColumnName("Number"); - b.Property("PoNumber") + b.Property("ProductReceiptNumber") .HasMaxLength(64) .HasColumnType("nvarchar(64)"); @@ -13060,8 +17427,9 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasMaxLength(64) .HasColumnType("nvarchar(64)"); - b.Property("ReceiveTime") - .HasColumnType("datetime2"); + b.Property("ReceiptNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); b.Property("Remark") .HasMaxLength(3072) @@ -13072,22 +17440,10 @@ namespace Win_in.Sfs.Wms.Store.Migrations .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"); @@ -13097,9 +17453,6 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasMaxLength(64) .HasColumnType("nvarchar(64)"); - b.Property("WarehouseCode") - .HasColumnType("nvarchar(max)"); - b.Property("Worker") .HasColumnType("nvarchar(max)"); @@ -13108,12 +17461,10 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.HasIndex("Number") .IsUnique(); - b.HasIndex("SupplierCode"); - - b.ToTable("Store_PurchaseReceiptNote", (string)null); + b.ToTable("Store_PutawayNote", (string)null); }); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.PurchaseReceiptNoteDetail", b => + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.PutawayNoteDetail", b => { b.Property("Id") .HasColumnType("uniqueidentifier"); @@ -13121,11 +17472,6 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.Property("ArriveDate") .HasColumnType("datetime2"); - b.Property("ContainerCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ContainerCode"); - b.Property("CreationTime") .HasColumnType("datetime2") .HasColumnName("CreationTime"); @@ -13137,9 +17483,48 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.Property("ExpireDate") .HasColumnType("datetime2"); - b.Property("FailedReason") + 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"); @@ -13197,67 +17582,39 @@ namespace Win_in.Sfs.Wms.Store.Migrations .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() + + b.Property("ItemDesc1") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("LocationCode"); + .HasColumnName("ItemDesc1"); - b.Property("LocationErpCode") - .IsRequired() + b.Property("ItemDesc2") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("LocationErpCode"); + .HasColumnName("ItemDesc2"); - b.Property("LocationGroup") + b.Property("ItemName") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("LocationGroup"); + .HasColumnName("ItemName"); - b.Property("Lot") + b.Property("JobNumber") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("Lot"); + .HasColumnName("JobNumber"); - b.Property("MassDefect") - .HasColumnType("nvarchar(max)"); + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); b.Property("MasterID") .HasColumnType("uniqueidentifier"); @@ -13268,12 +17625,6 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("nvarchar(64)") .HasColumnName("Number"); - b.Property("PackingCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("PackingCode"); - b.Property("PoLine") .HasMaxLength(64) .HasColumnType("nvarchar(64)") @@ -13287,11 +17638,6 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.Property("ProduceDate") .HasColumnType("datetime2"); - b.Property("PurchaseReceiptInspectStatus") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - b.Property("Qty") .HasPrecision(18, 6) .HasColumnType("decimal(18,6)") @@ -13359,290 +17705,59 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("nvarchar(3072)") .HasColumnName("Remark"); - b.Property("Status") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - b.Property("StdPackQty") .HasColumnType("decimal(18,6)"); b.Property("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"); + .HasColumnName("SupplierBatch"); - b.Property("MasterID") - .HasColumnType("uniqueidentifier"); + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); - b.Property("Number") - .IsRequired() + b.Property("ToContainerCode") + .HasColumnType("nvarchar(max)"); + + b.Property("ToLocationArea") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("Number"); + .HasColumnName("ToLocationArea"); - b.Property("PackingCode") + b.Property("ToLocationCode") .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("PackingCode"); + .HasColumnName("ToLocationCode"); - b.Property("PoLine") + b.Property("ToLocationErpCode") + .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("PoLine"); + .HasColumnName("ToLocationErpCode"); - b.Property("PoNumber") + b.Property("ToLocationGroup") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("PoNumber"); - - b.Property("ProduceDate") - .HasColumnType("datetime2"); - - b.Property("Qty") - .HasPrecision(18, 6) - .HasColumnType("decimal(18,6)") - .HasColumnName("Qty"); + .HasColumnName("ToLocationGroup"); - b.Property("RecommendErpCode") + b.Property("ToLot") .HasColumnType("nvarchar(max)"); - b.Property("Remark") - .HasMaxLength(3072) - .HasColumnType("nvarchar(3072)") - .HasColumnName("Remark"); + b.Property("ToPackingCode") + .HasColumnType("nvarchar(450)"); - b.Property("StdPackQty") - .HasColumnType("decimal(18,6)"); + b.Property("ToStatus") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); - b.Property("SupplierBatch") + b.Property("ToWarehouseCode") + .IsRequired() .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"); + .HasColumnName("ToWarehouseCode"); b.Property("Uom") .IsRequired() @@ -13654,40 +17769,35 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.HasIndex("MasterID"); - b.HasIndex("Number", "PackingCode") - .IsUnique(); + b.HasIndex("Number", "FromPackingCode", "FromLocationCode", "ToLocationCode", "ToPackingCode") + .IsUnique() + .HasFilter("[FromPackingCode] IS NOT NULL AND [ToPackingCode] IS NOT NULL"); - b.ToTable("Store_PurchaseReceiptRequestDetail", (string)null); + b.ToTable("Store_PutawayNoteDetail", (string)null); }); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.PurchaseReturnJob", b => + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.PutawayRequest", b => { b.Property("Id") .HasColumnType("uniqueidentifier"); - b.Property("AcceptTime") + b.Property("ActiveDate") .HasColumnType("datetime2"); - b.Property("AcceptUserId") - .HasColumnType("uniqueidentifier"); - - b.Property("AcceptUserName") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - b.Property("AsnNumber") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + .HasColumnType("nvarchar(max)"); - b.Property("CompleteTime") - .HasColumnType("datetime2"); + b.Property("AutoAgree") + .HasColumnType("bit"); - b.Property("CompleteUserId") - .HasColumnType("uniqueidentifier"); + b.Property("AutoCompleteJob") + .HasColumnType("bit"); - b.Property("CompleteUserName") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + b.Property("AutoHandle") + .HasColumnType("bit"); + + b.Property("AutoSubmit") + .HasColumnType("bit"); b.Property("ConcurrencyStamp") .IsConcurrencyToken() @@ -13703,28 +17813,15 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("CreatorId"); + b.Property("DirectCreateNote") + .HasColumnType("bit"); + b.Property("ExtraProperties") .HasColumnType("nvarchar(max)") .HasColumnName("ExtraProperties"); - b.Property("IsAutoComplete") - .ValueGeneratedOnAdd() - .HasColumnType("bit") - .HasDefaultValue(false); - - b.Property("JobDescription") - .HasMaxLength(1024) - .HasColumnType("nvarchar(1024)"); - - b.Property("JobStatus") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("JobType") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + b.Property("InspectNumber") + .HasColumnType("nvarchar(max)"); b.Property("LastModificationTime") .HasColumnType("datetime2") @@ -13737,62 +17834,51 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.Property("Number") .IsRequired() .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); b.Property("PoNumber") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + .HasColumnType("nvarchar(max)"); - b.Property("Priority") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasDefaultValue(0); + b.Property("ProductReceiptNumber") + .HasColumnType("nvarchar(max)"); - b.Property("PriorityIncrement") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasDefaultValue(0); + b.Property("PurchaseReceiptRequestNumber") + .HasColumnType("nvarchar(max)"); - b.Property("PurchaseReturnRequestNumber") + 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("ReturnReason") + b.Property("RequestNumber") .HasColumnType("nvarchar(max)"); - b.Property("ReturnTime") - .HasColumnType("datetime2"); - - b.Property("ReturnType") + b.Property("RequestStatus") .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)"); b.Property("RpNumber") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + .HasColumnType("nvarchar(max)"); b.Property("SupplierCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + .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") + b.Property("Type") + .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)"); @@ -13804,14 +17890,17 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.HasIndex("Number") .IsUnique(); - b.ToTable("Job_PurchaseReturnJob", (string)null); + b.ToTable("Store_PutawayRequest", (string)null); }); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.PurchaseReturnJobDetail", b => + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.PutawayRequestDetail", b => { b.Property("Id") .HasColumnType("uniqueidentifier"); + b.Property("ArriveDate") + .HasColumnType("datetime2"); + b.Property("CreationTime") .HasColumnType("datetime2") .HasColumnName("CreationTime"); @@ -13820,63 +17909,54 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("CreatorId"); - b.Property("HandledArriveDate") + b.Property("ExpireDate") .HasColumnType("datetime2"); - b.Property("HandledContainerCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("HandledContainerCode"); - - b.Property("HandledExpireDate") - .HasColumnType("datetime2"); + b.Property("FromContainerCode") + .HasColumnType("nvarchar(max)"); - b.Property("HandledFromLocationArea") + b.Property("FromLocationArea") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("HandledFromLocationArea"); + .HasColumnName("FromLocationArea"); - b.Property("HandledFromLocationCode") + b.Property("FromLocationCode") + .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("HandledFromLocationCode"); + .HasColumnName("FromLocationCode"); - b.Property("HandledFromLocationErpCode") + b.Property("FromLocationErpCode") + .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("HandledFromLocationErpCode"); + .HasColumnName("FromLocationErpCode"); - b.Property("HandledFromLocationGroup") + b.Property("FromLocationGroup") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("HandledFromLocationGroup"); + .HasColumnName("FromLocationGroup"); - b.Property("HandledFromWarehouseCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("HandledFromWarehouseCode"); + b.Property("FromLot") + .HasColumnType("nvarchar(max)"); - b.Property("HandledLot") + b.Property("FromPackingCode") + .HasColumnType("nvarchar(max)"); + + b.Property("FromStatus") + .IsRequired() .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("HandledLot"); + .HasColumnType("nvarchar(64)"); - b.Property("HandledPackingCode") + b.Property("FromWarehouseCode") + .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("HandledPackingCode"); - - b.Property("HandledProduceDate") - .HasColumnType("datetime2"); + .HasColumnName("FromWarehouseCode"); - b.Property("HandledQty") + b.Property("InventoryQty") .HasColumnType("decimal(18,6)"); - b.Property("HandledSupplierBatch") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("HandledSupplierBatch"); - b.Property("ItemCode") .IsRequired() .HasMaxLength(64) @@ -13912,104 +17992,100 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.Property("Number") .IsRequired() .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); b.Property("PoLine") .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + .HasColumnType("nvarchar(64)") + .HasColumnName("PoLine"); b.Property("PoNumber") .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("Reason") - .HasColumnType("nvarchar(max)"); + .HasColumnType("nvarchar(64)") + .HasColumnName("PoNumber"); - b.Property("RecommendArriveDate") + b.Property("ProduceDate") .HasColumnType("datetime2"); - b.Property("RecommendContainerCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendContainerCode"); + b.Property("Qty") + .HasPrecision(18, 6) + .HasColumnType("decimal(18,6)") + .HasColumnName("Qty"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); - b.Property("RecommendExpireDate") - .HasColumnType("datetime2"); + b.Property("StdPackQty") + .HasColumnType("decimal(18,6)"); - b.Property("RecommendFromLocationArea") + b.Property("SupplierBatch") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendFromLocationArea"); + .HasColumnName("SupplierBatch"); - b.Property("RecommendFromLocationCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendFromLocationCode"); + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); - b.Property("RecommendFromLocationErpCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendFromLocationErpCode"); + b.Property("ToContainerCode") + .HasColumnType("nvarchar(max)"); - b.Property("RecommendFromLocationGroup") + b.Property("ToLocationArea") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendFromLocationGroup"); + .HasColumnName("ToLocationArea"); - b.Property("RecommendFromWarehouseCode") + b.Property("ToLocationCode") + .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendFromWarehouseCode"); + .HasColumnName("ToLocationCode"); - b.Property("RecommendLot") + b.Property("ToLocationErpCode") + .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendLot"); + .HasColumnName("ToLocationErpCode"); - b.Property("RecommendPackingCode") + b.Property("ToLocationGroup") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendPackingCode"); - - b.Property("RecommendProduceDate") - .HasColumnType("datetime2"); - - b.Property("RecommendQty") - .HasColumnType("decimal(18,6)"); + .HasColumnName("ToLocationGroup"); - b.Property("RecommendSupplierBatch") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendSupplierBatch"); + b.Property("ToLot") + .HasColumnType("nvarchar(max)"); - b.Property("Remark") - .HasMaxLength(3072) - .HasColumnType("nvarchar(3072)") - .HasColumnName("Remark"); + b.Property("ToPackingCode") + .HasColumnType("nvarchar(max)"); - b.Property("Status") + b.Property("ToStatus") .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)"); - b.Property("StdPackQty") - .HasColumnType("decimal(18,6)"); - - b.Property("TenantId") - .HasColumnType("uniqueidentifier") - .HasColumnName("TenantId"); + b.Property("ToWarehouseCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToWarehouseCode"); b.Property("Uom") - .HasColumnType("nvarchar(max)"); + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Uom"); b.HasKey("Id"); b.HasIndex("MasterID"); - b.ToTable("Job_PurchaseReturnJobDetail", (string)null); + b.ToTable("Store_PutawayRequestDetail", (string)null); }); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.PurchaseReturnNote", b => + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ReceiptAbnormalNote", b => { b.Property("Id") .HasColumnType("uniqueidentifier"); @@ -14018,6 +18094,7 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("datetime2"); b.Property("AsnNumber") + .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)"); @@ -14039,11 +18116,6 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("nvarchar(max)") .HasColumnName("ExtraProperties"); - b.Property("JobNumber") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("JobNumber"); - b.Property("LastModificationTime") .HasColumnType("datetime2") .HasColumnName("LastModificationTime"); @@ -14058,11 +18130,8 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("nvarchar(64)") .HasColumnName("Number"); - b.Property("PoNumber") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("PurchaseReturnRequestNumber") + b.Property("ReceiptNumber") + .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)"); @@ -14071,27 +18140,8 @@ namespace Win_in.Sfs.Wms.Store.Migrations .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") + .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)"); @@ -14104,17 +18154,24 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.HasKey("Id"); - b.HasIndex("Number") + b.HasIndex("SupplierCode"); + + b.HasIndex("AsnNumber", "Number", "SupplierCode", "ReceiptNumber") .IsUnique(); - b.ToTable("Store_PurchaseReturnNote", (string)null); + b.ToTable("Store_ReceiptAbnormalNote", (string)null); }); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.PurchaseReturnNoteDetail", b => + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ReceiptAbnormalNoteDetail", b => { b.Property("Id") .HasColumnType("uniqueidentifier"); + b.Property("AbnormalType") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + b.Property("ArriveDate") .HasColumnType("datetime2"); @@ -14134,63 +18191,6 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.Property("ExpireDate") .HasColumnType("datetime2"); - b.Property("HandledArriveDate") - .HasColumnType("datetime2"); - - b.Property("HandledContainerCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("HandledContainerCode"); - - b.Property("HandledExpireDate") - .HasColumnType("datetime2"); - - b.Property("HandledFromLocationArea") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("HandledFromLocationArea"); - - b.Property("HandledFromLocationCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("HandledFromLocationCode"); - - b.Property("HandledFromLocationErpCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("HandledFromLocationErpCode"); - - b.Property("HandledFromLocationGroup") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("HandledFromLocationGroup"); - - b.Property("HandledFromWarehouseCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("HandledFromWarehouseCode"); - - b.Property("HandledLot") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("HandledLot"); - - b.Property("HandledPackingCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("HandledPackingCode"); - - b.Property("HandledProduceDate") - .HasColumnType("datetime2"); - - b.Property("HandledQty") - .HasColumnType("decimal(18,6)"); - - b.Property("HandledSupplierBatch") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("HandledSupplierBatch"); - b.Property("ItemCode") .IsRequired() .HasMaxLength(64) @@ -14250,96 +18250,33 @@ namespace Win_in.Sfs.Wms.Store.Migrations 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") + b.Property("Number") + .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendFromWarehouseCode"); + .HasColumnName("Number"); - b.Property("RecommendLot") + b.Property("PackingCode") + .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendLot"); + .HasColumnName("PackingCode"); - b.Property("RecommendPackingCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendPackingCode"); + b.Property("Photos") + .HasColumnType("nvarchar(max)"); - b.Property("RecommendProduceDate") + b.Property("ProduceDate") .HasColumnType("datetime2"); - b.Property("RecommendQty") - .HasColumnType("decimal(18,6)"); + b.Property("Qty") + .HasPrecision(18, 6) + .HasColumnType("decimal(18,6)") + .HasColumnName("Qty"); - b.Property("RecommendSupplierBatch") + b.Property("ReceiptNumber") + .IsRequired() .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendSupplierBatch"); + .HasColumnType("nvarchar(64)"); b.Property("Remark") .HasMaxLength(3072) @@ -14379,13 +18316,13 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.HasIndex("MasterID"); - b.HasIndex("Number", "PackingCode") + b.HasIndex("Number", "PackingCode", "ReceiptNumber") .IsUnique(); - b.ToTable("Store_PurchaseReturnNoteDetail", (string)null); + b.ToTable("Store_ReceiptAbnormalNoteDetail", (string)null); }); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.PurchaseReturnRequest", b => + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.RecycledMaterialReceiptNote", b => { b.Property("Id") .HasColumnType("uniqueidentifier"); @@ -14393,22 +18330,6 @@ namespace Win_in.Sfs.Wms.Store.Migrations 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) @@ -14423,9 +18344,6 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("CreatorId"); - b.Property("DirectCreateNote") - .HasColumnType("bit"); - b.Property("ExtraProperties") .HasColumnType("nvarchar(max)") .HasColumnName("ExtraProperties"); @@ -14444,36 +18362,11 @@ namespace Win_in.Sfs.Wms.Store.Migrations .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"); @@ -14486,10 +18379,10 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.HasIndex("Number") .IsUnique(); - b.ToTable("Store_PurchaseReturnRequest", (string)null); + b.ToTable("Store_RecycledMaterialReceiptNote", (string)null); }); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.PurchaseReturnRequestDetail", b => + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.RecycledMaterialReceiptNoteDetail", b => { b.Property("Id") .HasColumnType("uniqueidentifier"); @@ -14584,16 +18477,6 @@ namespace Win_in.Sfs.Wms.Store.Migrations .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"); @@ -14602,6 +18485,9 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("decimal(18,6)") .HasColumnName("Qty"); + b.Property("ReasonCode") + .HasColumnType("nvarchar(max)"); + b.Property("Remark") .HasMaxLength(3072) .HasColumnType("nvarchar(3072)") @@ -14643,44 +18529,35 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.HasIndex("Number", "PackingCode") .IsUnique(); - b.ToTable("Store_PurchaseReturnRequestDetail", (string)null); + b.ToTable("Store_RecycledMaterialReceiptNoteDetail", (string)null); }); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.PutawayJob", b => + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.SaleOrder", b => { b.Property("Id") .HasColumnType("uniqueidentifier"); - b.Property("AcceptTime") + b.Property("ActiveDate") .HasColumnType("datetime2"); - b.Property("AcceptUserId") - .HasColumnType("uniqueidentifier"); + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); - b.Property("AcceptUserName") + b.Property("ContactEmail") .HasMaxLength(64) .HasColumnType("nvarchar(64)"); - b.Property("AsnNumber") + b.Property("ContactName") .HasMaxLength(64) .HasColumnType("nvarchar(64)"); - b.Property("CompleteTime") - .HasColumnType("datetime2"); - - b.Property("CompleteUserId") - .HasColumnType("uniqueidentifier"); - - b.Property("CompleteUserName") + b.Property("ContactPhone") .HasMaxLength(64) .HasColumnType("nvarchar(64)"); - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("nvarchar(40)") - .HasColumnName("ConcurrencyStamp"); - b.Property("CreationTime") .HasColumnType("datetime2") .HasColumnName("CreationTime"); @@ -14689,32 +18566,16 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("CreatorId"); - b.Property("ExtraProperties") - .HasColumnType("nvarchar(max)") - .HasColumnName("ExtraProperties"); - - b.Property("InspectNumber") + b.Property("CustomerCode") .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("DueDate") + .HasColumnType("datetime2"); - b.Property("JobType") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); b.Property("LastModificationTime") .HasColumnType("datetime2") @@ -14727,172 +18588,75 @@ namespace Win_in.Sfs.Wms.Store.Migrations 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)"); + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); - b.Property("ReceiptNumber") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + b.Property("OrderDate") + .HasColumnType("datetime2"); 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)"); + .HasColumnName("Remark"); - b.Property("FromLocationGroup") + b.Property("SoStatus") + .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)"); - b.Property("FromWarehouseCode") + b.Property("SoType") .HasMaxLength(64) .HasColumnType("nvarchar(64)"); - b.Property("HandledArriveDate") - .HasColumnType("datetime2"); + b.Property("TaxRate") + .ValueGeneratedOnAdd() + .HasColumnType("decimal(18,6)") + .HasDefaultValue(0m); - b.Property("HandledContainerCode") + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("Version") .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("HandledContainerCode"); + .HasColumnType("nvarchar(64)"); - b.Property("HandledExpireDate") - .HasColumnType("datetime2"); + b.Property("Worker") + .HasColumnType("nvarchar(max)"); - b.Property("HandledLot") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("HandledLot"); + b.HasKey("Id"); - b.Property("HandledPackingCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("HandledPackingCode"); + b.HasIndex("CustomerCode"); - b.Property("HandledProduceDate") - .HasColumnType("datetime2"); + b.HasIndex("Number") + .IsUnique(); - b.Property("HandledQty") - .HasColumnType("decimal(18,6)"); + b.ToTable("Store_SaleOrder", (string)null); + }); - b.Property("HandledSupplierBatch") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("HandledSupplierBatch"); + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.SaleOrderDetail", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); - b.Property("HandledToLocationArea") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("HandledToLocationArea"); + b.Property("ConvertRate") + .ValueGeneratedOnAdd() + .HasColumnType("decimal(18,6)") + .HasDefaultValue(1m); - b.Property("HandledToLocationCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("HandledToLocationCode"); + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); - b.Property("HandledToLocationErpCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("HandledToLocationErpCode"); + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); - b.Property("HandledToLocationGroup") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("HandledToLocationGroup"); + b.Property("CustomerPackQty") + .HasColumnType("decimal(18,6)"); - b.Property("HandledToWarehouseCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("HandledToWarehouseCode"); + b.Property("CustomerPackUom") + .HasColumnType("nvarchar(max)"); b.Property("ItemCode") .IsRequired() @@ -14923,90 +18687,31 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("LastModifierId"); - b.Property("MasterID") - .HasColumnType("uniqueidentifier"); - - b.Property("Number") + b.Property("LineStatus") .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)"); - b.Property("PoLine") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + b.Property("MasterID") + .HasColumnType("uniqueidentifier"); - b.Property("PoNumber") + b.Property("Number") + .IsRequired() .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); 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") + b.Property("SoLine") .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)"); @@ -15028,10 +18733,13 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.HasIndex("MasterID"); - b.ToTable("Job_PutawayJobDetail", (string)null); + b.HasIndex("Number", "SoLine", "ItemCode") + .IsUnique(); + + b.ToTable("Store_SaleOrderDetail", (string)null); }); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.PutawayNote", b => + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ScrapNote", b => { b.Property("Id") .HasColumnType("uniqueidentifier"); @@ -15039,10 +18747,6 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.Property("ActiveDate") .HasColumnType("datetime2"); - b.Property("AsnNumber") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - b.Property("ConcurrencyStamp") .IsConcurrencyToken() .HasMaxLength(40) @@ -15061,10 +18765,6 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("nvarchar(max)") .HasColumnName("ExtraProperties"); - b.Property("InspectNumber") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - b.Property("JobNumber") .HasMaxLength(64) .HasColumnType("nvarchar(64)") @@ -15084,28 +18784,12 @@ namespace Win_in.Sfs.Wms.Store.Migrations .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") + b.Property("ScrapRequestNumber") .HasMaxLength(64) .HasColumnType("nvarchar(64)"); @@ -15114,7 +18798,6 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnName("TenantId"); b.Property("Type") - .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)"); @@ -15126,10 +18809,10 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.HasIndex("Number") .IsUnique(); - b.ToTable("Store_PutawayNote", (string)null); + b.ToTable("Store_ScrapNote", (string)null); }); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.PutawayNoteDetail", b => + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ScrapNoteDetail", b => { b.Property("Id") .HasColumnType("uniqueidentifier"); @@ -15174,78 +18857,22 @@ namespace Win_in.Sfs.Wms.Store.Migrations .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") + b.Property("FromPackingCode") .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("HandledToLocationErpCode"); + .HasColumnType("nvarchar(64)"); - b.Property("HandledToLocationGroup") + b.Property("FromStatus") + .IsRequired() .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("HandledToLocationGroup"); + .HasColumnType("nvarchar(64)"); - b.Property("HandledToWarehouseCode") + b.Property("FromWarehouseCode") + .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("HandledToWarehouseCode"); + .HasColumnName("FromWarehouseCode"); b.Property("ItemCode") .IsRequired() @@ -15268,11 +18895,6 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("nvarchar(64)") .HasColumnName("ItemName"); - b.Property("JobNumber") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("JobNumber"); - b.Property("LastModificationTime") .HasColumnType("datetime2") .HasColumnName("LastModificationTime"); @@ -15290,16 +18912,6 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("nvarchar(64)") .HasColumnName("Number"); - b.Property("PoLine") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("PoLine"); - - b.Property("PoNumber") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("PoNumber"); - b.Property("ProduceDate") .HasColumnType("datetime2"); @@ -15308,140 +18920,287 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("decimal(18,6)") .HasColumnName("Qty"); - b.Property("RecommendArriveDate") - .HasColumnType("datetime2"); + b.Property("ReasonCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); - b.Property("RecommendContainerCode") + 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("RecommendContainerCode"); + .HasColumnName("SupplierBatch"); - b.Property("RecommendExpireDate") - .HasColumnType("datetime2"); + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); - b.Property("RecommendLot") + b.Property("ToContainerCode") + .HasColumnType("nvarchar(max)"); + + b.Property("ToLocationArea") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendLot"); + .HasColumnName("ToLocationArea"); - b.Property("RecommendPackingCode") + b.Property("ToLocationCode") + .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendPackingCode"); - - b.Property("RecommendProduceDate") - .HasColumnType("datetime2"); - - b.Property("RecommendQty") - .HasColumnType("decimal(18,6)"); + .HasColumnName("ToLocationCode"); - b.Property("RecommendSupplierBatch") + b.Property("ToLocationErpCode") + .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendSupplierBatch"); + .HasColumnName("ToLocationErpCode"); - b.Property("RecommendToLocationArea") + b.Property("ToLocationGroup") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendToLocationArea"); + .HasColumnName("ToLocationGroup"); - b.Property("RecommendToLocationCode") + b.Property("ToLot") + .HasColumnType("nvarchar(max)"); + + b.Property("ToPackingCode") + .HasColumnType("nvarchar(max)"); + + b.Property("ToStatus") + .IsRequired() .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendToLocationCode"); + .HasColumnType("nvarchar(64)"); - b.Property("RecommendToLocationErpCode") + b.Property("ToWarehouseCode") + .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendToLocationErpCode"); + .HasColumnName("ToWarehouseCode"); - b.Property("RecommendToLocationGroup") + b.Property("Uom") + .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendToLocationGroup"); + .HasColumnName("Uom"); - b.Property("RecommendToWarehouseCode") + 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("RecommendToWarehouseCode"); + .HasColumnName("Number"); b.Property("Remark") .HasMaxLength(3072) .HasColumnType("nvarchar(3072)") .HasColumnName("Remark"); - b.Property("StdPackQty") - .HasColumnType("decimal(18,6)"); - - b.Property("SupplierBatch") + b.Property("RequestStatus") + .IsRequired() .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("SupplierBatch"); + .HasColumnType("nvarchar(64)"); b.Property("TenantId") .HasColumnType("uniqueidentifier") .HasColumnName("TenantId"); - b.Property("ToContainerCode") + b.Property("Type") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Worker") .HasColumnType("nvarchar(max)"); - b.Property("ToLocationArea") + 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("ToLocationArea"); + .HasColumnName("ItemCode"); - b.Property("ToLocationCode") + 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("ToLocationCode"); + .HasColumnName("LocationCode"); - b.Property("ToLocationErpCode") + b.Property("LocationErpCode") .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("ToLocationErpCode"); + .HasColumnName("LocationErpCode"); - b.Property("ToLocationGroup") + b.Property("LocationGroup") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("ToLocationGroup"); + .HasColumnName("LocationGroup"); - b.Property("ToLot") - .HasColumnType("nvarchar(max)"); + b.Property("MasterID") + .HasColumnType("uniqueidentifier"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); - b.Property("ToPackingCode") - .HasColumnType("nvarchar(450)"); + b.Property("Qty") + .HasPrecision(18, 6) + .HasColumnType("decimal(18,6)") + .HasColumnName("Qty"); - b.Property("ToStatus") - .IsRequired() + b.Property("ReasonCode") .HasMaxLength(64) .HasColumnType("nvarchar(64)"); - b.Property("ToWarehouseCode") + 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("ToWarehouseCode"); + .HasColumnName("Uom"); - b.Property("Uom") + b.Property("WarehouseCode") .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("Uom"); + .HasColumnName("WarehouseCode"); b.HasKey("Id"); b.HasIndex("MasterID"); - b.HasIndex("Number", "FromPackingCode", "FromLocationCode", "ToLocationCode", "ToPackingCode") - .IsUnique() - .HasFilter("[FromPackingCode] IS NOT NULL AND [ToPackingCode] IS NOT NULL"); + b.HasIndex("Number", "ItemCode", "LocationCode") + .IsUnique(); - b.ToTable("Store_PutawayNoteDetail", (string)null); + b.ToTable("Store_ScrapRequestDetail", (string)null); }); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.PutawayRequest", b => + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.SupplierAsn", b => { b.Property("Id") .HasColumnType("uniqueidentifier"); @@ -15449,27 +19208,29 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.Property("ActiveDate") .HasColumnType("datetime2"); - b.Property("AsnNumber") - .HasColumnType("nvarchar(max)"); - - b.Property("AutoAgree") - .HasColumnType("bit"); - - b.Property("AutoCompleteJob") - .HasColumnType("bit"); - - b.Property("AutoHandle") - .HasColumnType("bit"); - - b.Property("AutoSubmit") - .HasColumnType("bit"); - b.Property("ConcurrencyStamp") .IsConcurrencyToken() .HasMaxLength(40) .HasColumnType("nvarchar(40)") .HasColumnName("ConcurrencyStamp"); + b.Property("ContactEmail") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ContactName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ContactPhone") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("CreateType") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + b.Property("CreationTime") .HasColumnType("datetime2") .HasColumnName("CreationTime"); @@ -15478,16 +19239,21 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("CreatorId"); - b.Property("DirectCreateNote") - .HasColumnType("bit"); + 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("InspectNumber") - .HasColumnType("nvarchar(max)"); - b.Property("LastModificationTime") .HasColumnType("datetime2") .HasColumnName("LastModificationTime"); @@ -15502,48 +19268,54 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("nvarchar(64)") .HasColumnName("Number"); - b.Property("PoNumber") - .HasColumnType("nvarchar(max)"); - - b.Property("ProductReceiptNumber") - .HasColumnType("nvarchar(max)"); + b.Property("PlanArriveDate") + .HasColumnType("datetime2"); - b.Property("PurchaseReceiptRequestNumber") + b.Property("PlanUserCode") .HasColumnType("nvarchar(max)"); - b.Property("PutawayMode") - .IsRequired() + b.Property("PoNumber") .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("RpNumber") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); - b.Property("RequestStatus") + b.Property("ShipDate") + .HasColumnType("datetime2"); + + b.Property("Status") .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)"); - b.Property("RpNumber") + 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() + b.Property("TimeWindow") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("TruckNumber") .HasMaxLength(64) .HasColumnType("nvarchar(64)"); @@ -15555,10 +19327,12 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.HasIndex("Number") .IsUnique(); - b.ToTable("Store_PutawayRequest", (string)null); + b.HasIndex("SupplierCode"); + + b.ToTable("Store_SupplierAsn", (string)null); }); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.PutawayRequestDetail", b => + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.SupplierAsnDetail", b => { b.Property("Id") .HasColumnType("uniqueidentifier"); @@ -15566,6 +19340,14 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.Property("ArriveDate") .HasColumnType("datetime2"); + b.Property("ContainerCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ContainerCode"); + + b.Property("ConvertRate") + .HasColumnType("decimal(18,6)"); + b.Property("CreationTime") .HasColumnType("datetime2") .HasColumnName("CreationTime"); @@ -15574,53 +19356,11 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("CreatorId"); - b.Property("ExpireDate") - .HasColumnType("datetime2"); - - b.Property("FromContainerCode") - .HasColumnType("nvarchar(max)"); - - b.Property("FromLocationArea") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("FromLocationArea"); - - b.Property("FromLocationCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("FromLocationCode"); - - b.Property("FromLocationErpCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("FromLocationErpCode"); - - b.Property("FromLocationGroup") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("FromLocationGroup"); - - b.Property("FromLot") - .HasColumnType("nvarchar(max)"); - - b.Property("FromPackingCode") + b.Property("Ctype") .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("ExpireDate") + .HasColumnType("datetime2"); b.Property("ItemCode") .IsRequired() @@ -15651,6 +19391,11 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("LastModifierId"); + b.Property("Lot") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Lot"); + b.Property("MasterID") .HasColumnType("uniqueidentifier"); @@ -15660,6 +19405,15 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("nvarchar(64)") .HasColumnName("Number"); + b.Property("PackingCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("PackingCode"); + + b.Property("PlanUserCode") + .HasColumnType("nvarchar(max)"); + b.Property("PoLine") .HasMaxLength(64) .HasColumnType("nvarchar(64)") @@ -15673,11 +19427,17 @@ namespace Win_in.Sfs.Wms.Store.Migrations 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)") @@ -15691,51 +19451,15 @@ namespace Win_in.Sfs.Wms.Store.Migrations .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("SupplierPackQty") + .HasColumnType("decimal(18,6)"); - b.Property("ToPackingCode") + b.Property("SupplierPackUom") .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("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); b.Property("Uom") .IsRequired() @@ -15747,19 +19471,34 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.HasIndex("MasterID"); - b.ToTable("Store_PutawayRequestDetail", (string)null); + b.HasIndex("Number", "ItemCode", "PackingCode") + .IsUnique(); + + b.ToTable("Store_SupplierAsnDetail", (string)null); }); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ReceiptAbnormalNote", b => + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.TransferLibJob", b => { b.Property("Id") .HasColumnType("uniqueidentifier"); - b.Property("ActiveDate") + b.Property("AcceptTime") .HasColumnType("datetime2"); - b.Property("AsnNumber") - .IsRequired() + 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)"); @@ -15769,6 +19508,12 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("nvarchar(40)") .HasColumnName("ConcurrencyStamp"); + b.Property("ConfirmTime") + .HasColumnType("datetime2"); + + b.Property("Confirmed") + .HasColumnType("bit"); + b.Property("CreationTime") .HasColumnType("datetime2") .HasColumnName("CreationTime"); @@ -15781,6 +19526,28 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("nvarchar(max)") .HasColumnName("ExtraProperties"); + b.Property("IsAutoComplete") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false); + + b.Property("JobDescription") + .HasMaxLength(1024) + .HasColumnType("nvarchar(1024)"); + + b.Property("JobNumber") + .HasColumnType("nvarchar(max)"); + + b.Property("JobStatus") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("JobType") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + b.Property("LastModificationTime") .HasColumnType("datetime2") .HasColumnName("LastModificationTime"); @@ -15790,61 +19557,69 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnName("LastModifierId"); b.Property("Number") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("Number"); - - b.Property("ReceiptNumber") .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("SupplierCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + b.Property("RequestNumber") + .HasColumnType("nvarchar(max)"); b.Property("TenantId") .HasColumnType("uniqueidentifier") .HasColumnName("TenantId"); + b.Property("Type") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("UpStreamJobNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("UseOnTheWayLocation") + .HasColumnType("bit"); + + b.Property("WarehouseCode") + .HasColumnType("nvarchar(max)"); + + b.Property("WorkGroupCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + b.Property("Worker") .HasColumnType("nvarchar(max)"); b.HasKey("Id"); - b.HasIndex("SupplierCode"); - - b.HasIndex("AsnNumber", "Number", "SupplierCode", "ReceiptNumber") + b.HasIndex("Number") .IsUnique(); - b.ToTable("Store_ReceiptAbnormalNote", (string)null); + b.ToTable("Job_TransferLibJob", (string)null); }); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ReceiptAbnormalNoteDetail", b => + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.TransferLibJobDetail", 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"); @@ -15856,78 +19631,85 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.Property("ExpireDate") .HasColumnType("datetime2"); - b.Property("ItemCode") - .IsRequired() + b.Property("FromContainerCode") + .HasColumnType("nvarchar(max)"); + + b.Property("FromLocationArea") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("ItemCode"); + .HasColumnName("FromLocationArea"); - b.Property("ItemDesc1") + b.Property("FromLocationCode") + .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("ItemDesc1"); + .HasColumnName("FromLocationCode"); - b.Property("ItemDesc2") + b.Property("FromLocationErpCode") + .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("ItemDesc2"); + .HasColumnName("FromLocationErpCode"); - b.Property("ItemName") + b.Property("FromLocationGroup") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("ItemName"); + .HasColumnName("FromLocationGroup"); - b.Property("LastModificationTime") - .HasColumnType("datetime2") - .HasColumnName("LastModificationTime"); + b.Property("FromLot") + .HasColumnType("nvarchar(max)"); - b.Property("LastModifierId") - .HasColumnType("uniqueidentifier") - .HasColumnName("LastModifierId"); + b.Property("FromPackingCode") + .HasColumnType("nvarchar(max)"); - b.Property("LocationArea") + b.Property("FromStatus") + .HasColumnType("int"); + + b.Property("FromWarehouseCode") + .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("LocationArea"); + .HasColumnName("FromWarehouseCode"); - b.Property("LocationCode") + b.Property("ItemCode") .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("LocationCode"); + .HasColumnName("ItemCode"); - b.Property("LocationErpCode") - .IsRequired() + b.Property("ItemDesc1") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("LocationErpCode"); + .HasColumnName("ItemDesc1"); - b.Property("LocationGroup") + b.Property("ItemDesc2") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("LocationGroup"); + .HasColumnName("ItemDesc2"); - b.Property("Lot") + b.Property("ItemName") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("Lot"); + .HasColumnName("ItemName"); + + b.Property("JobStatus") + .HasColumnType("int"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); b.Property("MasterID") .HasColumnType("uniqueidentifier"); b.Property("Number") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("Number"); - - b.Property("PackingCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("PackingCode"); + .HasColumnType("nvarchar(max)"); - b.Property("Photos") + b.Property("OnTheWayLocationCode") .HasColumnType("nvarchar(max)"); b.Property("ProduceDate") @@ -15938,21 +19720,14 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("decimal(18,6)") .HasColumnName("Qty"); - b.Property("ReceiptNumber") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + b.Property("Reason") + .HasColumnType("nvarchar(max)"); b.Property("Remark") .HasMaxLength(3072) .HasColumnType("nvarchar(3072)") .HasColumnName("Remark"); - b.Property("Status") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - b.Property("StdPackQty") .HasColumnType("decimal(18,6)"); @@ -15965,29 +19740,60 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("TenantId"); - b.Property("Uom") + b.Property("ToContainerCode") + .HasColumnType("nvarchar(max)"); + + b.Property("ToLocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToLocationArea"); + + b.Property("ToLocationCode") .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("Uom"); + .HasColumnName("ToLocationCode"); - b.Property("WarehouseCode") + b.Property("ToLocationErpCode") .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("WarehouseCode"); + .HasColumnName("ToLocationErpCode"); + + b.Property("ToLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToLocationGroup"); + + b.Property("ToLot") + .HasColumnType("nvarchar(max)"); + + b.Property("ToPackingCode") + .HasColumnType("nvarchar(max)"); + + b.Property("ToStatus") + .HasColumnType("int"); + + b.Property("ToWarehouseCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToWarehouseCode"); + + b.Property("Uom") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Uom"); b.HasKey("Id"); b.HasIndex("MasterID"); - b.HasIndex("Number", "PackingCode", "ReceiptNumber") - .IsUnique(); - - b.ToTable("Store_ReceiptAbnormalNoteDetail", (string)null); + b.ToTable("Job_TransferLibJobDetail", (string)null); }); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.RecycledMaterialReceiptNote", b => + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.TransferLibNote", b => { b.Property("Id") .HasColumnType("uniqueidentifier"); @@ -16001,6 +19807,12 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("nvarchar(40)") .HasColumnName("ConcurrencyStamp"); + b.Property("ConfirmTime") + .HasColumnType("datetime2"); + + b.Property("Confirmed") + .HasColumnType("bit"); + b.Property("CreationTime") .HasColumnType("datetime2") .HasColumnName("CreationTime"); @@ -16013,6 +19825,11 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("nvarchar(max)") .HasColumnName("ExtraProperties"); + b.Property("JobNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("JobNumber"); + b.Property("LastModificationTime") .HasColumnType("datetime2") .HasColumnName("LastModificationTime"); @@ -16032,10 +19849,21 @@ namespace Win_in.Sfs.Wms.Store.Migrations .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)"); @@ -16044,10 +19872,10 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.HasIndex("Number") .IsUnique(); - b.ToTable("Store_RecycledMaterialReceiptNote", (string)null); + b.ToTable("Store_TransferLibNote", (string)null); }); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.RecycledMaterialReceiptNoteDetail", b => + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.TransferLibNoteDetail", b => { b.Property("Id") .HasColumnType("uniqueidentifier"); @@ -16055,11 +19883,6 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.Property("ArriveDate") .HasColumnType("datetime2"); - b.Property("ContainerCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ContainerCode"); - b.Property("CreationTime") .HasColumnType("datetime2") .HasColumnName("CreationTime"); @@ -16071,61 +19894,79 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.Property("ExpireDate") .HasColumnType("datetime2"); - b.Property("ItemCode") - .IsRequired() + b.Property("FromContainerCode") + .HasColumnType("nvarchar(max)"); + + b.Property("FromLocationArea") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("ItemCode"); + .HasColumnName("FromLocationArea"); - b.Property("ItemDesc1") + b.Property("FromLocationCode") + .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("ItemDesc1"); + .HasColumnName("FromLocationCode"); - b.Property("ItemDesc2") + b.Property("FromLocationErpCode") + .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("ItemDesc2"); + .HasColumnName("FromLocationErpCode"); - b.Property("ItemName") + b.Property("FromLocationGroup") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("ItemName"); + .HasColumnName("FromLocationGroup"); - b.Property("LastModificationTime") - .HasColumnType("datetime2") - .HasColumnName("LastModificationTime"); + b.Property("FromLot") + .HasColumnType("nvarchar(max)"); - b.Property("LastModifierId") - .HasColumnType("uniqueidentifier") - .HasColumnName("LastModifierId"); + b.Property("FromPackingCode") + .HasColumnType("nvarchar(450)"); - b.Property("LocationArea") + b.Property("FromStatus") + .IsRequired() .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("LocationArea"); + .HasColumnType("nvarchar(64)"); - b.Property("LocationCode") + b.Property("FromWarehouseCode") .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("LocationCode"); + .HasColumnName("FromWarehouseCode"); - b.Property("LocationErpCode") + b.Property("ItemCode") .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("LocationErpCode"); + .HasColumnName("ItemCode"); - b.Property("LocationGroup") + b.Property("ItemDesc1") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("LocationGroup"); + .HasColumnName("ItemDesc1"); - b.Property("Lot") + b.Property("ItemDesc2") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("Lot"); + .HasColumnName("ItemDesc2"); + + b.Property("ItemName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemName"); + + b.Property("JobStatus") + .HasColumnType("int"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); b.Property("MasterID") .HasColumnType("uniqueidentifier"); @@ -16136,11 +19977,8 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("nvarchar(64)") .HasColumnName("Number"); - b.Property("PackingCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("PackingCode"); + b.Property("OnTheWayLocationCode") + .HasColumnType("nvarchar(max)"); b.Property("ProduceDate") .HasColumnType("datetime2"); @@ -16150,19 +19988,15 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("decimal(18,6)") .HasColumnName("Qty"); - b.Property("ReasonCode") - .HasColumnType("nvarchar(max)"); + b.Property("Reason") + .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)"); @@ -16175,29 +20009,66 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("TenantId"); - b.Property("Uom") + b.Property("ToContainerCode") + .HasColumnType("nvarchar(max)"); + + b.Property("ToLocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToLocationArea"); + + b.Property("ToLocationCode") .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("Uom"); + .HasColumnName("ToLocationCode"); - b.Property("WarehouseCode") + b.Property("ToLocationErpCode") .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("WarehouseCode"); + .HasColumnName("ToLocationErpCode"); + + b.Property("ToLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToLocationGroup"); + + b.Property("ToLot") + .HasColumnType("nvarchar(max)"); + + b.Property("ToPackingCode") + .HasColumnType("nvarchar(max)"); + + b.Property("ToStatus") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ToWarehouseCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToWarehouseCode"); + + b.Property("Uom") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Uom"); b.HasKey("Id"); b.HasIndex("MasterID"); - b.HasIndex("Number", "PackingCode") - .IsUnique(); + b.HasIndex("Number", "FromPackingCode", "FromLocationCode", "ToLocationCode", "FromStatus", "ToStatus") + .IsUnique() + .HasFilter("[FromPackingCode] IS NOT NULL"); - b.ToTable("Store_RecycledMaterialReceiptNoteDetail", (string)null); + b.ToTable("Store_TransferLibNoteDetail", (string)null); }); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.SaleOrder", b => + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.TransferLibRequest", b => { b.Property("Id") .HasColumnType("uniqueidentifier"); @@ -16205,24 +20076,24 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.Property("ActiveDate") .HasColumnType("datetime2"); + b.Property("AutoAgree") + .HasColumnType("bit"); + + b.Property("AutoCompleteJob") + .HasColumnType("bit"); + + b.Property("AutoHandle") + .HasColumnType("bit"); + + b.Property("AutoSubmit") + .HasColumnType("bit"); + b.Property("ConcurrencyStamp") .IsConcurrencyToken() .HasMaxLength(40) .HasColumnType("nvarchar(40)") .HasColumnName("ConcurrencyStamp"); - b.Property("ContactEmail") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("ContactName") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("ContactPhone") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - b.Property("CreationTime") .HasColumnType("datetime2") .HasColumnName("CreationTime"); @@ -16231,12 +20102,8 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("CreatorId"); - b.Property("CustomerCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("DueDate") - .HasColumnType("datetime2"); + b.Property("DirectCreateNote") + .HasColumnType("bit"); b.Property("ExtraProperties") .HasColumnType("nvarchar(max)") @@ -16256,58 +20123,45 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("nvarchar(64)") .HasColumnName("Number"); - b.Property("OrderDate") - .HasColumnType("datetime2"); - b.Property("Remark") .HasMaxLength(3072) .HasColumnType("nvarchar(3072)") .HasColumnName("Remark"); - b.Property("SoStatus") + b.Property("RequestStatus") .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") + b.Property("Type") .HasMaxLength(64) .HasColumnType("nvarchar(64)"); + b.Property("UseOnTheWayLocation") + .HasColumnType("bit"); + b.Property("Worker") .HasColumnType("nvarchar(max)"); b.HasKey("Id"); - b.HasIndex("CustomerCode"); - b.HasIndex("Number") .IsUnique(); - b.ToTable("Store_SaleOrder", (string)null); + b.ToTable("Store_TransferLibRequest", (string)null); }); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.SaleOrderDetail", b => + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.TransferLibRequestDetail", b => { b.Property("Id") .HasColumnType("uniqueidentifier"); - b.Property("ConvertRate") - .ValueGeneratedOnAdd() - .HasColumnType("decimal(18,6)") - .HasDefaultValue(1m); + b.Property("ArriveDate") + .HasColumnType("datetime2"); b.Property("CreationTime") .HasColumnType("datetime2") @@ -16317,12 +20171,51 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("CreatorId"); - b.Property("CustomerPackQty") - .HasColumnType("decimal(18,6)"); + b.Property("ExpireDate") + .HasColumnType("datetime2"); - b.Property("CustomerPackUom") + 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) @@ -16344,6 +20237,9 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("nvarchar(64)") .HasColumnName("ItemName"); + b.Property("JobStatus") + .HasColumnType("int"); + b.Property("LastModificationTime") .HasColumnType("datetime2") .HasColumnName("LastModificationTime"); @@ -16352,11 +20248,6 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("LastModifierId"); - b.Property("LineStatus") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - b.Property("MasterID") .HasColumnType("uniqueidentifier"); @@ -16366,28 +20257,76 @@ namespace Win_in.Sfs.Wms.Store.Migrations .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("SoLine") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - b.Property("StdPackQty") .HasColumnType("decimal(18,6)"); + b.Property("SupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("SupplierBatch"); + b.Property("TenantId") .HasColumnType("uniqueidentifier") .HasColumnName("TenantId"); + b.Property("ToContainerCode") + .HasColumnType("nvarchar(max)"); + + b.Property("ToLocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToLocationArea"); + + b.Property("ToLocationCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToLocationCode"); + + b.Property("ToLocationErpCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToLocationErpCode"); + + b.Property("ToLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToLocationGroup"); + + b.Property("ToLot") + .HasColumnType("nvarchar(max)"); + + b.Property("ToPackingCode") + .HasColumnType("nvarchar(max)"); + + b.Property("ToStatus") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ToWarehouseCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToWarehouseCode"); + b.Property("Uom") .IsRequired() .HasMaxLength(64) @@ -16398,13 +20337,10 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.HasIndex("MasterID"); - b.HasIndex("Number", "SoLine", "ItemCode") - .IsUnique(); - - b.ToTable("Store_SaleOrderDetail", (string)null); + b.ToTable("Store_TransferLibRequestDetail", (string)null); }); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ScrapNote", b => + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.TransferNote", b => { b.Property("Id") .HasColumnType("uniqueidentifier"); @@ -16418,6 +20354,12 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("nvarchar(40)") .HasColumnName("ConcurrencyStamp"); + b.Property("ConfirmTime") + .HasColumnType("datetime2"); + + b.Property("Confirmed") + .HasColumnType("bit"); + b.Property("CreationTime") .HasColumnType("datetime2") .HasColumnName("CreationTime"); @@ -16454,18 +20396,21 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("nvarchar(3072)") .HasColumnName("Remark"); - b.Property("ScrapRequestNumber") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + b.Property("RequestNumber") + .HasColumnType("nvarchar(max)"); b.Property("TenantId") .HasColumnType("uniqueidentifier") .HasColumnName("TenantId"); b.Property("Type") + .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)"); + b.Property("UseOnTheWayLocation") + .HasColumnType("bit"); + b.Property("Worker") .HasColumnType("nvarchar(max)"); @@ -16474,10 +20419,10 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.HasIndex("Number") .IsUnique(); - b.ToTable("Store_ScrapNote", (string)null); + b.ToTable("Store_TransferNote", (string)null); }); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ScrapNoteDetail", b => + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.TransferNoteDetail", b => { b.Property("Id") .HasColumnType("uniqueidentifier"); @@ -16522,11 +20467,10 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnName("FromLocationGroup"); b.Property("FromLot") - .HasColumnType("nvarchar(450)"); + .HasColumnType("nvarchar(max)"); b.Property("FromPackingCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + .HasColumnType("nvarchar(450)"); b.Property("FromStatus") .IsRequired() @@ -16577,6 +20521,9 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("nvarchar(64)") .HasColumnName("Number"); + b.Property("OnTheWayLocationCode") + .HasColumnType("nvarchar(max)"); + b.Property("ProduceDate") .HasColumnType("datetime2"); @@ -16585,7 +20532,7 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("decimal(18,6)") .HasColumnName("Qty"); - b.Property("ReasonCode") + b.Property("Reason") .HasMaxLength(64) .HasColumnType("nvarchar(64)"); @@ -16658,14 +20605,14 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.HasIndex("MasterID"); - b.HasIndex("Number", "ItemCode", "FromPackingCode", "FromLocationCode", "ToLocationCode", "FromLot", "FromStatus") + b.HasIndex("Number", "FromPackingCode", "FromLocationCode", "ToLocationCode", "FromStatus", "ToStatus") .IsUnique() - .HasFilter("[FromPackingCode] IS NOT NULL AND [FromLot] IS NOT NULL"); + .HasFilter("[FromPackingCode] IS NOT NULL"); - b.ToTable("Store_ScrapNoteDetail", (string)null); + b.ToTable("Store_TransferNoteDetail", (string)null); }); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ScrapRequest", b => + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.TransferRequest", b => { b.Property("Id") .HasColumnType("uniqueidentifier"); @@ -16738,6 +20685,9 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasMaxLength(64) .HasColumnType("nvarchar(64)"); + b.Property("UseOnTheWayLocation") + .HasColumnType("bit"); + b.Property("Worker") .HasColumnType("nvarchar(max)"); @@ -16746,14 +20696,17 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.HasIndex("Number") .IsUnique(); - b.ToTable("Store_ScrapRequest", (string)null); + b.ToTable("Store_TransferRequest", (string)null); }); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ScrapRequestDetail", b => + 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"); @@ -16762,181 +20715,71 @@ namespace Win_in.Sfs.Wms.Store.Migrations .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("ExpireDate") + .HasColumnType("datetime2"); - b.Property("LocationErpCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("LocationErpCode"); + b.Property("FromContainerCode") + .HasColumnType("nvarchar(max)"); - b.Property("LocationGroup") + b.Property("FromLocationArea") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("LocationGroup"); - - b.Property("MasterID") - .HasColumnType("uniqueidentifier"); + .HasColumnName("FromLocationArea"); - b.Property("Number") + b.Property("FromLocationCode") .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"); + .HasColumnName("FromLocationCode"); - b.Property("Uom") + b.Property("FromLocationErpCode") .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("Uom"); + .HasColumnName("FromLocationErpCode"); - b.Property("WarehouseCode") - .IsRequired() + b.Property("FromLocationGroup") .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.SplitPackingRec", b => - { - b.Property("Id") - .HasColumnType("uniqueidentifier"); - - b.Property("ArrivalNoticNumber") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("nvarchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime2") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("uniqueidentifier") - .HasColumnName("CreatorId"); - - b.Property("ExtraProperties") - .HasColumnType("nvarchar(max)") - .HasColumnName("ExtraProperties"); + .HasColumnName("FromLocationGroup"); b.Property("FromLot") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("FromPackingCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("FromQty") - .HasPrecision(18, 6) - .HasColumnType("decimal(18,6)"); + .HasColumnType("nvarchar(max)"); - b.Property("FromStdPackQty") - .HasColumnType("decimal(18,6)"); + b.Property("FromPackingCode") + .HasColumnType("nvarchar(max)"); - b.Property("FromTopPackingCode") + b.Property("FromStatus") .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)"); - b.Property("FromUom") + b.Property("FromWarehouseCode") .IsRequired() .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + .HasColumnType("nvarchar(64)") + .HasColumnName("FromWarehouseCode"); b.Property("ItemCode") .IsRequired() .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemCode"); b.Property("ItemDesc1") - .HasMaxLength(1024) - .HasColumnType("nvarchar(1024)"); + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc1"); b.Property("ItemDesc2") - .HasMaxLength(1024) - .HasColumnType("nvarchar(1024)"); + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemDesc2"); b.Property("ItemName") .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("LabelType") - .HasColumnType("int"); + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemName"); b.Property("LastModificationTime") .HasColumnType("datetime2") @@ -16946,102 +20789,132 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("LastModifierId"); - b.Property("OprType") - .HasColumnType("int"); + b.Property("MasterID") + .HasColumnType("uniqueidentifier"); - b.Property("PurchaseInfo_AsnNumber") + b.Property("Number") + .IsRequired() .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); - b.Property("PurchaseInfo_PoNumber") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + b.Property("ProduceDate") + .HasColumnType("datetime2"); - b.Property("PutOnShelfNumber") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + b.Property("Qty") + .HasPrecision(18, 6) + .HasColumnType("decimal(18,6)") + .HasColumnName("Qty"); - b.Property("ReceiptRecNumber") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + b.Property("Reason") + .HasColumnType("nvarchar(max)"); b.Property("Remark") - .HasColumnType("nvarchar(max)"); + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("StdPackQty") + .HasColumnType("decimal(18,6)"); - b.Property("TaskOrderNumber") + b.Property("SupplierBatch") .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + .HasColumnType("nvarchar(64)") + .HasColumnName("SupplierBatch"); b.Property("TenantId") .HasColumnType("uniqueidentifier") .HasColumnName("TenantId"); - b.Property("ToLot") + b.Property("ToContainerCode") + .HasColumnType("nvarchar(max)"); + + b.Property("ToLocationArea") .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + .HasColumnType("nvarchar(64)") + .HasColumnName("ToLocationArea"); - b.Property("ToPackingCode") + b.Property("ToLocationCode") .IsRequired() .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + .HasColumnType("nvarchar(64)") + .HasColumnName("ToLocationCode"); - b.Property("ToQty") - .HasPrecision(18, 6) - .HasColumnType("decimal(18,6)"); + b.Property("ToLocationErpCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToLocationErpCode"); - b.Property("ToStdPackQty") - .HasColumnType("decimal(18,6)"); + b.Property("ToLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToLocationGroup"); + + b.Property("ToLot") + .HasColumnType("nvarchar(max)"); + + b.Property("ToPackingCode") + .HasColumnType("nvarchar(max)"); - b.Property("ToTopPackingCode") + b.Property("ToStatus") .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)"); - b.Property("ToUom") + b.Property("ToWarehouseCode") .IsRequired() .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + .HasColumnType("nvarchar(64)") + .HasColumnName("ToWarehouseCode"); - b.HasKey("Id"); + b.Property("Uom") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Uom"); - b.HasIndex("ToPackingCode"); + b.HasKey("Id"); - b.HasIndex("FromPackingCode", "ToPackingCode"); + b.HasIndex("MasterID"); - b.ToTable("Store_SplitPackingRec", (string)null); + b.ToTable("Store_TransferRequestDetail", (string)null); }); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.SupplierAsn", b => + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.UnplannedIssueJob", b => { b.Property("Id") .HasColumnType("uniqueidentifier"); - b.Property("ActiveDate") + b.Property("AcceptTime") .HasColumnType("datetime2"); - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("nvarchar(40)") - .HasColumnName("ConcurrencyStamp"); + b.Property("AcceptUserId") + .HasColumnType("uniqueidentifier"); - b.Property("ContactEmail") + b.Property("AcceptUserName") .HasMaxLength(64) .HasColumnType("nvarchar(64)"); - b.Property("ContactName") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + b.Property("BuildDate") + .HasColumnType("datetime2"); - b.Property("ContactPhone") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + b.Property("CompleteTime") + .HasColumnType("datetime2"); - b.Property("CreateType") - .IsRequired() + 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"); @@ -17050,21 +20923,37 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("CreatorId"); - b.Property("Ctype") - .HasColumnType("nvarchar(max)"); - - b.Property("DockCode") - .IsRequired() + b.Property("DeptCode") .HasMaxLength(64) .HasColumnType("nvarchar(64)"); - b.Property("DueDate") - .HasColumnType("datetime2"); + 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"); @@ -17076,102 +20965,138 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.Property("Number") .IsRequired() .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("Number"); - - b.Property("PlanArriveDate") - .HasColumnType("datetime2"); + .HasColumnType("nvarchar(64)"); - b.Property("PlanUserCode") + b.Property("OANumber") .HasColumnType("nvarchar(max)"); - 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("Remark") .HasMaxLength(3072) .HasColumnType("nvarchar(3072)") .HasColumnName("Remark"); - b.Property("RpNumber") - .IsRequired() + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("UnplannedIssueRequestNumber") .HasMaxLength(64) .HasColumnType("nvarchar(64)"); - b.Property("ShipDate") - .HasColumnType("datetime2"); + b.Property("UnplannedIssueType") + .HasColumnType("int"); - b.Property("Status") - .IsRequired() + b.Property("UpStreamJobNumber") .HasMaxLength(64) .HasColumnType("nvarchar(64)"); - b.Property("SupplierAddress") + b.Property("WarehouseCode") .HasColumnType("nvarchar(max)"); - b.Property("SupplierCode") - .IsRequired() + b.Property("WorkGroupCode") .HasMaxLength(64) .HasColumnType("nvarchar(64)"); - b.Property("SupplierName") + b.Property("Worker") .HasColumnType("nvarchar(max)"); - b.Property("TenantId") - .HasColumnType("uniqueidentifier") - .HasColumnName("TenantId"); + b.HasKey("Id"); - b.Property("TimeWindow") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + b.HasIndex("Number") + .IsUnique(); - b.Property("TruckNumber") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + b.ToTable("Job_UnplannedIssueJob", (string)null); + }); - b.Property("Worker") + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.UnplannedIssueJobDetail", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("CaseCode") .HasColumnType("nvarchar(max)"); - b.HasKey("Id"); + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("Explain") + .HasColumnType("nvarchar(max)"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("HandledArriveDate") + .HasColumnType("datetime2"); + + b.Property("HandledContainerCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledContainerCode"); - b.HasIndex("Number") - .IsUnique(); + b.Property("HandledExpireDate") + .HasColumnType("datetime2"); - b.HasIndex("SupplierCode"); + b.Property("HandledFromLocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledFromLocationArea"); - b.ToTable("Store_SupplierAsn", (string)null); - }); + b.Property("HandledFromLocationCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledFromLocationCode"); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.SupplierAsnDetail", b => - { - b.Property("Id") - .HasColumnType("uniqueidentifier"); + b.Property("HandledFromLocationErpCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledFromLocationErpCode"); - b.Property("ArriveDate") - .HasColumnType("datetime2"); + b.Property("HandledFromLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledFromLocationGroup"); - b.Property("ContainerCode") + b.Property("HandledFromWarehouseCode") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("ContainerCode"); + .HasColumnName("HandledFromWarehouseCode"); - b.Property("ConvertRate") - .HasColumnType("decimal(18,6)"); + b.Property("HandledLot") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledLot"); - b.Property("CreationTime") - .HasColumnType("datetime2") - .HasColumnName("CreationTime"); + b.Property("HandledPackingCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledPackingCode"); - b.Property("CreatorId") - .HasColumnType("uniqueidentifier") - .HasColumnName("CreatorId"); + b.Property("HandledProduceDate") + .HasColumnType("datetime2"); - b.Property("Ctype") - .HasColumnType("nvarchar(max)"); + b.Property("HandledQty") + .HasColumnType("decimal(18,6)"); - b.Property("ExpireDate") - .HasColumnType("datetime2"); + b.Property("HandledSupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledSupplierBatch"); b.Property("ItemCode") .IsRequired() @@ -17202,93 +21127,108 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("LastModifierId"); - b.Property("Lot") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("Lot"); - b.Property("MasterID") .HasColumnType("uniqueidentifier"); b.Property("Number") .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("OnceBusiCode") + .HasColumnType("nvarchar(max)"); + + b.Property("ProjCapacityCode") + .HasColumnType("nvarchar(max)"); + + b.Property("ReasonCode") + .HasColumnType("nvarchar(max)"); + + b.Property("RecommendArriveDate") + .HasColumnType("datetime2"); + + b.Property("RecommendContainerCode") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("Number"); + .HasColumnName("RecommendContainerCode"); - b.Property("PackingCode") - .IsRequired() + b.Property("RecommendExpireDate") + .HasColumnType("datetime2"); + + b.Property("RecommendFromLocationArea") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("PackingCode"); + .HasColumnName("RecommendFromLocationArea"); - b.Property("PlanUserCode") - .HasColumnType("nvarchar(max)"); + b.Property("RecommendFromLocationCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendFromLocationCode"); - b.Property("PoLine") + b.Property("RecommendFromLocationErpCode") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("PoLine"); + .HasColumnName("RecommendFromLocationErpCode"); - b.Property("PoNumber") + b.Property("RecommendFromLocationGroup") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("PoNumber"); + .HasColumnName("RecommendFromLocationGroup"); - b.Property("ProduceDate") - .HasColumnType("datetime2"); + b.Property("RecommendFromWarehouseCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendFromWarehouseCode"); - b.Property("ProjectCode") - .HasColumnType("nvarchar(max)"); + b.Property("RecommendLot") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendLot"); - b.Property("Qty") - .HasPrecision(18, 6) - .HasColumnType("decimal(18,6)") - .HasColumnName("Qty"); + b.Property("RecommendPackingCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendPackingCode"); - b.Property("RecommendErpCode") - .HasColumnType("nvarchar(max)"); + 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") + b.Property("Status") + .IsRequired() .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("SupplierBatch"); + .HasColumnType("nvarchar(64)"); - b.Property("SupplierPackQty") + b.Property("StdPackQty") .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"); + .HasColumnType("nvarchar(max)"); b.HasKey("Id"); b.HasIndex("MasterID"); - b.HasIndex("Number", "ItemCode", "PackingCode") - .IsUnique(); - - b.ToTable("Store_SupplierAsnDetail", (string)null); + b.ToTable("Job_UnplannedIssueJobDetail", (string)null); }); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.TransferNote", b => + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.UnplannedIssueNote", b => { b.Property("Id") .HasColumnType("uniqueidentifier"); @@ -17296,18 +21236,15 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.Property("ActiveDate") .HasColumnType("datetime2"); + b.Property("BuildDate") + .HasColumnType("datetime2"); + b.Property("ConcurrencyStamp") .IsConcurrencyToken() .HasMaxLength(40) .HasColumnType("nvarchar(40)") .HasColumnName("ConcurrencyStamp"); - b.Property("ConfirmTime") - .HasColumnType("datetime2"); - - b.Property("Confirmed") - .HasColumnType("bit"); - b.Property("CreationTime") .HasColumnType("datetime2") .HasColumnName("CreationTime"); @@ -17316,14 +21253,21 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("CreatorId"); + b.Property("DeptCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("DeptName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + b.Property("ExtraProperties") .HasColumnType("nvarchar(max)") .HasColumnName("ExtraProperties"); b.Property("JobNumber") .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("JobNumber"); + .HasColumnType("nvarchar(64)"); b.Property("LastModificationTime") .HasColumnType("datetime2") @@ -17339,25 +21283,24 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("nvarchar(64)") .HasColumnName("Number"); + b.Property("OANumber") + .HasColumnType("nvarchar(max)"); + b.Property("Remark") .HasMaxLength(3072) .HasColumnType("nvarchar(3072)") .HasColumnName("Remark"); - b.Property("RequestNumber") - .HasColumnType("nvarchar(max)"); - b.Property("TenantId") .HasColumnType("uniqueidentifier") .HasColumnName("TenantId"); - b.Property("Type") - .IsRequired() + b.Property("UnplannedIssueRequestNumber") .HasMaxLength(64) .HasColumnType("nvarchar(64)"); - b.Property("UseOnTheWayLocation") - .HasColumnType("bit"); + b.Property("UnplannedIssueType") + .HasColumnType("int"); b.Property("Worker") .HasColumnType("nvarchar(max)"); @@ -17367,10 +21310,10 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.HasIndex("Number") .IsUnique(); - b.ToTable("Store_TransferNote", (string)null); + b.ToTable("Store_UnplannedIssueNote", (string)null); }); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.TransferNoteDetail", b => + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.UnplannedIssueNoteDetail", b => { b.Property("Id") .HasColumnType("uniqueidentifier"); @@ -17378,6 +21321,14 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.Property("ArriveDate") .HasColumnType("datetime2"); + b.Property("CaseCode") + .HasColumnType("nvarchar(max)"); + + b.Property("ContainerCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ContainerCode"); + b.Property("CreationTime") .HasColumnType("datetime2") .HasColumnName("CreationTime"); @@ -17389,47 +21340,69 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.Property("ExpireDate") .HasColumnType("datetime2"); - b.Property("FromContainerCode") + b.Property("Explain") .HasColumnType("nvarchar(max)"); - b.Property("FromLocationArea") + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("HandledArriveDate") + .HasColumnType("datetime2"); + + b.Property("HandledContainerCode") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("FromLocationArea"); + .HasColumnName("HandledContainerCode"); - b.Property("FromLocationCode") - .IsRequired() + b.Property("HandledExpireDate") + .HasColumnType("datetime2"); + + b.Property("HandledFromLocationArea") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("FromLocationCode"); + .HasColumnName("HandledFromLocationArea"); - b.Property("FromLocationErpCode") - .IsRequired() + b.Property("HandledFromLocationCode") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("FromLocationErpCode"); + .HasColumnName("HandledFromLocationCode"); - b.Property("FromLocationGroup") + b.Property("HandledFromLocationErpCode") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("FromLocationGroup"); + .HasColumnName("HandledFromLocationErpCode"); - b.Property("FromLot") - .HasColumnType("nvarchar(max)"); + b.Property("HandledFromLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledFromLocationGroup"); - b.Property("FromPackingCode") - .HasColumnType("nvarchar(450)"); + b.Property("HandledFromWarehouseCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledFromWarehouseCode"); + + b.Property("HandledLot") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledLot"); - b.Property("FromStatus") - .IsRequired() + b.Property("HandledPackingCode") .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledPackingCode"); - b.Property("FromWarehouseCode") - .IsRequired() + b.Property("HandledProduceDate") + .HasColumnType("datetime2"); + + b.Property("HandledQty") + .HasColumnType("decimal(18,6)"); + + b.Property("HandledSupplierBatch") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("FromWarehouseCode"); + .HasColumnName("HandledSupplierBatch"); b.Property("ItemCode") .IsRequired() @@ -17460,6 +21433,33 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("LastModifierId"); + b.Property("LocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationArea"); + + b.Property("LocationCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationCode"); + + b.Property("LocationErpCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationErpCode"); + + b.Property("LocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationGroup"); + + b.Property("Lot") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Lot"); + b.Property("MasterID") .HasColumnType("uniqueidentifier"); @@ -17469,79 +21469,107 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("nvarchar(64)") .HasColumnName("Number"); - b.Property("OnTheWayLocationCode") + b.Property("OnceBusiCode") .HasColumnType("nvarchar(max)"); + b.Property("PackingCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("PackingCode"); + b.Property("ProduceDate") .HasColumnType("datetime2"); + b.Property("ProjCapacityCode") + .HasColumnType("nvarchar(max)"); + b.Property("Qty") .HasPrecision(18, 6) .HasColumnType("decimal(18,6)") .HasColumnName("Qty"); - b.Property("Reason") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + b.Property("ReasonCode") + .HasColumnType("nvarchar(max)"); - b.Property("Remark") - .HasMaxLength(3072) - .HasColumnType("nvarchar(3072)") - .HasColumnName("Remark"); + b.Property("RecommendArriveDate") + .HasColumnType("datetime2"); - b.Property("StdPackQty") - .HasColumnType("decimal(18,6)"); + b.Property("RecommendContainerCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendContainerCode"); - b.Property("SupplierBatch") + b.Property("RecommendExpireDate") + .HasColumnType("datetime2"); + + b.Property("RecommendFromLocationArea") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("SupplierBatch"); + .HasColumnName("RecommendFromLocationArea"); - b.Property("TenantId") - .HasColumnType("uniqueidentifier") - .HasColumnName("TenantId"); + b.Property("RecommendFromLocationCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendFromLocationCode"); - b.Property("ToContainerCode") - .HasColumnType("nvarchar(max)"); + b.Property("RecommendFromLocationErpCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendFromLocationErpCode"); - b.Property("ToLocationArea") + b.Property("RecommendFromLocationGroup") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("ToLocationArea"); + .HasColumnName("RecommendFromLocationGroup"); - b.Property("ToLocationCode") - .IsRequired() + b.Property("RecommendFromWarehouseCode") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("ToLocationCode"); + .HasColumnName("RecommendFromWarehouseCode"); - b.Property("ToLocationErpCode") - .IsRequired() + b.Property("RecommendLot") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("ToLocationErpCode"); + .HasColumnName("RecommendLot"); - b.Property("ToLocationGroup") + b.Property("RecommendPackingCode") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("ToLocationGroup"); + .HasColumnName("RecommendPackingCode"); - b.Property("ToLot") - .HasColumnType("nvarchar(max)"); + b.Property("RecommendProduceDate") + .HasColumnType("datetime2"); - b.Property("ToPackingCode") - .HasColumnType("nvarchar(max)"); + b.Property("RecommendQty") + .HasColumnType("decimal(18,6)"); - b.Property("ToStatus") + b.Property("RecommendSupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendSupplierBatch"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("Status") .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)"); - b.Property("ToWarehouseCode") - .IsRequired() + b.Property("StdPackQty") + .HasColumnType("decimal(18,6)"); + + b.Property("SupplierBatch") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("ToWarehouseCode"); + .HasColumnName("SupplierBatch"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); b.Property("Uom") .IsRequired() @@ -17549,18 +21577,24 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("nvarchar(64)") .HasColumnName("Uom"); + b.Property("WarehouseCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("WarehouseCode"); + b.HasKey("Id"); b.HasIndex("MasterID"); - b.HasIndex("Number", "FromPackingCode", "FromLocationCode", "ToLocationCode", "FromStatus", "ToStatus") + b.HasIndex("Number", "PackingCode", "ItemCode", "Lot", "Status") .IsUnique() - .HasFilter("[FromPackingCode] IS NOT NULL"); + .HasFilter("[Lot] IS NOT NULL"); - b.ToTable("Store_TransferNoteDetail", (string)null); + b.ToTable("Store_UnplannedIssueNoteDetail", (string)null); }); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.TransferRequest", b => + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.UnplannedIssueRequest", b => { b.Property("Id") .HasColumnType("uniqueidentifier"); @@ -17580,6 +21614,9 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.Property("AutoSubmit") .HasColumnType("bit"); + b.Property("BuildDate") + .HasColumnType("datetime2"); + b.Property("ConcurrencyStamp") .IsConcurrencyToken() .HasMaxLength(40) @@ -17594,6 +21631,14 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("CreatorId"); + b.Property("DeptCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("DeptName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + b.Property("DirectCreateNote") .HasColumnType("bit"); @@ -17615,6 +21660,9 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("nvarchar(64)") .HasColumnName("Number"); + b.Property("OANumber") + .HasColumnType("nvarchar(max)"); + b.Property("Remark") .HasMaxLength(3072) .HasColumnType("nvarchar(3072)") @@ -17629,12 +21677,8 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("TenantId"); - b.Property("Type") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("UseOnTheWayLocation") - .HasColumnType("bit"); + b.Property("UnplannedIssueType") + .HasColumnType("int"); b.Property("Worker") .HasColumnType("nvarchar(max)"); @@ -17644,10 +21688,10 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.HasIndex("Number") .IsUnique(); - b.ToTable("Store_TransferRequest", (string)null); + b.ToTable("Store_UnplannedIssueRequest", (string)null); }); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.TransferRequestDetail", b => + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.UnplannedIssueRequestDetail", b => { b.Property("Id") .HasColumnType("uniqueidentifier"); @@ -17655,6 +21699,14 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.Property("ArriveDate") .HasColumnType("datetime2"); + b.Property("CaseCode") + .HasColumnType("nvarchar(max)"); + + b.Property("ContainerCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ContainerCode"); + b.Property("CreationTime") .HasColumnType("datetime2") .HasColumnName("CreationTime"); @@ -17666,47 +21718,12 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.Property("ExpireDate") .HasColumnType("datetime2"); - b.Property("FromContainerCode") - .HasColumnType("nvarchar(max)"); - - b.Property("FromLocationArea") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("FromLocationArea"); - - b.Property("FromLocationCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("FromLocationCode"); - - b.Property("FromLocationErpCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("FromLocationErpCode"); - - b.Property("FromLocationGroup") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("FromLocationGroup"); - - b.Property("FromLot") - .HasColumnType("nvarchar(max)"); - - b.Property("FromPackingCode") + b.Property("Explain") .HasColumnType("nvarchar(max)"); - b.Property("FromStatus") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("FromWarehouseCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("FromWarehouseCode"); + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); b.Property("ItemCode") .IsRequired() @@ -17737,6 +21754,33 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("LastModifierId"); + b.Property("LocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationArea"); + + b.Property("LocationCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationCode"); + + b.Property("LocationErpCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationErpCode"); + + b.Property("LocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("LocationGroup"); + + b.Property("Lot") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Lot"); + b.Property("MasterID") .HasColumnType("uniqueidentifier"); @@ -17746,22 +21790,36 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("nvarchar(64)") .HasColumnName("Number"); + b.Property("OnceBusiCode") + .HasColumnType("nvarchar(max)"); + + b.Property("PackingCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("PackingCode"); + b.Property("ProduceDate") .HasColumnType("datetime2"); + b.Property("ProjCapacityCode") + .HasColumnType("nvarchar(max)"); + b.Property("Qty") .HasPrecision(18, 6) .HasColumnType("decimal(18,6)") .HasColumnName("Qty"); - b.Property("Reason") - .HasColumnType("nvarchar(max)"); - b.Property("Remark") .HasMaxLength(3072) .HasColumnType("nvarchar(3072)") .HasColumnName("Remark"); + b.Property("Status") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + b.Property("StdPackQty") .HasColumnType("decimal(18,6)"); @@ -17774,62 +21832,30 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("TenantId"); - b.Property("ToContainerCode") - .HasColumnType("nvarchar(max)"); - - b.Property("ToLocationArea") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ToLocationArea"); - - b.Property("ToLocationCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ToLocationCode"); - - b.Property("ToLocationErpCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ToLocationErpCode"); - - b.Property("ToLocationGroup") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ToLocationGroup"); - - b.Property("ToLot") - .HasColumnType("nvarchar(max)"); - - b.Property("ToPackingCode") - .HasColumnType("nvarchar(max)"); - - b.Property("ToStatus") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("ToWarehouseCode") + b.Property("Uom") .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("ToWarehouseCode"); + .HasColumnName("Uom"); - b.Property("Uom") + b.Property("WarehouseCode") .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("Uom"); + .HasColumnName("WarehouseCode"); b.HasKey("Id"); b.HasIndex("MasterID"); - b.ToTable("Store_TransferRequestDetail", (string)null); + b.HasIndex("Number", "PackingCode", "ItemCode", "Lot", "Status") + .IsUnique() + .HasFilter("[Lot] IS NOT NULL"); + + b.ToTable("Store_UnplannedIssueRequestDetail", (string)null); }); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.UnplannedIssueJob", b => + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.UnplannedReceiptJob", b => { b.Property("Id") .HasColumnType("uniqueidentifier"); @@ -17937,11 +21963,11 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("TenantId"); - b.Property("UnplannedIssueRequestNumber") + b.Property("UnplannedReceiptRequestNumber") .HasMaxLength(64) .HasColumnType("nvarchar(64)"); - b.Property("UnplannedIssueType") + b.Property("UnplannedReceiptType") .HasColumnType("int"); b.Property("UpStreamJobNumber") @@ -17963,10 +21989,10 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.HasIndex("Number") .IsUnique(); - b.ToTable("Job_UnplannedIssueJob", (string)null); + b.ToTable("Job_UnplannedReceiptJob", (string)null); }); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.UnplannedIssueJobDetail", b => + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.UnplannedReceiptJobDetail", b => { b.Property("Id") .HasColumnType("uniqueidentifier"); @@ -18000,51 +22026,51 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.Property("HandledExpireDate") .HasColumnType("datetime2"); - b.Property("HandledFromLocationArea") + b.Property("HandledLot") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("HandledFromLocationArea"); + .HasColumnName("HandledLot"); - b.Property("HandledFromLocationCode") + b.Property("HandledPackingCode") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("HandledFromLocationCode"); + .HasColumnName("HandledPackingCode"); - b.Property("HandledFromLocationErpCode") + b.Property("HandledProduceDate") + .HasColumnType("datetime2"); + + b.Property("HandledQty") + .HasColumnType("decimal(18,6)"); + + b.Property("HandledSupplierBatch") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("HandledFromLocationErpCode"); + .HasColumnName("HandledSupplierBatch"); - b.Property("HandledFromLocationGroup") + b.Property("HandledToLocationArea") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("HandledFromLocationGroup"); + .HasColumnName("HandledToLocationArea"); - b.Property("HandledFromWarehouseCode") + b.Property("HandledToLocationCode") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("HandledFromWarehouseCode"); + .HasColumnName("HandledToLocationCode"); - b.Property("HandledLot") + b.Property("HandledToLocationErpCode") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("HandledLot"); + .HasColumnName("HandledToLocationErpCode"); - b.Property("HandledPackingCode") + b.Property("HandledToLocationGroup") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("HandledPackingCode"); - - b.Property("HandledProduceDate") - .HasColumnType("datetime2"); - - b.Property("HandledQty") - .HasColumnType("decimal(18,6)"); + .HasColumnName("HandledToLocationGroup"); - b.Property("HandledSupplierBatch") + b.Property("HandledToWarehouseCode") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("HandledSupplierBatch"); + .HasColumnName("HandledToWarehouseCode"); b.Property("ItemCode") .IsRequired() @@ -18103,51 +22129,51 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.Property("RecommendExpireDate") .HasColumnType("datetime2"); - b.Property("RecommendFromLocationArea") + b.Property("RecommendLot") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendFromLocationArea"); + .HasColumnName("RecommendLot"); - b.Property("RecommendFromLocationCode") + b.Property("RecommendPackingCode") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendFromLocationCode"); + .HasColumnName("RecommendPackingCode"); - b.Property("RecommendFromLocationErpCode") + b.Property("RecommendProduceDate") + .HasColumnType("datetime2"); + + b.Property("RecommendQty") + .HasColumnType("decimal(18,6)"); + + b.Property("RecommendSupplierBatch") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendFromLocationErpCode"); + .HasColumnName("RecommendSupplierBatch"); - b.Property("RecommendFromLocationGroup") + b.Property("RecommendToLocationArea") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendFromLocationGroup"); + .HasColumnName("RecommendToLocationArea"); - b.Property("RecommendFromWarehouseCode") + b.Property("RecommendToLocationCode") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendFromWarehouseCode"); + .HasColumnName("RecommendToLocationCode"); - b.Property("RecommendLot") + b.Property("RecommendToLocationErpCode") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendLot"); + .HasColumnName("RecommendToLocationErpCode"); - b.Property("RecommendPackingCode") + b.Property("RecommendToLocationGroup") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendPackingCode"); - - b.Property("RecommendProduceDate") - .HasColumnType("datetime2"); - - b.Property("RecommendQty") - .HasColumnType("decimal(18,6)"); + .HasColumnName("RecommendToLocationGroup"); - b.Property("RecommendSupplierBatch") + b.Property("RecommendToWarehouseCode") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendSupplierBatch"); + .HasColumnName("RecommendToWarehouseCode"); b.Property("Remark") .HasMaxLength(3072) @@ -18173,10 +22199,10 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.HasIndex("MasterID"); - b.ToTable("Job_UnplannedIssueJobDetail", (string)null); + b.ToTable("Job_UnplannedReceiptJobDetail", (string)null); }); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.UnplannedIssueNote", b => + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.UnplannedReceiptNote", b => { b.Property("Id") .HasColumnType("uniqueidentifier"); @@ -18243,11 +22269,11 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("TenantId"); - b.Property("UnplannedIssueRequestNumber") + b.Property("UnplannedReceiptRequestNumber") .HasMaxLength(64) .HasColumnType("nvarchar(64)"); - b.Property("UnplannedIssueType") + b.Property("UnplannedReceiptType") .HasColumnType("int"); b.Property("Worker") @@ -18258,10 +22284,10 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.HasIndex("Number") .IsUnique(); - b.ToTable("Store_UnplannedIssueNote", (string)null); + b.ToTable("Store_UnplannedReceiptNote", (string)null); }); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.UnplannedIssueNoteDetail", b => + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.UnplannedReceiptNoteDetail", b => { b.Property("Id") .HasColumnType("uniqueidentifier"); @@ -18306,51 +22332,51 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.Property("HandledExpireDate") .HasColumnType("datetime2"); - b.Property("HandledFromLocationArea") + b.Property("HandledLot") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("HandledFromLocationArea"); + .HasColumnName("HandledLot"); - b.Property("HandledFromLocationCode") + b.Property("HandledPackingCode") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("HandledFromLocationCode"); + .HasColumnName("HandledPackingCode"); - b.Property("HandledFromLocationErpCode") + b.Property("HandledProduceDate") + .HasColumnType("datetime2"); + + b.Property("HandledQty") + .HasColumnType("decimal(18,6)"); + + b.Property("HandledSupplierBatch") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("HandledFromLocationErpCode"); + .HasColumnName("HandledSupplierBatch"); - b.Property("HandledFromLocationGroup") + b.Property("HandledToLocationArea") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("HandledFromLocationGroup"); + .HasColumnName("HandledToLocationArea"); - b.Property("HandledFromWarehouseCode") + b.Property("HandledToLocationCode") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("HandledFromWarehouseCode"); + .HasColumnName("HandledToLocationCode"); - b.Property("HandledLot") + b.Property("HandledToLocationErpCode") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("HandledLot"); + .HasColumnName("HandledToLocationErpCode"); - b.Property("HandledPackingCode") + b.Property("HandledToLocationGroup") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("HandledPackingCode"); - - b.Property("HandledProduceDate") - .HasColumnType("datetime2"); - - b.Property("HandledQty") - .HasColumnType("decimal(18,6)"); + .HasColumnName("HandledToLocationGroup"); - b.Property("HandledSupplierBatch") + b.Property("HandledToWarehouseCode") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("HandledSupplierBatch"); + .HasColumnName("HandledToWarehouseCode"); b.Property("ItemCode") .IsRequired() @@ -18437,44 +22463,19 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("decimal(18,6)") .HasColumnName("Qty"); - b.Property("ReasonCode") - .HasColumnType("nvarchar(max)"); - - b.Property("RecommendArriveDate") - .HasColumnType("datetime2"); - - b.Property("RecommendContainerCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendContainerCode"); - - b.Property("RecommendExpireDate") - .HasColumnType("datetime2"); - - b.Property("RecommendFromLocationArea") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendFromLocationArea"); - - b.Property("RecommendFromLocationCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendFromLocationCode"); - - b.Property("RecommendFromLocationErpCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendFromLocationErpCode"); + b.Property("ReasonCode") + .HasColumnType("nvarchar(max)"); - b.Property("RecommendFromLocationGroup") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendFromLocationGroup"); + b.Property("RecommendArriveDate") + .HasColumnType("datetime2"); - b.Property("RecommendFromWarehouseCode") + b.Property("RecommendContainerCode") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendFromWarehouseCode"); + .HasColumnName("RecommendContainerCode"); + + b.Property("RecommendExpireDate") + .HasColumnType("datetime2"); b.Property("RecommendLot") .HasMaxLength(64) @@ -18497,6 +22498,31 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("nvarchar(64)") .HasColumnName("RecommendSupplierBatch"); + b.Property("RecommendToLocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendToLocationArea"); + + b.Property("RecommendToLocationCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendToLocationCode"); + + b.Property("RecommendToLocationErpCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendToLocationErpCode"); + + b.Property("RecommendToLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendToLocationGroup"); + + b.Property("RecommendToWarehouseCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendToWarehouseCode"); + b.Property("Remark") .HasMaxLength(3072) .HasColumnType("nvarchar(3072)") @@ -18539,10 +22565,10 @@ namespace Win_in.Sfs.Wms.Store.Migrations .IsUnique() .HasFilter("[Lot] IS NOT NULL"); - b.ToTable("Store_UnplannedIssueNoteDetail", (string)null); + b.ToTable("Store_UnplannedReceiptNoteDetail", (string)null); }); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.UnplannedIssueRequest", b => + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.UnplannedReceiptRequest", b => { b.Property("Id") .HasColumnType("uniqueidentifier"); @@ -18625,7 +22651,7 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("TenantId"); - b.Property("UnplannedIssueType") + b.Property("UnplannedReceiptType") .HasColumnType("int"); b.Property("Worker") @@ -18636,10 +22662,10 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.HasIndex("Number") .IsUnique(); - b.ToTable("Store_UnplannedIssueRequest", (string)null); + b.ToTable("Store_UnplannedReceiptRequest", (string)null); }); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.UnplannedIssueRequestDetail", b => + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.UnplannedReceiptRequestDetail", b => { b.Property("Id") .HasColumnType("uniqueidentifier"); @@ -18758,6 +22784,9 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("decimal(18,6)") .HasColumnName("Qty"); + b.Property("ReasonCode") + .HasColumnType("nvarchar(max)"); + b.Property("Remark") .HasMaxLength(3072) .HasColumnType("nvarchar(3072)") @@ -18800,37 +22829,17 @@ namespace Win_in.Sfs.Wms.Store.Migrations .IsUnique() .HasFilter("[Lot] IS NOT NULL"); - b.ToTable("Store_UnplannedIssueRequestDetail", (string)null); + b.ToTable("Store_UnplannedReceiptRequestDetail", (string)null); }); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.UnplannedReceiptJob", b => + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.WarehouseTransferNote", b => { b.Property("Id") .HasColumnType("uniqueidentifier"); - b.Property("AcceptTime") - .HasColumnType("datetime2"); - - b.Property("AcceptUserId") - .HasColumnType("uniqueidentifier"); - - b.Property("AcceptUserName") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("BuildDate") - .HasColumnType("datetime2"); - - b.Property("CompleteTime") + b.Property("ActiveDate") .HasColumnType("datetime2"); - b.Property("CompleteUserId") - .HasColumnType("uniqueidentifier"); - - b.Property("CompleteUserName") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - b.Property("ConcurrencyStamp") .IsConcurrencyToken() .HasMaxLength(40) @@ -18845,36 +22854,14 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("CreatorId"); - b.Property("DeptCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("DeptName") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - b.Property("ExtraProperties") .HasColumnType("nvarchar(max)") .HasColumnName("ExtraProperties"); - b.Property("IsAutoComplete") - .ValueGeneratedOnAdd() - .HasColumnType("bit") - .HasDefaultValue(false); - - b.Property("JobDescription") - .HasMaxLength(1024) - .HasColumnType("nvarchar(1024)"); - - b.Property("JobStatus") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("JobType") - .IsRequired() + b.Property("JobNumber") .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + .HasColumnType("nvarchar(64)") + .HasColumnName("JobNumber"); b.Property("LastModificationTime") .HasColumnType("datetime2") @@ -18887,47 +22874,21 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.Property("Number") .IsRequired() .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("OANumber") - .HasColumnType("nvarchar(max)"); - - b.Property("Priority") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasDefaultValue(0); - - b.Property("PriorityIncrement") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasDefaultValue(0); + .HasColumnType("nvarchar(64)") + .HasColumnName("Number"); b.Property("Remark") .HasMaxLength(3072) .HasColumnType("nvarchar(3072)") .HasColumnName("Remark"); - b.Property("TenantId") - .HasColumnType("uniqueidentifier") - .HasColumnName("TenantId"); - - b.Property("UnplannedReceiptRequestNumber") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("UnplannedReceiptType") - .HasColumnType("int"); - - b.Property("UpStreamJobNumber") + b.Property("SupplierCode") .HasMaxLength(64) .HasColumnType("nvarchar(64)"); - b.Property("WarehouseCode") - .HasColumnType("nvarchar(max)"); - - b.Property("WorkGroupCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); b.Property("Worker") .HasColumnType("nvarchar(max)"); @@ -18937,16 +22898,16 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.HasIndex("Number") .IsUnique(); - b.ToTable("Job_UnplannedReceiptJob", (string)null); + b.ToTable("Store_WarehouseTransferNote", (string)null); }); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.UnplannedReceiptJobDetail", b => + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.WarehouseTransferNoteDetail", b => { b.Property("Id") .HasColumnType("uniqueidentifier"); - b.Property("CaseCode") - .HasColumnType("nvarchar(max)"); + b.Property("ArriveDate") + .HasColumnType("datetime2"); b.Property("CreationTime") .HasColumnType("datetime2") @@ -18956,69 +22917,50 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("CreatorId"); - b.Property("Explain") - .HasColumnType("nvarchar(max)"); - - b.Property("ExtraProperties") - .HasColumnType("nvarchar(max)") - .HasColumnName("ExtraProperties"); - - b.Property("HandledArriveDate") + b.Property("ExpireDate") .HasColumnType("datetime2"); - b.Property("HandledContainerCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("HandledContainerCode"); - - b.Property("HandledExpireDate") - .HasColumnType("datetime2"); + b.Property("FromContainerCode") + .HasColumnType("nvarchar(max)"); - b.Property("HandledLot") + b.Property("FromLocationArea") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("HandledLot"); + .HasColumnName("FromLocationArea"); - b.Property("HandledPackingCode") + b.Property("FromLocationCode") + .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("HandledPackingCode"); - - b.Property("HandledProduceDate") - .HasColumnType("datetime2"); - - b.Property("HandledQty") - .HasColumnType("decimal(18,6)"); + .HasColumnName("FromLocationCode"); - b.Property("HandledSupplierBatch") + b.Property("FromLocationErpCode") + .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("HandledSupplierBatch"); + .HasColumnName("FromLocationErpCode"); - b.Property("HandledToLocationArea") + b.Property("FromLocationGroup") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("HandledToLocationArea"); + .HasColumnName("FromLocationGroup"); - b.Property("HandledToLocationCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("HandledToLocationCode"); + b.Property("FromLot") + .HasColumnType("nvarchar(max)"); - b.Property("HandledToLocationErpCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("HandledToLocationErpCode"); + b.Property("FromPackingCode") + .HasColumnType("nvarchar(450)"); - b.Property("HandledToLocationGroup") + b.Property("FromStatus") + .IsRequired() .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("HandledToLocationGroup"); + .HasColumnType("nvarchar(64)"); - b.Property("HandledToWarehouseCode") + b.Property("FromWarehouseCode") + .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("HandledToWarehouseCode"); + .HasColumnName("FromWarehouseCode"); b.Property("ItemCode") .IsRequired() @@ -19054,103 +22996,99 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.Property("Number") .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("OnceBusiCode") - .HasColumnType("nvarchar(max)"); - - b.Property("ProjCapacityCode") - .HasColumnType("nvarchar(max)"); - - b.Property("ReasonCode") - .HasColumnType("nvarchar(max)"); - - b.Property("RecommendArriveDate") - .HasColumnType("datetime2"); - - b.Property("RecommendContainerCode") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendContainerCode"); + .HasColumnName("Number"); - b.Property("RecommendExpireDate") + b.Property("ProduceDate") .HasColumnType("datetime2"); - b.Property("RecommendLot") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendLot"); + b.Property("Qty") + .HasPrecision(18, 6) + .HasColumnType("decimal(18,6)") + .HasColumnName("Qty"); - b.Property("RecommendPackingCode") + b.Property("Reason") .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendPackingCode"); + .HasColumnType("nvarchar(64)"); - b.Property("RecommendProduceDate") - .HasColumnType("datetime2"); + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); - b.Property("RecommendQty") + b.Property("StdPackQty") .HasColumnType("decimal(18,6)"); - b.Property("RecommendSupplierBatch") + b.Property("SupplierBatch") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendSupplierBatch"); + .HasColumnName("SupplierBatch"); - b.Property("RecommendToLocationArea") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendToLocationArea"); + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); - b.Property("RecommendToLocationCode") + b.Property("ToContainerCode") + .HasColumnType("nvarchar(max)"); + + b.Property("ToLocationArea") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendToLocationCode"); + .HasColumnName("ToLocationArea"); - b.Property("RecommendToLocationErpCode") + b.Property("ToLocationCode") + .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendToLocationErpCode"); + .HasColumnName("ToLocationCode"); - b.Property("RecommendToLocationGroup") + b.Property("ToLocationErpCode") + .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendToLocationGroup"); + .HasColumnName("ToLocationErpCode"); - b.Property("RecommendToWarehouseCode") + b.Property("ToLocationGroup") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendToWarehouseCode"); + .HasColumnName("ToLocationGroup"); - b.Property("Remark") - .HasMaxLength(3072) - .HasColumnType("nvarchar(3072)") - .HasColumnName("Remark"); + b.Property("ToLot") + .HasColumnType("nvarchar(max)"); - b.Property("Status") + b.Property("ToPackingCode") + .HasColumnType("nvarchar(max)"); + + b.Property("ToStatus") .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)"); - b.Property("StdPackQty") - .HasColumnType("decimal(18,6)"); - - b.Property("TenantId") - .HasColumnType("uniqueidentifier") - .HasColumnName("TenantId"); + b.Property("ToWarehouseCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToWarehouseCode"); b.Property("Uom") - .HasColumnType("nvarchar(max)"); + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Uom"); b.HasKey("Id"); b.HasIndex("MasterID"); - b.ToTable("Job_UnplannedReceiptJobDetail", (string)null); + b.HasIndex("Number", "FromPackingCode", "FromLocationCode", "ToLocationCode") + .IsUnique() + .HasFilter("[FromPackingCode] IS NOT NULL"); + + b.ToTable("Store_WarehouseTransferNoteDetail", (string)null); }); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.UnplannedReceiptNote", b => + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.WipWarehouseAdjustNote", b => { b.Property("Id") .HasColumnType("uniqueidentifier"); @@ -19158,15 +23096,18 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.Property("ActiveDate") .HasColumnType("datetime2"); - b.Property("BuildDate") - .HasColumnType("datetime2"); - b.Property("ConcurrencyStamp") .IsConcurrencyToken() .HasMaxLength(40) .HasColumnType("nvarchar(40)") .HasColumnName("ConcurrencyStamp"); + b.Property("ConfirmTime") + .HasColumnType("datetime2"); + + b.Property("Confirmed") + .HasColumnType("bit"); + b.Property("CreationTime") .HasColumnType("datetime2") .HasColumnName("CreationTime"); @@ -19175,21 +23116,14 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("CreatorId"); - b.Property("DeptCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("DeptName") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - b.Property("ExtraProperties") .HasColumnType("nvarchar(max)") .HasColumnName("ExtraProperties"); b.Property("JobNumber") .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + .HasColumnType("nvarchar(64)") + .HasColumnName("JobNumber"); b.Property("LastModificationTime") .HasColumnType("datetime2") @@ -19205,25 +23139,22 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("nvarchar(64)") .HasColumnName("Number"); - b.Property("OANumber") - .HasColumnType("nvarchar(max)"); - b.Property("Remark") .HasMaxLength(3072) .HasColumnType("nvarchar(3072)") .HasColumnName("Remark"); + b.Property("RequestNumber") + .HasColumnType("nvarchar(max)"); + b.Property("TenantId") .HasColumnType("uniqueidentifier") .HasColumnName("TenantId"); - b.Property("UnplannedReceiptRequestNumber") + b.Property("Type") .HasMaxLength(64) .HasColumnType("nvarchar(64)"); - b.Property("UnplannedReceiptType") - .HasColumnType("int"); - b.Property("Worker") .HasColumnType("nvarchar(max)"); @@ -19232,10 +23163,10 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.HasIndex("Number") .IsUnique(); - b.ToTable("Store_UnplannedReceiptNote", (string)null); + b.ToTable("Store_WipWarehouseAdjustNote", (string)null); }); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.UnplannedReceiptNoteDetail", b => + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.WipWarehouseAdjustNoteDetail", b => { b.Property("Id") .HasColumnType("uniqueidentifier"); @@ -19243,14 +23174,6 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.Property("ArriveDate") .HasColumnType("datetime2"); - b.Property("CaseCode") - .HasColumnType("nvarchar(max)"); - - b.Property("ContainerCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ContainerCode"); - b.Property("CreationTime") .HasColumnType("datetime2") .HasColumnName("CreationTime"); @@ -19262,69 +23185,47 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.Property("ExpireDate") .HasColumnType("datetime2"); - b.Property("Explain") + b.Property("FromContainerCode") .HasColumnType("nvarchar(max)"); - b.Property("ExtraProperties") - .HasColumnType("nvarchar(max)") - .HasColumnName("ExtraProperties"); - - b.Property("HandledArriveDate") - .HasColumnType("datetime2"); - - b.Property("HandledContainerCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("HandledContainerCode"); - - b.Property("HandledExpireDate") - .HasColumnType("datetime2"); - - b.Property("HandledLot") + b.Property("FromLocationArea") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("HandledLot"); + .HasColumnName("FromLocationArea"); - b.Property("HandledPackingCode") + b.Property("FromLocationCode") + .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("HandledPackingCode"); - - b.Property("HandledProduceDate") - .HasColumnType("datetime2"); - - b.Property("HandledQty") - .HasColumnType("decimal(18,6)"); + .HasColumnName("FromLocationCode"); - b.Property("HandledSupplierBatch") + b.Property("FromLocationErpCode") + .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("HandledSupplierBatch"); + .HasColumnName("FromLocationErpCode"); - b.Property("HandledToLocationArea") + b.Property("FromLocationGroup") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("HandledToLocationArea"); + .HasColumnName("FromLocationGroup"); - b.Property("HandledToLocationCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("HandledToLocationCode"); + b.Property("FromLot") + .HasColumnType("nvarchar(max)"); - b.Property("HandledToLocationErpCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("HandledToLocationErpCode"); + b.Property("FromPackingCode") + .HasColumnType("nvarchar(450)"); - b.Property("HandledToLocationGroup") + b.Property("FromStatus") + .IsRequired() .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("HandledToLocationGroup"); + .HasColumnType("nvarchar(64)"); - b.Property("HandledToWarehouseCode") + b.Property("FromWarehouseCode") + .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("HandledToWarehouseCode"); + .HasColumnName("FromWarehouseCode"); b.Property("ItemCode") .IsRequired() @@ -19355,33 +23256,6 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("LastModifierId"); - b.Property("LocationArea") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("LocationArea"); - - b.Property("LocationCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("LocationCode"); - - b.Property("LocationErpCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("LocationErpCode"); - - b.Property("LocationGroup") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("LocationGroup"); - - b.Property("Lot") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("Lot"); - b.Property("MasterID") .HasColumnType("uniqueidentifier"); @@ -19391,107 +23265,80 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("nvarchar(64)") .HasColumnName("Number"); - b.Property("OnceBusiCode") - .HasColumnType("nvarchar(max)"); - - b.Property("PackingCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("PackingCode"); - b.Property("ProduceDate") .HasColumnType("datetime2"); - b.Property("ProjCapacityCode") - .HasColumnType("nvarchar(max)"); - b.Property("Qty") .HasPrecision(18, 6) .HasColumnType("decimal(18,6)") .HasColumnName("Qty"); - b.Property("ReasonCode") - .HasColumnType("nvarchar(max)"); - - b.Property("RecommendArriveDate") - .HasColumnType("datetime2"); - - b.Property("RecommendContainerCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendContainerCode"); - - b.Property("RecommendExpireDate") - .HasColumnType("datetime2"); - - b.Property("RecommendLot") + b.Property("Reason") .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendLot"); + .HasColumnType("nvarchar(64)"); - b.Property("RecommendPackingCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendPackingCode"); + b.Property("ReasonCode") + .HasMaxLength(4096) + .HasColumnType("nvarchar(max)"); - b.Property("RecommendProduceDate") - .HasColumnType("datetime2"); + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); - b.Property("RecommendQty") + b.Property("StdPackQty") .HasColumnType("decimal(18,6)"); - b.Property("RecommendSupplierBatch") + b.Property("SupplierBatch") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendSupplierBatch"); + .HasColumnName("SupplierBatch"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); - b.Property("RecommendToLocationArea") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendToLocationArea"); + b.Property("ToContainerCode") + .HasColumnType("nvarchar(max)"); - b.Property("RecommendToLocationCode") + b.Property("ToLocationArea") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendToLocationCode"); + .HasColumnName("ToLocationArea"); - b.Property("RecommendToLocationErpCode") + b.Property("ToLocationCode") + .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendToLocationErpCode"); + .HasColumnName("ToLocationCode"); - b.Property("RecommendToLocationGroup") + b.Property("ToLocationErpCode") + .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendToLocationGroup"); + .HasColumnName("ToLocationErpCode"); - b.Property("RecommendToWarehouseCode") + b.Property("ToLocationGroup") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendToWarehouseCode"); + .HasColumnName("ToLocationGroup"); - b.Property("Remark") - .HasMaxLength(3072) - .HasColumnType("nvarchar(3072)") - .HasColumnName("Remark"); + b.Property("ToLot") + .HasColumnType("nvarchar(max)"); - b.Property("Status") + b.Property("ToPackingCode") + .HasColumnType("nvarchar(max)"); + + b.Property("ToStatus") .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)"); - b.Property("StdPackQty") - .HasColumnType("decimal(18,6)"); - - b.Property("SupplierBatch") + b.Property("ToWarehouseCode") + .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("SupplierBatch"); - - b.Property("TenantId") - .HasColumnType("uniqueidentifier") - .HasColumnName("TenantId"); + .HasColumnName("ToWarehouseCode"); b.Property("Uom") .IsRequired() @@ -19499,24 +23346,18 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("nvarchar(64)") .HasColumnName("Uom"); - b.Property("WarehouseCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("WarehouseCode"); - b.HasKey("Id"); b.HasIndex("MasterID"); - b.HasIndex("Number", "PackingCode", "ItemCode", "Lot", "Status") + b.HasIndex("Number", "FromPackingCode", "FromLocationCode", "ToLocationCode", "FromStatus", "ToStatus") .IsUnique() - .HasFilter("[Lot] IS NOT NULL"); + .HasFilter("[FromPackingCode] IS NOT NULL"); - b.ToTable("Store_UnplannedReceiptNoteDetail", (string)null); + b.ToTable("Store_WipWarehouseAdjustNoteDetail", (string)null); }); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.UnplannedReceiptRequest", b => + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.WipWarehouseAdjustRequest", b => { b.Property("Id") .HasColumnType("uniqueidentifier"); @@ -19536,9 +23377,6 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.Property("AutoSubmit") .HasColumnType("bit"); - b.Property("BuildDate") - .HasColumnType("datetime2"); - b.Property("ConcurrencyStamp") .IsConcurrencyToken() .HasMaxLength(40) @@ -19553,14 +23391,6 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("CreatorId"); - b.Property("DeptCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("DeptName") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - b.Property("DirectCreateNote") .HasColumnType("bit"); @@ -19582,9 +23412,6 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("nvarchar(64)") .HasColumnName("Number"); - b.Property("OANumber") - .HasColumnType("nvarchar(max)"); - b.Property("Remark") .HasMaxLength(3072) .HasColumnType("nvarchar(3072)") @@ -19599,8 +23426,9 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("TenantId"); - b.Property("UnplannedReceiptType") - .HasColumnType("int"); + b.Property("Type") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); b.Property("Worker") .HasColumnType("nvarchar(max)"); @@ -19610,10 +23438,10 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.HasIndex("Number") .IsUnique(); - b.ToTable("Store_UnplannedReceiptRequest", (string)null); + b.ToTable("Store_WipWarehouseAdjustRequest", (string)null); }); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.UnplannedReceiptRequestDetail", b => + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.WipWarehouseAdjustRequestDetail", b => { b.Property("Id") .HasColumnType("uniqueidentifier"); @@ -19621,14 +23449,6 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.Property("ArriveDate") .HasColumnType("datetime2"); - b.Property("CaseCode") - .HasColumnType("nvarchar(max)"); - - b.Property("ContainerCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ContainerCode"); - b.Property("CreationTime") .HasColumnType("datetime2") .HasColumnName("CreationTime"); @@ -19640,68 +23460,76 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.Property("ExpireDate") .HasColumnType("datetime2"); - b.Property("Explain") + b.Property("FromContainerCode") .HasColumnType("nvarchar(max)"); - b.Property("ExtraProperties") - .HasColumnType("nvarchar(max)") - .HasColumnName("ExtraProperties"); - - b.Property("ItemCode") - .IsRequired() + b.Property("FromLocationArea") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("ItemCode"); + .HasColumnName("FromLocationArea"); - b.Property("ItemDesc1") + b.Property("FromLocationCode") + .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("ItemDesc1"); + .HasColumnName("FromLocationCode"); - b.Property("ItemDesc2") + b.Property("FromLocationErpCode") + .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("ItemDesc2"); + .HasColumnName("FromLocationErpCode"); - b.Property("ItemName") + b.Property("FromLocationGroup") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("ItemName"); + .HasColumnName("FromLocationGroup"); - b.Property("LastModificationTime") - .HasColumnType("datetime2") - .HasColumnName("LastModificationTime"); + b.Property("FromLot") + .HasColumnType("nvarchar(max)"); - b.Property("LastModifierId") - .HasColumnType("uniqueidentifier") - .HasColumnName("LastModifierId"); + b.Property("FromPackingCode") + .HasColumnType("nvarchar(max)"); - b.Property("LocationArea") + b.Property("FromStatus") + .IsRequired() .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("LocationArea"); + .HasColumnType("nvarchar(64)"); - b.Property("LocationCode") + b.Property("FromWarehouseCode") .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("LocationCode"); + .HasColumnName("FromWarehouseCode"); - b.Property("LocationErpCode") + b.Property("ItemCode") .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("LocationErpCode"); + .HasColumnName("ItemCode"); - b.Property("LocationGroup") + b.Property("ItemDesc1") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("LocationGroup"); + .HasColumnName("ItemDesc1"); - b.Property("Lot") + b.Property("ItemDesc2") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("Lot"); + .HasColumnName("ItemDesc2"); + + b.Property("ItemName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ItemName"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); b.Property("MasterID") .HasColumnType("uniqueidentifier"); @@ -19712,27 +23540,20 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("nvarchar(64)") .HasColumnName("Number"); - b.Property("OnceBusiCode") - .HasColumnType("nvarchar(max)"); - - b.Property("PackingCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("PackingCode"); - b.Property("ProduceDate") .HasColumnType("datetime2"); - b.Property("ProjCapacityCode") - .HasColumnType("nvarchar(max)"); - b.Property("Qty") .HasPrecision(18, 6) .HasColumnType("decimal(18,6)") .HasColumnName("Qty"); + b.Property("Reason") + .HasMaxLength(4096) + .HasColumnType("nvarchar(max)"); + b.Property("ReasonCode") + .HasMaxLength(4096) .HasColumnType("nvarchar(max)"); b.Property("Remark") @@ -19740,11 +23561,6 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("nvarchar(3072)") .HasColumnName("Remark"); - b.Property("Status") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - b.Property("StdPackQty") .HasColumnType("decimal(18,6)"); @@ -19757,30 +23573,62 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("TenantId"); - b.Property("Uom") + b.Property("ToContainerCode") + .HasColumnType("nvarchar(max)"); + + b.Property("ToLocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToLocationArea"); + + b.Property("ToLocationCode") .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("Uom"); + .HasColumnName("ToLocationCode"); - b.Property("WarehouseCode") + b.Property("ToLocationErpCode") .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("WarehouseCode"); + .HasColumnName("ToLocationErpCode"); + + b.Property("ToLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToLocationGroup"); + + b.Property("ToLot") + .HasColumnType("nvarchar(max)"); + + b.Property("ToPackingCode") + .HasColumnType("nvarchar(max)"); + + b.Property("ToStatus") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ToWarehouseCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("ToWarehouseCode"); + + b.Property("Uom") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Uom"); b.HasKey("Id"); b.HasIndex("MasterID"); - b.HasIndex("Number", "PackingCode", "ItemCode", "Lot", "Status") - .IsUnique() - .HasFilter("[Lot] IS NOT NULL"); - - b.ToTable("Store_UnplannedReceiptRequestDetail", (string)null); + b.ToTable("Store_WipWarehouseAdjustRequestDetail", (string)null); }); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.WarehouseTransferNote", b => + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.WorkOrder", b => { b.Property("Id") .HasColumnType("uniqueidentifier"); @@ -19802,14 +23650,33 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("CreatorId"); + b.Property("EffectiveDate") + .HasColumnType("datetime2"); + b.Property("ExtraProperties") .HasColumnType("nvarchar(max)") .HasColumnName("ExtraProperties"); - b.Property("JobNumber") + 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("JobNumber"); + .HasColumnName("ItemName"); b.Property("LastModificationTime") .HasColumnType("datetime2") @@ -19819,25 +23686,58 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("LastModifierId"); + b.Property("LocationCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + b.Property("Number") .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)") .HasColumnName("Number"); + b.Property("Op") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Qty") + .HasPrecision(18, 6) + .HasColumnType("decimal(18,6)") + .HasColumnName("Qty"); + b.Property("Remark") .HasMaxLength(3072) .HasColumnType("nvarchar(3072)") .HasColumnName("Remark"); - b.Property("SupplierCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - b.Property("TenantId") .HasColumnType("uniqueidentifier") .HasColumnName("TenantId"); + b.Property("Type") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Uom") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("Uom"); + + b.Property("WoStatus") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("WorkOrderId") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("WorkStation") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + b.Property("Worker") .HasColumnType("nvarchar(max)"); @@ -19846,17 +23746,14 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.HasIndex("Number") .IsUnique(); - b.ToTable("Store_WarehouseTransferNote", (string)null); + b.ToTable("Store_WorkOrder", (string)null); }); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.WarehouseTransferNoteDetail", b => + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.WorkOrderDetail", b => { b.Property("Id") .HasColumnType("uniqueidentifier"); - b.Property("ArriveDate") - .HasColumnType("datetime2"); - b.Property("CreationTime") .HasColumnType("datetime2") .HasColumnName("CreationTime"); @@ -19865,51 +23762,9 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("CreatorId"); - b.Property("ExpireDate") + b.Property("EffectiveDate") .HasColumnType("datetime2"); - b.Property("FromContainerCode") - .HasColumnType("nvarchar(max)"); - - b.Property("FromLocationArea") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("FromLocationArea"); - - b.Property("FromLocationCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("FromLocationCode"); - - b.Property("FromLocationErpCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("FromLocationErpCode"); - - b.Property("FromLocationGroup") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("FromLocationGroup"); - - b.Property("FromLot") - .HasColumnType("nvarchar(max)"); - - b.Property("FromPackingCode") - .HasColumnType("nvarchar(450)"); - - b.Property("FromStatus") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("FromWarehouseCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("FromWarehouseCode"); - b.Property("ItemCode") .IsRequired() .HasMaxLength(64) @@ -19948,15 +23803,18 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("nvarchar(64)") .HasColumnName("Number"); - b.Property("ProduceDate") - .HasColumnType("datetime2"); + b.Property("Op") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); - b.Property("Qty") - .HasPrecision(18, 6) - .HasColumnType("decimal(18,6)") - .HasColumnName("Qty"); + b.Property("RawLocationCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); - b.Property("Reason") + b.Property("RawQty") + .HasColumnType("decimal(18,6)"); + + b.Property("RawUom") .HasMaxLength(64) .HasColumnType("nvarchar(64)"); @@ -19965,97 +23823,133 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("nvarchar(3072)") .HasColumnName("Remark"); - b.Property("StdPackQty") - .HasColumnType("decimal(18,6)"); - - b.Property("SupplierBatch") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("SupplierBatch"); - b.Property("TenantId") .HasColumnType("uniqueidentifier") .HasColumnName("TenantId"); - b.Property("ToContainerCode") - .HasColumnType("nvarchar(max)"); + b.HasKey("Id"); - b.Property("ToLocationArea") + b.HasIndex("MasterID"); + + b.HasIndex("Number", "ItemCode") + .IsUnique(); + + b.ToTable("Store_WorkOrderDetail", (string)null); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Equipments.EquipmentRecord", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("BarCode") .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ToLocationArea"); + .HasColumnType("nvarchar(64)"); - b.Property("ToLocationCode") - .IsRequired() + b.Property("Batch") .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ToLocationCode"); + .HasColumnType("nvarchar(64)"); - b.Property("ToLocationErpCode") - .IsRequired() + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("EqptCode") .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ToLocationErpCode"); + .HasColumnType("nvarchar(64)"); - b.Property("ToLocationGroup") + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("FromLocCode") .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ToLocationGroup"); + .HasColumnType("nvarchar(64)"); - b.Property("ToLot") - .HasColumnType("nvarchar(max)"); + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); - b.Property("ToPackingCode") - .HasColumnType("nvarchar(max)"); + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); - b.Property("ToStatus") - .IsRequired() + b.Property("PartCode") .HasMaxLength(64) .HasColumnType("nvarchar(64)"); - b.Property("ToWarehouseCode") - .IsRequired() + b.Property("Qty") + .HasColumnType("decimal(18,6)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("State") + .HasColumnType("int"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("ToLocCode") .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ToWarehouseCode"); + .HasColumnType("nvarchar(64)"); - b.Property("Uom") - .IsRequired() + b.Property("Type") .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("Uom"); + .HasColumnType("int"); b.HasKey("Id"); - b.HasIndex("MasterID"); - - b.HasIndex("Number", "FromPackingCode", "FromLocationCode", "ToLocationCode") - .IsUnique() - .HasFilter("[FromPackingCode] IS NOT NULL"); + b.HasIndex("EqptCode"); - b.ToTable("Store_WarehouseTransferNoteDetail", (string)null); + b.ToTable("Store_EquipmentRecord", (string)null); }); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.WipWarehouseAdjustNote", b => + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Jobs.IssueJobs.CoatingIssueJob", b => { b.Property("Id") + .ValueGeneratedOnAdd() .HasColumnType("uniqueidentifier"); - b.Property("ActiveDate") + b.Property("AcceptTime") + .HasColumnType("datetime2"); + + b.Property("AcceptUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("AcceptUserName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("CompleteTime") .HasColumnType("datetime2"); + b.Property("CompleteUserId") + .HasColumnType("uniqueidentifier"); + + b.Property("CompleteUserName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + b.Property("ConcurrencyStamp") .IsConcurrencyToken() .HasMaxLength(40) .HasColumnType("nvarchar(40)") .HasColumnName("ConcurrencyStamp"); - b.Property("ConfirmTime") - .HasColumnType("datetime2"); - - b.Property("Confirmed") - .HasColumnType("bit"); - b.Property("CreationTime") .HasColumnType("datetime2") .HasColumnName("CreationTime"); @@ -20068,10 +23962,24 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("nvarchar(max)") .HasColumnName("ExtraProperties"); - b.Property("JobNumber") + b.Property("IsAutoComplete") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false); + + b.Property("JobDescription") + .HasMaxLength(1024) + .HasColumnType("nvarchar(1024)"); + + b.Property("JobStatus") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("JobType") + .IsRequired() .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("JobNumber"); + .HasColumnType("nvarchar(64)"); b.Property("LastModificationTime") .HasColumnType("datetime2") @@ -20081,47 +23989,77 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("LastModifierId"); + b.Property("MaterialRequestNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + b.Property("Number") .IsRequired() .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("Number"); + .HasColumnType("nvarchar(64)"); + + b.Property("Priority") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasDefaultValue(0); + + b.Property("PriorityIncrement") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasDefaultValue(0); + + b.Property("ProdLine") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); b.Property("Remark") .HasMaxLength(3072) .HasColumnType("nvarchar(3072)") .HasColumnName("Remark"); - b.Property("RequestNumber") - .HasColumnType("nvarchar(max)"); + b.Property("RequestType") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); b.Property("TenantId") .HasColumnType("uniqueidentifier") .HasColumnName("TenantId"); - b.Property("Type") + b.Property("UpStreamJobNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("UseOnTheWayLocation") + .HasColumnType("bit"); + + b.Property("WarehouseCode") + .HasColumnType("nvarchar(max)"); + + b.Property("WorkGroupCode") .HasMaxLength(64) .HasColumnType("nvarchar(64)"); b.Property("Worker") .HasColumnType("nvarchar(max)"); + b.Property("Workshop") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + b.HasKey("Id"); b.HasIndex("Number") .IsUnique(); - b.ToTable("Store_WipWarehouseAdjustNote", (string)null); + b.ToTable("Job_CoatingIssueJob", (string)null); }); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.WipWarehouseAdjustNoteDetail", b => + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Jobs.IssueJobs.CoatingIssueJobDetail", b => { b.Property("Id") + .ValueGeneratedOnAdd() .HasColumnType("uniqueidentifier"); - b.Property("ArriveDate") - .HasColumnType("datetime2"); - b.Property("CreationTime") .HasColumnType("datetime2") .HasColumnName("CreationTime"); @@ -20130,50 +24068,73 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("CreatorId"); - b.Property("ExpireDate") + b.Property("DeliveryQty") + .HasColumnType("decimal(18,6)"); + + b.Property("DistributionType") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ExpiredTime") .HasColumnType("datetime2"); - b.Property("FromContainerCode") - .HasColumnType("nvarchar(max)"); + b.Property("HandledArriveDate") + .HasColumnType("datetime2"); - b.Property("FromLocationArea") + b.Property("HandledContainerCode") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("FromLocationArea"); + .HasColumnName("HandledContainerCode"); - b.Property("FromLocationCode") - .IsRequired() + b.Property("HandledExpireDate") + .HasColumnType("datetime2"); + + b.Property("HandledFromLocationArea") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("FromLocationCode"); + .HasColumnName("HandledFromLocationArea"); - b.Property("FromLocationErpCode") - .IsRequired() + b.Property("HandledFromLocationCode") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("FromLocationErpCode"); + .HasColumnName("HandledFromLocationCode"); - b.Property("FromLocationGroup") + b.Property("HandledFromLocationErpCode") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("FromLocationGroup"); + .HasColumnName("HandledFromLocationErpCode"); - b.Property("FromLot") - .HasColumnType("nvarchar(max)"); + b.Property("HandledFromLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledFromLocationGroup"); - b.Property("FromPackingCode") - .HasColumnType("nvarchar(450)"); + b.Property("HandledFromWarehouseCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledFromWarehouseCode"); - b.Property("FromStatus") - .IsRequired() + b.Property("HandledLot") .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledLot"); - b.Property("FromWarehouseCode") - .IsRequired() + b.Property("HandledPackingCode") .HasMaxLength(64) .HasColumnType("nvarchar(64)") - .HasColumnName("FromWarehouseCode"); + .HasColumnName("HandledPackingCode"); + + b.Property("HandledProduceDate") + .HasColumnType("datetime2"); + + b.Property("HandledQty") + .HasColumnType("decimal(18,6)"); + + b.Property("HandledSupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledSupplierBatch"); b.Property("ItemCode") .IsRequired() @@ -20210,127 +24171,178 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.Property("Number") .IsRequired() .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("Number"); + .HasColumnType("nvarchar(64)"); - b.Property("ProduceDate") + b.Property("OnTheWayLocationCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Operation") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("PlanBeginTime") .HasColumnType("datetime2"); - b.Property("Qty") - .HasPrecision(18, 6) - .HasColumnType("decimal(18,6)") - .HasColumnName("Qty"); + b.Property("PlannedSplitRule") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); - b.Property("Reason") + b.Property("PositionCode") .HasMaxLength(64) .HasColumnType("nvarchar(64)"); - b.Property("ReasonCode") - .HasMaxLength(4096) - .HasColumnType("nvarchar(max)"); + b.Property("ProdLine") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("RecommendArriveDate") + .HasColumnType("datetime2"); + + b.Property("RecommendContainerCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendContainerCode"); + + b.Property("RecommendExpireDate") + .HasColumnType("datetime2"); + + b.Property("RecommendFromLocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendFromLocationArea"); + + b.Property("RecommendFromLocationCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendFromLocationCode"); + + b.Property("RecommendFromLocationErpCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendFromLocationErpCode"); + + b.Property("RecommendFromLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendFromLocationGroup"); + + b.Property("RecommendFromWarehouseCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendFromWarehouseCode"); + + b.Property("RecommendLot") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendLot"); + + b.Property("RecommendPackingCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendPackingCode"); + + b.Property("RecommendProduceDate") + .HasColumnType("datetime2"); + + b.Property("RecommendQty") + .HasColumnType("decimal(18,6)"); + + b.Property("RecommendSupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendSupplierBatch"); + + b.Property("RecommendType") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); b.Property("Remark") .HasMaxLength(3072) .HasColumnType("nvarchar(3072)") .HasColumnName("Remark"); - b.Property("StdPackQty") + b.Property("RequestLocationCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("RoundedQty") .HasColumnType("decimal(18,6)"); - b.Property("SupplierBatch") + b.Property("Status") + .IsRequired() .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("SupplierBatch"); + .HasColumnType("nvarchar(64)"); + + b.Property("StdPackQty") + .HasColumnType("decimal(18,6)"); b.Property("TenantId") .HasColumnType("uniqueidentifier") .HasColumnName("TenantId"); - b.Property("ToContainerCode") - .HasColumnType("nvarchar(max)"); - b.Property("ToLocationArea") .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ToLocationArea"); + .HasColumnType("nvarchar(64)"); b.Property("ToLocationCode") - .IsRequired() .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ToLocationCode"); + .HasColumnType("nvarchar(64)"); b.Property("ToLocationErpCode") - .IsRequired() .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ToLocationErpCode"); + .HasColumnType("nvarchar(64)"); b.Property("ToLocationGroup") .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ToLocationGroup"); - - b.Property("ToLot") - .HasColumnType("nvarchar(max)"); - - b.Property("ToPackingCode") - .HasColumnType("nvarchar(max)"); + .HasColumnType("nvarchar(64)"); - b.Property("ToStatus") - .IsRequired() + b.Property("ToWarehouseCode") .HasMaxLength(64) .HasColumnType("nvarchar(64)"); - b.Property("ToWarehouseCode") + b.Property("TruncType") .IsRequired() .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ToWarehouseCode"); + .HasColumnType("nvarchar(64)"); b.Property("Uom") - .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("WorkStation") .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("Uom"); + .HasColumnType("nvarchar(64)"); b.HasKey("Id"); b.HasIndex("MasterID"); - b.HasIndex("Number", "FromPackingCode", "FromLocationCode", "ToLocationCode", "FromStatus", "ToStatus") - .IsUnique() - .HasFilter("[FromPackingCode] IS NOT NULL"); - - b.ToTable("Store_WipWarehouseAdjustNoteDetail", (string)null); + b.ToTable("Job_CoatingIssueJobDetail", (string)null); }); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.WipWarehouseAdjustRequest", b => + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Notes.IssueNotes.CoatingIssueNote", b => { b.Property("Id") + .ValueGeneratedOnAdd() .HasColumnType("uniqueidentifier"); b.Property("ActiveDate") .HasColumnType("datetime2"); - b.Property("AutoAgree") - .HasColumnType("bit"); - - b.Property("AutoCompleteJob") - .HasColumnType("bit"); - - b.Property("AutoHandle") - .HasColumnType("bit"); - - b.Property("AutoSubmit") - .HasColumnType("bit"); - b.Property("ConcurrencyStamp") .IsConcurrencyToken() .HasMaxLength(40) .HasColumnType("nvarchar(40)") .HasColumnName("ConcurrencyStamp"); + b.Property("ConfirmTime") + .HasColumnType("datetime2"); + + b.Property("Confirmed") + .HasColumnType("bit"); + b.Property("CreationTime") .HasColumnType("datetime2") .HasColumnName("CreationTime"); @@ -20339,13 +24351,15 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("CreatorId"); - b.Property("DirectCreateNote") - .HasColumnType("bit"); - b.Property("ExtraProperties") .HasColumnType("nvarchar(max)") .HasColumnName("ExtraProperties"); + b.Property("JobNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("JobNumber"); + b.Property("LastModificationTime") .HasColumnType("datetime2") .HasColumnName("LastModificationTime"); @@ -20365,8 +24379,11 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("nvarchar(3072)") .HasColumnName("Remark"); - b.Property("RequestStatus") - .IsRequired() + b.Property("RequestNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("RequestType") .HasMaxLength(64) .HasColumnType("nvarchar(64)"); @@ -20374,24 +24391,28 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("TenantId"); - b.Property("Type") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + b.Property("UseOnTheWayLocation") + .HasColumnType("bit"); b.Property("Worker") .HasColumnType("nvarchar(max)"); + b.Property("Workshop") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + b.HasKey("Id"); b.HasIndex("Number") .IsUnique(); - b.ToTable("Store_WipWarehouseAdjustRequest", (string)null); + b.ToTable("Store_CoatingIssueNote", (string)null); }); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.WipWarehouseAdjustRequestDetail", b => + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Notes.IssueNotes.CoatingIssueNoteDetail", b => { b.Property("Id") + .ValueGeneratedOnAdd() .HasColumnType("uniqueidentifier"); b.Property("ArriveDate") @@ -20408,6 +24429,9 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.Property("ExpireDate") .HasColumnType("datetime2"); + b.Property("ExpiredTime") + .HasColumnType("datetime2"); + b.Property("FromContainerCode") .HasColumnType("nvarchar(max)"); @@ -20437,7 +24461,7 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("nvarchar(max)"); b.Property("FromPackingCode") - .HasColumnType("nvarchar(max)"); + .HasColumnType("nvarchar(450)"); b.Property("FromStatus") .IsRequired() @@ -20450,6 +24474,66 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("nvarchar(64)") .HasColumnName("FromWarehouseCode"); + b.Property("HandledArriveDate") + .HasColumnType("datetime2"); + + b.Property("HandledContainerCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledContainerCode"); + + b.Property("HandledExpireDate") + .HasColumnType("datetime2"); + + b.Property("HandledFromLocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledFromLocationArea"); + + b.Property("HandledFromLocationCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledFromLocationCode"); + + b.Property("HandledFromLocationErpCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledFromLocationErpCode"); + + b.Property("HandledFromLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledFromLocationGroup"); + + b.Property("HandledFromWarehouseCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledFromWarehouseCode"); + + b.Property("HandledLot") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledLot"); + + b.Property("HandledPackingCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledPackingCode"); + + b.Property("HandledProduceDate") + .HasColumnType("datetime2"); + + b.Property("HandledQty") + .HasColumnType("decimal(18,6)"); + + b.Property("HandledSupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("HandledSupplierBatch"); + + b.Property("IssueTime") + .HasColumnType("datetime2"); + b.Property("ItemCode") .IsRequired() .HasMaxLength(64) @@ -20488,6 +24572,17 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("nvarchar(64)") .HasColumnName("Number"); + b.Property("OnTheWayLocationCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("PositionCode") + .HasColumnType("nvarchar(max)"); + + b.Property("ProdLine") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + b.Property("ProduceDate") .HasColumnType("datetime2"); @@ -20496,13 +24591,67 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("decimal(18,6)") .HasColumnName("Qty"); - b.Property("Reason") - .HasMaxLength(4096) - .HasColumnType("nvarchar(max)"); + b.Property("RecommendArriveDate") + .HasColumnType("datetime2"); - b.Property("ReasonCode") - .HasMaxLength(4096) - .HasColumnType("nvarchar(max)"); + b.Property("RecommendContainerCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendContainerCode"); + + b.Property("RecommendExpireDate") + .HasColumnType("datetime2"); + + b.Property("RecommendFromLocationArea") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendFromLocationArea"); + + b.Property("RecommendFromLocationCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendFromLocationCode"); + + b.Property("RecommendFromLocationErpCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendFromLocationErpCode"); + + b.Property("RecommendFromLocationGroup") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendFromLocationGroup"); + + b.Property("RecommendFromWarehouseCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendFromWarehouseCode"); + + b.Property("RecommendLot") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendLot"); + + b.Property("RecommendPackingCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendPackingCode"); + + b.Property("RecommendProduceDate") + .HasColumnType("datetime2"); + + b.Property("RecommendQty") + .HasColumnType("decimal(18,6)"); + + b.Property("RecommendSupplierBatch") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)") + .HasColumnName("RecommendSupplierBatch"); + + b.Property("RecommendType") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); b.Property("Remark") .HasMaxLength(3072) @@ -20569,21 +24718,44 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("nvarchar(64)") .HasColumnName("Uom"); + b.Property("WorkStation") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + b.HasKey("Id"); + b.HasIndex("FromPackingCode"); + b.HasIndex("MasterID"); - b.ToTable("Store_WipWarehouseAdjustRequestDetail", (string)null); + b.HasIndex("Number", "FromPackingCode", "FromLocationCode", "ToLocationCode") + .IsUnique() + .HasFilter("[FromPackingCode] IS NOT NULL"); + + b.ToTable("Store_CoatingIssueNoteDetail", (string)null); }); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.WorkOrder", b => + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Requests.MaterialRequests.CoatingMaterialRequest", b => { b.Property("Id") + .ValueGeneratedOnAdd() .HasColumnType("uniqueidentifier"); b.Property("ActiveDate") .HasColumnType("datetime2"); + b.Property("AutoAgree") + .HasColumnType("bit"); + + b.Property("AutoCompleteJob") + .HasColumnType("bit"); + + b.Property("AutoHandle") + .HasColumnType("bit"); + + b.Property("AutoSubmit") + .HasColumnType("bit"); + b.Property("ConcurrencyStamp") .IsConcurrencyToken() .HasMaxLength(40) @@ -20598,34 +24770,13 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("CreatorId"); - b.Property("EffectiveDate") - .HasColumnType("datetime2"); + b.Property("DirectCreateNote") + .HasColumnType("bit"); b.Property("ExtraProperties") .HasColumnType("nvarchar(max)") .HasColumnName("ExtraProperties"); - b.Property("ItemCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ItemCode"); - - b.Property("ItemDesc1") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ItemDesc1"); - - b.Property("ItemDesc2") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ItemDesc2"); - - b.Property("ItemName") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ItemName"); - b.Property("LastModificationTime") .HasColumnType("datetime2") .HasColumnName("LastModificationTime"); @@ -20634,72 +24785,60 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("LastModifierId"); - b.Property("LocationCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - b.Property("Number") .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)") .HasColumnName("Number"); - b.Property("Op") + b.Property("PreparationPlanNumber") .HasMaxLength(64) .HasColumnType("nvarchar(64)"); - b.Property("Qty") - .HasPrecision(18, 6) - .HasColumnType("decimal(18,6)") - .HasColumnName("Qty"); + b.Property("ProdLine") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); b.Property("Remark") .HasMaxLength(3072) .HasColumnType("nvarchar(3072)") .HasColumnName("Remark"); + b.Property("RequestStatus") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + b.Property("TenantId") .HasColumnType("uniqueidentifier") .HasColumnName("TenantId"); b.Property("Type") - .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)"); - b.Property("Uom") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("Uom"); - - b.Property("WoStatus") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + b.Property("UseOnTheWayLocation") + .HasColumnType("bit"); - b.Property("WorkOrderId") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + b.Property("Worker") + .HasColumnType("nvarchar(max)"); - b.Property("WorkStation") + b.Property("Workshop") .HasMaxLength(64) .HasColumnType("nvarchar(64)"); - b.Property("Worker") - .HasColumnType("nvarchar(max)"); - b.HasKey("Id"); b.HasIndex("Number") .IsUnique(); - b.ToTable("Store_WorkOrder", (string)null); + b.ToTable("Store_CoatingMaterialRequest", (string)null); }); - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.WorkOrderDetail", b => + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Requests.MaterialRequests.CoatingMaterialRequestDetail", b => { b.Property("Id") + .ValueGeneratedOnAdd() .HasColumnType("uniqueidentifier"); b.Property("CreationTime") @@ -20710,9 +24849,16 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("CreatorId"); - b.Property("EffectiveDate") + b.Property("ExpiredTime") .HasColumnType("datetime2"); + b.Property("FromLocationArea") + .HasColumnType("nvarchar(max)"); + + b.Property("IssuedQty") + .HasPrecision(18, 6) + .HasColumnType("decimal(18,6)"); + b.Property("ItemCode") .IsRequired() .HasMaxLength(64) @@ -20751,18 +24897,24 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("nvarchar(64)") .HasColumnName("Number"); - b.Property("Op") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); + b.Property("PositionCode") + .HasColumnType("nvarchar(max)"); - b.Property("RawLocationCode") + b.Property("ProdLine") .HasMaxLength(64) .HasColumnType("nvarchar(64)"); - b.Property("RawQty") + b.Property("Qty") + .HasPrecision(18, 6) + .HasColumnType("decimal(18,6)") + .HasColumnName("Qty"); + + b.Property("ReceivedQty") + .HasPrecision(18, 6) .HasColumnType("decimal(18,6)"); - b.Property("RawUom") + b.Property("RecommendType") + .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)"); @@ -20771,18 +24923,63 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("nvarchar(3072)") .HasColumnName("Remark"); + b.Property("Status") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("StdPackQty") + .HasColumnType("decimal(18,6)"); + b.Property("TenantId") .HasColumnType("uniqueidentifier") .HasColumnName("TenantId"); + b.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") + b.HasIndex("Number", "ItemCode", "ToLocationCode") .IsUnique(); - b.ToTable("Store_WorkOrderDetail", (string)null); + b.ToTable("Store_CoatingMaterialRequestDetail", (string)null); }); modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.BackFlushNoteDetail", b => @@ -20812,6 +25009,33 @@ namespace Win_in.Sfs.Wms.Store.Migrations .IsRequired(); }); + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ContainerJobDetail", b => + { + b.HasOne("Win_in.Sfs.Wms.Store.Domain.ContainerJob", null) + .WithMany("Details") + .HasForeignKey("MasterID") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ContainerNoteDetail", b => + { + b.HasOne("Win_in.Sfs.Wms.Store.Domain.ContainerNote", null) + .WithMany("Details") + .HasForeignKey("MasterID") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ContainerRequestDetail", b => + { + b.HasOne("Win_in.Sfs.Wms.Store.Domain.ContainerRequest", null) + .WithMany("Details") + .HasForeignKey("MasterID") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.CountAdjustNoteDetail", b => { b.HasOne("Win_in.Sfs.Wms.Store.Domain.CountAdjustNote", null) @@ -20911,6 +25135,33 @@ namespace Win_in.Sfs.Wms.Store.Migrations .IsRequired(); }); + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.InjectionJobDetail", b => + { + b.HasOne("Win_in.Sfs.Wms.Store.Domain.InjectionJob", null) + .WithMany("Details") + .HasForeignKey("MasterID") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.InjectionNoteDetail", b => + { + b.HasOne("Win_in.Sfs.Wms.Store.Domain.InjectionNote", null) + .WithMany("Details") + .HasForeignKey("MasterID") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.InjectionRequestDetail", b => + { + b.HasOne("Win_in.Sfs.Wms.Store.Domain.InjectionRequest", null) + .WithMany("Details") + .HasForeignKey("MasterID") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.InspectAbnormalNoteDetail", b => { b.HasOne("Win_in.Sfs.Wms.Store.Domain.InspectAbnormalNote", null) @@ -21172,6 +25423,15 @@ namespace Win_in.Sfs.Wms.Store.Migrations .IsRequired(); }); + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ProductRecycleJobDetail", b => + { + b.HasOne("Win_in.Sfs.Wms.Store.Domain.ProductRecycleJob", null) + .WithMany("Details") + .HasForeignKey("MasterID") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ProductRecycleMaterialDetail", b => { b.HasOne("Win_in.Sfs.Wms.Store.Domain.ProductRecycleNote", null) @@ -21343,6 +25603,33 @@ namespace Win_in.Sfs.Wms.Store.Migrations .IsRequired(); }); + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.TransferLibJobDetail", b => + { + b.HasOne("Win_in.Sfs.Wms.Store.Domain.TransferLibJob", null) + .WithMany("Details") + .HasForeignKey("MasterID") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.TransferLibNoteDetail", b => + { + b.HasOne("Win_in.Sfs.Wms.Store.Domain.TransferLibNote", null) + .WithMany("Details") + .HasForeignKey("MasterID") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.TransferLibRequestDetail", b => + { + b.HasOne("Win_in.Sfs.Wms.Store.Domain.TransferLibRequest", null) + .WithMany("Details") + .HasForeignKey("MasterID") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.TransferNoteDetail", b => { b.HasOne("Win_in.Sfs.Wms.Store.Domain.TransferNote", null) @@ -21451,6 +25738,33 @@ namespace Win_in.Sfs.Wms.Store.Migrations .IsRequired(); }); + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Jobs.IssueJobs.CoatingIssueJobDetail", b => + { + b.HasOne("Win_in.Sfs.Wms.Store.Jobs.IssueJobs.CoatingIssueJob", null) + .WithMany("Details") + .HasForeignKey("MasterID") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Notes.IssueNotes.CoatingIssueNoteDetail", b => + { + b.HasOne("Win_in.Sfs.Wms.Store.Notes.IssueNotes.CoatingIssueNote", null) + .WithMany("Details") + .HasForeignKey("MasterID") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Requests.MaterialRequests.CoatingMaterialRequestDetail", b => + { + b.HasOne("Win_in.Sfs.Wms.Store.Requests.MaterialRequests.CoatingMaterialRequest", null) + .WithMany("Details") + .HasForeignKey("MasterID") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.BackFlushNote", b => { b.Navigation("Details"); @@ -21466,6 +25780,21 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.Navigation("Details"); }); + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ContainerJob", b => + { + b.Navigation("Details"); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ContainerNote", b => + { + b.Navigation("Details"); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ContainerRequest", b => + { + b.Navigation("Details"); + }); + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.CountAdjustNote", b => { b.Navigation("Details"); @@ -21521,6 +25850,21 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.Navigation("Details"); }); + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.InjectionJob", b => + { + b.Navigation("Details"); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.InjectionNote", b => + { + b.Navigation("Details"); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.InjectionRequest", b => + { + b.Navigation("Details"); + }); + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.InspectAbnormalNote", b => { b.Navigation("Details"); @@ -21657,6 +26001,11 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.Navigation("Details"); }); + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ProductRecycleJob", b => + { + b.Navigation("Details"); + }); + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ProductRecycleNote", b => { b.Navigation("Details"); @@ -21749,6 +26098,21 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.Navigation("Details"); }); + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.TransferLibJob", b => + { + b.Navigation("Details"); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.TransferLibNote", b => + { + b.Navigation("Details"); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.TransferLibRequest", b => + { + b.Navigation("Details"); + }); + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.TransferNote", b => { b.Navigation("Details"); @@ -21808,6 +26172,21 @@ namespace Win_in.Sfs.Wms.Store.Migrations { b.Navigation("Details"); }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Jobs.IssueJobs.CoatingIssueJob", b => + { + b.Navigation("Details"); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Notes.IssueNotes.CoatingIssueNote", b => + { + b.Navigation("Details"); + }); + + modelBuilder.Entity("Win_in.Sfs.Wms.Store.Requests.MaterialRequests.CoatingMaterialRequest", b => + { + b.Navigation("Details"); + }); #pragma warning restore 612, 618 } } diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/Notes/IssueNotes/AssembleNotes/AssembleNoteDbContextModelCreatingExtensions.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/Notes/IssueNotes/AssembleNotes/AssembleNoteDbContextModelCreatingExtensions.cs new file mode 100644 index 000000000..f13daeb61 --- /dev/null +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/Notes/IssueNotes/AssembleNotes/AssembleNoteDbContextModelCreatingExtensions.cs @@ -0,0 +1,63 @@ +using Microsoft.EntityFrameworkCore; +using Volo.Abp.EntityFrameworkCore.Modeling; +using Win_in.Sfs.Shared.Domain.Shared; +using Win_in.Sfs.Wms.Store.Domain; + +namespace Win_in.Sfs.Wms.Store.EntityFrameworkCore; + +public static class AssembleNoteDbContextModelCreatingExtensions +{ + public static void ConfigureAssembleNote(this ModelBuilder builder, StoreModelBuilderConfigurationOptions options) + { + builder.Entity(b => + { + //Configure table & schema name + b.ToTable(options.TablePrefix + nameof(AssembleNote), options.Schema); + //Configure ABP properties + b.ConfigureByConvention(); + //Configure Sfs base properties + b.ConfigureSfsStoreBase(); + + //Properties + b.Property(q => q.RequestNumber).HasMaxLength(SfsPropertyConst.CodeLength); + b.Property(q => q.RequestType).HasMaxLength(SfsPropertyConst.CodeLength); + b.Property(q => q.Workshop).HasMaxLength(SfsPropertyConst.NameLength); + b.Property(q => q.Remark).HasMaxLength(SfsPropertyConst.RemarkLength); + + //Relations + b.HasMany(q => q.Details).WithOne().HasForeignKey(d => d.MasterID).IsRequired(); + + //Indexes + b.HasIndex(q => new { q.Number }).IsUnique(); + }); + + builder.Entity(b => + { + //Configure table & schema name + b.ToTable(options.TablePrefix + nameof(AssembleNoteDetail), options.Schema); + //Configure ABP properties + b.ConfigureByConvention(); + //Configure Sfs base properties + b.ConfigureSfsStoreBase(); + //Configure Sfs store detail properties + b.ConfigureSfsStoreDetailBase(); + + //Properties + b.Property(q => q.IssueTime).IsRequired(); + b.Property(q => q.ExpiredTime).IsRequired(); + b.Property(q => q.ProdLine).HasMaxLength(SfsPropertyConst.NameLength); + b.Property(q => q.WorkStation).HasMaxLength(SfsPropertyConst.NameLength); + b.Property(q => q.OnTheWayLocationCode).HasMaxLength(SfsPropertyConst.CodeLength); + b.Property(q => q.FromStatus).HasMaxLength(SfsPropertyConst.NameLength).HasConversion(); + b.Property(q => q.ToStatus).HasMaxLength(SfsPropertyConst.NameLength).HasConversion(); + b.Property(q => q.PositionCode).HasMaxLength(SfsPropertyConst.CodeLength); + b.Property(q => q.RecommendType).HasMaxLength(SfsPropertyConst.NameLength).HasConversion(); + + //Relations + + //Indexes + b.HasIndex(q => new { q.Number, q.FromPackingCode, q.FromLocationCode, q.ToLocationCode }).IsUnique(); + b.HasIndex(q => new { q.FromPackingCode }); + }); + } +} diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/Notes/IssueNotes/AssembleNotes/AssembleNoteEfCoreRepository.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/Notes/IssueNotes/AssembleNotes/AssembleNoteEfCoreRepository.cs new file mode 100644 index 000000000..4ab8d2677 --- /dev/null +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/Notes/IssueNotes/AssembleNotes/AssembleNoteEfCoreRepository.cs @@ -0,0 +1,11 @@ +using Volo.Abp.EntityFrameworkCore; +using Win_in.Sfs.Wms.Store.Domain; + +namespace Win_in.Sfs.Wms.Store.EntityFrameworkCore; + +public class AssembleNoteEfCoreRepository : SfsStoreEfCoreRepositoryBase, IAssembleNoteRepository +{ + public AssembleNoteEfCoreRepository(IDbContextProvider dbContextProvider) : base(dbContextProvider) + { + } +} diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/Notes/IssueNotes/CoatingIssueNoteDbContextModelCreatingExtensions.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/Notes/IssueNotes/CoatingIssueNoteDbContextModelCreatingExtensions.cs new file mode 100644 index 000000000..11dcd02be --- /dev/null +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/Notes/IssueNotes/CoatingIssueNoteDbContextModelCreatingExtensions.cs @@ -0,0 +1,62 @@ +using Microsoft.EntityFrameworkCore; +using Volo.Abp.EntityFrameworkCore.Modeling; +using Win_in.Sfs.Shared.Domain.Shared; +using Win_in.Sfs.Wms.Store.Notes.IssueNotes; + +namespace Win_in.Sfs.Wms.Store.EntityFrameworkCore; + +public static class CoatingIssueNoteDbContextModelCreatingExtensions +{ + public static void ConfigureCoatingIssueNote(this ModelBuilder builder, StoreModelBuilderConfigurationOptions options) + { + builder.Entity(b => + { + //Configure table & schema name + b.ToTable(options.TablePrefix + nameof(CoatingIssueNote), options.Schema); + //Configure ABP properties + b.ConfigureByConvention(); + //Configure Sfs base properties + b.ConfigureSfsStoreBase(); + + //Properties + b.Property(q => q.RequestNumber).HasMaxLength(SfsPropertyConst.CodeLength); + b.Property(q => q.RequestType).HasMaxLength(SfsPropertyConst.CodeLength); + b.Property(q => q.Workshop).HasMaxLength(SfsPropertyConst.NameLength); + b.Property(q => q.Remark).HasMaxLength(SfsPropertyConst.RemarkLength); + + //Relations + b.HasMany(q => q.Details).WithOne().HasForeignKey(d => d.MasterID).IsRequired(); + + //Indexes + b.HasIndex(q => new { q.Number }).IsUnique(); + }); + + builder.Entity(b => + { + //Configure table & schema name + b.ToTable(options.TablePrefix + nameof(CoatingIssueNoteDetail), options.Schema); + //Configure ABP properties + b.ConfigureByConvention(); + //Configure Sfs base properties + b.ConfigureSfsStoreBase(); + //Configure Sfs store detail properties + b.ConfigureSfsStoreDetailBase(); + + //Properties + b.Property(q => q.IssueTime).IsRequired(); + b.Property(q => q.ExpiredTime).IsRequired(); + b.Property(q => q.ProdLine).HasMaxLength(SfsPropertyConst.NameLength); + b.Property(q => q.WorkStation).HasMaxLength(SfsPropertyConst.NameLength); + b.Property(q => q.OnTheWayLocationCode).HasMaxLength(SfsPropertyConst.CodeLength); + b.Property(q => q.FromStatus).HasMaxLength(SfsPropertyConst.NameLength).HasConversion(); + b.Property(q => q.ToStatus).HasMaxLength(SfsPropertyConst.NameLength).HasConversion(); + b.Property(q => q.RecommendType).HasMaxLength(SfsPropertyConst.NameLength).HasConversion(); + + //Relations + + //Indexes + b.HasIndex(q => new { q.Number, q.FromPackingCode, q.FromLocationCode, q.ToLocationCode }).IsUnique(); + b.HasIndex(q => new { q.FromPackingCode }); + }); + } +} diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/Notes/IssueNotes/CoatingIssueNoteEfCoreRepository.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/Notes/IssueNotes/CoatingIssueNoteEfCoreRepository.cs new file mode 100644 index 000000000..52079ada4 --- /dev/null +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/Notes/IssueNotes/CoatingIssueNoteEfCoreRepository.cs @@ -0,0 +1,11 @@ +using Volo.Abp.EntityFrameworkCore; +using Win_in.Sfs.Wms.Store.Notes.IssueNotes; + +namespace Win_in.Sfs.Wms.Store.EntityFrameworkCore; + +public class CoatingIssueNoteEfCoreRepository : SfsStoreEfCoreRepositoryBase, ICoatingIssueNoteRepository +{ + public CoatingIssueNoteEfCoreRepository(IDbContextProvider dbContextProvider) : base(dbContextProvider) + { + } +} diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/Notes/IssueNotes/InjectionNotes/InjectionNoteDbContextModelCreatingExtensions.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/Notes/IssueNotes/InjectionNotes/InjectionNoteDbContextModelCreatingExtensions.cs new file mode 100644 index 000000000..debf08f37 --- /dev/null +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/Notes/IssueNotes/InjectionNotes/InjectionNoteDbContextModelCreatingExtensions.cs @@ -0,0 +1,63 @@ +using Microsoft.EntityFrameworkCore; +using Volo.Abp.EntityFrameworkCore.Modeling; +using Win_in.Sfs.Shared.Domain.Shared; +using Win_in.Sfs.Wms.Store.Domain; + +namespace Win_in.Sfs.Wms.Store.EntityFrameworkCore; + +public static class InjectionNoteDbContextModelCreatingExtensions +{ + public static void ConfigureInjectionNote(this ModelBuilder builder, StoreModelBuilderConfigurationOptions options) + { + builder.Entity(b => + { + //Configure table & schema name + b.ToTable(options.TablePrefix + nameof(InjectionNote), options.Schema); + //Configure ABP properties + b.ConfigureByConvention(); + //Configure Sfs base properties + b.ConfigureSfsStoreBase(); + + //Properties + b.Property(q => q.RequestNumber).HasMaxLength(SfsPropertyConst.CodeLength); + b.Property(q => q.RequestType).HasMaxLength(SfsPropertyConst.CodeLength); + b.Property(q => q.Workshop).HasMaxLength(SfsPropertyConst.NameLength); + b.Property(q => q.Remark).HasMaxLength(SfsPropertyConst.RemarkLength); + + //Relations + b.HasMany(q => q.Details).WithOne().HasForeignKey(d => d.MasterID).IsRequired(); + + //Indexes + b.HasIndex(q => new { q.Number }).IsUnique(); + }); + + builder.Entity(b => + { + //Configure table & schema name + b.ToTable(options.TablePrefix + nameof(InjectionNoteDetail), options.Schema); + //Configure ABP properties + b.ConfigureByConvention(); + //Configure Sfs base properties + b.ConfigureSfsStoreBase(); + //Configure Sfs store detail properties + b.ConfigureSfsStoreDetailBase(); + + //Properties + b.Property(q => q.IssueTime).IsRequired(); + b.Property(q => q.ExpiredTime).IsRequired(); + b.Property(q => q.ProdLine).HasMaxLength(SfsPropertyConst.NameLength); + b.Property(q => q.WorkStation).HasMaxLength(SfsPropertyConst.NameLength); + b.Property(q => q.OnTheWayLocationCode).HasMaxLength(SfsPropertyConst.CodeLength); + b.Property(q => q.FromStatus).HasMaxLength(SfsPropertyConst.NameLength).HasConversion(); + b.Property(q => q.ToStatus).HasMaxLength(SfsPropertyConst.NameLength).HasConversion(); + b.Property(q => q.PositionCode).HasMaxLength(SfsPropertyConst.CodeLength); + b.Property(q => q.RecommendType).HasMaxLength(SfsPropertyConst.NameLength).HasConversion(); + + //Relations + + //Indexes + b.HasIndex(q => new { q.Number, q.FromPackingCode, q.FromLocationCode, q.ToLocationCode }).IsUnique(); + b.HasIndex(q => new { q.FromPackingCode }); + }); + } +} diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/Notes/IssueNotes/InjectionNotes/InjectionNoteEfCoreRepository.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/Notes/IssueNotes/InjectionNotes/InjectionNoteEfCoreRepository.cs new file mode 100644 index 000000000..26e8dc61c --- /dev/null +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/Notes/IssueNotes/InjectionNotes/InjectionNoteEfCoreRepository.cs @@ -0,0 +1,11 @@ +using Volo.Abp.EntityFrameworkCore; +using Win_in.Sfs.Wms.Store.Domain; + +namespace Win_in.Sfs.Wms.Store.EntityFrameworkCore; + +public class InjectionNoteEfCoreRepository : SfsStoreEfCoreRepositoryBase, IInjectionNoteRepository +{ + public InjectionNoteEfCoreRepository(IDbContextProvider dbContextProvider) : base(dbContextProvider) + { + } +} diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/Notes/TransferLibNotes/TransferLibNoteDbContextModelCreatingExtensions.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/Notes/TransferLibNotes/TransferLibNoteDbContextModelCreatingExtensions.cs new file mode 100644 index 000000000..3b0e847fe --- /dev/null +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/Notes/TransferLibNotes/TransferLibNoteDbContextModelCreatingExtensions.cs @@ -0,0 +1,52 @@ +using Microsoft.EntityFrameworkCore; +using Volo.Abp.EntityFrameworkCore.Modeling; +using Win_in.Sfs.Shared.Domain.Shared; +using Win_in.Sfs.Wms.Store.Domain; + +namespace Win_in.Sfs.Wms.Store.EntityFrameworkCore; + +public static class TransferLibNoteDbContextModelCreatingExtensions +{ + public static void ConfigureTransferLibNote(this ModelBuilder builder, StoreModelBuilderConfigurationOptions options) + { + builder.Entity(b => + { + //Configure table & schema name + b.ToTable(options.TablePrefix + nameof(TransferLibNote), options.Schema); + //Configure ABP properties + b.ConfigureByConvention(); + //Configure Sfs base properties + b.ConfigureSfsStoreBase(); + //Properties + b.Property(q => q.Type).HasMaxLength(SfsPropertyConst.CodeLength); + + //Relations + b.HasMany(q => q.Details).WithOne().HasForeignKey(d => d.MasterID).IsRequired(); + + //Indexes + b.HasIndex(q => new { q.Number }).IsUnique(); + }); + + builder.Entity(b => + { + //Configure table & schema name + b.ToTable(options.TablePrefix + nameof(TransferLibNoteDetail), options.Schema); + //Configure ABP properties + b.ConfigureByConvention(); + //Configure Sfs base properties + b.ConfigureSfsStoreBase(); + //Configure Sfs store detail properties + b.ConfigureSfsStoreDetailBase(); + + //Properties + b.Property(q => q.Reason).HasMaxLength(SfsPropertyConst.CodeLength); + b.Property(q => q.FromStatus).HasMaxLength(SfsPropertyConst.NameLength).HasConversion(); + b.Property(q => q.ToStatus).HasMaxLength(SfsPropertyConst.NameLength).HasConversion(); + + //Relations + + //Indexes + b.HasIndex(q => new { q.Number, q.FromPackingCode, q.FromLocationCode, q.ToLocationCode, q.FromStatus, q.ToStatus }).IsUnique(); + }); + } +} diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/Notes/TransferLibNotes/TransferLibNoteEfCoreRepository.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/Notes/TransferLibNotes/TransferLibNoteEfCoreRepository.cs new file mode 100644 index 000000000..3b803dd84 --- /dev/null +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/Notes/TransferLibNotes/TransferLibNoteEfCoreRepository.cs @@ -0,0 +1,11 @@ +using Volo.Abp.EntityFrameworkCore; +using Win_in.Sfs.Wms.Store.Domain; + +namespace Win_in.Sfs.Wms.Store.EntityFrameworkCore; + +public class TransferLibNoteEfCoreRepository : SfsStoreEfCoreRepositoryBase, ITransferLibNoteRepository +{ + public TransferLibNoteEfCoreRepository(IDbContextProvider dbContextProvider) : base(dbContextProvider) + { + } +} diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/Requests/MaterialRequests/AssembleRequests/AssembleRequestDbContextModelCreatingExtensions.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/Requests/MaterialRequests/AssembleRequests/AssembleRequestDbContextModelCreatingExtensions.cs new file mode 100644 index 000000000..8d53f0ac3 --- /dev/null +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/Requests/MaterialRequests/AssembleRequests/AssembleRequestDbContextModelCreatingExtensions.cs @@ -0,0 +1,65 @@ +using Microsoft.EntityFrameworkCore; +using Volo.Abp.EntityFrameworkCore.Modeling; +using Win_in.Sfs.Shared.Domain.Shared; +using Win_in.Sfs.Wms.Store.Domain; + +namespace Win_in.Sfs.Wms.Store.EntityFrameworkCore; + +public static class AssembleRequestDbContextModelCreatingExtensions +{ + public static void ConfigureAssembleRequest(this ModelBuilder builder, StoreModelBuilderConfigurationOptions options) + { + builder.Entity(b => + { + //Configure table & schema name + b.ToTable(options.TablePrefix + nameof(AssembleRequest), options.Schema); + //Configure ABP properties + b.ConfigureByConvention(); + //Configure Sfs base properties + b.ConfigureSfsStoreBase(); + + //Properties + b.Property(q => q.Type).HasMaxLength(SfsPropertyConst.CodeLength); + b.Property(q => q.ProdLine).HasMaxLength(SfsPropertyConst.CodeLength); + b.Property(q => q.RequestStatus).HasMaxLength(SfsPropertyConst.NameLength).HasConversion(); + + //Relations + b.HasMany(q => q.Details).WithOne().HasForeignKey(d => d.MasterID).IsRequired(); + + //Indexes + b.HasIndex(q => new { q.Number }).IsUnique(); + }); + + builder.Entity(b => + { + //Configure table & schema name + b.ToTable(options.TablePrefix + nameof(AssembleRequestDetail), options.Schema); + //Configure ABP properties + b.ConfigureByConvention(); + //Configure Sfs base properties + b.ConfigureSfsStoreBase(); + //Configure Sfs store detail properties + b.ConfigureSfsStoreDetailBase(); + //Properties + b.Property(q => q.ToLocationCode).IsRequired().HasMaxLength(SfsPropertyConst.CodeLength); + b.Property(q => q.ToLocationErpCode).IsRequired().HasMaxLength(SfsPropertyConst.CodeLength); + b.Property(q => q.ToWarehouseCode).IsRequired().HasMaxLength(SfsPropertyConst.CodeLength); + b.Property(q => q.ToLocationArea).IsRequired().HasMaxLength(SfsPropertyConst.CodeLength); + b.Property(q => q.ToLocationGroup).IsRequired().HasMaxLength(SfsPropertyConst.CodeLength); + b.Property(q => q.ExpiredTime).IsRequired(); + b.Property(q => q.ProdLine).HasMaxLength(SfsPropertyConst.CodeLength); + b.Property(q => q.WorkStation).HasMaxLength(SfsPropertyConst.CodeLength); + b.Property(q => q.IssuedQty).HasPrecision(18, 6); + b.Property(q => q.ReceivedQty).HasPrecision(18, 6); + b.Property(q => q.Status).HasMaxLength(SfsPropertyConst.NameLength).HasConversion(); + b.Property(q => q.PositionCode).HasMaxLength(SfsPropertyConst.CodeLength); + b.Property(q => q.RecommendType).HasMaxLength(SfsPropertyConst.NameLength).HasConversion(); + + //Relations + + //Indexes + b.HasIndex(q => new { q.Number, q.ItemCode, q.ToLocationCode }).IsUnique(); + b.HasIndex(q => new { q.ItemCode }); + }); + } +} diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/Requests/MaterialRequests/AssembleRequests/AssembleRequestEfCoreRepository.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/Requests/MaterialRequests/AssembleRequests/AssembleRequestEfCoreRepository.cs new file mode 100644 index 000000000..7541df1ec --- /dev/null +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/Requests/MaterialRequests/AssembleRequests/AssembleRequestEfCoreRepository.cs @@ -0,0 +1,11 @@ +using Volo.Abp.EntityFrameworkCore; +using Win_in.Sfs.Wms.Store.Domain; + +namespace Win_in.Sfs.Wms.Store.EntityFrameworkCore; + +public class AssembleRequestEfCoreRepository : SfsStoreEfCoreRepositoryBase, IAssembleRequestRepository +{ + public AssembleRequestEfCoreRepository(IDbContextProvider dbContextProvider) : base(dbContextProvider) + { + } +} diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/Requests/MaterialRequests/CoatingMaterialRequestDbContextModelCreatingExtensions.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/Requests/MaterialRequests/CoatingMaterialRequestDbContextModelCreatingExtensions.cs new file mode 100644 index 000000000..ac89a7de5 --- /dev/null +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/Requests/MaterialRequests/CoatingMaterialRequestDbContextModelCreatingExtensions.cs @@ -0,0 +1,64 @@ +using Microsoft.EntityFrameworkCore; +using Volo.Abp.EntityFrameworkCore.Modeling; +using Win_in.Sfs.Shared.Domain.Shared; +using Win_in.Sfs.Wms.Store.Requests.MaterialRequests; + +namespace Win_in.Sfs.Wms.Store.EntityFrameworkCore; + +public static class CoatingMaterialRequestDbContextModelCreatingExtensions +{ + public static void ConfigureCoatingMaterialRequest(this ModelBuilder builder, StoreModelBuilderConfigurationOptions options) + { + builder.Entity(b => + { + //Configure table & schema name + b.ToTable(options.TablePrefix + nameof(CoatingMaterialRequest), options.Schema); + //Configure ABP properties + b.ConfigureByConvention(); + //Configure Sfs base properties + b.ConfigureSfsStoreBase(); + + //Properties + b.Property(q => q.Type).HasMaxLength(SfsPropertyConst.CodeLength); + b.Property(q => q.PreparationPlanNumber).HasMaxLength(SfsPropertyConst.CodeLength); + b.Property(q => q.ProdLine).HasMaxLength(SfsPropertyConst.CodeLength); + b.Property(q => q.Workshop).HasMaxLength(SfsPropertyConst.CodeLength); + b.Property(q => q.RequestStatus).HasMaxLength(SfsPropertyConst.NameLength).HasConversion(); + + //Relations + b.HasMany(q => q.Details).WithOne().HasForeignKey(d => d.MasterID).IsRequired(); + + //Indexes + b.HasIndex(q => new { q.Number }).IsUnique(); + }); + + builder.Entity(b => + { + //Configure table & schema name + b.ToTable(options.TablePrefix + nameof(CoatingMaterialRequestDetail), options.Schema); + //Configure ABP properties + b.ConfigureByConvention(); + //Configure Sfs base properties + b.ConfigureSfsStoreBase(); + //Configure Sfs store detail properties + b.ConfigureSfsStoreDetailBase(); + //Properties + b.Property(q => q.ToLocationCode).IsRequired().HasMaxLength(SfsPropertyConst.CodeLength); + b.Property(q => q.ToLocationErpCode).IsRequired().HasMaxLength(SfsPropertyConst.CodeLength); + b.Property(q => q.ToWarehouseCode).IsRequired().HasMaxLength(SfsPropertyConst.CodeLength); + b.Property(q => q.ToLocationArea).IsRequired().HasMaxLength(SfsPropertyConst.CodeLength); + b.Property(q => q.ToLocationGroup).IsRequired().HasMaxLength(SfsPropertyConst.CodeLength); + b.Property(q => q.ExpiredTime).IsRequired(); + b.Property(q => q.ProdLine).HasMaxLength(SfsPropertyConst.CodeLength); + b.Property(q => q.WorkStation).HasMaxLength(SfsPropertyConst.CodeLength); + b.Property(q => q.IssuedQty).HasPrecision(18, 6); + b.Property(q => q.ReceivedQty).HasPrecision(18, 6); + b.Property(q => q.Status).HasMaxLength(SfsPropertyConst.NameLength).HasConversion(); + b.Property(q => q.RecommendType).HasMaxLength(SfsPropertyConst.NameLength).HasConversion(); + //Relations + //Indexes + b.HasIndex(q => new { q.Number, q.ItemCode, q.ToLocationCode }).IsUnique(); + b.HasIndex(q => new { q.ItemCode }); + }); + } +} diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/Requests/MaterialRequests/CoatingMaterialRequestEfCoreRepository.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/Requests/MaterialRequests/CoatingMaterialRequestEfCoreRepository.cs new file mode 100644 index 000000000..14ee5826f --- /dev/null +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/Requests/MaterialRequests/CoatingMaterialRequestEfCoreRepository.cs @@ -0,0 +1,11 @@ +using Volo.Abp.EntityFrameworkCore; +using Win_in.Sfs.Wms.Store.Requests.MaterialRequests; + +namespace Win_in.Sfs.Wms.Store.EntityFrameworkCore; + +public class CoatingMaterialRequestEfCoreRepository : SfsStoreEfCoreRepositoryBase, ICoatingMaterialRequestRepository +{ + public CoatingMaterialRequestEfCoreRepository(IDbContextProvider dbContextProvider) : base(dbContextProvider) + { + } +} diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/Requests/MaterialRequests/InjectionRequests/InjectionRequestDbContextModelCreatingExtensions.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/Requests/MaterialRequests/InjectionRequests/InjectionRequestDbContextModelCreatingExtensions.cs new file mode 100644 index 000000000..530ad03a4 --- /dev/null +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/Requests/MaterialRequests/InjectionRequests/InjectionRequestDbContextModelCreatingExtensions.cs @@ -0,0 +1,65 @@ +using Microsoft.EntityFrameworkCore; +using Volo.Abp.EntityFrameworkCore.Modeling; +using Win_in.Sfs.Shared.Domain.Shared; +using Win_in.Sfs.Wms.Store.Domain; + +namespace Win_in.Sfs.Wms.Store.EntityFrameworkCore; + +public static class InjectionRequestDbContextModelCreatingExtensions +{ + public static void ConfigureInjectionRequest(this ModelBuilder builder, StoreModelBuilderConfigurationOptions options) + { + builder.Entity(b => + { + //Configure table & schema name + b.ToTable(options.TablePrefix + nameof(InjectionRequest), options.Schema); + //Configure ABP properties + b.ConfigureByConvention(); + //Configure Sfs base properties + b.ConfigureSfsStoreBase(); + + //Properties + b.Property(q => q.Type).HasMaxLength(SfsPropertyConst.CodeLength); + b.Property(q => q.ProdLine).HasMaxLength(SfsPropertyConst.CodeLength); + b.Property(q => q.RequestStatus).HasMaxLength(SfsPropertyConst.NameLength).HasConversion(); + + //Relations + b.HasMany(q => q.Details).WithOne().HasForeignKey(d => d.MasterID).IsRequired(); + + //Indexes + b.HasIndex(q => new { q.Number }).IsUnique(); + }); + + builder.Entity(b => + { + //Configure table & schema name + b.ToTable(options.TablePrefix + nameof(InjectionRequestDetail), options.Schema); + //Configure ABP properties + b.ConfigureByConvention(); + //Configure Sfs base properties + b.ConfigureSfsStoreBase(); + //Configure Sfs store detail properties + b.ConfigureSfsStoreDetailBase(); + //Properties + b.Property(q => q.ToLocationCode).IsRequired().HasMaxLength(SfsPropertyConst.CodeLength); + b.Property(q => q.ToLocationErpCode).IsRequired().HasMaxLength(SfsPropertyConst.CodeLength); + b.Property(q => q.ToWarehouseCode).IsRequired().HasMaxLength(SfsPropertyConst.CodeLength); + b.Property(q => q.ToLocationArea).IsRequired().HasMaxLength(SfsPropertyConst.CodeLength); + b.Property(q => q.ToLocationGroup).IsRequired().HasMaxLength(SfsPropertyConst.CodeLength); + b.Property(q => q.ExpiredTime).IsRequired(); + b.Property(q => q.ProdLine).HasMaxLength(SfsPropertyConst.CodeLength); + b.Property(q => q.WorkStation).HasMaxLength(SfsPropertyConst.CodeLength); + b.Property(q => q.IssuedQty).HasPrecision(18, 6); + b.Property(q => q.ReceivedQty).HasPrecision(18, 6); + b.Property(q => q.Status).HasMaxLength(SfsPropertyConst.NameLength).HasConversion(); + b.Property(q => q.PositionCode).HasMaxLength(SfsPropertyConst.CodeLength); + b.Property(q => q.RecommendType).HasMaxLength(SfsPropertyConst.NameLength).HasConversion(); + + //Relations + + //Indexes + b.HasIndex(q => new { q.Number, q.ItemCode, q.ToLocationCode }).IsUnique(); + b.HasIndex(q => new { q.ItemCode }); + }); + } +} diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/Requests/MaterialRequests/InjectionRequests/InjectionRequestEfCoreRepository.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/Requests/MaterialRequests/InjectionRequests/InjectionRequestEfCoreRepository.cs new file mode 100644 index 000000000..7b5e20a16 --- /dev/null +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/Requests/MaterialRequests/InjectionRequests/InjectionRequestEfCoreRepository.cs @@ -0,0 +1,11 @@ +using Volo.Abp.EntityFrameworkCore; +using Win_in.Sfs.Wms.Store.Domain; + +namespace Win_in.Sfs.Wms.Store.EntityFrameworkCore; + +public class InjectionRequestEfCoreRepository : SfsStoreEfCoreRepositoryBase, IInjectionRequestRepository +{ + public InjectionRequestEfCoreRepository(IDbContextProvider dbContextProvider) : base(dbContextProvider) + { + } +} diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/Requests/TransferLibRequests/TransferLibRequestDbContextModelCreatingExtensions.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/Requests/TransferLibRequests/TransferLibRequestDbContextModelCreatingExtensions.cs new file mode 100644 index 000000000..b5ce52256 --- /dev/null +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/Requests/TransferLibRequests/TransferLibRequestDbContextModelCreatingExtensions.cs @@ -0,0 +1,52 @@ +using Microsoft.EntityFrameworkCore; +using Volo.Abp.EntityFrameworkCore.Modeling; +using Win_in.Sfs.Shared.Domain.Shared; +using Win_in.Sfs.Wms.Store.Domain; + +namespace Win_in.Sfs.Wms.Store.EntityFrameworkCore; + +public static class TransferLibRequestDbContextModelCreatingExtensions +{ + public static void ConfigureTransferLibRequest(this ModelBuilder builder, StoreModelBuilderConfigurationOptions options) + { + builder.Entity(b => + { + //Configure table & schema name + b.ToTable(options.TablePrefix + nameof(TransferLibRequest), options.Schema); + //Configure ABP properties + b.ConfigureByConvention(); + //Configure Sfs base properties + b.ConfigureSfsStoreBase(); + //Properties + b.Property(q => q.Type).HasMaxLength(SfsPropertyConst.CodeLength); + b.Property(q => q.RequestStatus).HasMaxLength(SfsPropertyConst.NameLength).HasConversion(); + + //Relations + b.HasMany(q => q.Details).WithOne().HasForeignKey(d => d.MasterID).IsRequired(); + + //Indexes + b.HasIndex(q => new { q.Number }).IsUnique(); + }); + + builder.Entity(b => + { + //Configure table & schema name + b.ToTable(options.TablePrefix + nameof(TransferLibRequestDetail), options.Schema); + //Configure ABP properties + b.ConfigureByConvention(); + //Configure Sfs base properties + b.ConfigureSfsStoreBase(); + //Configure Sfs store detail properties + b.ConfigureSfsStoreDetailBase(); + + //Properties + b.Property(q => q.FromStatus).HasMaxLength(SfsPropertyConst.NameLength).HasConversion(); + b.Property(q => q.ToStatus).HasMaxLength(SfsPropertyConst.NameLength).HasConversion(); + + //Relations + + //Indexes + + }); + } +} diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/Requests/TransferLibRequests/TransferLibRequestEfCoreRepository.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/Requests/TransferLibRequests/TransferLibRequestEfCoreRepository.cs new file mode 100644 index 000000000..0c0cc0a79 --- /dev/null +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/Requests/TransferLibRequests/TransferLibRequestEfCoreRepository.cs @@ -0,0 +1,11 @@ +using Volo.Abp.EntityFrameworkCore; +using Win_in.Sfs.Wms.Store.Domain; + +namespace Win_in.Sfs.Wms.Store.EntityFrameworkCore; + +public class TransferLibRequestEfCoreRepository : SfsStoreEfCoreRepositoryBase, ITransferLibRequestRepository +{ + public TransferLibRequestEfCoreRepository(IDbContextProvider dbContextProvider) : base(dbContextProvider) + { + } +} diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/StoreDbContext.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/StoreDbContext.cs index d33e47fe6..714637c10 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/StoreDbContext.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/StoreDbContext.cs @@ -16,8 +16,13 @@ public class StoreDbContext : AbpDbContext, IStoreDbContext public DbSet ItemTransformRequests { get; set; } public DbSet TransferRequests { get; set; } + + public DbSet TransferLibRequests { get; set; } + public DbSet ProductReceiptRequests { get; set; } public DbSet MaterialRequests { get; set; } + public DbSet InjectionRequests { get; set; } + public DbSet AssembleRequests { get; set; } public DbSet ContainerRequests { get; set; } public DbSet DeliverRequests { get; set; } public DbSet InspectRequests { get; set; } @@ -57,6 +62,9 @@ public class StoreDbContext : AbpDbContext, IStoreDbContext public DbSet ItemTransformNotes { get; set; } public DbSet RecycledMaterialReceiptNotes { get; set; } public DbSet TransferNotes { get; set; } + + public DbSet TransferLibNotes { get; } + public DbSet JisProductReceiptNotes { get; set; } public DbSet ProductReceiptNotes { get; set; } public DbSet OfflineSettlementNotes { get; set; } @@ -69,6 +77,8 @@ public class StoreDbContext : AbpDbContext, IStoreDbContext public DbSet InventoryTransferNotes { get; set; } public DbSet WarehouseTransferNotes { get; set; } public DbSet IssueNotes { get; set; } + public DbSet InjectionNotes { get; set; } + public DbSet AssembleNotes { get; set; } public DbSet ContainerNotes { get; set; } public DbSet UnplannedReceiptNotes { get; set; } public DbSet UnplannedIssueNotes { get; set; } @@ -94,6 +104,8 @@ public class StoreDbContext : AbpDbContext, IStoreDbContext public DbSet InspectJobs { get; set; } public DbSet PutawayJobs { get; set; } public DbSet IssueJobs { get; set; } + public DbSet InjectionJobs { get; set; } + public DbSet AssembleJobs { get; set; } public DbSet ContainerJobs { get; set; } public DbSet DeliverJobs { get; set; } public DbSet JisDeliverJobs { get; set; } @@ -105,6 +117,7 @@ public class StoreDbContext : AbpDbContext, IStoreDbContext public DbSet UnplannedIssueJobs { get; set; } public DbSet UnplannedReceiptJobs { get; set; } public DbSet ProductionReturnJobs { get; set; } + public DbSet TransferLibJobs { get; } #endregion diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/StoreDbContextModelCreatingExtensions.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/StoreDbContextModelCreatingExtensions.cs index a325299a5..cd0750295 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/StoreDbContextModelCreatingExtensions.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/StoreDbContextModelCreatingExtensions.cs @@ -24,36 +24,31 @@ public static class StoreDbContextModelCreatingExtensions optionsAction?.Invoke(options); #region Orders - builder.ConfigurePurchaseOrder(options); builder.ConfigureSaleOrder(options); builder.ConfigureWorkOrder(options); - builder.ConfigureEquipmentRecord(options); //builder.ConfigureEquipmentLocCap(options); - - - #endregion #region Plans - builder.ConfigureProductionPlan(options); builder.ConfigurePreparationPlan(options); builder.ConfigureDeliverPlan(options); builder.ConfigureCountPlan(options); builder.ConfigureSupplierAsn(options); builder.ConfigureCustomerAsn(options); - #endregion #region Requests - builder.ConfigureItemTransformRequest(options); builder.ConfigureTransferRequest(options); + builder.ConfigureTransferLibRequest(options); builder.ConfigureProductReceiptRequest(options); builder.ConfigurePurchaseReceiptRequest(options); builder.ConfigureMaterialRequest(options); + builder.ConfigureInjectionRequest(options); + builder.ConfigureAssembleRequest(options); builder.ConfigureDeliverRequest(options); builder.ConfigureContainerRequest(options); builder.ConfigureInspectRequest(options); @@ -66,14 +61,16 @@ public static class StoreDbContextModelCreatingExtensions builder.ConfigureScrapRequest(options); builder.ConfigureCountAdjustRequest(options); builder.ConfigureWipWarehouseAdjustRequest(options); - + builder.ConfigureCoatingIssueNote(options); + builder.ConfigureCoatingMaterialRequest(options); + builder.ConfigureCoatingIssueJob(options); #endregion #region Notes - builder.ConfigureItemTransformNote(options); builder.ConfigureRecycledMaterialReceiptNote(options); builder.ConfigureTransferNote(options); + builder.ConfigureTransferLibNote(options); builder.ConfigureJisProductReceiptNote(options); builder.ConfigureJisDeliverNote(options); builder.ConfigureProductReceiptNote(options); @@ -87,6 +84,8 @@ public static class StoreDbContextModelCreatingExtensions builder.ConfigureInventoryTransferNote(options); builder.ConfigureWarehouseTransferNote(options); builder.ConfigureIssueNote(options); + builder.ConfigureInjectionNote(options); + builder.ConfigureAssembleNote(options); builder.ConfigureContainerNote(options); builder.ConfigureUnplannedReceiptNote(options); builder.ConfigureUnplannedIssueNote(options); @@ -104,7 +103,6 @@ public static class StoreDbContextModelCreatingExtensions builder.ConfigureNoOkConvertOKNote(options); builder.ConfigureInventoryInitialNote(options); builder.ConfigureWipWarehouseAdjustNote(options); - #endregion #region Jobs @@ -113,6 +111,8 @@ public static class StoreDbContextModelCreatingExtensions builder.ConfigureInspectJob(options); builder.ConfigurePutawayJob(options); builder.ConfigureIssueJob(options); + builder.ConfigureInjectionJob(options); + builder.ConfigureAssembleJob(options); builder.ConfigureContainerJob(options); builder.ConfigureDeliverJob(options); builder.ConfigureJisDeliverJob(options); @@ -124,7 +124,7 @@ public static class StoreDbContextModelCreatingExtensions builder.ConfigureUnplannedIssueJob(options); builder.ConfigureUnplannedReceiptJob(options); builder.ConfigureProductionReturnJob(options); - + builder.ConfigureTransferLibJob(options); #endregion builder.ConfigureExchangeData(options); diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/StoreEntityFrameworkCoreModule.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/StoreEntityFrameworkCoreModule.cs index 24dc4c2c4..997949441 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/StoreEntityFrameworkCoreModule.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/StoreEntityFrameworkCoreModule.cs @@ -5,6 +5,9 @@ using Volo.Abp.EntityFrameworkCore.DependencyInjection; using Volo.Abp.Modularity; using Win_in.Sfs.Wms.Store.CountAdjustRequests; using Win_in.Sfs.Wms.Store.Domain; +using Win_in.Sfs.Wms.Store.Jobs.IssueJobs; +using Win_in.Sfs.Wms.Store.Notes.IssueNotes; +using Win_in.Sfs.Wms.Store.Requests.MaterialRequests; using Win_in.Sfs.Wms.Store.UnplannedIssueRequests; namespace Win_in.Sfs.Wms.Store.EntityFrameworkCore; @@ -51,9 +54,12 @@ public class StoreEntityFrameworkCoreModule : AbpModule context.Services.AddTransient(); context.Services.AddTransient(); + context.Services.AddTransient(); context.Services.AddTransient(); context.Services.AddTransient(); context.Services.AddTransient(); + context.Services.AddTransient(); + context.Services.AddTransient(); context.Services.AddTransient(); context.Services.AddTransient(); context.Services.AddTransient(); @@ -67,6 +73,11 @@ public class StoreEntityFrameworkCoreModule : AbpModule context.Services.AddTransient(); context.Services.AddTransient(); + context.Services.AddTransient(); + + + + #endregion #region Notes @@ -75,6 +86,7 @@ public class StoreEntityFrameworkCoreModule : AbpModule context.Services .AddTransient(); context.Services.AddTransient(); + context.Services.AddTransient(); context.Services.AddTransient(); context.Services.AddTransient(); context.Services.AddTransient(); @@ -88,6 +100,8 @@ public class StoreEntityFrameworkCoreModule : AbpModule context.Services.AddTransient(); context.Services.AddTransient(); context.Services.AddTransient(); + context.Services.AddTransient(); + context.Services.AddTransient(); context.Services.AddTransient(); context.Services.AddTransient(); context.Services.AddTransient(); @@ -105,6 +119,7 @@ public class StoreEntityFrameworkCoreModule : AbpModule context.Services.AddTransient(); context.Services.AddTransient(); context.Services.AddTransient(); + context.Services.AddTransient(); #endregion @@ -114,6 +129,8 @@ public class StoreEntityFrameworkCoreModule : AbpModule context.Services.AddTransient(); context.Services.AddTransient(); context.Services.AddTransient(); + context.Services.AddTransient(); + context.Services.AddTransient(); context.Services.AddTransient(); context.Services.AddTransient(); context.Services.AddTransient(); @@ -125,7 +142,8 @@ public class StoreEntityFrameworkCoreModule : AbpModule context.Services.AddTransient(); context.Services.AddTransient(); context.Services.AddTransient(); - + context.Services.AddTransient(); + context.Services.AddTransient(); #endregion context.Services.AddTransient(); @@ -168,12 +186,18 @@ public class StoreEntityFrameworkCoreModule : AbpModule options.Entity(orderOptions => orderOptions.DefaultWithDetailsFunc = query => query.Include(o => o.Details)); + options.Entity(orderOptions => + orderOptions.DefaultWithDetailsFunc = query => query.Include(o => o.Details)); options.Entity(orderOptions => orderOptions.DefaultWithDetailsFunc = query => query.Include(o => o.Details)); options.Entity(orderOptions => orderOptions.DefaultWithDetailsFunc = query => query.Include(o => o.Details)); options.Entity(orderOptions => orderOptions.DefaultWithDetailsFunc = query => query.Include(o => o.Details)); + options.Entity(orderOptions => + orderOptions.DefaultWithDetailsFunc = query => query.Include(o => o.Details)); + options.Entity(orderOptions => + orderOptions.DefaultWithDetailsFunc = query => query.Include(o => o.Details)); options.Entity(orderOptions => orderOptions.DefaultWithDetailsFunc = query => query.Include(o => o.Details)); options.Entity(orderOptions => @@ -208,6 +232,9 @@ public class StoreEntityFrameworkCoreModule : AbpModule options.Entity(orderOptions => orderOptions.DefaultWithDetailsFunc = query => query.Include(o => o.Details)); + options.Entity(orderOptions => + orderOptions.DefaultWithDetailsFunc = query => query.Include(o => o.Details)); + options.Entity(orderOptions => orderOptions.DefaultWithDetailsFunc = query => query.Include(o => o.Details)); options.Entity(orderOptions => @@ -222,6 +249,10 @@ public class StoreEntityFrameworkCoreModule : AbpModule orderOptions.DefaultWithDetailsFunc = query => query.Include(o => o.Details)); options.Entity(orderOptions => orderOptions.DefaultWithDetailsFunc = query => query.Include(o => o.Details)); + options.Entity(orderOptions => + orderOptions.DefaultWithDetailsFunc = query => query.Include(o => o.Details)); + options.Entity(orderOptions => + orderOptions.DefaultWithDetailsFunc = query => query.Include(o => o.Details)); options.Entity(orderOptions => orderOptions.DefaultWithDetailsFunc = query => query.Include(o => o.Details)); options.Entity(orderOptions => @@ -293,6 +324,10 @@ public class StoreEntityFrameworkCoreModule : AbpModule orderOptions.DefaultWithDetailsFunc = query => query.Include(o => o.Details)); options.Entity(orderOptions => orderOptions.DefaultWithDetailsFunc = query => query.Include(o => o.Details)); + options.Entity(orderOptions => + orderOptions.DefaultWithDetailsFunc = query => query.Include(o => o.Details)); + options.Entity(orderOptions => + orderOptions.DefaultWithDetailsFunc = query => query.Include(o => o.Details)); options.Entity(orderOptions => orderOptions.DefaultWithDetailsFunc = query => query.Include(o => o.Details)); options.Entity(orderOptions => @@ -313,6 +348,9 @@ public class StoreEntityFrameworkCoreModule : AbpModule options.Entity(orderOptions => orderOptions.DefaultWithDetailsFunc = query => query.Include(o => o.Details)); + options.Entity(orderOptions => + orderOptions.DefaultWithDetailsFunc = query => query.Include(o => o.Details)); + #endregion }); } diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/Win_in.Sfs.Wms.Store.EntityFrameworkCore.csproj b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/Win_in.Sfs.Wms.Store.EntityFrameworkCore.csproj index b0aebac8d..7f8204f22 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/Win_in.Sfs.Wms.Store.EntityFrameworkCore.csproj +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/Win_in.Sfs.Wms.Store.EntityFrameworkCore.csproj @@ -1,4 +1,4 @@ - + diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/AutoMapperProfiles/Jobs/AssembleJobAutoMapperProfile.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/AutoMapperProfiles/Jobs/AssembleJobAutoMapperProfile.cs new file mode 100644 index 000000000..f1cecd7c7 --- /dev/null +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/AutoMapperProfiles/Jobs/AssembleJobAutoMapperProfile.cs @@ -0,0 +1,92 @@ +using System; +using AutoMapper; +using Volo.Abp.AutoMapper; +using Win_in.Sfs.Shared.Application; +using Win_in.Sfs.Wms.Inventory.Application.Contracts; +using Win_in.Sfs.Wms.Store.Application.Contracts; +using Win_in.Sfs.Wms.Store.Domain; + +namespace Win_in.Sfs.Wms.Store.Event; + +public partial class StoreEventAutoMapperProfile : Profile +{ + private void AssembleJobAutoMapperProfile() + { + + CreateMap() + .ForMember(x => x.JobNumber, y => y.MapFrom(d => d.Number)) + .ForMember(x => x.RequestNumber, y => y.MapFrom(d => d.AssembleRequestNumber)) + .ForMember(x => x.ActiveDate, y => y.MapFrom(d => DateTime.Now)) + .ForMember(x => x.Worker, y => y.MapFrom(d => d.CompleteUserName)) + .Ignore(x => x.Confirmed) + .Ignore(x => x.Number) + .Ignore(x => x.ConfirmTime); + + CreateMap() + .ForMember(x => x.FromPackingCode, y => y.MapFrom(d => d.HandledPackingCode)) + .ForMember(x => x.ToPackingCode, y => y.MapFrom(d => d.HandledPackingCode)) + .ForMember(x => x.SupplierBatch, y => y.MapFrom(d => d.HandledSupplierBatch)) + .ForMember(x => x.ArriveDate, y => y.MapFrom(d => d.HandledArriveDate)) + .ForMember(x => x.ProduceDate, y => y.MapFrom(d => d.HandledProduceDate)) + .ForMember(x => x.ExpireDate, y => y.MapFrom(d => d.HandledExpireDate)) + .ForMember(x => x.FromLot, y => y.MapFrom(d => d.HandledLot)) + .ForMember(x => x.ToLot, y => y.MapFrom(d => d.HandledLot)) + .ForMember(x => x.ToContainerCode, y => y.MapFrom(d => d.HandledContainerCode)) + .ForMember(x => x.FromContainerCode, y => y.MapFrom(d => d.HandledContainerCode)) + .ForMember(x => x.FromStatus, y => y.MapFrom(d => d.Status)) + .ForMember(x => x.ToStatus, y => y.MapFrom(d => d.Status)) + .ForMember(x => x.Qty, y => y.MapFrom(d => d.HandledQty)) + .ForMember(x => x.IssueTime, y => y.MapFrom(d => DateTime.Now)) + .ForMember(x => x.FromLocationCode, y => y.MapFrom(d => d.HandledFromLocationCode)) + .ForMember(x => x.FromLocationArea, y => y.MapFrom(d => d.HandledFromLocationArea)) + .ForMember(x => x.FromLocationGroup, y => y.MapFrom(d => d.HandledFromLocationGroup)) + .ForMember(x => x.FromLocationErpCode, y => y.MapFrom(d => d.HandledFromLocationErpCode)) + .ForMember(x => x.FromWarehouseCode, y => y.MapFrom(d => d.HandledFromWarehouseCode)) + .ForMember(x => x.ToLocationCode, y => y.MapFrom(d => d.ToLocationCode)) + .Ignore(x => x.ToLocationArea) + .Ignore(x => x.ToLocationGroup) + .Ignore(x => x.ToLocationErpCode) + ; + + CreateMap() + .MapExpectInOutFrom() + .Ignore(x => x.Worker) + .Ignore(x => x.SerialNumber) + .Ignore(x => x.ExtraProperties) + ; + + CreateMap() + .MapExpectInOutFrom() + .Ignore(x => x.Worker) + .Ignore(x => x.SerialNumber) + .Ignore(x => x.ExtraProperties); + + CreateMap() + .ForMember(x => x.RequestNumber, y => y.MapFrom(d => d.AssembleRequestNumber)) + .Ignore(x => x.Confirmed) + .Ignore(x => x.JobNumber) + .Ignore(x => x.ActiveDate) + ; + CreateMap() + .ForMember(x => x.Qty, y => y.MapFrom(d => d.HandledQty)) + .ForMember(x => x.IssueTime, y => y.MapFrom(d => DateTime.Now)) + .ForMember(x => x.FromPackingCode, y => y.MapFrom(d => d.HandledPackingCode)) + .ForMember(x => x.ToPackingCode, y => y.MapFrom(d => d.HandledPackingCode)) + .ForMember(x => x.FromContainerCode, y => y.MapFrom(d => d.HandledContainerCode)) + .ForMember(x => x.ToContainerCode, y => y.MapFrom(d => d.HandledContainerCode)) + .ForMember(x => x.FromLot, y => y.MapFrom(d => d.HandledLot)) + .ForMember(x => x.ToLot, y => y.MapFrom(d => d.HandledLot)) + .ForMember(x => x.SupplierBatch, y => y.MapFrom(d => d.HandledSupplierBatch)) + .ForMember(x => x.ArriveDate, y => y.MapFrom(d => d.HandledArriveDate)) + .ForMember(x => x.ProduceDate, y => y.MapFrom(d => d.HandledProduceDate)) + .ForMember(x => x.ExpireDate, y => y.MapFrom(d => d.ExpiredTime)) + .ForMember(x => x.FromLocationCode, y => y.MapFrom(d => d.HandledFromLocationCode)) + .ForMember(x => x.FromLocationArea, y => y.MapFrom(d => d.HandledFromLocationArea)) + .ForMember(x => x.FromLocationGroup, y => y.MapFrom(d => d.HandledFromLocationGroup)) + .ForMember(x => x.FromLocationErpCode, y => y.MapFrom(d => d.HandledFromLocationErpCode)) + .ForMember(x => x.FromWarehouseCode, y => y.MapFrom(d => d.HandledFromWarehouseCode)) + .ForMember(x => x.FromStatus, y => y.MapFrom(d => d.Status)) + .ForMember(x => x.ToStatus, y => y.MapFrom(d => d.Status)) + ; + } +} diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/AutoMapperProfiles/Jobs/CoatingIssueJobAutoMapperProfile.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/AutoMapperProfiles/Jobs/CoatingIssueJobAutoMapperProfile.cs new file mode 100644 index 000000000..bf3a92d55 --- /dev/null +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/AutoMapperProfiles/Jobs/CoatingIssueJobAutoMapperProfile.cs @@ -0,0 +1,94 @@ +using System; +using AutoMapper; +using Volo.Abp.AutoMapper; +using Win_in.Sfs.Shared.Application; +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.Jobs.IssueJobs; +using Win_in.Sfs.Wms.Store.Notes.IssueNotes; + +namespace Win_in.Sfs.Wms.Store.Event; + +public partial class StoreEventAutoMapperProfile : Profile +{ + private void CoatingIssueJobAutoMapperProfile() + { + + CreateMap() + .ForMember(x => x.JobNumber, y => y.MapFrom(d => d.Number)) + .ForMember(x => x.RequestNumber, y => y.MapFrom(d => d.MaterialRequestNumber)) + .ForMember(x => x.ActiveDate, y => y.MapFrom(d => DateTime.Now)) + .ForMember(x => x.Worker, y => y.MapFrom(d => d.CompleteUserName)) + .Ignore(x => x.Confirmed) + .Ignore(x => x.Number) + .Ignore(x => x.ConfirmTime); + + CreateMap() + .ForMember(x => x.FromPackingCode, y => y.MapFrom(d => d.HandledPackingCode)) + .ForMember(x => x.ToPackingCode, y => y.MapFrom(d => d.HandledPackingCode)) + .ForMember(x => x.SupplierBatch, y => y.MapFrom(d => d.HandledSupplierBatch)) + .ForMember(x => x.ArriveDate, y => y.MapFrom(d => d.HandledArriveDate)) + .ForMember(x => x.ProduceDate, y => y.MapFrom(d => d.HandledProduceDate)) + .ForMember(x => x.ExpireDate, y => y.MapFrom(d => d.HandledExpireDate)) + .ForMember(x => x.FromLot, y => y.MapFrom(d => d.HandledLot)) + .ForMember(x => x.ToLot, y => y.MapFrom(d => d.HandledLot)) + .ForMember(x => x.ToContainerCode, y => y.MapFrom(d => d.HandledContainerCode)) + .ForMember(x => x.FromContainerCode, y => y.MapFrom(d => d.HandledContainerCode)) + .ForMember(x => x.FromStatus, y => y.MapFrom(d => d.Status)) + .ForMember(x => x.ToStatus, y => y.MapFrom(d => d.Status)) + .ForMember(x => x.Qty, y => y.MapFrom(d => d.HandledQty)) + .ForMember(x => x.IssueTime, y => y.MapFrom(d => DateTime.Now)) + .ForMember(x => x.FromLocationCode, y => y.MapFrom(d => d.HandledFromLocationCode)) + .ForMember(x => x.FromLocationArea, y => y.MapFrom(d => d.HandledFromLocationArea)) + .ForMember(x => x.FromLocationGroup, y => y.MapFrom(d => d.HandledFromLocationGroup)) + .ForMember(x => x.FromLocationErpCode, y => y.MapFrom(d => d.HandledFromLocationErpCode)) + .ForMember(x => x.FromWarehouseCode, y => y.MapFrom(d => d.HandledFromWarehouseCode)) + .ForMember(x => x.ToLocationCode, y => y.MapFrom(d => d.ToLocationCode)) + .Ignore(x => x.ToLocationArea) + .Ignore(x => x.ToLocationGroup) + .Ignore(x => x.ToLocationErpCode) + ; + + CreateMap() + .MapExpectInOutFrom() + .Ignore(x => x.Worker) + .Ignore(x => x.SerialNumber) + .Ignore(x => x.ExtraProperties) + ; + + CreateMap() + .MapExpectInOutFrom() + .Ignore(x => x.Worker) + .Ignore(x => x.SerialNumber) + .Ignore(x => x.ExtraProperties); + + CreateMap() + .ForMember(x => x.RequestNumber, y => y.MapFrom(d => d.MaterialRequestNumber)) + .Ignore(x => x.Confirmed) + .Ignore(x => x.JobNumber) + .Ignore(x => x.ActiveDate) + ; + CreateMap() + .ForMember(x => x.Qty, y => y.MapFrom(d => d.HandledQty)) + .ForMember(x => x.IssueTime, y => y.MapFrom(d => DateTime.Now)) + .ForMember(x => x.FromPackingCode, y => y.MapFrom(d =>d.HandledPackingCode)) + .ForMember(x => x.ToPackingCode, y => y.MapFrom(d => d.HandledPackingCode)) + .ForMember(x => x.FromContainerCode, y => y.MapFrom(d => d.HandledContainerCode)) + .ForMember(x => x.ToContainerCode, y => y.MapFrom(d => d.HandledContainerCode)) + .ForMember(x => x.FromLot, y => y.MapFrom(d => d.HandledLot)) + .ForMember(x => x.ToLot, y => y.MapFrom(d => d.HandledLot)) + .ForMember(x => x.SupplierBatch, y => y.MapFrom(d => d.HandledSupplierBatch)) + .ForMember(x => x.ArriveDate, y => y.MapFrom(d => d.HandledArriveDate)) + .ForMember(x => x.ProduceDate, y => y.MapFrom(d => d.HandledProduceDate)) + .ForMember(x => x.ExpireDate, y => y.MapFrom(d => d.ExpiredTime)) + .ForMember(x => x.FromLocationCode, y => y.MapFrom(d => d.HandledFromLocationCode)) + .ForMember(x => x.FromLocationArea, y => y.MapFrom(d => d.HandledFromLocationArea)) + .ForMember(x => x.FromLocationGroup, y => y.MapFrom(d => d.HandledFromLocationGroup)) + .ForMember(x => x.FromLocationErpCode, y => y.MapFrom(d => d.HandledFromLocationErpCode)) + .ForMember(x => x.FromWarehouseCode, y => y.MapFrom(d => d.HandledFromWarehouseCode)) + .ForMember(x => x.FromStatus, y => y.MapFrom(d => d.Status)) + .ForMember(x => x.ToStatus, y => y.MapFrom(d => d.Status)) + ; + } +} diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/AutoMapperProfiles/Jobs/InjectionJobAutoMapperProfile.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/AutoMapperProfiles/Jobs/InjectionJobAutoMapperProfile.cs new file mode 100644 index 000000000..4665215e3 --- /dev/null +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/AutoMapperProfiles/Jobs/InjectionJobAutoMapperProfile.cs @@ -0,0 +1,92 @@ +using System; +using AutoMapper; +using Volo.Abp.AutoMapper; +using Win_in.Sfs.Shared.Application; +using Win_in.Sfs.Wms.Inventory.Application.Contracts; +using Win_in.Sfs.Wms.Store.Application.Contracts; +using Win_in.Sfs.Wms.Store.Domain; + +namespace Win_in.Sfs.Wms.Store.Event; + +public partial class StoreEventAutoMapperProfile : Profile +{ + private void InjectionJobAutoMapperProfile() + { + + CreateMap() + .ForMember(x => x.JobNumber, y => y.MapFrom(d => d.Number)) + .ForMember(x => x.RequestNumber, y => y.MapFrom(d => d.InjectionRequestNumber)) + .ForMember(x => x.ActiveDate, y => y.MapFrom(d => DateTime.Now)) + .ForMember(x => x.Worker, y => y.MapFrom(d => d.CompleteUserName)) + .Ignore(x => x.Confirmed) + .Ignore(x => x.Number) + .Ignore(x => x.ConfirmTime); + + CreateMap() + .ForMember(x => x.FromPackingCode, y => y.MapFrom(d => d.HandledPackingCode)) + .ForMember(x => x.ToPackingCode, y => y.MapFrom(d => d.HandledPackingCode)) + .ForMember(x => x.SupplierBatch, y => y.MapFrom(d => d.HandledSupplierBatch)) + .ForMember(x => x.ArriveDate, y => y.MapFrom(d => d.HandledArriveDate)) + .ForMember(x => x.ProduceDate, y => y.MapFrom(d => d.HandledProduceDate)) + .ForMember(x => x.ExpireDate, y => y.MapFrom(d => d.HandledExpireDate)) + .ForMember(x => x.FromLot, y => y.MapFrom(d => d.HandledLot)) + .ForMember(x => x.ToLot, y => y.MapFrom(d => d.HandledLot)) + .ForMember(x => x.ToContainerCode, y => y.MapFrom(d => d.HandledContainerCode)) + .ForMember(x => x.FromContainerCode, y => y.MapFrom(d => d.HandledContainerCode)) + .ForMember(x => x.FromStatus, y => y.MapFrom(d => d.Status)) + .ForMember(x => x.ToStatus, y => y.MapFrom(d => d.Status)) + .ForMember(x => x.Qty, y => y.MapFrom(d => d.HandledQty)) + .ForMember(x => x.IssueTime, y => y.MapFrom(d => DateTime.Now)) + .ForMember(x => x.FromLocationCode, y => y.MapFrom(d => d.HandledFromLocationCode)) + .ForMember(x => x.FromLocationArea, y => y.MapFrom(d => d.HandledFromLocationArea)) + .ForMember(x => x.FromLocationGroup, y => y.MapFrom(d => d.HandledFromLocationGroup)) + .ForMember(x => x.FromLocationErpCode, y => y.MapFrom(d => d.HandledFromLocationErpCode)) + .ForMember(x => x.FromWarehouseCode, y => y.MapFrom(d => d.HandledFromWarehouseCode)) + .ForMember(x => x.ToLocationCode, y => y.MapFrom(d => d.ToLocationCode)) + .Ignore(x => x.ToLocationArea) + .Ignore(x => x.ToLocationGroup) + .Ignore(x => x.ToLocationErpCode) + ; + + CreateMap() + .MapExpectInOutFrom() + .Ignore(x => x.Worker) + .Ignore(x => x.SerialNumber) + .Ignore(x => x.ExtraProperties) + ; + + CreateMap() + .MapExpectInOutFrom() + .Ignore(x => x.Worker) + .Ignore(x => x.SerialNumber) + .Ignore(x => x.ExtraProperties); + + CreateMap() + .ForMember(x => x.RequestNumber, y => y.MapFrom(d => d.InjectionRequestNumber)) + .Ignore(x => x.Confirmed) + .Ignore(x => x.JobNumber) + .Ignore(x => x.ActiveDate) + ; + CreateMap() + .ForMember(x => x.Qty, y => y.MapFrom(d => d.HandledQty)) + .ForMember(x => x.IssueTime, y => y.MapFrom(d => DateTime.Now)) + .ForMember(x => x.FromPackingCode, y => y.MapFrom(d => d.HandledPackingCode)) + .ForMember(x => x.ToPackingCode, y => y.MapFrom(d => d.HandledPackingCode)) + .ForMember(x => x.FromContainerCode, y => y.MapFrom(d => d.HandledContainerCode)) + .ForMember(x => x.ToContainerCode, y => y.MapFrom(d => d.HandledContainerCode)) + .ForMember(x => x.FromLot, y => y.MapFrom(d => d.HandledLot)) + .ForMember(x => x.ToLot, y => y.MapFrom(d => d.HandledLot)) + .ForMember(x => x.SupplierBatch, y => y.MapFrom(d => d.HandledSupplierBatch)) + .ForMember(x => x.ArriveDate, y => y.MapFrom(d => d.HandledArriveDate)) + .ForMember(x => x.ProduceDate, y => y.MapFrom(d => d.HandledProduceDate)) + .ForMember(x => x.ExpireDate, y => y.MapFrom(d => d.ExpiredTime)) + .ForMember(x => x.FromLocationCode, y => y.MapFrom(d => d.HandledFromLocationCode)) + .ForMember(x => x.FromLocationArea, y => y.MapFrom(d => d.HandledFromLocationArea)) + .ForMember(x => x.FromLocationGroup, y => y.MapFrom(d => d.HandledFromLocationGroup)) + .ForMember(x => x.FromLocationErpCode, y => y.MapFrom(d => d.HandledFromLocationErpCode)) + .ForMember(x => x.FromWarehouseCode, y => y.MapFrom(d => d.HandledFromWarehouseCode)) + .ForMember(x => x.FromStatus, y => y.MapFrom(d => d.Status)) + .ForMember(x => x.ToStatus, y => y.MapFrom(d => d.Status)) + ; + } +} diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/AutoMapperProfiles/Jobs/TransferLibJobAutoMapperProfile.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/AutoMapperProfiles/Jobs/TransferLibJobAutoMapperProfile.cs new file mode 100644 index 000000000..a6fb7a9f6 --- /dev/null +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/AutoMapperProfiles/Jobs/TransferLibJobAutoMapperProfile.cs @@ -0,0 +1,27 @@ +using System; +using AutoMapper; +using Volo.Abp.AutoMapper; +using Win_in.Sfs.Shared.Application; +using Win_in.Sfs.Wms.Store.Application.Contracts; +using Win_in.Sfs.Wms.Store.Domain; + +namespace Win_in.Sfs.Wms.Store.Event; + +public partial class StoreEventAutoMapperProfile : Profile +{ + private void TransferLibJobAutoMapperProfile() + { + CreateMap() + .ForMember(x => x.JobNumber, y => y.MapFrom(d => d.Number)) + .ForMember(x => x.Worker, y => y.MapFrom(d => d.CompleteUserName)) + .ForMember(x => x.ActiveDate, y => y.MapFrom(d => DateTime.Now)) + .Ignore(x => x.Number) + .Ignore(x => x.Confirmed) + ; + + CreateMap() + //.MapNormalFromHandledFrom() + //.MapExtraProperties() + ; + } +} diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/AutoMapperProfiles/Notes/AssembleNoteAutoMapperProfile.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/AutoMapperProfiles/Notes/AssembleNoteAutoMapperProfile.cs new file mode 100644 index 000000000..15033a58a --- /dev/null +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/AutoMapperProfiles/Notes/AssembleNoteAutoMapperProfile.cs @@ -0,0 +1,22 @@ +using AutoMapper; +using Volo.Abp.AutoMapper; +using Win_in.Sfs.Wms.Inventory.Application.Contracts; +using Win_in.Sfs.Wms.Store.Domain; + +namespace Win_in.Sfs.Wms.Store.Event; + +public partial class StoreEventAutoMapperProfile : Profile +{ + private void AssembleNoteAutoMapperProfile() + { + CreateMap() + .Ignore(x => x.DocNumber) + .Ignore(x => x.JobNumber) + .Ignore(x => x.Worker) + .Ignore(x => x.TransType) + .Ignore(x => x.ExtraProperties) + .Ignore(x => x.TransSubType) + ; + } + +} diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/AutoMapperProfiles/Notes/CoatingIssueNoteAutoMapperProfile.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/AutoMapperProfiles/Notes/CoatingIssueNoteAutoMapperProfile.cs new file mode 100644 index 000000000..8f88e2ac7 --- /dev/null +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/AutoMapperProfiles/Notes/CoatingIssueNoteAutoMapperProfile.cs @@ -0,0 +1,23 @@ +using AutoMapper; +using Volo.Abp.AutoMapper; +using Win_in.Sfs.Wms.Inventory.Application.Contracts; +using Win_in.Sfs.Wms.Store.Domain; +using Win_in.Sfs.Wms.Store.Notes.IssueNotes; + +namespace Win_in.Sfs.Wms.Store.Event; + +public partial class StoreEventAutoMapperProfile : Profile +{ + private void CoatingIssueNoteAutoMapperProfile() + { + CreateMap() + .Ignore(x => x.DocNumber) + .Ignore(x => x.JobNumber) + .Ignore(x => x.Worker) + .Ignore(x => x.TransType) + .Ignore(x => x.ExtraProperties) + .Ignore(x => x.TransSubType) + ; + } + +} diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/AutoMapperProfiles/Notes/InjectionNoteAutoMapperProfile.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/AutoMapperProfiles/Notes/InjectionNoteAutoMapperProfile.cs new file mode 100644 index 000000000..14299295f --- /dev/null +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/AutoMapperProfiles/Notes/InjectionNoteAutoMapperProfile.cs @@ -0,0 +1,22 @@ +using AutoMapper; +using Volo.Abp.AutoMapper; +using Win_in.Sfs.Wms.Inventory.Application.Contracts; +using Win_in.Sfs.Wms.Store.Domain; + +namespace Win_in.Sfs.Wms.Store.Event; + +public partial class StoreEventAutoMapperProfile : Profile +{ + private void InjectionNoteAutoMapperProfile() + { + CreateMap() + .Ignore(x => x.DocNumber) + .Ignore(x => x.JobNumber) + .Ignore(x => x.Worker) + .Ignore(x => x.TransType) + .Ignore(x => x.ExtraProperties) + .Ignore(x => x.TransSubType) + ; + } + +} diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/AutoMapperProfiles/Notes/TransferLibNoteAutoMapperProfile.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/AutoMapperProfiles/Notes/TransferLibNoteAutoMapperProfile.cs new file mode 100644 index 000000000..ce730668e --- /dev/null +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/AutoMapperProfiles/Notes/TransferLibNoteAutoMapperProfile.cs @@ -0,0 +1,34 @@ +using AutoMapper; +using Volo.Abp.AutoMapper; +using Win_in.Sfs.Shared.Application; +using Win_in.Sfs.Wms.Inventory.Application.Contracts; +using Win_in.Sfs.Wms.Store.Application.Contracts; +using Win_in.Sfs.Wms.Store.Domain; + +namespace Win_in.Sfs.Wms.Store.Event; + +public partial class StoreEventAutoMapperProfile : Profile +{ + private void TransferLibNoteAutoMapperProfile() + { + CreateMap() + + .MapNegativeQty() + .ForMember(dest => dest.DocNumber, opts => opts.MapFrom(src => src.Number)) + .Ignore(x => x.DocNumber) + .Ignore(x => x.JobNumber) + .Ignore(x => x.Worker) + .Ignore(x => x.ManageType) + .Ignore(x => x.TransType) + .Ignore(x => x.TransSubType) + .Ignore(x => x.TransInOut) + .Ignore(x => x.ExtraProperties) + ; + ; + CreateMap() + .ReverseMap(); + CreateMap() + .ReverseMap(); + } + +} diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/AutoMapperProfiles/Requests/AssembleRequestAutoMapperProfile.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/AutoMapperProfiles/Requests/AssembleRequestAutoMapperProfile.cs new file mode 100644 index 000000000..dcf76a76b --- /dev/null +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/AutoMapperProfiles/Requests/AssembleRequestAutoMapperProfile.cs @@ -0,0 +1,135 @@ +using AutoMapper; +using Volo.Abp.AutoMapper; +using Win_in.Sfs.Shared.Application; +using Win_in.Sfs.Wms.Inventory.Application.Contracts; +using Win_in.Sfs.Wms.Store.Application.Contracts; +using Win_in.Sfs.Wms.Store.Domain; + +namespace Win_in.Sfs.Wms.Store.Event; + +public partial class StoreEventAutoMapperProfile : Profile +{ + private void AssembleRequestAutoMapperProfile() + { + CreateMap() + .ForMember(x => x.AssembleRequestNumber, y => y.MapFrom(d => d.Number)) + .ForMember(x => x.RequestType, y => y.MapFrom(d => d.Type)) + .Ignore(x => x.WarehouseCode) + .Ignore(x => x.Workshop) + .Ignore(x => x.UpStreamJobNumber) + .Ignore(x => x.JobType) + .Ignore(x => x.IsAutoComplete) + .Ignore(x => x.ExpiredTime) + .Ignore(x => x.JobDescription) + .Ignore(x => x.JobStatus) + .Ignore(x => x.WorkGroupCode) + .Ignore(x => x.Priority) + .Ignore(x => x.PriorityIncrement) + .Ignore(x => x.AcceptUserId) + .Ignore(x => x.AcceptTime) + .Ignore(x => x.AcceptUserName) + .Ignore(x => x.CompleteUserId) + .Ignore(x => x.CompleteUserName) + .Ignore(x => x.CompleteTime) + .Ignore(x => x.Details) + ; + + CreateMap() + .ForMember(x => x.RequestLocationCode, y => y.MapFrom(d => d.ToLocationCode)) + .Ignore(x => x.RecommendFromLocationArea) + .Ignore(x => x.RecommendFromLocationGroup) + .Ignore(x => x.HandledFromLocationArea) + .Ignore(x => x.HandledFromLocationGroup) + .Ignore(x => x.RecommendFromWarehouseCode) + .Ignore(x => x.HandledFromWarehouseCode) + .Ignore(x => x.OnTheWayLocationCode) + .Ignore(x => x.DistributionType) + .Ignore(x => x.RoundedQty) + .Ignore(x => x.Operation) + .Ignore(x => x.ExpiredTime) + .Ignore(x => x.TruncType) + .Ignore(x => x.PlanBeginTime) + .Ignore(x => x.PlannedSplitRule) + .Ignore(x => x.DeliveryQty) + .Ignore(x => x.Status) + .Ignore(x => x.RecommendContainerCode) + .Ignore(x => x.StdPackQty) + .Ignore(x => x.RecommendPackingCode) + .Ignore(x => x.HandledContainerCode) + .Ignore(x => x.HandledPackingCode) + .Ignore(x => x.RecommendSupplierBatch) + .Ignore(x => x.RecommendProduceDate) + .Ignore(x => x.RecommendArriveDate) + .Ignore(x => x.RecommendExpireDate) + .Ignore(x => x.HandledFromLocationCode) + .Ignore(x => x.HandledFromLocationErpCode) + .Ignore(x => x.HandledUom) + .Ignore(x => x.RecommendFromLocationErpCode) + .Ignore(x => x.HandledExpireDate) + .Ignore(x => x.HandledLot) + .Ignore(x => x.HandledArriveDate) + .Ignore(x => x.HandledProduceDate) + .Ignore(x => x.HandledQty) + .Ignore(x => x.RecommendQty) + .Ignore(x => x.Uom) + .Ignore(x => x.HandledSupplierBatch) + .Ignore(x => x.RecommendFromLocationCode) + .Ignore(x => x.RecommendLot) + .IgnoreIHasRecommendAndHandledFrom(); + + CreateMap() + .ForMember(x => x.RecommendArriveDate, y => y.MapFrom(d => d.ArriveDate)) + .ForMember(x => x.RecommendContainerCode, y => y.MapFrom(d => d.ContainerCode)) + .ForMember(x => x.RecommendExpireDate, y => y.MapFrom(d => d.ExpireDate)) + .ForMember(x => x.RecommendFromLocationCode, y => y.MapFrom(d => d.LocationCode)) + .ForMember(x => x.RecommendFromLocationErpCode, y => y.MapFrom(d => d.LocationErpCode)) + .ForMember(x => x.RecommendFromWarehouseCode, y => y.MapFrom(d => d.WarehouseCode)) + .ForMember(x => x.RecommendFromLocationArea, y => y.MapFrom(d => d.LocationArea)) + .ForMember(x => x.RecommendFromLocationGroup, y => y.MapFrom(d => d.LocationGroup)) + .ForMember(x => x.RecommendLot, y => y.MapFrom(d => d.Lot)) + .ForMember(x => x.RecommendPackingCode, y => y.MapFrom(d => d.PackingCode)) + .ForMember(x => x.RecommendProduceDate, y => y.MapFrom(d => d.ProduceDate)) + .ForMember(x => x.RecommendQty, y => y.MapFrom(d => d.Qty)) + .ForMember(x => x.RecommendSupplierBatch, y => y.MapFrom(d => d.SupplierBatch)) + .ForMember(x => x.Uom, y => y.MapFrom(d => d.Uom)).Ignore(x => x.HandledArriveDate) + .Ignore(x => x.HandledFromLocationArea) + .Ignore(x => x.HandledFromLocationGroup) + .Ignore(x => x.ToLocationErpCode) + .Ignore(x => x.ToWarehouseCode) + .Ignore(x => x.ToLocationArea) + .Ignore(x => x.ToLocationGroup) + .Ignore(x => x.HandledFromWarehouseCode) + .Ignore(x => x.RequestLocationCode) + .Ignore(x => x.ToLocationCode) + .Ignore(x => x.ProdLine) + .Ignore(x => x.WorkStation) + .Ignore(x => x.HandledContainerCode) + .Ignore(x => x.HandledExpireDate) + .Ignore(x => x.HandledFromLocationCode) + .Ignore(x => x.HandledFromLocationErpCode) + .Ignore(x => x.HandledLot) + .Ignore(x => x.HandledPackingCode) + .Ignore(x => x.HandledProduceDate) + .Ignore(x => x.HandledQty) + .Ignore(x => x.HandledSupplierBatch) + .Ignore(x => x.HandledUom) + .Ignore(x => x.Remark) + .Ignore(x => x.OnTheWayLocationCode) + .Ignore(x => x.DistributionType) + .Ignore(x => x.RoundedQty) + .Ignore(x => x.Operation) + .Ignore(x => x.ExpiredTime) + .Ignore(x => x.TruncType) + .Ignore(x => x.PlanBeginTime) + .Ignore(x => x.PlannedSplitRule) + .Ignore(x => x.DeliveryQty) + .Ignore(x => x.RequestLocationCode) + .Ignore(x => x.ToLocationCode) + .Ignore(x => x.ProdLine) + .Ignore(x => x.WorkStation) + .Ignore(x => x.PositionCode) + .Ignore(x => x.RecommendType) + .IgnoreIHasRecommendAndHandledFrom(); + + } +} diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/AutoMapperProfiles/Requests/CoatingMaterialRequestAutoMapperProfile.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/AutoMapperProfiles/Requests/CoatingMaterialRequestAutoMapperProfile.cs new file mode 100644 index 000000000..bd08e04bb --- /dev/null +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/AutoMapperProfiles/Requests/CoatingMaterialRequestAutoMapperProfile.cs @@ -0,0 +1,136 @@ +using AutoMapper; +using Volo.Abp.AutoMapper; +using Win_in.Sfs.Shared.Application; +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.Jobs.IssueJobs; +using Win_in.Sfs.Wms.Store.Requests.MaterialRequests; + +namespace Win_in.Sfs.Wms.Store.Event; + +public partial class StoreEventAutoMapperProfile : Profile +{ + private void CoatingMaterialRequestAutoMapperProfile() + { + CreateMap() + .ForMember(x => x.MaterialRequestNumber, y => y.MapFrom(d => d.Number)) + .ForMember(x => x.RequestType, y => y.MapFrom(d => d.Type)) + .Ignore(x => x.WarehouseCode) + .Ignore(x => x.UpStreamJobNumber) + .Ignore(x => x.JobType) + .Ignore(x => x.IsAutoComplete) + .Ignore(x => x.ExpiredTime) + .Ignore(x => x.JobDescription) + .Ignore(x => x.JobStatus) + .Ignore(x => x.WorkGroupCode) + .Ignore(x => x.Priority) + .Ignore(x => x.PriorityIncrement) + .Ignore(x => x.AcceptUserId) + .Ignore(x => x.AcceptTime) + .Ignore(x => x.AcceptUserName) + .Ignore(x => x.CompleteUserId) + .Ignore(x => x.CompleteUserName) + .Ignore(x => x.CompleteTime) + .Ignore(x => x.Details) + ; + + CreateMap() + .ForMember(x => x.RequestLocationCode, y => y.MapFrom(d => d.ToLocationCode)) + .Ignore(x => x.RecommendFromLocationArea) + .Ignore(x => x.RecommendFromLocationGroup) + .Ignore(x => x.HandledFromLocationArea) + .Ignore(x => x.HandledFromLocationGroup) + .Ignore(x => x.RecommendFromWarehouseCode) + .Ignore(x => x.HandledFromWarehouseCode) + .Ignore(x => x.OnTheWayLocationCode) + .Ignore(x => x.DistributionType) + .Ignore(x => x.RoundedQty) + .Ignore(x => x.Operation) + .Ignore(x => x.ExpiredTime) + .Ignore(x => x.TruncType) + .Ignore(x => x.PlanBeginTime) + .Ignore(x => x.PlannedSplitRule) + .Ignore(x => x.DeliveryQty) + .Ignore(x => x.Status) + .Ignore(x => x.RecommendContainerCode) + .Ignore(x => x.StdPackQty) + .Ignore(x => x.RecommendPackingCode) + .Ignore(x => x.HandledContainerCode) + .Ignore(x => x.HandledPackingCode) + .Ignore(x => x.RecommendSupplierBatch) + .Ignore(x => x.RecommendProduceDate) + .Ignore(x => x.RecommendArriveDate) + .Ignore(x => x.RecommendExpireDate) + .Ignore(x => x.HandledFromLocationCode) + .Ignore(x => x.HandledFromLocationErpCode) + .Ignore(x => x.HandledUom) + .Ignore(x => x.RecommendFromLocationErpCode) + .Ignore(x => x.HandledExpireDate) + .Ignore(x => x.HandledLot) + .Ignore(x => x.HandledArriveDate) + .Ignore(x => x.HandledProduceDate) + .Ignore(x => x.HandledQty) + .Ignore(x => x.RecommendQty) + .Ignore(x => x.Uom) + .Ignore(x => x.HandledSupplierBatch) + .Ignore(x => x.RecommendFromLocationCode) + .Ignore(x => x.RecommendLot) + .IgnoreIHasRecommendAndHandledFrom(); + + CreateMap() + .ForMember(x => x.RecommendArriveDate, y => y.MapFrom(d => d.ArriveDate)) + .ForMember(x => x.RecommendContainerCode, y => y.MapFrom(d => d.ContainerCode)) + .ForMember(x => x.RecommendExpireDate, y => y.MapFrom(d => d.ExpireDate)) + .ForMember(x => x.RecommendFromLocationCode, y => y.MapFrom(d => d.LocationCode)) + .ForMember(x => x.RecommendFromLocationErpCode, y => y.MapFrom(d => d.LocationErpCode)) + .ForMember(x => x.RecommendFromWarehouseCode, y => y.MapFrom(d => d.WarehouseCode)) + .ForMember(x => x.RecommendFromLocationArea, y => y.MapFrom(d => d.LocationArea)) + .ForMember(x => x.RecommendFromLocationGroup, y => y.MapFrom(d => d.LocationGroup)) + .ForMember(x => x.RecommendLot, y => y.MapFrom(d => d.Lot)) + .ForMember(x => x.RecommendPackingCode, y => y.MapFrom(d => d.PackingCode)) + .ForMember(x => x.RecommendProduceDate, y => y.MapFrom(d => d.ProduceDate)) + .ForMember(x => x.RecommendQty, y => y.MapFrom(d => d.Qty)) + .ForMember(x => x.RecommendSupplierBatch, y => y.MapFrom(d => d.SupplierBatch)) + .ForMember(x => x.Uom, y => y.MapFrom(d => d.Uom)).Ignore(x => x.HandledArriveDate) + .Ignore(x => x.HandledFromLocationArea) + .Ignore(x => x.HandledFromLocationGroup) + .Ignore(x => x.ToLocationErpCode) + .Ignore(x => x.ToWarehouseCode) + .Ignore(x => x.ToLocationArea) + .Ignore(x => x.ToLocationGroup) + .Ignore(x => x.HandledFromWarehouseCode) + .Ignore(x => x.RequestLocationCode) + .Ignore(x => x.ToLocationCode) + .Ignore(x => x.ProdLine) + .Ignore(x => x.WorkStation) + .Ignore(x => x.HandledContainerCode) + .Ignore(x => x.HandledExpireDate) + .Ignore(x => x.HandledFromLocationCode) + .Ignore(x => x.HandledFromLocationErpCode) + .Ignore(x => x.HandledLot) + .Ignore(x => x.HandledPackingCode) + .Ignore(x => x.HandledProduceDate) + .Ignore(x => x.HandledQty) + .Ignore(x => x.HandledSupplierBatch) + .Ignore(x => x.HandledUom) + .Ignore(x => x.Remark) + .Ignore(x => x.OnTheWayLocationCode) + .Ignore(x => x.DistributionType) + .Ignore(x => x.RoundedQty) + .Ignore(x => x.Operation) + .Ignore(x => x.ExpiredTime) + .Ignore(x => x.TruncType) + .Ignore(x => x.PlanBeginTime) + .Ignore(x => x.PlannedSplitRule) + .Ignore(x => x.DeliveryQty) + .Ignore(x => x.RequestLocationCode) + .Ignore(x => x.ToLocationCode) + .Ignore(x => x.ProdLine) + .Ignore(x => x.WorkStation) + .Ignore(x => x.PositionCode) + .Ignore(x => x.RecommendType) + .IgnoreIHasRecommendAndHandledFrom(); + + } +} diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/AutoMapperProfiles/Requests/InjectionRequestAutoMapperProfile.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/AutoMapperProfiles/Requests/InjectionRequestAutoMapperProfile.cs new file mode 100644 index 000000000..04511417c --- /dev/null +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/AutoMapperProfiles/Requests/InjectionRequestAutoMapperProfile.cs @@ -0,0 +1,134 @@ +using AutoMapper; +using Volo.Abp.AutoMapper; +using Win_in.Sfs.Shared.Application; +using Win_in.Sfs.Wms.Inventory.Application.Contracts; +using Win_in.Sfs.Wms.Store.Application.Contracts; +using Win_in.Sfs.Wms.Store.Domain; + +namespace Win_in.Sfs.Wms.Store.Event; + +public partial class StoreEventAutoMapperProfile : Profile +{ + private void InjectionRequestAutoMapperProfile() + { + CreateMap() + .ForMember(x => x.InjectionRequestNumber, y => y.MapFrom(d => d.Number)) + .ForMember(x => x.RequestType, y => y.MapFrom(d => d.Type)) + .Ignore(x => x.WarehouseCode) + .Ignore(x => x.UpStreamJobNumber) + .Ignore(x => x.JobType) + .Ignore(x => x.IsAutoComplete) + .Ignore(x => x.ExpiredTime) + .Ignore(x => x.JobDescription) + .Ignore(x => x.JobStatus) + .Ignore(x => x.WorkGroupCode) + .Ignore(x => x.Priority) + .Ignore(x => x.PriorityIncrement) + .Ignore(x => x.AcceptUserId) + .Ignore(x => x.AcceptTime) + .Ignore(x => x.AcceptUserName) + .Ignore(x => x.CompleteUserId) + .Ignore(x => x.CompleteUserName) + .Ignore(x => x.CompleteTime) + .Ignore(x => x.Details) + ; + + CreateMap() + .ForMember(x => x.RequestLocationCode, y => y.MapFrom(d => d.ToLocationCode)) + .Ignore(x => x.RecommendFromLocationArea) + .Ignore(x => x.RecommendFromLocationGroup) + .Ignore(x => x.HandledFromLocationArea) + .Ignore(x => x.HandledFromLocationGroup) + .Ignore(x => x.RecommendFromWarehouseCode) + .Ignore(x => x.HandledFromWarehouseCode) + .Ignore(x => x.OnTheWayLocationCode) + .Ignore(x => x.DistributionType) + .Ignore(x => x.RoundedQty) + .Ignore(x => x.Operation) + .Ignore(x => x.ExpiredTime) + .Ignore(x => x.TruncType) + .Ignore(x => x.PlanBeginTime) + .Ignore(x => x.PlannedSplitRule) + .Ignore(x => x.DeliveryQty) + .Ignore(x => x.Status) + .Ignore(x => x.RecommendContainerCode) + .Ignore(x => x.StdPackQty) + .Ignore(x => x.RecommendPackingCode) + .Ignore(x => x.HandledContainerCode) + .Ignore(x => x.HandledPackingCode) + .Ignore(x => x.RecommendSupplierBatch) + .Ignore(x => x.RecommendProduceDate) + .Ignore(x => x.RecommendArriveDate) + .Ignore(x => x.RecommendExpireDate) + .Ignore(x => x.HandledFromLocationCode) + .Ignore(x => x.HandledFromLocationErpCode) + .Ignore(x => x.HandledUom) + .Ignore(x => x.RecommendFromLocationErpCode) + .Ignore(x => x.HandledExpireDate) + .Ignore(x => x.HandledLot) + .Ignore(x => x.HandledArriveDate) + .Ignore(x => x.HandledProduceDate) + .Ignore(x => x.HandledQty) + .Ignore(x => x.RecommendQty) + .Ignore(x => x.Uom) + .Ignore(x => x.HandledSupplierBatch) + .Ignore(x => x.RecommendFromLocationCode) + .Ignore(x => x.RecommendLot) + .IgnoreIHasRecommendAndHandledFrom(); + + CreateMap() + .ForMember(x => x.RecommendArriveDate, y => y.MapFrom(d => d.ArriveDate)) + .ForMember(x => x.RecommendContainerCode, y => y.MapFrom(d => d.ContainerCode)) + .ForMember(x => x.RecommendExpireDate, y => y.MapFrom(d => d.ExpireDate)) + .ForMember(x => x.RecommendFromLocationCode, y => y.MapFrom(d => d.LocationCode)) + .ForMember(x => x.RecommendFromLocationErpCode, y => y.MapFrom(d => d.LocationErpCode)) + .ForMember(x => x.RecommendFromWarehouseCode, y => y.MapFrom(d => d.WarehouseCode)) + .ForMember(x => x.RecommendFromLocationArea, y => y.MapFrom(d => d.LocationArea)) + .ForMember(x => x.RecommendFromLocationGroup, y => y.MapFrom(d => d.LocationGroup)) + .ForMember(x => x.RecommendLot, y => y.MapFrom(d => d.Lot)) + .ForMember(x => x.RecommendPackingCode, y => y.MapFrom(d => d.PackingCode)) + .ForMember(x => x.RecommendProduceDate, y => y.MapFrom(d => d.ProduceDate)) + .ForMember(x => x.RecommendQty, y => y.MapFrom(d => d.Qty)) + .ForMember(x => x.RecommendSupplierBatch, y => y.MapFrom(d => d.SupplierBatch)) + .ForMember(x => x.Uom, y => y.MapFrom(d => d.Uom)).Ignore(x => x.HandledArriveDate) + .Ignore(x => x.HandledFromLocationArea) + .Ignore(x => x.HandledFromLocationGroup) + .Ignore(x => x.ToLocationErpCode) + .Ignore(x => x.ToWarehouseCode) + .Ignore(x => x.ToLocationArea) + .Ignore(x => x.ToLocationGroup) + .Ignore(x => x.HandledFromWarehouseCode) + .Ignore(x => x.RequestLocationCode) + .Ignore(x => x.ToLocationCode) + .Ignore(x => x.ProdLine) + .Ignore(x => x.WorkStation) + .Ignore(x => x.HandledContainerCode) + .Ignore(x => x.HandledExpireDate) + .Ignore(x => x.HandledFromLocationCode) + .Ignore(x => x.HandledFromLocationErpCode) + .Ignore(x => x.HandledLot) + .Ignore(x => x.HandledPackingCode) + .Ignore(x => x.HandledProduceDate) + .Ignore(x => x.HandledQty) + .Ignore(x => x.HandledSupplierBatch) + .Ignore(x => x.HandledUom) + .Ignore(x => x.Remark) + .Ignore(x => x.OnTheWayLocationCode) + .Ignore(x => x.DistributionType) + .Ignore(x => x.RoundedQty) + .Ignore(x => x.Operation) + .Ignore(x => x.ExpiredTime) + .Ignore(x => x.TruncType) + .Ignore(x => x.PlanBeginTime) + .Ignore(x => x.PlannedSplitRule) + .Ignore(x => x.DeliveryQty) + .Ignore(x => x.RequestLocationCode) + .Ignore(x => x.ToLocationCode) + .Ignore(x => x.ProdLine) + .Ignore(x => x.WorkStation) + .Ignore(x => x.PositionCode) + .Ignore(x => x.RecommendType) + .IgnoreIHasRecommendAndHandledFrom(); + + } +} diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/AutoMapperProfiles/Requests/ProductionReturnRequestAutoMapperProfile.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/AutoMapperProfiles/Requests/ProductionReturnRequestAutoMapperProfile.cs index d7101e43e..10cdc47d7 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/AutoMapperProfiles/Requests/ProductionReturnRequestAutoMapperProfile.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/AutoMapperProfiles/Requests/ProductionReturnRequestAutoMapperProfile.cs @@ -5,12 +5,85 @@ using Win_in.Sfs.Wms.Store.Domain; namespace Win_in.Sfs.Wms.Store.Event; +using System; using Win_in.Sfs.Shared.Domain.Shared; +using Win_in.Sfs.Wms.Inventory.Application.Contracts; public partial class StoreEventAutoMapperProfile : Profile { private void ProductionReturnRequestAutoMapperProfile() { + + //CreateMap() + // .ForMember(x => x.JobNumber, y => y.MapFrom(d => d.Number)) + // .ForMember(x => x.ReturnTime, y => y.MapFrom(d => d.CreationTime)) + // .ForMember(x => x.Worker, y => y.MapFrom(d => d.Worker)) + // .ForMember(x => x.ActiveDate, y => y.MapFrom(d => DateTime.Now)) + // .Ignore(x => x.Number); + + //CreateMap() + + // .ForMember(x => x.FromPackingCode, y => y.MapFrom(d => d.FromPackingCode)) + // .ForMember(x => x.ToPackingCode, y => y.MapFrom(d => d.ToPackingCode)) + // .ForMember(x => x.SupplierBatch, y => y.MapFrom(d => d.SupplierBatch)) + // .ForMember(x => x.ArriveDate, y => y.MapFrom(d => d.ArriveDate)) + // .ForMember(x => x.ProduceDate, y => y.MapFrom(d => d.ProduceDate)) + // .ForMember(x => x.ExpireDate, y => y.MapFrom(d => d.ExpireDate)) + // .ForMember(x => x.FromLot, y => y.MapFrom(d => string.Empty)) + // .ForMember(x => x.ToLot, y => y.MapFrom(d => d.ToLot)) + // .ForMember(x => x.ToContainerCode, y => y.MapFrom(d => d.ToContainerCode)) + // .ForMember(x => x.FromContainerCode, y => y.MapFrom(d => d.FromContainerCode)) + // .ForMember(x => x.FromStatus, y => y.MapFrom(d => d.FromStatus)) + // .ForMember(x => x.ToStatus, y => y.MapFrom(d => d.ToStatus)) + // .ForMember(x => x.Qty, y => y.MapFrom(d => d.Qty)) + // .ForMember(x => x.FromLocationCode, y => y.MapFrom(d => d.FromLocationCode)) + // .ForMember(x => x.FromLocationArea, y => y.MapFrom(d => d.ToLocationArea)) + // .ForMember(x => x.FromLocationGroup, y => y.MapFrom(d => d.ToLocationGroup)) + // .ForMember(x => x.FromLocationErpCode, y => y.MapFrom(d => d.ToLocationErpCode)) + // .ForMember(x => x.FromWarehouseCode, y => y.MapFrom(d => d.ToWarehouseCode)) + // .ForMember(x => x.Qty, y => y.MapFrom(d => d.Qty)) + // .Ignore(x => x.ArriveDate) + // .Ignore(x => x.ToLocationCode) + // .Ignore(x => x.ToLocationArea) + // .Ignore(x => x.ToLocationGroup) + // .Ignore(x => x.ToLocationErpCode) + // .Ignore(x => x.ToWarehouseCode) + // .Ignore(x => x.HandledContainerCode) + // .Ignore(x => x.HandledPackingCode) + // .Ignore(x => x.HandledToLocationCode) + // .Ignore(x => x.HandledToLocationArea) + // .Ignore(x => x.HandledToLocationGroup) + // .Ignore(x => x.HandledToLocationErpCode) + // .Ignore(x => x.HandledToWarehouseCode) + // .Ignore(x => x.HandledExpireDate) + // .Ignore(x => x.HandledLot) + // .Ignore(x => x.HandledArriveDate) + // .Ignore(x => x.HandledProduceDate) + // .Ignore(x => x.HandledQty) + // .Ignore(x => x.HandledSupplierBatch); + + + //CreateMap() + // .MapExpectInOutTo() + // .Ignore(x => x.SerialNumber) + // .Ignore(x => x.Worker) + // .Ignore(x => x.ExtraProperties) + // ; + + //CreateMap() + // .MapExpectInOutTo() + // .ForMember(x => x.LocationCode, y => y.MapFrom(d => d.FromLocationCode)) + // .ForMember(x => x.LocationArea, y => y.MapFrom(d => d.FromLocationArea)) + // .ForMember(x => x.LocationGroup, y => y.MapFrom(d => d.FromLocationGroup)) + // .ForMember(x => x.LocationErpCode, y => y.MapFrom(d => d.FromLocationErpCode)) + // .ForMember(x => x.WarehouseCode, y => y.MapFrom(d => d.FromWarehouseCode)) + // .Ignore(x => x.SerialNumber) + // .Ignore(x => x.Worker) + // .Ignore(x => x.ExtraProperties); + + + + CreateMap() .ForMember(x => x.ProductionReturnRequestNumber, y => y.MapFrom(t => t.Number)) .ForMember(x => x.IsAutoComplete, y => y.MapFrom(t => t.AutoCompleteJob)) @@ -53,7 +126,6 @@ public partial class StoreEventAutoMapperProfile : Profile .Ignore(x => x.HandledProduceDate) .Ignore(x => x.HandledQty) .Ignore(x => x.HandledSupplierBatch) - ; } } diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/AutoMapperProfiles/Requests/TransferLibRequestAutoMapperProfile.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/AutoMapperProfiles/Requests/TransferLibRequestAutoMapperProfile.cs new file mode 100644 index 000000000..5e7bae13e --- /dev/null +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/AutoMapperProfiles/Requests/TransferLibRequestAutoMapperProfile.cs @@ -0,0 +1,24 @@ +using AutoMapper; +using Volo.Abp.AutoMapper; +using Win_in.Sfs.Wms.Store.Domain; + +namespace Win_in.Sfs.Wms.Store.Event; + +public partial class StoreEventAutoMapperProfile : Profile +{ + private void TransferLibRequestAutoMapperProfile() + { + CreateMap() + .IgnoreAuditedObjectProperties() + .ForMember(x => x.RequestNumber, y => y.MapFrom(d => d.Number)) + .ForMember(x => x.Confirmed, y => y.MapFrom(d => !d.UseOnTheWayLocation)) + .Ignore(x => x.ConfirmTime) + .Ignore(x => x.JobNumber) + .Ignore(x => x.Number) + .Ignore(x => x.Id); + + CreateMap() + .Ignore(x => x.OnTheWayLocationCode); + + } +} diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Jobs/AssembleJobEventHandler.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Jobs/AssembleJobEventHandler.cs new file mode 100644 index 000000000..8834827b7 --- /dev/null +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Jobs/AssembleJobEventHandler.cs @@ -0,0 +1,130 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; +using Volo.Abp.EventBus; +using Volo.Abp.Uow; +using Win_in.Sfs.Basedata.Application.Contracts; +using Win_in.Sfs.Shared.Domain.Shared; +using Win_in.Sfs.Shared.Event; +using Win_in.Sfs.Wms.Store.Application.Contracts; +using Win_in.Sfs.Wms.Store.Domain; +using Win_in.Sfs.Wms.Store.Domain.Shared; + +namespace Win_in.Sfs.Wms.Store.Event.BusinessJob; + +public class AssembleJobEventHandler : + StoreEventHandlerBase + , ILocalEventHandler> +{ + private const EnumTransType TransType = EnumTransType.Issue; + + private readonly IAssembleNoteAppService _assembleNoteAppService; + private readonly ILocationAppService _locationAppService; + + public AssembleJobEventHandler(IAssembleNoteAppService assembleNoteAppService, ILocationAppService locationAppService) + { + _assembleNoteAppService = assembleNoteAppService; + _locationAppService = locationAppService; + } + + /// + /// 执行后 + /// + /// + /// + [UnitOfWork] + public virtual async Task HandleEventAsync(SfsCompletedEntityEventData eventData) + { + var entity = eventData.Entity; + var assembleNote = await BuildAssembleNoteAsync(entity).ConfigureAwait(false); + await _assembleNoteAppService.CreateAsync(assembleNote).ConfigureAwait(false); + } + + #region 私有 + + /// + /// 创建补料记录实体 + /// + /// + /// + private async Task BuildAssembleNoteAsync(AssembleJob entity) + { + var assembleNoteCreateInput = ObjectMapper.Map(entity); + assembleNoteCreateInput.JobNumber = entity.Number; + var locationCodes = assembleNoteCreateInput.Details.Select(p => p.ToLocationCode).Distinct().ToList(); + var locations = await _locationAppService.GetByCodesAsync(locationCodes).ConfigureAwait(false); + + assembleNoteCreateInput.Details.RemoveAll(p => p.Qty == 0); + + foreach (var detail in assembleNoteCreateInput.Details) + { + var location = locations.First(p => p.Code == detail.ToLocationCode); + await RemovePackingCodeAndContainerCodeAndLotAsync(detail, location.Type).ConfigureAwait(false); //去箱 去托 去批 + + detail.ToLocationArea = location.AreaCode; + detail.ToLocationGroup = location.LocationGroupCode; + detail.ToLocationErpCode = location.ErpLocationCode; + detail.ToWarehouseCode = location.WarehouseCode; + } + + return assembleNoteCreateInput; + } + + /// + /// 去除箱码 托码 批次 + /// + private async Task RemovePackingCodeAndContainerCodeAndLotAsync(AssembleNoteDetailInput assembleNoteDetail, + EnumLocationType locationType) + { + switch (locationType) + { + case EnumLocationType.WIP: + { + //用开关控制 发料到线边后去除箱码和托码 ??? + if (await SettingManager.IsTrueAsync(StoreSettings.Issue.ToWip.IsRemovePackingCode) + .ConfigureAwait(false)) + { + assembleNoteDetail.ToPackingCode = ""; + } + + if (await SettingManager.IsTrueAsync(StoreSettings.Issue.ToWip.IsRemoveContainerCode) + .ConfigureAwait(false)) + { + assembleNoteDetail.ToContainerCode = ""; + } + + if (await SettingManager.IsTrueAsync(StoreSettings.Issue.ToWip.IsRemoveLot).ConfigureAwait(false)) + { + assembleNoteDetail.ToLot = ""; + } + + break; + } + case EnumLocationType.SEMI: + { + //用开关控制 发料到后去除箱码和托码 ??? + if (await SettingManager.IsTrueAsync(StoreSettings.Issue.ToSemi.IsRemovePackingCode) + .ConfigureAwait(false)) + { + assembleNoteDetail.ToPackingCode = ""; + } + + if (await SettingManager.IsTrueAsync(StoreSettings.Issue.ToSemi.IsRemoveContainerCode) + .ConfigureAwait(false)) + { + assembleNoteDetail.ToContainerCode = ""; + } + + if (await SettingManager.IsTrueAsync(StoreSettings.Issue.ToSemi.IsRemoveLot).ConfigureAwait(false)) + { + assembleNoteDetail.ToLot = ""; + } + + break; + } + } + } + + #endregion +} diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Jobs/CoatingIssueJobEventHandler.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Jobs/CoatingIssueJobEventHandler.cs new file mode 100644 index 000000000..8a82f504c --- /dev/null +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Jobs/CoatingIssueJobEventHandler.cs @@ -0,0 +1,132 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; +using Volo.Abp.EventBus; +using Volo.Abp.Uow; +using Win_in.Sfs.Basedata.Application.Contracts; +using Win_in.Sfs.Shared.Domain.Shared; +using Win_in.Sfs.Shared.Event; +using Win_in.Sfs.Wms.Store.Application.Contracts; +using Win_in.Sfs.Wms.Store.Domain; +using Win_in.Sfs.Wms.Store.Domain.Shared; +using Win_in.Sfs.Wms.Store.Jobs.IssueJobs; +using Win_in.Sfs.Wms.Store.Notes.IssueNotes; + +namespace Win_in.Sfs.Wms.Store.Event.BusinessJob; + +public class CoatingIssueJobEventHandler : + StoreEventHandlerBase + , ILocalEventHandler> +{ + private const EnumTransType TransType = EnumTransType.Issue; + + private readonly ICoatingIssueNoteAppService _issueNoteAppService; + private readonly ILocationAppService _locationAppService; + + public CoatingIssueJobEventHandler(ICoatingIssueNoteAppService issueNoteAppService, ILocationAppService locationAppService) + { + _issueNoteAppService = issueNoteAppService; + _locationAppService = locationAppService; + } + + /// + /// 执行后 + /// + /// + /// + [UnitOfWork] + public virtual async Task HandleEventAsync(SfsCompletedEntityEventData eventData) + { + var entity = eventData.Entity; + var issueNote = await BuildIssueNoteAsync(entity).ConfigureAwait(false); + await _issueNoteAppService.CreateAsync(issueNote).ConfigureAwait(false); + } + + #region 私有 + + /// + /// 创建补料记录实体 + /// + /// + /// + private async Task BuildIssueNoteAsync(CoatingIssueJob entity) + { + var issueNoteCreateInput = ObjectMapper.Map(entity); + issueNoteCreateInput.JobNumber = entity.Number; + var locationCodes = issueNoteCreateInput.Details.Select(p => p.ToLocationCode).Distinct().ToList(); + var locations = await _locationAppService.GetByCodesAsync(locationCodes).ConfigureAwait(false); + + issueNoteCreateInput.Details.RemoveAll(p => p.Qty == 0); + + foreach (var detail in issueNoteCreateInput.Details) + { + var location = locations.First(p => p.Code == detail.ToLocationCode); + await RemovePackingCodeAndContainerCodeAndLotAsync(detail, location.Type).ConfigureAwait(false); //去箱 去托 去批 + + detail.ToLocationArea = location.AreaCode; + detail.ToLocationGroup = location.LocationGroupCode; + detail.ToLocationErpCode = location.ErpLocationCode; + detail.ToWarehouseCode = location.WarehouseCode; + } + + return issueNoteCreateInput; + } + + /// + /// 去除箱码 托码 批次 + /// + private async Task RemovePackingCodeAndContainerCodeAndLotAsync(CoatingIssueNoteDetailInput issueNoteDetail, + EnumLocationType locationType) + { + switch (locationType) + { + case EnumLocationType.WIP: + { + //用开关控制 发料到线边后去除箱码和托码 ??? + if (await SettingManager.IsTrueAsync(StoreSettings.Issue.ToWip.IsRemovePackingCode) + .ConfigureAwait(false)) + { + issueNoteDetail.ToPackingCode = ""; + } + + if (await SettingManager.IsTrueAsync(StoreSettings.Issue.ToWip.IsRemoveContainerCode) + .ConfigureAwait(false)) + { + issueNoteDetail.ToContainerCode = ""; + } + + if (await SettingManager.IsTrueAsync(StoreSettings.Issue.ToWip.IsRemoveLot).ConfigureAwait(false)) + { + issueNoteDetail.ToLot = ""; + } + + break; + } + case EnumLocationType.SEMI: + { + //用开关控制 发料到后去除箱码和托码 ??? + if (await SettingManager.IsTrueAsync(StoreSettings.Issue.ToSemi.IsRemovePackingCode) + .ConfigureAwait(false)) + { + issueNoteDetail.ToPackingCode = ""; + } + + if (await SettingManager.IsTrueAsync(StoreSettings.Issue.ToSemi.IsRemoveContainerCode) + .ConfigureAwait(false)) + { + issueNoteDetail.ToContainerCode = ""; + } + + if (await SettingManager.IsTrueAsync(StoreSettings.Issue.ToSemi.IsRemoveLot).ConfigureAwait(false)) + { + issueNoteDetail.ToLot = ""; + } + + break; + } + } + } + + #endregion +} diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Jobs/InjectionJobEventHandler.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Jobs/InjectionJobEventHandler.cs new file mode 100644 index 000000000..9499c8fa1 --- /dev/null +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Jobs/InjectionJobEventHandler.cs @@ -0,0 +1,130 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; +using Volo.Abp.EventBus; +using Volo.Abp.Uow; +using Win_in.Sfs.Basedata.Application.Contracts; +using Win_in.Sfs.Shared.Domain.Shared; +using Win_in.Sfs.Shared.Event; +using Win_in.Sfs.Wms.Store.Application.Contracts; +using Win_in.Sfs.Wms.Store.Domain; +using Win_in.Sfs.Wms.Store.Domain.Shared; + +namespace Win_in.Sfs.Wms.Store.Event.BusinessJob; + +public class InjectionJobEventHandler : + StoreEventHandlerBase + , ILocalEventHandler> +{ + private const EnumTransType TransType = EnumTransType.Issue; + + private readonly IInjectionNoteAppService _injectionNoteAppService; + private readonly ILocationAppService _locationAppService; + + public InjectionJobEventHandler(IInjectionNoteAppService injectionNoteAppService, ILocationAppService locationAppService) + { + _injectionNoteAppService = injectionNoteAppService; + _locationAppService = locationAppService; + } + + /// + /// 执行后 + /// + /// + /// + [UnitOfWork] + public virtual async Task HandleEventAsync(SfsCompletedEntityEventData eventData) + { + var entity = eventData.Entity; + var injectionNote = await BuildInjectionNoteAsync(entity).ConfigureAwait(false); + await _injectionNoteAppService.CreateAsync(injectionNote).ConfigureAwait(false); + } + + #region 私有 + + /// + /// 创建补料记录实体 + /// + /// + /// + private async Task BuildInjectionNoteAsync(InjectionJob entity) + { + var injectionNoteCreateInput = ObjectMapper.Map(entity); + injectionNoteCreateInput.JobNumber = entity.Number; + var locationCodes = injectionNoteCreateInput.Details.Select(p => p.ToLocationCode).Distinct().ToList(); + var locations = await _locationAppService.GetByCodesAsync(locationCodes).ConfigureAwait(false); + + injectionNoteCreateInput.Details.RemoveAll(p => p.Qty == 0); + + foreach (var detail in injectionNoteCreateInput.Details) + { + var location = locations.First(p => p.Code == detail.ToLocationCode); + await RemovePackingCodeAndContainerCodeAndLotAsync(detail, location.Type).ConfigureAwait(false); //去箱 去托 去批 + + detail.ToLocationArea = location.AreaCode; + detail.ToLocationGroup = location.LocationGroupCode; + detail.ToLocationErpCode = location.ErpLocationCode; + detail.ToWarehouseCode = location.WarehouseCode; + } + + return injectionNoteCreateInput; + } + + /// + /// 去除箱码 托码 批次 + /// + private async Task RemovePackingCodeAndContainerCodeAndLotAsync(InjectionNoteDetailInput injectionNoteDetail, + EnumLocationType locationType) + { + switch (locationType) + { + case EnumLocationType.WIP: + { + //用开关控制 发料到线边后去除箱码和托码 ??? + if (await SettingManager.IsTrueAsync(StoreSettings.Issue.ToWip.IsRemovePackingCode) + .ConfigureAwait(false)) + { + injectionNoteDetail.ToPackingCode = ""; + } + + if (await SettingManager.IsTrueAsync(StoreSettings.Issue.ToWip.IsRemoveContainerCode) + .ConfigureAwait(false)) + { + injectionNoteDetail.ToContainerCode = ""; + } + + if (await SettingManager.IsTrueAsync(StoreSettings.Issue.ToWip.IsRemoveLot).ConfigureAwait(false)) + { + injectionNoteDetail.ToLot = ""; + } + + break; + } + case EnumLocationType.SEMI: + { + //用开关控制 发料到后去除箱码和托码 ??? + if (await SettingManager.IsTrueAsync(StoreSettings.Issue.ToSemi.IsRemovePackingCode) + .ConfigureAwait(false)) + { + injectionNoteDetail.ToPackingCode = ""; + } + + if (await SettingManager.IsTrueAsync(StoreSettings.Issue.ToSemi.IsRemoveContainerCode) + .ConfigureAwait(false)) + { + injectionNoteDetail.ToContainerCode = ""; + } + + if (await SettingManager.IsTrueAsync(StoreSettings.Issue.ToSemi.IsRemoveLot).ConfigureAwait(false)) + { + injectionNoteDetail.ToLot = ""; + } + + break; + } + } + } + + #endregion +} diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Jobs/TransferLibJobEventHandler.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Jobs/TransferLibJobEventHandler.cs new file mode 100644 index 000000000..f2f1248cf --- /dev/null +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Jobs/TransferLibJobEventHandler.cs @@ -0,0 +1,84 @@ +using System.Threading.Tasks; +using Volo.Abp.EventBus; +using Volo.Abp.Uow; +using Win_in.Sfs.Shared.Domain.Shared; +using Win_in.Sfs.Shared.Event; +using Win_in.Sfs.Wms.Store.Application.Contracts; +using Win_in.Sfs.Wms.Store.Domain; + +namespace Win_in.Sfs.Wms.Store.Event.BusinessJob; + +public class TransferLibJobEventHandler : + StoreEventHandlerBase + , ILocalEventHandler> + , ILocalEventHandler> +{ + private readonly ITransferLibNoteAppService _noteApp; + + public TransferLibJobEventHandler( + ITransferLibNoteAppService noteApp + ) + { + _noteApp = noteApp; + } + + [UnitOfWork] + public virtual async Task HandleEventAsync(SfsCreatedEntityEventData eventData) + { + var entity = eventData.Entity; + + if (!entity.IsAutoComplete) + { + return; + } + + entity.CompleteTime = Clock.Now; + entity.JobStatus = EnumJobStatus.Done; + + foreach (var detail in eventData.Entity.Details) + { + //detail.SetHandledFromRecommend(); + } + + var note = BuildTransferLibNoteCreateInput(entity); + await _noteApp.CreateAsync(note).ConfigureAwait(false); + + } + + [UnitOfWork] + public virtual async Task HandleEventAsync(SfsCompletedEntityEventData eventData) + { + var entity = eventData.Entity; + var note = BuildTransferLibNoteCreateInput(entity); + await _noteApp.CreateAsync(note).ConfigureAwait(false); + + } + + /// + /// 创建补料记录实体 + /// + /// + /// + /// + private TransferLibNoteEditInput BuildTransferLibNoteCreateInput(TransferLibJob entity) + { + var createInput = ObjectMapper.Map(entity); + createInput.Details.RemoveAll(p => p.Qty == 0); + + /* + createInput.Details = new List(); + + foreach (var inputDetail in entity.Details) + { + var detail = ObjectMapper.Map(inputDetail); + + detail.ExtraProperties = inputDetail.ExtraProperties; + + createInput.Details.Add(detail); + } + */ + + return createInput; + } + +} diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Requests/AssembleRequestEventHandler.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Requests/AssembleRequestEventHandler.cs new file mode 100644 index 000000000..796227276 --- /dev/null +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Requests/AssembleRequestEventHandler.cs @@ -0,0 +1,283 @@ +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using FluentValidation.Validators; +using Volo.Abp; +using Volo.Abp.EventBus; +using Volo.Abp.SettingManagement; +using Win_in.Sfs.Basedata.Application.Contracts; +using Win_in.Sfs.Shared.Domain.Shared; +using Win_in.Sfs.Shared.Event; +using Win_in.Sfs.Wms.Inventory.Application.Contracts; +using Win_in.Sfs.Wms.Store.Application.Contracts; +using Win_in.Sfs.Wms.Store.Domain; +using Win_in.Sfs.Wms.Store.Domain.Shared; + +namespace Win_in.Sfs.Wms.Store.Event.BusinessRequest; + +public class AssembleRequestEventHandler + : StoreEventHandlerBase + , ILocalEventHandler> + , ILocalEventHandler> + , ILocalEventHandler> + , ILocalEventHandler> + , ILocalEventHandler>> +{ + private readonly IAssembleJobAppService _assembleJobAppService; + private readonly IProductionLineAppService _productionLineAppService; + private readonly IAssembleRequestManager _assembleRequestManager; + private readonly ILocationAppService _locationAppService; + private readonly IBalanceAppService _balanceAppService; + + public AssembleRequestEventHandler( + IAssembleJobAppService assembleJobAppService + , IProductionLineAppService productionLineAppService + , IAssembleRequestManager assembleRequestManager + , ILocationAppService locationAppService + , IBalanceAppService balanceAppService) + { + _assembleJobAppService = assembleJobAppService; + _productionLineAppService = productionLineAppService; + _assembleRequestManager = assembleRequestManager; + _locationAppService = locationAppService; + _balanceAppService = balanceAppService; + } + + /// + /// 创建后 + /// + /// Event data + public virtual async Task HandleEventAsync(SfsCreatedEntityEventData eventData) + { + var entity = eventData.Entity; + + //if (entity.AutoSubmit) + //{ + // await _assembleRequestManager.SubmitAsync(entity).ConfigureAwait(false); + //} + } + + /// + /// 批量创建后 + /// + /// Event data + public virtual async Task HandleEventAsync(SfsCreatedEntityEventData> eventData) + { + var entitys = eventData.Entity; + foreach (var entity in entitys) + { + if (entity.AutoSubmit) + { + await _assembleRequestManager.SubmitAsync(entity).ConfigureAwait(false); + } + + } + } + + /// + /// 执行后 + /// + /// + /// + public virtual async Task HandleEventAsync(SfsHandledEntityEventData eventData) + { + var entity = eventData.Entity; + var assembleJobs = await BuildAssembleJobAsync(entity).ConfigureAwait(false); + if (assembleJobs.Any()) + { + await _assembleJobAppService.CreateManyAsync(assembleJobs).ConfigureAwait(false); + } + } + + /// + /// 驳回后 + /// + /// + /// + public virtual async Task HandleEventAsync(SfsAbortedEntityEventData eventData) + { + + } + + /// + /// 完成后 + /// + /// + /// + public virtual async Task HandleEventAsync(SfsCompletedEntityEventData eventData) + { + _ = eventData.Entity; + // await _assembleJobAppService.CompleteByAssembleRequestAsync(entity.Number); + + await Task.CompletedTask.ConfigureAwait(false); + } + + #region 私有 + + private async Task> BuildAssembleJobAsync + (AssembleRequest assembleRequest) + { + var jobs = new List(); + + var transactionType = await TransactionTypeAclService.GetByTransTypeAsync(EnumTransType.Issue, EnumTransSubType.None).ConfigureAwait(false);//库存事务 + + var toLocationCodes = assembleRequest.Details.Select(p => p.ToLocationCode).Distinct().ToList();//所有发送库位的集合 + var toLocations = await _locationAppService.GetByCodesAsync(toLocationCodes).ConfigureAwait(false);//所有库位的集合 + + var assembleRequestDetails = assembleRequest.Details.Where(p => p.ToBeIssuedQty > 0);//所有还没发送物品的集合 + foreach (var assembleRequestDetail in assembleRequestDetails)//如果有还有剩余未叫料的数量 则创建新的任务 + { + var toLocation = toLocations.FirstOrDefault(p => p.Code == assembleRequestDetail.ToLocationCode);//判断目标库位是否存在 + Check.NotNull(toLocation, "库位代码", $"库位 {assembleRequestDetail.ToLocationCode} 不存在"); + + //创建详情 + var jobDetails = await BuildAssembleJobDetailInputsAsync(assembleRequest, assembleRequestDetail, transactionType, toLocation.LocationGroupCode).ConfigureAwait(false); + if (!jobDetails.Any()) + { + continue; + } + + var fromLocationCode = jobDetails[0].RecommendFromLocationCode; + var fromLocation = await _locationAppService.GetByCodeAsync(fromLocationCode).ConfigureAwait(false); + var job = jobs.FirstOrDefault(p => p.WorkGroupCode == fromLocation?.WorkGroupCode); + if (job == null || job.Details.Any(p => p.ToLocationCode != assembleRequestDetail.ToLocationCode)) + { + job = BuildAssembleJobCreateInput(assembleRequest, fromLocation); + jobs.Add(job); + } + job.Details.AddRange(jobDetails); + if (assembleRequestDetail.ToBeIssuedQty < 0) + { + assembleRequestDetail.Status = EnumStatus.Close; + } + } + + jobs = jobs.Where(p => p.Details.Any()).ToList(); + + var openRequestDetails = + assembleRequest.Details.Where(p => p.Status != EnumStatus.Close).ToList(); + + if (!openRequestDetails.Any()) + { + return jobs; + } + + + var enableMultipleCreateAssembleJob = await SettingManager.IsTrueAsync(StoreSettings.MaterialRequest.EnableMultipleCreateIssueJob).ConfigureAwait(false); + if (enableMultipleCreateAssembleJob) + { + + //assembleRequest.Partial(); + } + else + { + var sb = new StringBuilder(); + foreach (var openRequestDetail in openRequestDetails) + { + sb.AppendLine($"{openRequestDetail.ItemCode}请求数量 {openRequestDetail.Qty},可用库存数量 {openRequestDetail.IssuedQty}"); + } + throw new UserFriendlyException($"{sb} 可用库存数量不足, 无法生成发料任务"); + } + return jobs; + } + + private AssembleJobEditInput BuildAssembleJobCreateInput(AssembleRequest assembleRequest, LocationDTO fromLocation) + { + AssembleJobEditInput job; + job = ObjectMapper.Map(assembleRequest); + job.JobType = EnumJobType.IssueJob; + job.JobStatus = EnumJobStatus.Open; + job.WorkGroupCode = fromLocation.WorkGroupCode; + job.WarehouseCode = fromLocation.WarehouseCode; + job.ProdLine = fromLocation.LocationGroupCode; + job.Worker = assembleRequest.Worker; + if (string.IsNullOrEmpty(job.Worker)) + { + job.Worker = "admin"; + } + job.AssembleRequestNumber = assembleRequest.Number; + return job; + } + + private async Task> BuildAssembleJobDetailInputsAsync(AssembleRequest assembleRequest, + AssembleRequestDetail assembleRequestDetail, TransactionTypeDTO transactionType, string toLocationGroupCode) + { + var jobDetails = new List(); + var input = new RecommendBalanceRequestInput() + { + ItemCode = assembleRequestDetail.ItemCode, + Qty = assembleRequestDetail.ToBeIssuedQty, + LocationTypes = transactionType.OutLocationTypes, + LocationAreas = new List { assembleRequestDetail.FromLocationArea }, + Statuses = transactionType.OutInventoryStatuses, + }; + //获取推荐库存 + var recommendList = await _balanceAppService.GetRecommendBalancesAsync(input).ConfigureAwait(false); + //没有推荐库存时 跳过此明细 不生成任务 + if (recommendList.Count != 0) + { + foreach (var recommend in recommendList) + { + //拿走需求量 + var detail = await BuildAssembleJobDetailAsync(assembleRequestDetail, recommend, toLocationGroupCode).ConfigureAwait(false); + if (assembleRequest.UseOnTheWayLocation) + { + //获取在途库 + var locationDto = await _locationAppService.GetFirstByTypeAsync(EnumLocationType.TRANSPORT).ConfigureAwait(false); + + detail.OnTheWayLocationCode = locationDto.Code; + } + + jobDetails.Add(detail); + assembleRequestDetail.IssuedQty += recommend.Qty; + + //await _assembleRequestManager.UpdateDetailsAsync(assembleRequest).ConfigureAwait(false); + + } + } + return jobDetails; + } + + private async Task BuildAssembleJobDetailAsync(AssembleRequestDetail assembleRequestDetail, BalanceDTO balance, string toLocationGroupCode) + { + + //ProductionLineDTO prodLine = await _productionLineAppService.GetByLocationGroupCodeAsync(toLocationGroupCode).ConfigureAwait(false); + + var detail = ObjectMapper.Map(balance); + detail.RequestLocationCode = assembleRequestDetail.ToLocationCode; + detail.WorkStation = assembleRequestDetail.WorkStation; + detail.ExpiredTime = assembleRequestDetail.ExpiredTime; + detail.PositionCode = assembleRequestDetail.PositionCode; + detail.RecommendType = assembleRequestDetail.RecommendType; + + detail.RecommendPackingCode = balance.PackingCode; + detail.RecommendContainerCode = balance.ContainerCode; + detail.RecommendSupplierBatch = balance.SupplierBatch; + detail.RecommendProduceDate = balance.ProduceDate; + detail.RecommendExpireDate = balance.ExpireDate; + detail.RecommendLot = balance.Lot; + detail.RecommendProduceDate = balance.ProduceDate; + detail.RecommendArriveDate = balance.ArriveDate; + detail.RecommendFromLocationArea = balance.LocationArea; + detail.RecommendFromLocationCode = balance.LocationCode; + detail.RecommendFromLocationErpCode = balance.LocationErpCode; + detail.RecommendFromLocationGroup = balance.LocationGroup; + detail.RecommendFromWarehouseCode = balance.WarehouseCode; + detail.RecommendQty = balance.Qty; + detail.Uom = balance.Uom; + + detail.ToLocationCode = assembleRequestDetail.ToLocationCode; + detail.ToLocationErpCode = assembleRequestDetail.ToLocationErpCode; + detail.ToLocationArea = assembleRequestDetail.ToLocationArea; + detail.ToWarehouseCode = assembleRequestDetail.ToWarehouseCode; + + //detail.ProdLine = prodLine == null ? toLocationGroupCode : prodLine.Code; + detail.ProdLine = toLocationGroupCode; + await Task.CompletedTask.ConfigureAwait(false); + return detail; + + } + + #endregion +} diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Requests/CoatingIssueJobEventHandler.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Requests/CoatingIssueJobEventHandler.cs new file mode 100644 index 000000000..e69de29bb diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Requests/CoatingMaterialRequestEventHandler.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Requests/CoatingMaterialRequestEventHandler.cs new file mode 100644 index 000000000..287ebabf2 --- /dev/null +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Requests/CoatingMaterialRequestEventHandler.cs @@ -0,0 +1,307 @@ +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using FluentValidation.Validators; +using Volo.Abp; +using Volo.Abp.EventBus; +using Volo.Abp.SettingManagement; +using Win_in.Sfs.Basedata.Application.Contracts; +using Win_in.Sfs.Shared.Domain.Shared; +using Win_in.Sfs.Shared.Event; +using Win_in.Sfs.Wms.Inventory.Application.Contracts; +using Win_in.Sfs.Wms.Store.Application.Contracts; +using Win_in.Sfs.Wms.Store.Domain; +using Win_in.Sfs.Wms.Store.Domain.Shared; +using Win_in.Sfs.Wms.Store.Jobs.IssueJobs; +using Win_in.Sfs.Wms.Store.Requests.MaterialRequests; + +namespace Win_in.Sfs.Wms.Store.Event.BusinessRequest; + +public class CoatingMaterialRequestEventHandler + : StoreEventHandlerBase + , ILocalEventHandler> + , ILocalEventHandler> + , ILocalEventHandler> + , ILocalEventHandler> + , ILocalEventHandler>> +{ + private readonly ICoatingIssueJobAppService _issueJobAppService; + private readonly IProductionLineAppService _productionLineAppService; + private readonly ICoatingMaterialRequestManager _CoatingMaterialRequestManager; + private readonly ILocationAppService _locationAppService; + private readonly IBalanceAppService _balanceAppService; + + public CoatingMaterialRequestEventHandler( + ICoatingIssueJobAppService issueJobAppService + , IProductionLineAppService productionLineAppService + , ICoatingMaterialRequestManager CoatingMaterialRequestManager + , ILocationAppService locationAppService + , IBalanceAppService balanceAppService) + { + _issueJobAppService = issueJobAppService; + _productionLineAppService = productionLineAppService; + _CoatingMaterialRequestManager = CoatingMaterialRequestManager; + _locationAppService = locationAppService; + _balanceAppService = balanceAppService; + } + + /// + /// 创建后 + /// + /// Event data + public virtual async Task HandleEventAsync(SfsCreatedEntityEventData eventData) + { + var entity = eventData.Entity; + + //if (entity.AutoSubmit) + //{ + // await _CoatingMaterialRequestManager.SubmitAsync(entity).ConfigureAwait(false); + //} + } + + /// + /// 批量创建后 + /// + /// Event data + public virtual async Task HandleEventAsync(SfsCreatedEntityEventData> eventData) + { + var entitys = eventData.Entity; + foreach (var entity in entitys) + { + if (entity.AutoSubmit) + { + await _CoatingMaterialRequestManager.SubmitAsync(entity).ConfigureAwait(false); + } + if (entity.Type == EnumMaterialRequestType.Issue_WIP.ToString()) + { + await _CoatingMaterialRequestManager.SubmitAsync(entity).ConfigureAwait(false); + } + } + } + + /// + /// 执行后 + /// + /// + /// + public virtual async Task HandleEventAsync(SfsHandledEntityEventData eventData) + { + var entity = eventData.Entity; + var issueJobs = await BuildIssueJobAsync(entity).ConfigureAwait(false); + if (issueJobs.Any()) + { + await _issueJobAppService.CreateManyAsync(issueJobs).ConfigureAwait(false); + } + } + + /// + /// 驳回后 + /// + /// + /// + public virtual async Task HandleEventAsync(SfsAbortedEntityEventData eventData) + { + var entity = eventData.Entity; + await _issueJobAppService.CancelByMaterialRequestAsync(entity.Number).ConfigureAwait(false); + } + + /// + /// 完成后 + /// + /// + /// + public virtual async Task HandleEventAsync(SfsCompletedEntityEventData eventData) + { + _ = eventData.Entity; + // await _issueJobAppService.CompleteByCoatingMaterialRequestAsync(entity.Number); + + await Task.CompletedTask.ConfigureAwait(false); + } + + #region 私有 + + private async Task> BuildIssueJobAsync + (CoatingMaterialRequest CoatingMaterialRequest) + { + var jobs = new List(); + + var transactionType = await TransactionTypeAclService.GetByTransTypeAsync(EnumTransType.Issue, EnumTransSubType.None).ConfigureAwait(false);//库存事务 + + var toLocationCodes = CoatingMaterialRequest.Details.Select(p => p.ToLocationCode).Distinct().ToList();//所有发送库位的集合 + var toLocations = await _locationAppService.GetByCodesAsync(toLocationCodes).ConfigureAwait(false);//所有库位的集合 + + var CoatingMaterialRequestDetails = CoatingMaterialRequest.Details.Where(p => p.ToBeIssuedQty > 0);//所有还没发送物品的集合 + foreach (var CoatingMaterialRequestDetail in CoatingMaterialRequestDetails)//如果有还有剩余未叫料的数量 则创建新的任务 + { + var toLocation = toLocations.FirstOrDefault(p => p.Code == CoatingMaterialRequestDetail.ToLocationCode);//判断目标库位是否存在 + Check.NotNull(toLocation, "库位代码", $"库位 {CoatingMaterialRequestDetail.ToLocationCode} 不存在"); + + //创建详情 + var jobDetails = await BuildIssueJobDetailInputsAsync(CoatingMaterialRequest, CoatingMaterialRequestDetail, transactionType, toLocation.LocationGroupCode).ConfigureAwait(false); + if (!jobDetails.Any()) + { + continue; + } + + var fromLocationCode = jobDetails[0].RecommendFromLocationCode; + var fromLocation = await _locationAppService.GetByCodeAsync(fromLocationCode).ConfigureAwait(false); + var job = jobs.FirstOrDefault(p => p.WorkGroupCode == fromLocation?.WorkGroupCode); + if (job == null || job.Details.Any(p => p.ToLocationCode != CoatingMaterialRequestDetail.ToLocationCode)) + { + job = BuildIssueJobCreateInput(CoatingMaterialRequest, fromLocation); + jobs.Add(job); + } + job.Details.AddRange(jobDetails); + if (CoatingMaterialRequestDetail.ToBeIssuedQty < 0) + { + CoatingMaterialRequestDetail.Status = EnumStatus.Close; + } + } + + jobs = jobs.Where(p => p.Details.Any()).ToList(); + + var openRequestDetails = + CoatingMaterialRequest.Details.Where(p => p.Status != EnumStatus.Close).ToList(); + + if (!openRequestDetails.Any()) + { + return jobs; + } + + var enableMultipleCreateIssueJob = await SettingManager.IsTrueAsync(StoreSettings.MaterialRequest.EnableMultipleCreateIssueJob).ConfigureAwait(false); + if (enableMultipleCreateIssueJob) + { + CoatingMaterialRequest.Partial(); + } + else + { + var sb = new StringBuilder(); + foreach (var openRequestDetail in openRequestDetails) + { + sb.AppendLine($"{openRequestDetail.ItemCode}请求数量 {openRequestDetail.Qty},可用库存数量 {openRequestDetail.IssuedQty}"); + } + throw new UserFriendlyException($"{sb} 可用库存数量不足, 无法生成发料任务"); + } + return jobs; + } + + private CoatingIssueJobEditInput BuildIssueJobCreateInput(CoatingMaterialRequest CoatingMaterialRequest, LocationDTO fromLocation) + { + CoatingIssueJobEditInput job; + job = ObjectMapper.Map(CoatingMaterialRequest); + job.JobType = EnumJobType.IssueJob; + job.JobStatus = EnumJobStatus.Open; + job.WorkGroupCode = fromLocation.WorkGroupCode; + job.WarehouseCode = fromLocation.WarehouseCode; + job.ProdLine = fromLocation.LocationGroupCode; + job.Worker = CoatingMaterialRequest.Worker; + job.MaterialRequestNumber = CoatingMaterialRequest.Number; + return job; + } + + private async Task> BuildIssueJobDetailInputsAsync(CoatingMaterialRequest CoatingMaterialRequest, + CoatingMaterialRequestDetail CoatingMaterialRequestDetail, TransactionTypeDTO transactionType, string toLocationGroupCode) + { + var jobDetails = new List(); + var input = new RecommendBalanceRequestInput() + { + ItemCode = CoatingMaterialRequestDetail.ItemCode, + Qty = CoatingMaterialRequestDetail.ToBeIssuedQty, + LocationTypes = transactionType.OutLocationTypes, + LocationAreas = new List { CoatingMaterialRequestDetail.FromLocationArea }, + Statuses = transactionType.OutInventoryStatuses, + }; + //获取推荐库存 + var recommendList = await _balanceAppService.GetRecommendBalancesAsync(input).ConfigureAwait(false); + //没有推荐库存时 跳过此明细 不生成任务 + if (recommendList.Count != 0) + { + foreach (var recommend in recommendList) + { + //拿走需求量 + var detail = await BuildIssueJobDetailAsync(CoatingMaterialRequestDetail, recommend, toLocationGroupCode).ConfigureAwait(false); + if (CoatingMaterialRequest.UseOnTheWayLocation) + { + //获取在途库 + var locationDto = await _locationAppService.GetFirstByTypeAsync(EnumLocationType.TRANSPORT).ConfigureAwait(false); + + detail.OnTheWayLocationCode = locationDto.Code; + } + + jobDetails.Add(detail); + CoatingMaterialRequestDetail.IssuedQty += recommend.Qty; + await _CoatingMaterialRequestManager.UpdateDetailsAsync(CoatingMaterialRequest).ConfigureAwait(false); + + } + } + return jobDetails; + } + + private async Task BuildIssueJobDetailAsync(CoatingMaterialRequestDetail CoatingMaterialRequestDetail, BalanceDTO balance, string toLocationGroupCode) + { + //ProductionLineDTO prodLine = await _productionLineAppService.GetByLocationGroupCodeAsync(toLocationGroupCode).ConfigureAwait(false); + + var detail = ObjectMapper.Map(balance); + detail.RequestLocationCode = CoatingMaterialRequestDetail.ToLocationCode; + detail.WorkStation = CoatingMaterialRequestDetail.WorkStation; + detail.ExpiredTime = CoatingMaterialRequestDetail.ExpiredTime; + detail.PositionCode = CoatingMaterialRequestDetail.PositionCode; + detail.RecommendType = CoatingMaterialRequestDetail.RecommendType; + + detail.RecommendPackingCode = balance.PackingCode; + detail.RecommendContainerCode = balance.ContainerCode; + detail.RecommendSupplierBatch = balance.SupplierBatch; + detail.RecommendProduceDate = balance.ProduceDate; + detail.RecommendExpireDate = balance.ExpireDate; + detail.RecommendLot = balance.Lot; + detail.RecommendProduceDate = balance.ProduceDate; + detail.RecommendArriveDate = balance.ArriveDate; + detail.RecommendFromLocationArea = balance.LocationArea; + detail.RecommendFromLocationCode = balance.LocationCode; + detail.RecommendFromLocationErpCode = balance.LocationErpCode; + detail.RecommendFromLocationGroup = balance.LocationGroup; + detail.RecommendFromWarehouseCode = balance.WarehouseCode; + detail.RecommendQty = balance.Qty; + detail.Uom = balance.Uom; + + detail.ToLocationCode = CoatingMaterialRequestDetail.ToLocationCode; + detail.ToLocationErpCode = CoatingMaterialRequestDetail.ToLocationErpCode; + detail.ToLocationArea = CoatingMaterialRequestDetail.ToLocationArea; + detail.ToWarehouseCode = CoatingMaterialRequestDetail.ToWarehouseCode; + detail.ToLocationGroup = CoatingMaterialRequestDetail.ToLocationGroup; + //detail.Operation = //TODO + //detail.DistributionType =//TODO + //detail.TruncType = //TODO + //detail.RoundedQty =//TODO + //detail.PlannedSplitRule = //TODO + //detail.PlanBeginTime = //TODO + //detaiol.DeliveryQty = //TODO + + // var detail = ObjectMapper.Map(CoatingMaterialRequestDetail); + // + // detail.RecommendPackingCode = balance.PackingCode; + // detail.RecommendContainerCode = balance.ContainerCode; + // detail.RecommendLot = balance.Lot; + // detail.RecommendLocationCode = balance.LocationCode; + // detail.RecommendLocationArea = balance.LocationArea; + // detail.RecommendLocationGroup = balance.LocationGroup; + // detail.RecommendLocationErpCode = balance.LocationErpCode; + // detail.WarehouseCode = balance.WarehouseCode; + // detail.Status = balance.Status; + // detail.RecommendSupplierBatch = balance.SupplierBatch; + // detail.RecommendArriveDate = balance.ArriveDate; + // detail.RecommendProduceDate = balance.ProduceDate; + // detail.RecommendExpireDate = balance.ExpireDate; + // detail.RecommendQty = balance.Qty; + // detail.RecommendUom = balance.Uom; + + // detail.ProdLine = prodLine == null ? toLocationGroupCode : prodLine.Code; + detail.ProdLine = toLocationGroupCode; + await Task.CompletedTask.ConfigureAwait(false); + return detail; + + } + + #endregion +} diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Requests/InjectionRequestEventHandler.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Requests/InjectionRequestEventHandler.cs new file mode 100644 index 000000000..8d31e595b --- /dev/null +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Requests/InjectionRequestEventHandler.cs @@ -0,0 +1,283 @@ +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using FluentValidation.Validators; +using Volo.Abp; +using Volo.Abp.EventBus; +using Volo.Abp.SettingManagement; +using Win_in.Sfs.Basedata.Application.Contracts; +using Win_in.Sfs.Shared.Domain.Shared; +using Win_in.Sfs.Shared.Event; +using Win_in.Sfs.Wms.Inventory.Application.Contracts; +using Win_in.Sfs.Wms.Store.Application.Contracts; +using Win_in.Sfs.Wms.Store.Domain; +using Win_in.Sfs.Wms.Store.Domain.Shared; + +namespace Win_in.Sfs.Wms.Store.Event.BusinessRequest; + +public class InjectionRequestEventHandler + : StoreEventHandlerBase + , ILocalEventHandler> + , ILocalEventHandler> + , ILocalEventHandler> + , ILocalEventHandler> + , ILocalEventHandler>> +{ + private readonly IInjectionJobAppService _injectionJobAppService; + private readonly IProductionLineAppService _productionLineAppService; + private readonly IInjectionRequestManager _injectionRequestManager; + private readonly ILocationAppService _locationAppService; + private readonly IBalanceAppService _balanceAppService; + + public InjectionRequestEventHandler( + IInjectionJobAppService injectionJobAppService + , IProductionLineAppService productionLineAppService + , IInjectionRequestManager injectionRequestManager + , ILocationAppService locationAppService + , IBalanceAppService balanceAppService) + { + _injectionJobAppService = injectionJobAppService; + _productionLineAppService = productionLineAppService; + _injectionRequestManager = injectionRequestManager; + _locationAppService = locationAppService; + _balanceAppService = balanceAppService; + } + + /// + /// 创建后 + /// + /// Event data + public virtual async Task HandleEventAsync(SfsCreatedEntityEventData eventData) + { + var entity = eventData.Entity; + + //if (entity.AutoSubmit) + //{ + // await _injectionRequestManager.SubmitAsync(entity).ConfigureAwait(false); + //} + } + + /// + /// 批量创建后 + /// + /// Event data + public virtual async Task HandleEventAsync(SfsCreatedEntityEventData> eventData) + { + var entitys = eventData.Entity; + foreach (var entity in entitys) + { + if (entity.AutoSubmit) + { + await _injectionRequestManager.SubmitAsync(entity).ConfigureAwait(false); + } + + } + } + + /// + /// 执行后 + /// + /// + /// + public virtual async Task HandleEventAsync(SfsHandledEntityEventData eventData) + { + var entity = eventData.Entity; + var injectionJobs = await BuildInjectionJobAsync(entity).ConfigureAwait(false); + if (injectionJobs.Any()) + { + await _injectionJobAppService.CreateManyAsync(injectionJobs).ConfigureAwait(false); + } + } + + /// + /// 驳回后 + /// + /// + /// + public virtual async Task HandleEventAsync(SfsAbortedEntityEventData eventData) + { + + } + + /// + /// 完成后 + /// + /// + /// + public virtual async Task HandleEventAsync(SfsCompletedEntityEventData eventData) + { + _ = eventData.Entity; + // await _injectionJobAppService.CompleteByInjectionRequestAsync(entity.Number); + + await Task.CompletedTask.ConfigureAwait(false); + } + + #region 私有 + + private async Task> BuildInjectionJobAsync + (InjectionRequest injectionRequest) + { + var jobs = new List(); + + var transactionType = await TransactionTypeAclService.GetByTransTypeAsync(EnumTransType.Issue, EnumTransSubType.None).ConfigureAwait(false);//库存事务 + + var toLocationCodes = injectionRequest.Details.Select(p => p.ToLocationCode).Distinct().ToList();//所有发送库位的集合 + var toLocations = await _locationAppService.GetByCodesAsync(toLocationCodes).ConfigureAwait(false);//所有库位的集合 + + var injectionRequestDetails = injectionRequest.Details.Where(p => p.ToBeIssuedQty > 0);//所有还没发送物品的集合 + foreach (var injectionRequestDetail in injectionRequestDetails)//如果有还有剩余未叫料的数量 则创建新的任务 + { + var toLocation = toLocations.FirstOrDefault(p => p.Code == injectionRequestDetail.ToLocationCode);//判断目标库位是否存在 + Check.NotNull(toLocation, "库位代码", $"库位 {injectionRequestDetail.ToLocationCode} 不存在"); + + //创建详情 + var jobDetails = await BuildInjectionJobDetailInputsAsync(injectionRequest, injectionRequestDetail, transactionType, toLocation.LocationGroupCode).ConfigureAwait(false); + if (!jobDetails.Any()) + { + continue; + } + + var fromLocationCode = jobDetails[0].RecommendFromLocationCode; + var fromLocation = await _locationAppService.GetByCodeAsync(fromLocationCode).ConfigureAwait(false); + var job = jobs.FirstOrDefault(p => p.WorkGroupCode == fromLocation?.WorkGroupCode); + if (job == null || job.Details.Any(p => p.ToLocationCode != injectionRequestDetail.ToLocationCode)) + { + job = BuildInjectionJobCreateInput(injectionRequest, fromLocation); + jobs.Add(job); + } + job.Details.AddRange(jobDetails); + if (injectionRequestDetail.ToBeIssuedQty < 0) + { + injectionRequestDetail.Status = EnumStatus.Close; + } + } + + jobs = jobs.Where(p => p.Details.Any()).ToList(); + + var openRequestDetails = + injectionRequest.Details.Where(p => p.Status != EnumStatus.Close).ToList(); + + if (!openRequestDetails.Any()) + { + return jobs; + } + + + var enableMultipleCreateInjectionJob = await SettingManager.IsTrueAsync(StoreSettings.MaterialRequest.EnableMultipleCreateIssueJob).ConfigureAwait(false); + if (enableMultipleCreateInjectionJob) + { + + //injectionRequest.Partial(); + } + else + { + var sb = new StringBuilder(); + foreach (var openRequestDetail in openRequestDetails) + { + sb.AppendLine($"{openRequestDetail.ItemCode}请求数量 {openRequestDetail.Qty},可用库存数量 {openRequestDetail.IssuedQty}"); + } + throw new UserFriendlyException($"{sb} 可用库存数量不足, 无法生成发料任务"); + } + return jobs; + } + + private InjectionJobEditInput BuildInjectionJobCreateInput(InjectionRequest injectionRequest, LocationDTO fromLocation) + { + InjectionJobEditInput job; + job = ObjectMapper.Map(injectionRequest); + job.JobType = EnumJobType.IssueJob; + job.JobStatus = EnumJobStatus.Open; + job.WorkGroupCode = fromLocation.WorkGroupCode; + job.WarehouseCode = fromLocation.WarehouseCode; + job.ProdLine = fromLocation.LocationGroupCode; + job.Worker = injectionRequest.Worker; + if(string.IsNullOrEmpty(job.Worker)) + { + job.Worker = "admin"; + } + job.InjectionRequestNumber = injectionRequest.Number; + return job; + } + + private async Task> BuildInjectionJobDetailInputsAsync(InjectionRequest injectionRequest, + InjectionRequestDetail injectionRequestDetail, TransactionTypeDTO transactionType, string toLocationGroupCode) + { + var jobDetails = new List(); + var input = new RecommendBalanceRequestInput() + { + ItemCode = injectionRequestDetail.ItemCode, + Qty = injectionRequestDetail.ToBeIssuedQty, + LocationTypes = transactionType.OutLocationTypes, + LocationAreas = new List { injectionRequestDetail.FromLocationArea }, + Statuses = transactionType.OutInventoryStatuses, + }; + //获取推荐库存 + var recommendList = await _balanceAppService.GetRecommendBalancesAsync(input).ConfigureAwait(false); + //没有推荐库存时 跳过此明细 不生成任务 + if (recommendList.Count != 0) + { + foreach (var recommend in recommendList) + { + //拿走需求量 + var detail = await BuildInjectionJobDetailAsync(injectionRequestDetail, recommend, toLocationGroupCode).ConfigureAwait(false); + if (injectionRequest.UseOnTheWayLocation) + { + //获取在途库 + var locationDto = await _locationAppService.GetFirstByTypeAsync(EnumLocationType.TRANSPORT).ConfigureAwait(false); + + detail.OnTheWayLocationCode = locationDto.Code; + } + + jobDetails.Add(detail); + injectionRequestDetail.IssuedQty += recommend.Qty; + + //await _injectionRequestManager.UpdateDetailsAsync(injectionRequest).ConfigureAwait(false); + + } + } + return jobDetails; + } + + private async Task BuildInjectionJobDetailAsync(InjectionRequestDetail injectionRequestDetail, BalanceDTO balance, string toLocationGroupCode) + { + + //ProductionLineDTO prodLine = await _productionLineAppService.GetByLocationGroupCodeAsync(toLocationGroupCode).ConfigureAwait(false); + + var detail = ObjectMapper.Map(balance); + detail.RequestLocationCode = injectionRequestDetail.ToLocationCode; + detail.WorkStation = injectionRequestDetail.WorkStation; + detail.ExpiredTime = injectionRequestDetail.ExpiredTime; + detail.PositionCode = injectionRequestDetail.PositionCode; + detail.RecommendType = injectionRequestDetail.RecommendType; + + detail.RecommendPackingCode = balance.PackingCode; + detail.RecommendContainerCode = balance.ContainerCode; + detail.RecommendSupplierBatch = balance.SupplierBatch; + detail.RecommendProduceDate = balance.ProduceDate; + detail.RecommendExpireDate = balance.ExpireDate; + detail.RecommendLot = balance.Lot; + detail.RecommendProduceDate = balance.ProduceDate; + detail.RecommendArriveDate = balance.ArriveDate; + detail.RecommendFromLocationArea = balance.LocationArea; + detail.RecommendFromLocationCode = balance.LocationCode; + detail.RecommendFromLocationErpCode = balance.LocationErpCode; + detail.RecommendFromLocationGroup = balance.LocationGroup; + detail.RecommendFromWarehouseCode = balance.WarehouseCode; + detail.RecommendQty = balance.Qty; + detail.Uom = balance.Uom; + + detail.ToLocationCode = injectionRequestDetail.ToLocationCode; + detail.ToLocationErpCode = injectionRequestDetail.ToLocationErpCode; + detail.ToLocationArea = injectionRequestDetail.ToLocationArea; + detail.ToWarehouseCode = injectionRequestDetail.ToWarehouseCode; + + //detail.ProdLine = prodLine == null ? toLocationGroupCode : prodLine.Code; + detail.ProdLine = toLocationGroupCode ; + await Task.CompletedTask.ConfigureAwait(false); + return detail; + + } + + #endregion +} diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Requests/MaterialRequestEventHandler.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Requests/MaterialRequestEventHandler.cs index 4f9c8d67f..1e56002a4 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Requests/MaterialRequestEventHandler.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Requests/MaterialRequestEventHandler.cs @@ -238,7 +238,7 @@ public class MaterialRequestEventHandler private async Task BuildIssueJobDetailAsync(MaterialRequestDetail materialRequestDetail, BalanceDTO balance, string toLocationGroupCode) { - ProductionLineDTO prodLine = await _productionLineAppService.GetByLocationGroupCodeAsync(toLocationGroupCode).ConfigureAwait(false); + //ProductionLineDTO prodLine = await _productionLineAppService.GetByLocationGroupCodeAsync(toLocationGroupCode).ConfigureAwait(false); var detail = ObjectMapper.Map(balance); detail.RequestLocationCode = materialRequestDetail.ToLocationCode; @@ -294,7 +294,7 @@ public class MaterialRequestEventHandler // detail.RecommendQty = balance.Qty; // detail.RecommendUom = balance.Uom; - detail.ProdLine = prodLine == null ? toLocationGroupCode : prodLine.Code; + //detail.ProdLine = prodLine == null ? toLocationGroupCode : prodLine.Code; await Task.CompletedTask.ConfigureAwait(false); return detail; diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Requests/Note/CoatingIssueNoteEventHandler.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Requests/Note/CoatingIssueNoteEventHandler.cs new file mode 100644 index 000000000..f41206079 --- /dev/null +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Requests/Note/CoatingIssueNoteEventHandler.cs @@ -0,0 +1,100 @@ +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; +using Volo.Abp.EventBus; +using Volo.Abp.Uow; +using Win_in.Sfs.Shared.Domain.Shared; +using Win_in.Sfs.Shared.Event; +using Win_in.Sfs.Wms.Store.Domain; +using Win_in.Sfs.Wms.Store.Notes.IssueNotes; +using Win_in.Sfs.Wms.Store.Requests.MaterialRequests; +using static Win_in.Sfs.Wms.Store.Domain.Shared.StoreSettings; +using MaterialRequest = Win_in.Sfs.Wms.Store.Domain.MaterialRequest; + +namespace Win_in.Sfs.Wms.Store.Event.BusinessRequest; + +public class CoatingIssueNoteEventHandler + : StoreEventHandlerBase + , ILocalEventHandler> + , ILocalEventHandler>> + , ILocalEventHandler> +{ + private readonly ICoatingMaterialRequestManager _materialRequestManager; + + public CoatingIssueNoteEventHandler( + ICoatingMaterialRequestManager materialRequestManager + ) + { + _materialRequestManager = materialRequestManager; + } + + /// + /// 当叫料记录创建后 修改请求的值 + /// + /// + /// + [UnitOfWork] + public virtual async Task HandleEventAsync(SfsConfirmedEntityEventData eventData) + { + var entity = eventData.Entity; + + await UpdateReceivedQtyMaterialRequestAsync(entity).ConfigureAwait(false); + } + + /// + /// 当叫料记录创建后 修改请求的值 + /// + /// + /// + [UnitOfWork] + public virtual async Task HandleEventAsync(SfsCreatedEntityEventData eventData) + { + var entity = eventData.Entity; + if (!entity.UseOnTheWayLocation) + { + await UpdateReceivedQtyMaterialRequestAsync(entity).ConfigureAwait(false); + } + } + + /// + /// 当叫料记录创建后 修改请求的值 + /// + /// + /// + [UnitOfWork] + public virtual async Task HandleEventAsync(SfsCreatedEntityEventData> eventData) + { + var entities = eventData.Entity; + foreach (var entity in entities.Where(entity => !entity.UseOnTheWayLocation)) + { + await UpdateReceivedQtyMaterialRequestAsync(entity).ConfigureAwait(false); + } + } + + private async Task UpdateReceivedQtyMaterialRequestAsync(CoatingIssueNote entity) + { + var receiveQtyGroup = entity.Details + .GroupBy(p => new { p.ItemCode, p.ToLocationCode }) + .Select(p => new { p.Key.ItemCode, p.Key.ToLocationCode, Qty = p.Sum(d => d.Qty) }) + .ToList(); + + var materialRequest = await _materialRequestManager.GetByNumberAsync(entity.RequestNumber).ConfigureAwait(false); + + if (entity.RequestType != EnumMaterialRequestType.Issue_Direct.ToString()) + { + //更新叫料请求的已收数量 + foreach (var materialRequestDetail in materialRequest.Details) + { + var receiveQty = receiveQtyGroup.FirstOrDefault(p => + p.ItemCode == materialRequestDetail.ItemCode && + p.ToLocationCode == materialRequestDetail.ToLocationCode)?.Qty; + if (receiveQty != null) + { + materialRequestDetail.ReceivedQty += receiveQty.Value; + } + } + + await _materialRequestManager.UpdateDetailsAsync(materialRequest).ConfigureAwait(false); + } + } +} diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Requests/ProductReceiptRequestEventHandler.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Requests/ProductReceiptRequestEventHandler.cs index e59b18222..cbbbeeabe 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Requests/ProductReceiptRequestEventHandler.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Requests/ProductReceiptRequestEventHandler.cs @@ -128,13 +128,13 @@ public class ProductReceiptRequestEventHandler { var detail = ObjectMapper.Map(productionPlanDetail); detail.ProdLine = productionPlan.ProdLine; - detail.RawLocationCode = productionLine.RawLocationCode; //原料回冲库位 + //detail.RawLocationCode = productionLine.RawLocationCode; //原料回冲库位 detail.RecommendSupplierBatch = productionPlanDetail.SupplierBatch; detail.RecommendArriveDate = productionPlanDetail.ArriveDate; detail.RecommendProduceDate = productionPlanDetail.ProduceDate; detail.RecommendExpireDate = productionPlanDetail.ExpireDate; detail.RecommendLot = productionPlanDetail.Lot; - detail.RecommendToLocationCode = productionLine.ProductLocationCode; + //detail.RecommendToLocationCode = productionLine.ProductLocationCode; detail.RecommendQty = productionPlanDetail.Qty; detail.Uom = productionPlanDetail.Uom; detail.StdPackQty = productionPlanDetail.StdPackQty; @@ -153,8 +153,8 @@ public class ProductReceiptRequestEventHandler var productionLine = await _productionLineAppService.GetByCodeAsync(productionPlan.ProdLine).ConfigureAwait(false); Check.NotNull(productionLine, "生产线代码", $"生产线 {productionPlan.ProdLine} 不存在"); - var location = await LocationAclService.GetByCodeAsync(productionLine.ProductLocationCode).ConfigureAwait(false); - Check.NotNull(location, "库位代码", $"库位 {productionLine.ProductLocationCode} 不存在"); + //var location = await LocationAclService.GetByCodeAsync(productionLine.ProductLocationCode).ConfigureAwait(false); + //Check.NotNull(location, "库位代码", $"库位 {productionLine.ProductLocationCode} 不存在"); var num = itemPack == 0 ? 1 : (int)Math.Ceiling(productionPlanDetail.Qty / itemPack); for (var n = 0; n < num; n++) @@ -169,8 +169,8 @@ public class ProductReceiptRequestEventHandler //设置工作组和任务优先级 entity.Priority = PriorityHelper.GetPriority(Clock); entity.PriorityIncrement = 1; - entity.WarehouseCode = location.WarehouseCode; - entity.WorkGroupCode = location.WorkGroupCode; + //entity.WarehouseCode = location.WarehouseCode; + //entity.WorkGroupCode = location.WorkGroupCode; return entity; diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Requests/ProductionPlanEventHandler.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Requests/ProductionPlanEventHandler.cs index 2212785fd..b52a02a04 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Requests/ProductionPlanEventHandler.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Requests/ProductionPlanEventHandler.cs @@ -66,13 +66,13 @@ public class ProductionPlanEventHandler { var detail = ObjectMapper.Map(productionPlanDetail); detail.ProdLine = productionPlan.ProdLine; - detail.RawLocationCode = productionLine.RawLocationCode; //原料回冲库位 + //detail.RawLocationCode = productionLine.RawLocationCode; //原料回冲库位 detail.RecommendSupplierBatch = productionPlanDetail.SupplierBatch; detail.RecommendArriveDate = productionPlanDetail.ArriveDate; detail.RecommendProduceDate = productionPlanDetail.ProduceDate; detail.RecommendExpireDate = productionPlanDetail.ExpireDate; detail.RecommendLot = productionPlanDetail.Lot; - detail.RecommendToLocationCode = productionLine.ProductLocationCode; + //detail.RecommendToLocationCode = productionLine.ProductLocationCode; detail.RecommendQty = productionPlanDetail.PlanQty; detail.Uom = productionPlanDetail.Uom; detail.StdPackQty = stdPackQty; @@ -91,8 +91,8 @@ public class ProductionPlanEventHandler var productionLine = await _productionLineAppService.GetByCodeAsync(productionPlan.ProdLine).ConfigureAwait(false); Check.NotNull(productionLine, "生产线代码", $"生产线 {productionPlan.ProdLine} 不存在"); - var location = await LocationAclService.GetByCodeAsync(productionLine.ProductLocationCode).ConfigureAwait(false); - Check.NotNull(location, "库位代码", $"库位 {productionLine.ProductLocationCode} 不存在"); + //var location = await LocationAclService.GetByCodeAsync(productionLine.ProductLocationCode).ConfigureAwait(false); + //Check.NotNull(location, "库位代码", $"库位 {productionLine.ProductLocationCode} 不存在"); var num = (int)Math.Ceiling(productionPlanDetail.PlanQty / item.StdPackQty); for (var n = 0; n < num; n++) @@ -107,8 +107,8 @@ public class ProductionPlanEventHandler //设置工作组和任务优先级 entity.Priority = PriorityHelper.GetPriority(Clock); entity.PriorityIncrement = 1; - entity.WarehouseCode = location.WarehouseCode; - entity.WorkGroupCode = location.WorkGroupCode; + //entity.WarehouseCode = location.WarehouseCode; + //entity.WorkGroupCode = location.WorkGroupCode; return entity; diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Requests/ProductionReturnRequestEventHandler.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Requests/ProductionReturnRequestEventHandler.cs index 55602b4f9..b964e2940 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Requests/ProductionReturnRequestEventHandler.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Requests/ProductionReturnRequestEventHandler.cs @@ -1,5 +1,9 @@ -using System.Collections.Generic; +using System; +using System.Collections.Generic; +using System.Linq; using System.Threading.Tasks; +using Microsoft.AspNetCore.Components.Forms; +using Omu.ValueInjecter; using Volo.Abp.EventBus; using Win_in.Sfs.Shared.Event; using Win_in.Sfs.Wms.Store.Application.Contracts; @@ -14,19 +18,83 @@ public class ProductionReturnRequestEventHandler { private readonly IProductionReturnJobAppService _productionReturnJobApp; + private readonly IProductionReturnNoteAppService _productionReturnNoteApp; + public ProductionReturnRequestEventHandler( - IProductionReturnJobAppService productionReturnJobApp + IProductionReturnJobAppService productionReturnJobApp, + IProductionReturnNoteAppService productionReturnNoteApp ) { + _productionReturnNoteApp= productionReturnNoteApp; _productionReturnJobApp = productionReturnJobApp; } public virtual async Task HandleEventAsync(SfsHandledEntityEventData eventData) { var entity = eventData.Entity; - var job = await BuildProductionReturnJobCreateInputAsync(entity).ConfigureAwait(false); - await _productionReturnJobApp.CreateAsync(job).ConfigureAwait(false); + //CreateMap() + // .ForMember(x => x.JobNumber, y => y.MapFrom(d => d.Number)) + // .ForMember(x => x.ReturnTime, y => y.MapFrom(d => d.CreationTime)) + // .ForMember(x => x.Worker, y => y.MapFrom(d => d.Worker)) + // .ForMember(x => x.ActiveDate, y => y.MapFrom(d => DateTime.Now)) + // .Ignore(x => x.Number); + //CreateMap() + // .ForMember(x => x.FromPackingCode, y => y.MapFrom(d => d.FromPackingCode)) + // .ForMember(x => x.ToPackingCode, y => y.MapFrom(d => d.ToPackingCode)) + // .ForMember(x => x.SupplierBatch, y => y.MapFrom(d => d.SupplierBatch)) + // .ForMember(x => x.ArriveDate, y => y.MapFrom(d => d.ArriveDate)) + // .ForMember(x => x.ProduceDate, y => y.MapFrom(d => d.ProduceDate)) + // .ForMember(x => x.ExpireDate, y => y.MapFrom(d => d.ExpireDate)) + // .ForMember(x => x.FromLot, y => y.MapFrom(d => string.Empty)) + // .ForMember(x => x.ToLot, y => y.MapFrom(d => d.ToLot)) + // .ForMember(x => x.ToContainerCode, y => y.MapFrom(d => d.ToContainerCode)) + // .ForMember(x => x.FromContainerCode, y => y.MapFrom(d => d.FromContainerCode)) + // .ForMember(x => x.FromStatus, y => y.MapFrom(d => d.FromStatus)) + // .ForMember(x => x.ToStatus, y => y.MapFrom(d => d.ToStatus)) + // .ForMember(x => x.Qty, y => y.MapFrom(d => d.Qty)) + // .ForMember(x => x.FromLocationCode, y => y.MapFrom(d => d.FromLocationCode)) + // .ForMember(x => x.FromLocationArea, y => y.MapFrom(d => d.ToLocationArea)) + // .ForMember(x => x.FromLocationGroup, y => y.MapFrom(d => d.ToLocationGroup)) + // .ForMember(x => x.FromLocationErpCode, y => y.MapFrom(d => d.ToLocationErpCode)) + // .ForMember(x => x.FromWarehouseCode, y => y.MapFrom(d => d.ToWarehouseCode)) + // .ForMember(x => x.Qty, y => y.MapFrom(d => d.Qty)) + // .Ignore(x => x.ArriveDate) + // .Ignore(x => x.ToLocationCode) + // .Ignore(x => x.ToLocationArea) + // .Ignore(x => x.ToLocationGroup) + // .Ignore(x => x.ToLocationErpCode) + // .Ignore(x => x.ToWarehouseCode) + // .Ignore(x => x.HandledContainerCode) + // .Ignore(x => x.HandledPackingCode) + // .Ignore(x => x.HandledToLocationCode) + // .Ignore(x => x.HandledToLocationArea) + // .Ignore(x => x.HandledToLocationGroup) + // .Ignore(x => x.HandledToLocationErpCode) + // .Ignore(x => x.HandledToWarehouseCode) + // .Ignore(x => x.HandledExpireDate) + // .Ignore(x => x.HandledLot) + // .Ignore(x => x.HandledArriveDate) + // .Ignore(x => x.HandledProduceDate) + // .Ignore(x => x.HandledQty) + // .Ignore(x => x.HandledSupplierBatch); + + + ProductionReturnNoteEditInput input = new ProductionReturnNoteEditInput(); + input.InjectFrom(entity); + input.ReturnTime = DateTime.Now; + input.ActiveDate=DateTime.Now; + input.JobNumber = input.Number; + List inputdetail = new List(); + foreach (var itm in entity.Details) + { + ProductionReturnNoteDetailInput detail=new ProductionReturnNoteDetailInput(); + detail.InjectFrom(itm); + inputdetail.Add(detail); + } + input.Details = inputdetail.ToList(); + + await _productionReturnNoteApp.CreateAsync(input).ConfigureAwait(false); } public virtual async Task HandleEventAsync(SfsAbortedEntityEventData eventData) @@ -36,26 +104,13 @@ public class ProductionReturnRequestEventHandler await _productionReturnJobApp.CancelByProductionReturnRequestNumberAsync(entity.Number).ConfigureAwait(false); } - private async Task BuildProductionReturnJobCreateInputAsync(ProductionReturnRequest request) - { - var job = ObjectMapper.Map(request); - - job.Details = new List(); + //private PurchaseReturnNoteEditInput BuildProductionReturn(PurchaseReturnJob entity) + //{ + // var input = ObjectMapper.Map(entity); - foreach (var detail in request.Details) - { - var inputDetail = - ObjectMapper.Map(detail); + // input.Details.RemoveAll(p => p.Qty == 0); - - var location = await LocationAclService.GetByCodeAsync(detail.ToLocationCode).ConfigureAwait(false); - - job.WorkGroupCode = location.WorkGroupCode; - - job.Details.Add(inputDetail); - } - - return job; - } + // return input; + //} } diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Requests/TransferLibRequestEventHandler.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Requests/TransferLibRequestEventHandler.cs new file mode 100644 index 000000000..0fca9572c --- /dev/null +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Requests/TransferLibRequestEventHandler.cs @@ -0,0 +1,145 @@ +using System; +using System.Collections.Generic; +using System.Threading.Tasks; +using DocumentFormat.OpenXml.Bibliography; +using Volo.Abp.EventBus; +using Volo.Abp.EventBus.Local; +using Volo.Abp.SettingManagement; +using Volo.Abp.Uow; +using Win_in.Sfs.Basedata.Application.Contracts; +using Win_in.Sfs.Shared.Domain.Shared; +using Win_in.Sfs.Shared.Event; +using Win_in.Sfs.Wms.Store.Domain; +using Win_in.Sfs.Wms.Store.Domain.Shared; + +namespace Win_in.Sfs.Wms.Store.Event.BusinessRequest; + +public class TransferLibRequestEventHandler + : StoreEventHandlerBase + , ILocalEventHandler> + , ILocalEventHandler>> + , ILocalEventHandler> + //, ILocalEventHandler> + //, ILocalEventHandler> + +{ + private readonly ITransferLibNoteManager _transferLibNoteManager; + private readonly ILocationAppService _locationAppService; + private readonly ITransferLibRequestManager _transferLibRequestManager; + protected ILocalEventBus LocalEventBus => LazyServiceProvider.LazyGetRequiredService(); + + public TransferLibRequestEventHandler( + ITransferLibNoteManager transferLibNoteManager, ILocationAppService locationAppService, ITransferLibRequestManager transferLibRequestManager) + { + _transferLibNoteManager = transferLibNoteManager; + _locationAppService = locationAppService; + _transferLibRequestManager = transferLibRequestManager; + } + + + /// + /// 库存转移 审批通过 后 + /// + /// + /// + /// + [UnitOfWork] + public async Task HandleEventAsync(SfsHandledEntityEventData eventData) + { + var entity = eventData.Entity; + var enumTransSubType = Enum.Parse(entity.Type); + + if (entity.DirectCreateNote) + { + var input = ObjectMapper.Map(entity); + + //获取在途库 + var locationDto = await _locationAppService.GetFirstByTypeAsync(EnumLocationType.TRANSPORT) + .ConfigureAwait(false); + + var transferOnTheWayLocation = + await SettingManager.GetOrNullGlobalAsync(StoreSettings.Common.TransferOnTheWayLocation) + .ConfigureAwait(false); + + input.Details.ForEach(p => { p.OnTheWayLocationCode = locationDto.Code; }); + + await _transferLibNoteManager.CreateAsync(input).ConfigureAwait(false); + } + + switch (enumTransSubType) + { + case EnumTransSubType.Transfer_Inside: + case EnumTransSubType.Transfer_Area: + break; + case EnumTransSubType.Transfer_Warehouse: + case EnumTransSubType.Transfer_Customer: + case EnumTransSubType.Transfer_WIP: + // entity.Handle(); + entity.Complete(); + break; + } + } + + /// + /// 库移创建后 + /// + /// Event data + [UnitOfWork] + public virtual async Task HandleEventAsync(SfsCreatedEntityEventData eventData) + { + var entity = eventData.Entity; + if (entity.AutoSubmit) + { + await _transferLibRequestManager.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 _transferLibRequestManager.SubmitAsync(entity).ConfigureAwait(false); + } + } + } + + ///// + ///// 提交后 + ///// + ///// Event data + //[UnitOfWork] + //public virtual async Task HandleEventAsync(SfsSubmittedEntityEventData eventData) + //{ + // var entity = eventData.Entity; + // if (entity.AutoAgree) + // { + // entity.Agree(); + // await LocalEventBus.PublishAsync(new SfsAgreedEntityEventData(entity), false) + // .ConfigureAwait(false); + // } + //} + + ///// + ///// 审批后 + ///// + ///// Event data + //[UnitOfWork] + //public virtual async Task HandleEventAsync(SfsAgreedEntityEventData eventData) + //{ + // var entity = eventData.Entity; + // if (entity.AutoHandle) + // { + // entity.Handle(); + // await LocalEventBus.PublishAsync(new SfsHandledEntityEventData(entity), false) + // .ConfigureAwait(false); + // } + //} +} diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/StoreEventAutoMapperProfile.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/StoreEventAutoMapperProfile.cs index 08d4809bf..3f57465d5 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/StoreEventAutoMapperProfile.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/StoreEventAutoMapperProfile.cs @@ -35,6 +35,8 @@ public partial class StoreEventAutoMapperProfile : Profile DeliverJobAutoMapperProfile(); InspectJobAutoMapperProfile(); IssueJobAutoMapperProfile(); + InjectionJobAutoMapperProfile(); + AssembleJobAutoMapperProfile(); JisDeliverJobAutoMapperProfile(); ProductionReturnJobAutoMapperProfile(); ProductReceiveJobAutoMapperProfile(); @@ -44,7 +46,7 @@ public partial class StoreEventAutoMapperProfile : Profile PutawayJobAutoMapperProfile(); UnplannedIssueJobAutoMapperProfile(); UnplannedReceiptJobAutoMapperProfile(); - + TransferLibJobAutoMapperProfile(); #endregion #region Notes @@ -66,10 +68,14 @@ public partial class StoreEventAutoMapperProfile : Profile InventoryTransferNoteAutoMapperProfile(); IsolationNoteAutoMapperProfile(); IssueNoteAutoMapperProfile(); + InjectionNoteAutoMapperProfile(); + AssembleNoteAutoMapperProfile(); ItemTransformNoteAutoMapperProfile(); JisDeliverNoteAutoMapperProfile(); JisProductReceiptNoteAutoMapperProfile(); MaterialRequestAutoMapperProfile(); + InjectionRequestAutoMapperProfile(); + AssembleRequestAutoMapperProfile(); ProductionReturnRequestAutoMapperProfile(); ProductionReturnNoteAutoMapperProfile(); ProductReceiptNoteAutoMapperProfile(); @@ -89,13 +95,18 @@ public partial class StoreEventAutoMapperProfile : Profile ProductRecycleRequestAutoMapperProfile(); PutawayRequestAutoMapperProfile(); TransferRequestAutoMapperProfile(); + TransferLibRequestAutoMapperProfile(); TransferNoteAutoMapperProfile(); NoOkConvertOkNoteAutoMapperProfile(); ScrapRequestMapperProfile(); ProductReceiptRequestMapperProfile(); CountAdjustRequestAutoMapperProfile(); InventoryInitialNoteAutoMapperProfile(); + TransferLibNoteAutoMapperProfile(); + CoatingIssueJobAutoMapperProfile(); + CoatingIssueNoteAutoMapperProfile(); + CoatingMaterialRequestAutoMapperProfile(); } }