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/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/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/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/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..f7ecc2eec --- /dev/null +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Jobs/TransferLibJobs/TransferLibJobAutoMapperProfile.cs @@ -0,0 +1,25 @@ +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); + } +} 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..ea28afa69 --- /dev/null +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/TransferLibNotes/TransferLibNoteMapperProfile.cs @@ -0,0 +1,79 @@ +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() + .IgnoreAuditedObjectProperties() + ; + + CreateMap() + .IgnoreAuditedObjectProperties() + ; + + CreateMap(); + + CreateMap(); + + 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/TransferLibRequests/TransferLibRequestAppService.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/TransferLibRequests/TransferLibRequestAppService.cs new file mode 100644 index 000000000..4f43dd476 --- /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.Transfer, 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.Transfer, 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..9d0327fb8 --- /dev/null +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/TransferLibRequests/TransferLibRequestMapperProfile.cs @@ -0,0 +1,69 @@ +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); + + 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 3cd3760a5..d1a07929e 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 @@ -20,6 +20,7 @@ public partial class StoreApplicationAutoMapperProfile : Profile UnplannedIssueRequestAutoMapperProfile(); UnplannedReceiptRequestAutoMapperProfile(); TransferRequestMapperProfile(); + TransferLibRequestMapperProfile(); PurchaseReturnRequestAutoMapperProfile(); ProductRecycleRequestAutoMapperProfile(); PutawayRequestAutoMapperProfile(); @@ -114,6 +115,6 @@ public partial class StoreApplicationAutoMapperProfile : Profile ExchangeDataAutoMapperProfile(); EquipmentRecordAutoMapperProfile(); - + TransferLibJobAutoMapperProfile(); } } 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/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/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 3e88393d3..33e6c1708 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,6 +16,9 @@ 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; } @@ -58,6 +61,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; } @@ -109,6 +115,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/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.Designer.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/Migrations/20240223065640_base.Designer.cs deleted file mode 100644 index 0703708b5..000000000 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/Migrations/20240223065640_base.Designer.cs +++ /dev/null @@ -1,21816 +0,0 @@ -// -using System; -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Metadata; -using Microsoft.EntityFrameworkCore.Migrations; -using Microsoft.EntityFrameworkCore.Storage.ValueConversion; -using Volo.Abp.EntityFrameworkCore; -using Win_in.Sfs.Wms.Store.EntityFrameworkCore; - -#nullable disable - -namespace Win_in.Sfs.Wms.Store.Migrations -{ - [DbContext(typeof(StoreDbContext))] - [Migration("20240223065640_base")] - partial class @base - { - protected override void BuildTargetModel(ModelBuilder modelBuilder) - { -#pragma warning disable 612, 618 - modelBuilder - .HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.SqlServer) - .HasAnnotation("ProductVersion", "6.0.13") - .HasAnnotation("Relational:MaxIdentifierLength", 128); - - SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder, 1L, 1); - - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.BackFlushNote", b => - { - b.Property("Id") - .HasColumnType("uniqueidentifier"); - - b.Property("ActiveDate") - .HasColumnType("datetime2"); - - b.Property("ArriveDate") - .HasColumnType("datetime2"); - - b.Property("CompleteTime") - .HasColumnType("datetime2"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("nvarchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime2") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("uniqueidentifier") - .HasColumnName("CreatorId"); - - b.Property("ExpireDate") - .HasColumnType("datetime2"); - - b.Property("ExtraProperties") - .HasColumnType("nvarchar(max)") - .HasColumnName("ExtraProperties"); - - b.Property("ItemCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ItemCode"); - - b.Property("ItemDesc1") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ItemDesc1"); - - b.Property("ItemDesc2") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ItemDesc2"); - - b.Property("ItemName") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ItemName"); - - b.Property("JobNumber") - .HasColumnType("nvarchar(max)"); - - b.Property("LastModificationTime") - .HasColumnType("datetime2") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("uniqueidentifier") - .HasColumnName("LastModifierId"); - - b.Property("LocationArea") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("LocationArea"); - - b.Property("LocationCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("LocationCode"); - - b.Property("LocationErpCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("LocationErpCode"); - - b.Property("LocationGroup") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("LocationGroup"); - - b.Property("Lot") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("Lot"); - - b.Property("Number") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("Number"); - - b.Property("PackingCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("ProdLine") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("ProduceDate") - .HasColumnType("datetime2"); - - b.Property("ProductReceiptNumber") - .HasColumnType("nvarchar(max)"); - - b.Property("ProductRecycleNumber") - .HasColumnType("nvarchar(max)"); - - b.Property("ProductionPlanNumber") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("Qty") - .HasPrecision(18, 6) - .HasColumnType("decimal(18,6)") - .HasColumnName("Qty"); - - b.Property("Remark") - .HasMaxLength(3072) - .HasColumnType("nvarchar(3072)") - .HasColumnName("Remark"); - - b.Property("Shift") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("SupplierBatch") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("SupplierBatch"); - - b.Property("TenantId") - .HasColumnType("uniqueidentifier") - .HasColumnName("TenantId"); - - b.Property("Uom") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("Uom"); - - b.Property("WarehouseCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("WarehouseCode"); - - b.Property("Worker") - .HasColumnType("nvarchar(max)"); - - b.Property("Workshop") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.HasKey("Id"); - - b.HasIndex("Number") - .IsUnique(); - - b.ToTable("Store_BackFlushNote", (string)null); - }); - - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.BackFlushNoteDetail", b => - { - b.Property("Id") - .HasColumnType("uniqueidentifier"); - - b.Property("ArriveDate") - .HasColumnType("datetime2"); - - b.Property("BomVersion") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("ContainerCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ContainerCode"); - - b.Property("CreationTime") - .HasColumnType("datetime2") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("uniqueidentifier") - .HasColumnName("CreatorId"); - - b.Property("ExpireDate") - .HasColumnType("datetime2"); - - b.Property("IsOffLine") - .HasColumnType("bit"); - - b.Property("ItemCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ItemCode"); - - b.Property("ItemDesc1") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ItemDesc1"); - - b.Property("ItemDesc2") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ItemDesc2"); - - b.Property("ItemName") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ItemName"); - - b.Property("LastModificationTime") - .HasColumnType("datetime2") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("uniqueidentifier") - .HasColumnName("LastModifierId"); - - b.Property("LocationArea") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("LocationArea"); - - b.Property("LocationCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("LocationCode"); - - b.Property("LocationErpCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("LocationErpCode"); - - b.Property("LocationGroup") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("LocationGroup"); - - b.Property("Lot") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("Lot"); - - b.Property("MasterID") - .HasColumnType("uniqueidentifier"); - - b.Property("Number") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("Number"); - - b.Property("PackingCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("PackingCode"); - - b.Property("ProduceDate") - .HasColumnType("datetime2"); - - b.Property("Qty") - .HasPrecision(18, 6) - .HasColumnType("decimal(18,6)") - .HasColumnName("Qty"); - - b.Property("Remark") - .HasMaxLength(3072) - .HasColumnType("nvarchar(3072)") - .HasColumnName("Remark"); - - b.Property("Status") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("StdPackQty") - .HasColumnType("decimal(18,6)"); - - b.Property("SupplierBatch") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("SupplierBatch"); - - b.Property("TenantId") - .HasColumnType("uniqueidentifier") - .HasColumnName("TenantId"); - - b.Property("Uom") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("Uom"); - - b.Property("WarehouseCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("WarehouseCode"); - - b.HasKey("Id"); - - b.HasIndex("MasterID"); - - b.HasIndex("Number", "ItemCode", "Lot") - .IsUnique() - .HasFilter("[Lot] IS NOT NULL"); - - b.ToTable("Store_BackFlushNoteDetail", (string)null); - }); - - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.CheckJob", b => - { - b.Property("Id") - .HasColumnType("uniqueidentifier"); - - b.Property("AcceptTime") - .HasColumnType("datetime2"); - - b.Property("AcceptUserId") - .HasColumnType("uniqueidentifier"); - - b.Property("AcceptUserName") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("CompleteTime") - .HasColumnType("datetime2"); - - b.Property("CompleteUserId") - .HasColumnType("uniqueidentifier"); - - b.Property("CompleteUserName") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("nvarchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime2") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("uniqueidentifier") - .HasColumnName("CreatorId"); - - b.Property("DeliverNoteNumber") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("ExtraProperties") - .HasColumnType("nvarchar(max)") - .HasColumnName("ExtraProperties"); - - b.Property("IsAutoComplete") - .ValueGeneratedOnAdd() - .HasColumnType("bit") - .HasDefaultValue(false); - - b.Property("JobDescription") - .HasMaxLength(1024) - .HasColumnType("nvarchar(1024)"); - - b.Property("JobStatus") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("JobType") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("LastModificationTime") - .HasColumnType("datetime2") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("uniqueidentifier") - .HasColumnName("LastModifierId"); - - b.Property("Number") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("Priority") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasDefaultValue(0); - - b.Property("PriorityIncrement") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasDefaultValue(0); - - b.Property("Remark") - .HasMaxLength(3072) - .HasColumnType("nvarchar(3072)") - .HasColumnName("Remark"); - - b.Property("TenantId") - .HasColumnType("uniqueidentifier") - .HasColumnName("TenantId"); - - b.Property("UpStreamJobNumber") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("WarehouseCode") - .HasColumnType("nvarchar(max)"); - - b.Property("WorkGroupCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("Worker") - .HasColumnType("nvarchar(max)"); - - b.HasKey("Id"); - - b.HasIndex("Number") - .IsUnique(); - - b.ToTable("Job_CheckJob", (string)null); - }); - - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.CheckJobDetail", b => - { - b.Property("Id") - .HasColumnType("uniqueidentifier"); - - b.Property("ArriveDate") - .HasColumnType("datetime2"); - - b.Property("ContainerCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ContainerCode"); - - b.Property("CreationTime") - .HasColumnType("datetime2") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("uniqueidentifier") - .HasColumnName("CreatorId"); - - b.Property("CustomerItemCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("ExpireDate") - .HasColumnType("datetime2"); - - b.Property("ItemCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ItemCode"); - - b.Property("ItemDesc1") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ItemDesc1"); - - b.Property("ItemDesc2") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ItemDesc2"); - - b.Property("ItemName") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ItemName"); - - b.Property("LastModificationTime") - .HasColumnType("datetime2") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("uniqueidentifier") - .HasColumnName("LastModifierId"); - - b.Property("LocationArea") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("LocationArea"); - - b.Property("LocationCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("LocationCode"); - - b.Property("LocationErpCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("LocationErpCode"); - - b.Property("LocationGroup") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("LocationGroup"); - - b.Property("Lot") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("Lot"); - - b.Property("MasterID") - .HasColumnType("uniqueidentifier"); - - b.Property("Number") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("Order") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("PackingCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("PackingCode"); - - b.Property("ProduceDate") - .HasColumnType("datetime2"); - - b.Property("Qty") - .HasPrecision(18, 6) - .HasColumnType("decimal(18,6)") - .HasColumnName("Qty"); - - b.Property("Remark") - .HasMaxLength(3072) - .HasColumnType("nvarchar(3072)") - .HasColumnName("Remark"); - - b.Property("Status") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("StdPackQty") - .HasColumnType("decimal(18,6)"); - - b.Property("SupplierBatch") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("SupplierBatch"); - - b.Property("TenantId") - .HasColumnType("uniqueidentifier") - .HasColumnName("TenantId"); - - b.Property("Uom") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("Uom"); - - b.Property("WarehouseCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("WarehouseCode"); - - b.HasKey("Id"); - - b.HasIndex("MasterID"); - - b.ToTable("Job_CheckJobDetail", (string)null); - }); - - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ContainerBindNote", b => - { - b.Property("Id") - .HasColumnType("uniqueidentifier"); - - b.Property("ActiveDate") - .HasColumnType("datetime2"); - - b.Property("BindTime") - .HasColumnType("datetime2"); - - b.Property("BindType") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("nvarchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("ContainerCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("CreationTime") - .HasColumnType("datetime2") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("uniqueidentifier") - .HasColumnName("CreatorId"); - - b.Property("ExtraProperties") - .HasColumnType("nvarchar(max)") - .HasColumnName("ExtraProperties"); - - b.Property("LastModificationTime") - .HasColumnType("datetime2") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("uniqueidentifier") - .HasColumnName("LastModifierId"); - - b.Property("LocationCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("Number") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("Number"); - - b.Property("Remark") - .HasMaxLength(3072) - .HasColumnType("nvarchar(3072)") - .HasColumnName("Remark"); - - b.Property("TenantId") - .HasColumnType("uniqueidentifier") - .HasColumnName("TenantId"); - - b.Property("Worker") - .HasColumnType("nvarchar(max)"); - - b.HasKey("Id"); - - b.HasIndex("Number") - .IsUnique(); - - b.ToTable("Store_ContainerBindNote", (string)null); - }); - - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ContainerBindNoteDetail", b => - { - b.Property("Id") - .HasColumnType("uniqueidentifier"); - - b.Property("ArriveDate") - .HasColumnType("datetime2"); - - b.Property("ContainerCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ContainerCode"); - - b.Property("CreationTime") - .HasColumnType("datetime2") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("uniqueidentifier") - .HasColumnName("CreatorId"); - - b.Property("ExpireDate") - .HasColumnType("datetime2"); - - b.Property("ItemCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ItemCode"); - - b.Property("ItemDesc1") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ItemDesc1"); - - b.Property("ItemDesc2") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ItemDesc2"); - - b.Property("ItemName") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ItemName"); - - b.Property("LastModificationTime") - .HasColumnType("datetime2") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("uniqueidentifier") - .HasColumnName("LastModifierId"); - - b.Property("Lot") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("Lot"); - - b.Property("MasterID") - .HasColumnType("uniqueidentifier"); - - b.Property("Number") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("Number"); - - b.Property("PackingCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("PackingCode"); - - b.Property("ProduceDate") - .HasColumnType("datetime2"); - - b.Property("Qty") - .HasPrecision(18, 6) - .HasColumnType("decimal(18,6)") - .HasColumnName("Qty"); - - b.Property("Remark") - .HasMaxLength(3072) - .HasColumnType("nvarchar(3072)") - .HasColumnName("Remark"); - - b.Property("StdPackQty") - .HasColumnType("decimal(18,6)"); - - b.Property("SupplierBatch") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("SupplierBatch"); - - b.Property("TenantId") - .HasColumnType("uniqueidentifier") - .HasColumnName("TenantId"); - - b.Property("Uom") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("Uom"); - - b.HasKey("Id"); - - b.HasIndex("MasterID"); - - b.HasIndex("Number", "PackingCode") - .IsUnique(); - - b.ToTable("Store_ContainerBindNoteDetail", (string)null); - }); - - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.CountAdjustNote", b => - { - b.Property("Id") - .HasColumnType("uniqueidentifier"); - - b.Property("ActiveDate") - .HasColumnType("datetime2"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("nvarchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CountAdjustRequestNumber") - .HasColumnType("nvarchar(max)"); - - b.Property("CountNoteNumber") - .HasColumnType("nvarchar(max)"); - - b.Property("CountPlanNumber") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("CreationTime") - .HasColumnType("datetime2") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("uniqueidentifier") - .HasColumnName("CreatorId"); - - b.Property("ExtraProperties") - .HasColumnType("nvarchar(max)") - .HasColumnName("ExtraProperties"); - - b.Property("IsAdjusted") - .HasColumnType("bit"); - - b.Property("JobNumber") - .HasColumnType("nvarchar(max)"); - - b.Property("LastModificationTime") - .HasColumnType("datetime2") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("uniqueidentifier") - .HasColumnName("LastModifierId"); - - b.Property("Number") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("Number"); - - b.Property("Remark") - .HasMaxLength(3072) - .HasColumnType("nvarchar(3072)") - .HasColumnName("Remark"); - - b.Property("TenantId") - .HasColumnType("uniqueidentifier") - .HasColumnName("TenantId"); - - b.Property("Type") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("Worker") - .HasColumnType("nvarchar(max)"); - - b.HasKey("Id"); - - b.HasIndex("Number") - .IsUnique(); - - b.ToTable("Store_CountAdjustNote", (string)null); - }); - - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.CountAdjustNoteDetail", b => - { - b.Property("Id") - .HasColumnType("uniqueidentifier"); - - b.Property("AdjustQty") - .HasColumnType("decimal(18,6)"); - - b.Property("ArriveDate") - .HasColumnType("datetime2"); - - b.Property("ContainerCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ContainerCode"); - - b.Property("CountLabel") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("CountQty") - .HasColumnType("decimal(18,6)"); - - b.Property("CreationTime") - .HasColumnType("datetime2") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("uniqueidentifier") - .HasColumnName("CreatorId"); - - b.Property("ExpireDate") - .HasColumnType("datetime2"); - - b.Property("InventoryQty") - .HasColumnType("decimal(18,6)"); - - b.Property("ItemCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ItemCode"); - - b.Property("ItemDesc1") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ItemDesc1"); - - b.Property("ItemDesc2") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ItemDesc2"); - - b.Property("ItemName") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ItemName"); - - b.Property("LastModificationTime") - .HasColumnType("datetime2") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("uniqueidentifier") - .HasColumnName("LastModifierId"); - - b.Property("LocationArea") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("LocationArea"); - - b.Property("LocationCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("LocationCode"); - - b.Property("LocationErpCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("LocationErpCode"); - - b.Property("LocationGroup") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("LocationGroup"); - - b.Property("Lot") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("Lot"); - - b.Property("MasterID") - .HasColumnType("uniqueidentifier"); - - b.Property("Number") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("Number"); - - b.Property("PackingCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("PackingCode"); - - b.Property("ProduceDate") - .HasColumnType("datetime2"); - - b.Property("ReasonCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("Remark") - .HasMaxLength(3072) - .HasColumnType("nvarchar(3072)") - .HasColumnName("Remark"); - - b.Property("Status") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("StdPackQty") - .HasColumnType("decimal(18,6)"); - - b.Property("SupplierBatch") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("SupplierBatch"); - - b.Property("TenantId") - .HasColumnType("uniqueidentifier") - .HasColumnName("TenantId"); - - b.Property("TransInOut") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("Uom") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("WarehouseCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("WarehouseCode"); - - b.HasKey("Id"); - - b.HasIndex("MasterID"); - - b.HasIndex("Number", "CountLabel", "ItemCode", "LocationCode", "Lot", "Status", "PackingCode") - .IsUnique() - .HasFilter("[Lot] IS NOT NULL"); - - b.ToTable("Store_CountAdjustNoteDetail", (string)null); - }); - - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.CountAdjustRequest", b => - { - b.Property("Id") - .HasColumnType("uniqueidentifier"); - - b.Property("ActiveDate") - .HasColumnType("datetime2"); - - b.Property("AutoAgree") - .HasColumnType("bit"); - - b.Property("AutoCompleteJob") - .HasColumnType("bit"); - - b.Property("AutoHandle") - .HasColumnType("bit"); - - b.Property("AutoSubmit") - .HasColumnType("bit"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("nvarchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CountNoteNumber") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("CountPlanNumber") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("CreationTime") - .HasColumnType("datetime2") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("uniqueidentifier") - .HasColumnName("CreatorId"); - - b.Property("DirectCreateNote") - .HasColumnType("bit"); - - b.Property("ExtraProperties") - .HasColumnType("nvarchar(max)") - .HasColumnName("ExtraProperties"); - - b.Property("LastModificationTime") - .HasColumnType("datetime2") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("uniqueidentifier") - .HasColumnName("LastModifierId"); - - b.Property("Number") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("Number"); - - b.Property("Remark") - .HasMaxLength(3072) - .HasColumnType("nvarchar(3072)") - .HasColumnName("Remark"); - - b.Property("RequestStatus") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("TenantId") - .HasColumnType("uniqueidentifier") - .HasColumnName("TenantId"); - - b.Property("Worker") - .HasColumnType("nvarchar(max)"); - - b.HasKey("Id"); - - b.HasIndex("Number") - .IsUnique(); - - b.ToTable("Store_CountAdjustRequest", (string)null); - }); - - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.CountAdjustRequestDetail", b => - { - b.Property("Id") - .HasColumnType("uniqueidentifier"); - - b.Property("ArriveDate") - .HasColumnType("datetime2"); - - b.Property("ContainerCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ContainerCode"); - - b.Property("CountQty") - .HasColumnType("decimal(18,6)"); - - b.Property("CreationTime") - .HasColumnType("datetime2") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("uniqueidentifier") - .HasColumnName("CreatorId"); - - b.Property("ExpireDate") - .HasColumnType("datetime2"); - - b.Property("InventoryQty") - .HasColumnType("decimal(18,6)"); - - b.Property("ItemCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ItemCode"); - - b.Property("ItemDesc1") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ItemDesc1"); - - b.Property("ItemDesc2") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ItemDesc2"); - - b.Property("ItemName") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ItemName"); - - b.Property("LastModificationTime") - .HasColumnType("datetime2") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("uniqueidentifier") - .HasColumnName("LastModifierId"); - - b.Property("LocationArea") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("LocationArea"); - - b.Property("LocationCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("LocationCode"); - - b.Property("LocationErpCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("LocationErpCode"); - - b.Property("LocationGroup") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("LocationGroup"); - - b.Property("Lot") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("Lot"); - - b.Property("MasterID") - .HasColumnType("uniqueidentifier"); - - b.Property("Number") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("Number"); - - b.Property("PackingCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("PackingCode"); - - b.Property("ProduceDate") - .HasColumnType("datetime2"); - - b.Property("Qty") - .HasPrecision(18, 6) - .HasColumnType("decimal(18,6)") - .HasColumnName("Qty"); - - b.Property("ReasonCode") - .HasColumnType("nvarchar(max)"); - - b.Property("Remark") - .HasMaxLength(3072) - .HasColumnType("nvarchar(3072)") - .HasColumnName("Remark"); - - b.Property("Status") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("StdPackQty") - .HasColumnType("decimal(18,6)"); - - b.Property("SupplierBatch") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("SupplierBatch"); - - b.Property("TenantId") - .HasColumnType("uniqueidentifier") - .HasColumnName("TenantId"); - - b.Property("Uom") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("Uom"); - - b.Property("WarehouseCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("WarehouseCode"); - - b.HasKey("Id"); - - b.HasIndex("MasterID"); - - b.HasIndex("Number", "ItemCode", "LocationCode", "Lot", "Status", "PackingCode") - .IsUnique() - .HasFilter("[Lot] IS NOT NULL"); - - b.ToTable("Store_CountAdjustRequestDetail", (string)null); - }); - - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.CountJob", b => - { - b.Property("Id") - .HasColumnType("uniqueidentifier"); - - b.Property("AcceptTime") - .HasColumnType("datetime2"); - - b.Property("AcceptUserId") - .HasColumnType("uniqueidentifier"); - - b.Property("AcceptUserName") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("CompleteTime") - .HasColumnType("datetime2"); - - b.Property("CompleteUserId") - .HasColumnType("uniqueidentifier"); - - b.Property("CompleteUserName") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("nvarchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CountMethod") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("CountPlanNumber") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("CountStage") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("CreationTime") - .HasColumnType("datetime2") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("uniqueidentifier") - .HasColumnName("CreatorId"); - - b.Property("Description") - .HasColumnType("nvarchar(max)"); - - b.Property("ExtraProperties") - .HasColumnType("nvarchar(max)") - .HasColumnName("ExtraProperties"); - - b.Property("IsAutoComplete") - .ValueGeneratedOnAdd() - .HasColumnType("bit") - .HasDefaultValue(false); - - b.Property("ItemCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("JobDescription") - .HasMaxLength(1024) - .HasColumnType("nvarchar(1024)"); - - b.Property("JobStatus") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("JobType") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("LastModificationTime") - .HasColumnType("datetime2") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("uniqueidentifier") - .HasColumnName("LastModifierId"); - - b.Property("LocationCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("Number") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("Priority") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasDefaultValue(0); - - b.Property("PriorityIncrement") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasDefaultValue(0); - - b.Property("Remark") - .HasMaxLength(3072) - .HasColumnType("nvarchar(3072)") - .HasColumnName("Remark"); - - b.Property("TenantId") - .HasColumnType("uniqueidentifier") - .HasColumnName("TenantId"); - - b.Property("Type") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("UpStreamJobNumber") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("WarehouseCode") - .HasColumnType("nvarchar(max)"); - - b.Property("WorkGroupCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("Worker") - .HasColumnType("nvarchar(max)"); - - b.HasKey("Id"); - - b.HasIndex("Number") - .IsUnique(); - - b.ToTable("Job_CountJob", (string)null); - }); - - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.CountJobDetail", b => - { - b.Property("Id") - .HasColumnType("uniqueidentifier"); - - b.Property("ArriveDate") - .HasColumnType("datetime2"); - - b.Property("ContainerCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ContainerCode"); - - b.Property("CountDescription") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("CountLabel") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("CountOperator") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("CountQty") - .HasColumnType("decimal(18,6)"); - - b.Property("CountTime") - .HasColumnType("datetime2"); - - b.Property("CreationTime") - .HasColumnType("datetime2") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("uniqueidentifier") - .HasColumnName("CreatorId"); - - b.Property("ExpireDate") - .HasColumnType("datetime2"); - - b.Property("InventoryLocationCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("InventoryQty") - .HasColumnType("decimal(18,6)"); - - b.Property("ItemCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ItemCode"); - - b.Property("ItemDesc1") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ItemDesc1"); - - b.Property("ItemDesc2") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ItemDesc2"); - - b.Property("ItemName") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ItemName"); - - b.Property("LastModificationTime") - .HasColumnType("datetime2") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("uniqueidentifier") - .HasColumnName("LastModifierId"); - - b.Property("LocationArea") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("LocationArea"); - - b.Property("LocationCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("LocationCode"); - - b.Property("LocationErpCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("LocationErpCode"); - - b.Property("LocationGroup") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("LocationGroup"); - - b.Property("Lot") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("Lot"); - - b.Property("MasterID") - .HasColumnType("uniqueidentifier"); - - b.Property("Number") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("PackingCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("PackingCode"); - - b.Property("ProduceDate") - .HasColumnType("datetime2"); - - b.Property("Remark") - .HasMaxLength(3072) - .HasColumnType("nvarchar(3072)") - .HasColumnName("Remark"); - - b.Property("Status") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("StdPackQty") - .HasColumnType("decimal(18,6)"); - - b.Property("SupplierBatch") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("SupplierBatch"); - - b.Property("TenantId") - .HasColumnType("uniqueidentifier") - .HasColumnName("TenantId"); - - b.Property("Uom") - .HasColumnType("nvarchar(max)"); - - b.Property("WarehouseCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("WarehouseCode"); - - b.HasKey("Id"); - - b.HasIndex("MasterID"); - - b.ToTable("Job_CountJobDetail", (string)null); - }); - - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.CountNote", b => - { - b.Property("Id") - .HasColumnType("uniqueidentifier"); - - b.Property("ActiveDate") - .HasColumnType("datetime2"); - - b.Property("Adjusted") - .HasColumnType("bit"); - - b.Property("BeginTime") - .HasColumnType("datetime2"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("nvarchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CountPlanNumber") - .HasColumnType("nvarchar(max)"); - - b.Property("CreationTime") - .HasColumnType("datetime2") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("uniqueidentifier") - .HasColumnName("CreatorId"); - - b.Property("Description") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("EndTime") - .HasColumnType("datetime2"); - - b.Property("ExtraProperties") - .HasColumnType("nvarchar(max)") - .HasColumnName("ExtraProperties"); - - b.Property("LastModificationTime") - .HasColumnType("datetime2") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("uniqueidentifier") - .HasColumnName("LastModifierId"); - - b.Property("Number") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("Number"); - - b.Property("Remark") - .HasMaxLength(3072) - .HasColumnType("nvarchar(3072)") - .HasColumnName("Remark"); - - b.Property("Stage") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("TenantId") - .HasColumnType("uniqueidentifier") - .HasColumnName("TenantId"); - - b.Property("Type") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("Worker") - .HasColumnType("nvarchar(max)"); - - b.HasKey("Id"); - - b.HasIndex("Number") - .IsUnique(); - - b.ToTable("Store_CountNote", (string)null); - }); - - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.CountNoteDetail", b => - { - b.Property("Id") - .HasColumnType("uniqueidentifier"); - - b.Property("Adjusted") - .HasColumnType("bit"); - - b.Property("ArriveDate") - .HasColumnType("datetime2"); - - b.Property("AuditCountDescription") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("AuditCountOperator") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("AuditCountQty") - .HasPrecision(18, 6) - .HasColumnType("decimal(18,6)"); - - b.Property("AuditCountTime") - .HasColumnType("datetime2"); - - b.Property("ContainerCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ContainerCode"); - - b.Property("CountLabel") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("CountPlanNumber") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("CreationTime") - .HasColumnType("datetime2") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("uniqueidentifier") - .HasColumnName("CreatorId"); - - b.Property("DetailStatus") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("ExpireDate") - .HasColumnType("datetime2"); - - b.Property("FinalCountQty") - .HasPrecision(18, 6) - .HasColumnType("decimal(18,6)"); - - b.Property("FirstCountDescription") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("FirstCountOperator") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("FirstCountQty") - .HasPrecision(18, 6) - .HasColumnType("decimal(18,6)"); - - b.Property("FirstCountTime") - .HasColumnType("datetime2"); - - b.Property("InventoryQty") - .HasColumnType("decimal(18,6)"); - - b.Property("ItemCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ItemCode"); - - b.Property("ItemDesc1") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ItemDesc1"); - - b.Property("ItemDesc2") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ItemDesc2"); - - b.Property("ItemName") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ItemName"); - - b.Property("LastModificationTime") - .HasColumnType("datetime2") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("uniqueidentifier") - .HasColumnName("LastModifierId"); - - b.Property("LocationArea") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("LocationArea"); - - b.Property("LocationCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("LocationCode"); - - b.Property("LocationErpCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("LocationErpCode"); - - b.Property("LocationGroup") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("LocationGroup"); - - b.Property("Lot") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("Lot"); - - b.Property("MasterID") - .HasColumnType("uniqueidentifier"); - - b.Property("Number") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("Number"); - - b.Property("PackingCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("PackingCode"); - - b.Property("ProduceDate") - .HasColumnType("datetime2"); - - b.Property("Remark") - .HasMaxLength(3072) - .HasColumnType("nvarchar(3072)") - .HasColumnName("Remark"); - - b.Property("RepeatCountDescription") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("RepeatCountOperator") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("RepeatCountQty") - .HasPrecision(18, 6) - .HasColumnType("decimal(18,6)"); - - b.Property("RepeatCountTime") - .HasColumnType("datetime2"); - - b.Property("Stage") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("Status") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("StdPackQty") - .HasColumnType("decimal(18,6)"); - - b.Property("SupplierBatch") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("SupplierBatch"); - - b.Property("TenantId") - .HasColumnType("uniqueidentifier") - .HasColumnName("TenantId"); - - b.Property("Uom") - .HasColumnType("nvarchar(max)"); - - b.Property("WarehouseCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("WarehouseCode"); - - b.HasKey("Id"); - - b.HasIndex("MasterID"); - - b.HasIndex("Number", "CountLabel") - .IsUnique(); - - b.ToTable("Store_CountNoteDetail", (string)null); - }); - - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.CountPlan", b => - { - b.Property("Id") - .HasColumnType("uniqueidentifier"); - - b.Property("ActiveDate") - .HasColumnType("datetime2"); - - b.Property("AutoAgree") - .HasColumnType("bit"); - - b.Property("AutoCompleteJob") - .HasColumnType("bit"); - - b.Property("AutoHandle") - .HasColumnType("bit"); - - b.Property("AutoSubmit") - .HasColumnType("bit"); - - b.Property("BeginTime") - .HasColumnType("datetime2"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("nvarchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CountMethod") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("CreationTime") - .HasColumnType("datetime2") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("uniqueidentifier") - .HasColumnName("CreatorId"); - - b.Property("Description") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("DirectCreateNote") - .HasColumnType("bit"); - - b.Property("EndTime") - .HasColumnType("datetime2"); - - b.Property("ExtraProperties") - .HasColumnType("nvarchar(max)") - .HasColumnName("ExtraProperties"); - - b.Property("JsonInventoryStatus") - .HasColumnType("nvarchar(max)"); - - b.Property("JsonItemCodes") - .HasColumnType("nvarchar(max)"); - - b.Property("JsonLocationCodes") - .HasColumnType("nvarchar(max)"); - - b.Property("LastModificationTime") - .HasColumnType("datetime2") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("uniqueidentifier") - .HasColumnName("LastModifierId"); - - b.Property("Number") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("Number"); - - b.Property("PlanTime") - .HasColumnType("datetime2"); - - b.Property("Remark") - .HasMaxLength(3072) - .HasColumnType("nvarchar(3072)") - .HasColumnName("Remark"); - - b.Property("RequestStatus") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("RequestType") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("Stage") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("TenantId") - .HasColumnType("uniqueidentifier") - .HasColumnName("TenantId"); - - b.Property("Type") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("Worker") - .HasColumnType("nvarchar(max)"); - - b.HasKey("Id"); - - b.HasIndex("Number") - .IsUnique(); - - b.ToTable("Store_CountPlan", (string)null); - }); - - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.CountPlanDetail", b => - { - b.Property("Id") - .HasColumnType("uniqueidentifier"); - - b.Property("ArriveDate") - .HasColumnType("datetime2"); - - b.Property("AuditCountDescription") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("AuditCountOperator") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("AuditCountQty") - .HasPrecision(18, 6) - .HasColumnType("decimal(18,6)"); - - b.Property("AuditCountTime") - .HasColumnType("datetime2"); - - b.Property("ContainerCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ContainerCode"); - - b.Property("CountLabel") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("CreationTime") - .HasColumnType("datetime2") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("uniqueidentifier") - .HasColumnName("CreatorId"); - - b.Property("DetailStatus") - .HasColumnType("int"); - - b.Property("ExpireDate") - .HasColumnType("datetime2"); - - b.Property("FinalCountQty") - .HasPrecision(18, 6) - .HasColumnType("decimal(18,6)"); - - b.Property("FirstCountDescription") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("FirstCountOperator") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("FirstCountQty") - .HasPrecision(18, 6) - .HasColumnType("decimal(18,6)"); - - b.Property("FirstCountTime") - .HasColumnType("datetime2"); - - b.Property("InventoryQty") - .HasColumnType("decimal(18,6)"); - - b.Property("ItemCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ItemCode"); - - b.Property("ItemDesc1") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ItemDesc1"); - - b.Property("ItemDesc2") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ItemDesc2"); - - b.Property("ItemName") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ItemName"); - - b.Property("LastModificationTime") - .HasColumnType("datetime2") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("uniqueidentifier") - .HasColumnName("LastModifierId"); - - b.Property("LocationArea") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("LocationArea"); - - b.Property("LocationCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("LocationCode"); - - b.Property("LocationErpCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("LocationErpCode"); - - b.Property("LocationGroup") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("LocationGroup"); - - b.Property("Lot") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("Lot"); - - b.Property("MasterID") - .HasColumnType("uniqueidentifier"); - - b.Property("Number") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("Number"); - - b.Property("PackingCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("PackingCode"); - - b.Property("ProduceDate") - .HasColumnType("datetime2"); - - b.Property("Remark") - .HasMaxLength(3072) - .HasColumnType("nvarchar(3072)") - .HasColumnName("Remark"); - - b.Property("RepeatCountDescription") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("RepeatCountOperator") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("RepeatCountQty") - .HasPrecision(18, 6) - .HasColumnType("decimal(18,6)"); - - b.Property("RepeatCountTime") - .HasColumnType("datetime2"); - - b.Property("Stage") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("Status") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("StdPackQty") - .HasColumnType("decimal(18,6)"); - - b.Property("SupplierBatch") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("SupplierBatch"); - - b.Property("TenantId") - .HasColumnType("uniqueidentifier") - .HasColumnName("TenantId"); - - b.Property("Uom") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("WarehouseCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("WarehouseCode"); - - b.HasKey("Id"); - - b.HasIndex("MasterID"); - - b.HasIndex("Number", "CountLabel") - .IsUnique(); - - b.ToTable("Store_CountPlanDetail", (string)null); - }); - - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.CustomerAsn", b => - { - b.Property("Id") - .HasColumnType("uniqueidentifier"); - - b.Property("ActiveDate") - .HasColumnType("datetime2"); - - b.Property("BeginTime") - .HasColumnType("datetime2"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("nvarchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("ContactEmail") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("ContactName") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("ContactPhone") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("CreationTime") - .HasColumnType("datetime2") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("uniqueidentifier") - .HasColumnName("CreatorId"); - - b.Property("CustomerCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("DockCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("EndTime") - .HasColumnType("datetime2"); - - b.Property("ExtraProperties") - .HasColumnType("nvarchar(max)") - .HasColumnName("ExtraProperties"); - - b.Property("LastModificationTime") - .HasColumnType("datetime2") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("uniqueidentifier") - .HasColumnName("LastModifierId"); - - b.Property("Number") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("Number"); - - b.Property("Remark") - .HasMaxLength(3072) - .HasColumnType("nvarchar(3072)") - .HasColumnName("Remark"); - - b.Property("SoNumber") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("Status") - .HasColumnType("int"); - - b.Property("TenantId") - .HasColumnType("uniqueidentifier") - .HasColumnName("TenantId"); - - b.Property("Worker") - .HasColumnType("nvarchar(max)"); - - b.HasKey("Id"); - - b.HasIndex("CustomerCode"); - - b.HasIndex("Number") - .IsUnique(); - - b.ToTable("Store_CustomerAsn", (string)null); - }); - - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.CustomerAsnDetail", b => - { - b.Property("Id") - .HasColumnType("uniqueidentifier"); - - b.Property("CreationTime") - .HasColumnType("datetime2") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("uniqueidentifier") - .HasColumnName("CreatorId"); - - b.Property("ItemCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ItemCode"); - - b.Property("ItemDesc1") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ItemDesc1"); - - b.Property("ItemDesc2") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ItemDesc2"); - - b.Property("ItemName") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ItemName"); - - b.Property("LastModificationTime") - .HasColumnType("datetime2") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("uniqueidentifier") - .HasColumnName("LastModifierId"); - - b.Property("MasterID") - .HasColumnType("uniqueidentifier"); - - b.Property("Number") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("Number"); - - b.Property("Qty") - .HasPrecision(18, 6) - .HasColumnType("decimal(18,6)") - .HasColumnName("Qty"); - - b.Property("Remark") - .HasMaxLength(3072) - .HasColumnType("nvarchar(3072)") - .HasColumnName("Remark"); - - b.Property("SoLine") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("SoNumber") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("StdPackQty") - .HasColumnType("decimal(18,6)"); - - b.Property("TenantId") - .HasColumnType("uniqueidentifier") - .HasColumnName("TenantId"); - - b.Property("Uom") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("Uom"); - - b.HasKey("Id"); - - b.HasIndex("MasterID"); - - b.HasIndex("Number", "ItemCode") - .IsUnique(); - - b.ToTable("Store_CustomerAsnDetail", (string)null); - }); - - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.CustomerReturnNote", b => - { - b.Property("Id") - .HasColumnType("uniqueidentifier"); - - b.Property("ActiveDate") - .HasColumnType("datetime2"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("nvarchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime2") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("uniqueidentifier") - .HasColumnName("CreatorId"); - - b.Property("Customer") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("ExtraProperties") - .HasColumnType("nvarchar(max)") - .HasColumnName("ExtraProperties"); - - b.Property("JobNumber") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("JobNumber"); - - b.Property("LastModificationTime") - .HasColumnType("datetime2") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("uniqueidentifier") - .HasColumnName("LastModifierId"); - - b.Property("Number") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("Number"); - - b.Property("Remark") - .HasMaxLength(3072) - .HasColumnType("nvarchar(3072)") - .HasColumnName("Remark"); - - b.Property("ReturnTime") - .HasColumnType("datetime2"); - - b.Property("TenantId") - .HasColumnType("uniqueidentifier") - .HasColumnName("TenantId"); - - b.Property("Worker") - .HasColumnType("nvarchar(max)"); - - b.HasKey("Id"); - - b.HasIndex("Number") - .IsUnique(); - - b.ToTable("Store_CustomerReturnNote", (string)null); - }); - - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.CustomerReturnNoteDetail", b => - { - b.Property("Id") - .HasColumnType("uniqueidentifier"); - - b.Property("ArriveDate") - .HasColumnType("datetime2"); - - b.Property("CreationTime") - .HasColumnType("datetime2") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("uniqueidentifier") - .HasColumnName("CreatorId"); - - b.Property("ExpireDate") - .HasColumnType("datetime2"); - - b.Property("FromContainerCode") - .HasColumnType("nvarchar(max)"); - - b.Property("FromLocationArea") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("FromLocationArea"); - - b.Property("FromLocationCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("FromLocationCode"); - - b.Property("FromLocationErpCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("FromLocationErpCode"); - - b.Property("FromLocationGroup") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("FromLocationGroup"); - - b.Property("FromLot") - .HasColumnType("nvarchar(max)"); - - b.Property("FromPackingCode") - .HasColumnType("nvarchar(450)"); - - b.Property("FromStatus") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("FromWarehouseCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("FromWarehouseCode"); - - b.Property("ItemCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ItemCode"); - - b.Property("ItemDesc1") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ItemDesc1"); - - b.Property("ItemDesc2") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ItemDesc2"); - - b.Property("ItemName") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ItemName"); - - b.Property("LastModificationTime") - .HasColumnType("datetime2") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("uniqueidentifier") - .HasColumnName("LastModifierId"); - - b.Property("MasterID") - .HasColumnType("uniqueidentifier"); - - b.Property("Number") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("Number"); - - b.Property("ProduceDate") - .HasColumnType("datetime2"); - - b.Property("Qty") - .HasPrecision(18, 6) - .HasColumnType("decimal(18,6)") - .HasColumnName("Qty"); - - b.Property("Remark") - .HasMaxLength(3072) - .HasColumnType("nvarchar(3072)") - .HasColumnName("Remark"); - - b.Property("StdPackQty") - .HasColumnType("decimal(18,6)"); - - b.Property("SupplierBatch") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("SupplierBatch"); - - b.Property("TenantId") - .HasColumnType("uniqueidentifier") - .HasColumnName("TenantId"); - - b.Property("ToContainerCode") - .HasColumnType("nvarchar(max)"); - - b.Property("ToLocationArea") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ToLocationArea"); - - b.Property("ToLocationCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ToLocationCode"); - - b.Property("ToLocationErpCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ToLocationErpCode"); - - b.Property("ToLocationGroup") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ToLocationGroup"); - - b.Property("ToLot") - .HasColumnType("nvarchar(max)"); - - b.Property("ToPackingCode") - .HasColumnType("nvarchar(max)"); - - b.Property("ToStatus") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("ToWarehouseCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ToWarehouseCode"); - - b.Property("Uom") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("Uom"); - - b.HasKey("Id"); - - b.HasIndex("MasterID"); - - b.HasIndex("Number", "FromPackingCode", "FromLocationCode", "ToLocationCode") - .IsUnique() - .HasFilter("[FromPackingCode] IS NOT NULL"); - - b.ToTable("Store_CustomerReturnNoteDetail", (string)null); - }); - - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.DeliverJob", b => - { - b.Property("Id") - .HasColumnType("uniqueidentifier"); - - b.Property("AcceptTime") - .HasColumnType("datetime2"); - - b.Property("AcceptUserId") - .HasColumnType("uniqueidentifier"); - - b.Property("AcceptUserName") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("CompleteTime") - .HasColumnType("datetime2"); - - b.Property("CompleteUserId") - .HasColumnType("uniqueidentifier"); - - b.Property("CompleteUserName") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("nvarchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime2") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("uniqueidentifier") - .HasColumnName("CreatorId"); - - b.Property("CustomerAddressCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("CustomerCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("DeliverPlanNumber") - .HasColumnType("nvarchar(max)"); - - b.Property("DeliverRequestNumber") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("DeliverTime") - .HasColumnType("datetime2"); - - b.Property("ExtraProperties") - .HasColumnType("nvarchar(max)") - .HasColumnName("ExtraProperties"); - - b.Property("IsAutoComplete") - .ValueGeneratedOnAdd() - .HasColumnType("bit") - .HasDefaultValue(false); - - b.Property("JobDescription") - .HasMaxLength(1024) - .HasColumnType("nvarchar(1024)"); - - b.Property("JobStatus") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("JobType") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("LastModificationTime") - .HasColumnType("datetime2") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("uniqueidentifier") - .HasColumnName("LastModifierId"); - - b.Property("Number") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("Priority") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasDefaultValue(0); - - b.Property("PriorityIncrement") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasDefaultValue(0); - - b.Property("Remark") - .HasMaxLength(3072) - .HasColumnType("nvarchar(3072)") - .HasColumnName("Remark"); - - b.Property("TenantId") - .HasColumnType("uniqueidentifier") - .HasColumnName("TenantId"); - - b.Property("UpStreamJobNumber") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("WarehouseCode") - .HasColumnType("nvarchar(max)"); - - b.Property("WorkGroupCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("Worker") - .HasColumnType("nvarchar(max)"); - - b.HasKey("Id"); - - b.HasIndex("Number") - .IsUnique(); - - b.ToTable("Job_DeliverJob", (string)null); - }); - - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.DeliverJobDetail", b => - { - b.Property("Id") - .HasColumnType("uniqueidentifier"); - - b.Property("CreationTime") - .HasColumnType("datetime2") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("uniqueidentifier") - .HasColumnName("CreatorId"); - - b.Property("HandledArriveDate") - .HasColumnType("datetime2"); - - b.Property("HandledContainerCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("HandledContainerCode"); - - b.Property("HandledExpireDate") - .HasColumnType("datetime2"); - - b.Property("HandledFromLocationArea") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("HandledFromLocationArea"); - - b.Property("HandledFromLocationCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("HandledFromLocationCode"); - - b.Property("HandledFromLocationErpCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("HandledFromLocationErpCode"); - - b.Property("HandledFromLocationGroup") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("HandledFromLocationGroup"); - - b.Property("HandledFromWarehouseCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("HandledFromWarehouseCode"); - - b.Property("HandledLot") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("HandledLot"); - - b.Property("HandledPackingCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("HandledPackingCode"); - - b.Property("HandledProduceDate") - .HasColumnType("datetime2"); - - b.Property("HandledQty") - .HasColumnType("decimal(18,6)"); - - b.Property("HandledSupplierBatch") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("HandledSupplierBatch"); - - b.Property("ItemCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ItemCode"); - - b.Property("ItemDesc1") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ItemDesc1"); - - b.Property("ItemDesc2") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ItemDesc2"); - - b.Property("ItemName") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ItemName"); - - b.Property("LastModificationTime") - .HasColumnType("datetime2") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("uniqueidentifier") - .HasColumnName("LastModifierId"); - - b.Property("MasterID") - .HasColumnType("uniqueidentifier"); - - b.Property("Number") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("OnTheWayLocationCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("RecommendArriveDate") - .HasColumnType("datetime2"); - - b.Property("RecommendContainerCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendContainerCode"); - - b.Property("RecommendExpireDate") - .HasColumnType("datetime2"); - - b.Property("RecommendFromLocationArea") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendFromLocationArea"); - - b.Property("RecommendFromLocationCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendFromLocationCode"); - - b.Property("RecommendFromLocationErpCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendFromLocationErpCode"); - - b.Property("RecommendFromLocationGroup") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendFromLocationGroup"); - - b.Property("RecommendFromWarehouseCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendFromWarehouseCode"); - - b.Property("RecommendLot") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendLot"); - - b.Property("RecommendPackingCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendPackingCode"); - - b.Property("RecommendProduceDate") - .HasColumnType("datetime2"); - - b.Property("RecommendQty") - .HasColumnType("decimal(18,6)"); - - b.Property("RecommendSupplierBatch") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendSupplierBatch"); - - b.Property("Remark") - .HasMaxLength(3072) - .HasColumnType("nvarchar(3072)") - .HasColumnName("Remark"); - - b.Property("Status") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("StdPackQty") - .HasColumnType("decimal(18,6)"); - - b.Property("TenantId") - .HasColumnType("uniqueidentifier") - .HasColumnName("TenantId"); - - b.Property("ToLocationArea") - .HasColumnType("nvarchar(max)"); - - b.Property("ToLocationCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("ToLocationErpCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("ToLocationGroup") - .HasColumnType("nvarchar(max)"); - - b.Property("ToWarehouseCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("Uom") - .HasColumnType("nvarchar(max)"); - - b.HasKey("Id"); - - b.HasIndex("MasterID"); - - b.ToTable("Job_DeliverJobDetail", (string)null); - }); - - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.DeliverNote", b => - { - b.Property("Id") - .HasColumnType("uniqueidentifier"); - - b.Property("ActiveDate") - .HasColumnType("datetime2"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("nvarchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CountPrint") - .HasColumnType("int"); - - b.Property("CreationTime") - .HasColumnType("datetime2") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("uniqueidentifier") - .HasColumnName("CreatorId"); - - b.Property("CustomerAddressCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("CustomerCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("DeliverPlanNumber") - .HasColumnType("nvarchar(max)"); - - b.Property("DeliverRequestNumber") - .HasColumnType("nvarchar(max)"); - - b.Property("DeliverRequestType") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("DeliverTime") - .HasColumnType("datetime2"); - - b.Property("ExtraProperties") - .HasColumnType("nvarchar(max)") - .HasColumnName("ExtraProperties"); - - b.Property("JobNumber") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("JobNumber"); - - b.Property("LastModificationTime") - .HasColumnType("datetime2") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("uniqueidentifier") - .HasColumnName("LastModifierId"); - - b.Property("Number") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("Number"); - - b.Property("Remark") - .HasMaxLength(3072) - .HasColumnType("nvarchar(3072)") - .HasColumnName("Remark"); - - b.Property("TenantId") - .HasColumnType("uniqueidentifier") - .HasColumnName("TenantId"); - - b.Property("Worker") - .HasColumnType("nvarchar(max)"); - - b.HasKey("Id"); - - b.HasIndex("Number") - .IsUnique(); - - b.ToTable("Store_DeliverNote", (string)null); - }); - - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.DeliverNoteDetail", b => - { - b.Property("Id") - .HasColumnType("uniqueidentifier"); - - b.Property("ArriveDate") - .HasColumnType("datetime2"); - - b.Property("CreationTime") - .HasColumnType("datetime2") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("uniqueidentifier") - .HasColumnName("CreatorId"); - - b.Property("ExpireDate") - .HasColumnType("datetime2"); - - b.Property("ExtraProperties") - .HasColumnType("nvarchar(max)") - .HasColumnName("ExtraProperties"); - - b.Property("FromContainerCode") - .HasColumnType("nvarchar(max)"); - - b.Property("FromLocationArea") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("FromLocationArea"); - - b.Property("FromLocationCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("FromLocationCode"); - - b.Property("FromLocationErpCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("FromLocationErpCode"); - - b.Property("FromLocationGroup") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("FromLocationGroup"); - - b.Property("FromLot") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("FromPackingCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("FromStatus") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("FromWarehouseCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("FromWarehouseCode"); - - b.Property("HandledArriveDate") - .HasColumnType("datetime2"); - - b.Property("HandledContainerCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("HandledContainerCode"); - - b.Property("HandledExpireDate") - .HasColumnType("datetime2"); - - b.Property("HandledFromLocationArea") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("HandledFromLocationArea"); - - b.Property("HandledFromLocationCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("HandledFromLocationCode"); - - b.Property("HandledFromLocationErpCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("HandledFromLocationErpCode"); - - b.Property("HandledFromLocationGroup") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("HandledFromLocationGroup"); - - b.Property("HandledFromWarehouseCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("HandledFromWarehouseCode"); - - b.Property("HandledLot") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("HandledLot"); - - b.Property("HandledPackingCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("HandledPackingCode"); - - b.Property("HandledProduceDate") - .HasColumnType("datetime2"); - - b.Property("HandledQty") - .HasColumnType("decimal(18,6)"); - - b.Property("HandledSupplierBatch") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("HandledSupplierBatch"); - - b.Property("ItemCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ItemCode"); - - b.Property("ItemDesc1") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ItemDesc1"); - - b.Property("ItemDesc2") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ItemDesc2"); - - b.Property("ItemName") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ItemName"); - - b.Property("LastModificationTime") - .HasColumnType("datetime2") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("uniqueidentifier") - .HasColumnName("LastModifierId"); - - b.Property("MasterID") - .HasColumnType("uniqueidentifier"); - - b.Property("Number") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("Number"); - - b.Property("ProduceDate") - .HasColumnType("datetime2"); - - b.Property("Qty") - .HasPrecision(18, 6) - .HasColumnType("decimal(18,6)") - .HasColumnName("Qty"); - - b.Property("RecommendArriveDate") - .HasColumnType("datetime2"); - - b.Property("RecommendContainerCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendContainerCode"); - - b.Property("RecommendExpireDate") - .HasColumnType("datetime2"); - - b.Property("RecommendFromLocationArea") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendFromLocationArea"); - - b.Property("RecommendFromLocationCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendFromLocationCode"); - - b.Property("RecommendFromLocationErpCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendFromLocationErpCode"); - - b.Property("RecommendFromLocationGroup") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendFromLocationGroup"); - - b.Property("RecommendFromWarehouseCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendFromWarehouseCode"); - - b.Property("RecommendLot") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendLot"); - - b.Property("RecommendPackingCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendPackingCode"); - - b.Property("RecommendProduceDate") - .HasColumnType("datetime2"); - - b.Property("RecommendQty") - .HasColumnType("decimal(18,6)"); - - b.Property("RecommendSupplierBatch") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendSupplierBatch"); - - b.Property("Remark") - .HasMaxLength(3072) - .HasColumnType("nvarchar(3072)") - .HasColumnName("Remark"); - - b.Property("StdPackQty") - .HasColumnType("decimal(18,6)"); - - b.Property("SupplierBatch") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("SupplierBatch"); - - b.Property("TenantId") - .HasColumnType("uniqueidentifier") - .HasColumnName("TenantId"); - - b.Property("ToContainerCode") - .HasColumnType("nvarchar(max)"); - - b.Property("ToLocationArea") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ToLocationArea"); - - b.Property("ToLocationCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ToLocationCode"); - - b.Property("ToLocationErpCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ToLocationErpCode"); - - b.Property("ToLocationGroup") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ToLocationGroup"); - - b.Property("ToLot") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("ToPackingCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("ToStatus") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("ToWarehouseCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ToWarehouseCode"); - - b.Property("Uom") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("Uom"); - - b.HasKey("Id"); - - b.HasIndex("MasterID"); - - b.HasIndex("Number", "ItemCode", "FromPackingCode", "FromLot", "FromLocationCode", "ToLocationCode") - .IsUnique(); - - b.ToTable("Store_DeliverNoteDetail", (string)null); - }); - - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.DeliverPlan", b => - { - b.Property("Id") - .HasColumnType("uniqueidentifier"); - - b.Property("ActiveDate") - .HasColumnType("datetime2"); - - b.Property("AutoAgree") - .HasColumnType("bit"); - - b.Property("AutoCompleteJob") - .HasColumnType("bit"); - - b.Property("AutoHandle") - .HasColumnType("bit"); - - b.Property("AutoSubmit") - .HasColumnType("bit"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("nvarchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime2") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("uniqueidentifier") - .HasColumnName("CreatorId"); - - b.Property("CustomerAddressCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("CustomerCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("DirectCreateNote") - .HasColumnType("bit"); - - b.Property("ExtraProperties") - .HasColumnType("nvarchar(max)") - .HasColumnName("ExtraProperties"); - - b.Property("LastModificationTime") - .HasColumnType("datetime2") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("uniqueidentifier") - .HasColumnName("LastModifierId"); - - b.Property("Number") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("Number"); - - b.Property("PlanDate") - .HasColumnType("datetime2"); - - b.Property("PlanTime") - .HasColumnType("datetime2"); - - b.Property("Project") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("Remark") - .HasMaxLength(3072) - .HasColumnType("nvarchar(3072)") - .HasColumnName("Remark"); - - b.Property("RequestStatus") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("SoNumber") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("TenantId") - .HasColumnType("uniqueidentifier") - .HasColumnName("TenantId"); - - b.Property("Worker") - .HasColumnType("nvarchar(max)"); - - b.HasKey("Id"); - - b.HasIndex("Number") - .IsUnique(); - - b.ToTable("Store_DeliverPlan", (string)null); - }); - - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.DeliverPlanDetail", b => - { - b.Property("Id") - .HasColumnType("uniqueidentifier"); - - b.Property("CreationTime") - .HasColumnType("datetime2") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("uniqueidentifier") - .HasColumnName("CreatorId"); - - b.Property("ItemCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ItemCode"); - - b.Property("ItemDesc1") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ItemDesc1"); - - b.Property("ItemDesc2") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ItemDesc2"); - - b.Property("ItemName") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ItemName"); - - b.Property("LastModificationTime") - .HasColumnType("datetime2") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("uniqueidentifier") - .HasColumnName("LastModifierId"); - - b.Property("MasterID") - .HasColumnType("uniqueidentifier"); - - b.Property("Number") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("Number"); - - b.Property("Qty") - .HasPrecision(18, 6) - .HasColumnType("decimal(18,6)") - .HasColumnName("Qty"); - - b.Property("Remark") - .HasMaxLength(3072) - .HasColumnType("nvarchar(3072)") - .HasColumnName("Remark"); - - b.Property("SoLine") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("SoNumber") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("StdPackQty") - .HasColumnType("decimal(18,6)"); - - b.Property("TenantId") - .HasColumnType("uniqueidentifier") - .HasColumnName("TenantId"); - - b.Property("Uom") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("Uom"); - - b.HasKey("Id"); - - b.HasIndex("MasterID"); - - b.HasIndex("Number", "SoNumber", "SoLine") - .IsUnique() - .HasFilter("[SoNumber] IS NOT NULL AND [SoLine] IS NOT NULL"); - - b.ToTable("Store_DeliverPlanDetail", (string)null); - }); - - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.DeliverRequest", b => - { - b.Property("Id") - .HasColumnType("uniqueidentifier"); - - b.Property("ActiveDate") - .HasColumnType("datetime2"); - - b.Property("AutoAgree") - .HasColumnType("bit"); - - b.Property("AutoCompleteJob") - .HasColumnType("bit"); - - b.Property("AutoHandle") - .HasColumnType("bit"); - - b.Property("AutoSubmit") - .HasColumnType("bit"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("nvarchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime2") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("uniqueidentifier") - .HasColumnName("CreatorId"); - - b.Property("CustomerAddressCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("CustomerCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("DeliverPlanNumber") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("DeliverRequestType") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("DeliverTime") - .HasColumnType("datetime2"); - - b.Property("DirectCreateNote") - .HasColumnType("bit"); - - b.Property("ExtraProperties") - .HasColumnType("nvarchar(max)") - .HasColumnName("ExtraProperties"); - - b.Property("LastModificationTime") - .HasColumnType("datetime2") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("uniqueidentifier") - .HasColumnName("LastModifierId"); - - b.Property("Number") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("Number"); - - b.Property("Remark") - .HasMaxLength(3072) - .HasColumnType("nvarchar(3072)") - .HasColumnName("Remark"); - - b.Property("RequestStatus") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("TenantId") - .HasColumnType("uniqueidentifier") - .HasColumnName("TenantId"); - - b.Property("Worker") - .HasColumnType("nvarchar(max)"); - - b.HasKey("Id"); - - b.HasIndex("Number") - .IsUnique(); - - b.ToTable("Store_DeliverRequest", (string)null); - }); - - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.DeliverRequestDetail", b => - { - b.Property("Id") - .HasColumnType("uniqueidentifier"); - - b.Property("AreaCode") - .HasColumnType("nvarchar(max)"); - - b.Property("CreationTime") - .HasColumnType("datetime2") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("uniqueidentifier") - .HasColumnName("CreatorId"); - - b.Property("ExtraProperties") - .HasColumnType("nvarchar(max)") - .HasColumnName("ExtraProperties"); - - b.Property("ItemCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ItemCode"); - - b.Property("ItemDesc1") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ItemDesc1"); - - b.Property("ItemDesc2") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ItemDesc2"); - - b.Property("ItemName") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ItemName"); - - b.Property("LastModificationTime") - .HasColumnType("datetime2") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("uniqueidentifier") - .HasColumnName("LastModifierId"); - - b.Property("MasterID") - .HasColumnType("uniqueidentifier"); - - b.Property("Number") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("Number"); - - b.Property("Qty") - .HasPrecision(18, 6) - .HasColumnType("decimal(18,6)") - .HasColumnName("Qty"); - - b.Property("Remark") - .HasMaxLength(3072) - .HasColumnType("nvarchar(3072)") - .HasColumnName("Remark"); - - b.Property("StdPackQty") - .HasColumnType("decimal(18,6)"); - - b.Property("TenantId") - .HasColumnType("uniqueidentifier") - .HasColumnName("TenantId"); - - b.Property("Uom") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("Uom"); - - b.HasKey("Id"); - - b.HasIndex("MasterID"); - - b.HasIndex("Number", "ItemCode") - .IsUnique(); - - b.ToTable("Store_DeliverRequestDetail", (string)null); - }); - - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ExchangeData", b => - { - b.Property("Id") - .HasColumnType("uniqueidentifier"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("nvarchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime2") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("uniqueidentifier") - .HasColumnName("CreatorId"); - - b.Property("DataAction") - .HasColumnType("int"); - - b.Property("DataContent") - .HasColumnType("nvarchar(max)"); - - b.Property("DataIdentityCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("DataType") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("DestinationSystem") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("EffectiveDate") - .HasColumnType("datetime2"); - - b.Property("ErrorCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("ErrorMessage") - .HasMaxLength(3072) - .HasColumnType("nvarchar(3072)"); - - b.Property("ExtraProperties") - .HasColumnType("nvarchar(max)") - .HasColumnName("ExtraProperties"); - - b.Property("LastModificationTime") - .HasColumnType("datetime2") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("uniqueidentifier") - .HasColumnName("LastModifierId"); - - b.Property("Number") - .HasColumnType("bigint"); - - b.Property("ReadTime") - .HasColumnType("datetime2"); - - b.Property("Reader") - .HasColumnType("nvarchar(max)"); - - b.Property("Remark") - .HasMaxLength(3072) - .HasColumnType("nvarchar(3072)") - .HasColumnName("Remark"); - - b.Property("RetryTimes") - .HasColumnType("int"); - - b.Property("SourceSystem") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("Status") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("TenantId") - .HasColumnType("uniqueidentifier") - .HasColumnName("TenantId"); - - b.Property("TyrpNumber") - .IsRequired() - .HasColumnType("nvarchar(max)"); - - b.Property("WriteTime") - .HasColumnType("datetime2"); - - b.Property("Writer") - .HasColumnType("nvarchar(max)"); - - b.HasKey("Id"); - - b.ToTable("Store_ExchangeData", (string)null); - }); - - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.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("ProdLine") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("RecommendArriveDate") - .HasColumnType("datetime2"); - - b.Property("RecommendContainerCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendContainerCode"); - - b.Property("RecommendExpireDate") - .HasColumnType("datetime2"); - - b.Property("RecommendFromLocationArea") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendFromLocationArea"); - - b.Property("RecommendFromLocationCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendFromLocationCode"); - - b.Property("RecommendFromLocationErpCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendFromLocationErpCode"); - - b.Property("RecommendFromLocationGroup") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendFromLocationGroup"); - - b.Property("RecommendFromWarehouseCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendFromWarehouseCode"); - - b.Property("RecommendLot") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendLot"); - - b.Property("RecommendPackingCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendPackingCode"); - - b.Property("RecommendProduceDate") - .HasColumnType("datetime2"); - - b.Property("RecommendQty") - .HasColumnType("decimal(18,6)"); - - b.Property("RecommendSupplierBatch") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendSupplierBatch"); - - b.Property("Remark") - .HasMaxLength(3072) - .HasColumnType("nvarchar(3072)") - .HasColumnName("Remark"); - - b.Property("RequestLocationCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("RoundedQty") - .HasColumnType("decimal(18,6)"); - - b.Property("Status") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("StdPackQty") - .HasColumnType("decimal(18,6)"); - - b.Property("TenantId") - .HasColumnType("uniqueidentifier") - .HasColumnName("TenantId"); - - b.Property("ToLocationArea") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("ToLocationCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("ToLocationErpCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("ToLocationGroup") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("ToWarehouseCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("TruncType") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("Uom") - .HasColumnType("nvarchar(max)"); - - b.Property("WorkStation") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.HasKey("Id"); - - b.HasIndex("MasterID"); - - b.ToTable("Job_IssueJobDetail", (string)null); - }); - - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.IssueNote", b => - { - b.Property("Id") - .HasColumnType("uniqueidentifier"); - - b.Property("ActiveDate") - .HasColumnType("datetime2"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("nvarchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("ConfirmTime") - .HasColumnType("datetime2"); - - b.Property("Confirmed") - .HasColumnType("bit"); - - b.Property("CreationTime") - .HasColumnType("datetime2") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("uniqueidentifier") - .HasColumnName("CreatorId"); - - b.Property("ExtraProperties") - .HasColumnType("nvarchar(max)") - .HasColumnName("ExtraProperties"); - - b.Property("JobNumber") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("JobNumber"); - - b.Property("LastModificationTime") - .HasColumnType("datetime2") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("uniqueidentifier") - .HasColumnName("LastModifierId"); - - b.Property("Number") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("Number"); - - b.Property("Remark") - .HasMaxLength(3072) - .HasColumnType("nvarchar(3072)") - .HasColumnName("Remark"); - - b.Property("RequestNumber") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("RequestType") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("TenantId") - .HasColumnType("uniqueidentifier") - .HasColumnName("TenantId"); - - b.Property("UseOnTheWayLocation") - .HasColumnType("bit"); - - b.Property("Worker") - .HasColumnType("nvarchar(max)"); - - b.Property("Workshop") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.HasKey("Id"); - - b.HasIndex("Number") - .IsUnique(); - - b.ToTable("Store_IssueNote", (string)null); - }); - - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.IssueNoteDetail", b => - { - b.Property("Id") - .HasColumnType("uniqueidentifier"); - - b.Property("ArriveDate") - .HasColumnType("datetime2"); - - b.Property("CreationTime") - .HasColumnType("datetime2") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("uniqueidentifier") - .HasColumnName("CreatorId"); - - b.Property("ExpireDate") - .HasColumnType("datetime2"); - - b.Property("ExpiredTime") - .HasColumnType("datetime2"); - - b.Property("FromContainerCode") - .HasColumnType("nvarchar(max)"); - - b.Property("FromLocationArea") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("FromLocationArea"); - - b.Property("FromLocationCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("FromLocationCode"); - - b.Property("FromLocationErpCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("FromLocationErpCode"); - - b.Property("FromLocationGroup") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("FromLocationGroup"); - - b.Property("FromLot") - .HasColumnType("nvarchar(max)"); - - b.Property("FromPackingCode") - .HasColumnType("nvarchar(450)"); - - b.Property("FromStatus") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("FromWarehouseCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("FromWarehouseCode"); - - b.Property("HandledArriveDate") - .HasColumnType("datetime2"); - - b.Property("HandledContainerCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("HandledContainerCode"); - - b.Property("HandledExpireDate") - .HasColumnType("datetime2"); - - b.Property("HandledFromLocationArea") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("HandledFromLocationArea"); - - b.Property("HandledFromLocationCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("HandledFromLocationCode"); - - b.Property("HandledFromLocationErpCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("HandledFromLocationErpCode"); - - b.Property("HandledFromLocationGroup") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("HandledFromLocationGroup"); - - b.Property("HandledFromWarehouseCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("HandledFromWarehouseCode"); - - b.Property("HandledLot") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("HandledLot"); - - b.Property("HandledPackingCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("HandledPackingCode"); - - b.Property("HandledProduceDate") - .HasColumnType("datetime2"); - - b.Property("HandledQty") - .HasColumnType("decimal(18,6)"); - - b.Property("HandledSupplierBatch") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("HandledSupplierBatch"); - - b.Property("IssueTime") - .HasColumnType("datetime2"); - - b.Property("ItemCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ItemCode"); - - b.Property("ItemDesc1") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ItemDesc1"); - - b.Property("ItemDesc2") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ItemDesc2"); - - b.Property("ItemName") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ItemName"); - - b.Property("LastModificationTime") - .HasColumnType("datetime2") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("uniqueidentifier") - .HasColumnName("LastModifierId"); - - b.Property("MasterID") - .HasColumnType("uniqueidentifier"); - - b.Property("Number") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("Number"); - - b.Property("OnTheWayLocationCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("ProdLine") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("ProduceDate") - .HasColumnType("datetime2"); - - b.Property("Qty") - .HasPrecision(18, 6) - .HasColumnType("decimal(18,6)") - .HasColumnName("Qty"); - - b.Property("RecommendArriveDate") - .HasColumnType("datetime2"); - - b.Property("RecommendContainerCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendContainerCode"); - - b.Property("RecommendExpireDate") - .HasColumnType("datetime2"); - - b.Property("RecommendFromLocationArea") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendFromLocationArea"); - - b.Property("RecommendFromLocationCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendFromLocationCode"); - - b.Property("RecommendFromLocationErpCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendFromLocationErpCode"); - - b.Property("RecommendFromLocationGroup") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendFromLocationGroup"); - - b.Property("RecommendFromWarehouseCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendFromWarehouseCode"); - - b.Property("RecommendLot") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendLot"); - - b.Property("RecommendPackingCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendPackingCode"); - - b.Property("RecommendProduceDate") - .HasColumnType("datetime2"); - - b.Property("RecommendQty") - .HasColumnType("decimal(18,6)"); - - b.Property("RecommendSupplierBatch") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendSupplierBatch"); - - b.Property("Remark") - .HasMaxLength(3072) - .HasColumnType("nvarchar(3072)") - .HasColumnName("Remark"); - - b.Property("StdPackQty") - .HasColumnType("decimal(18,6)"); - - b.Property("SupplierBatch") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("SupplierBatch"); - - b.Property("TenantId") - .HasColumnType("uniqueidentifier") - .HasColumnName("TenantId"); - - b.Property("ToContainerCode") - .HasColumnType("nvarchar(max)"); - - b.Property("ToLocationArea") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ToLocationArea"); - - b.Property("ToLocationCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ToLocationCode"); - - b.Property("ToLocationErpCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ToLocationErpCode"); - - b.Property("ToLocationGroup") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ToLocationGroup"); - - b.Property("ToLot") - .HasColumnType("nvarchar(max)"); - - b.Property("ToPackingCode") - .HasColumnType("nvarchar(max)"); - - b.Property("ToStatus") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("ToWarehouseCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ToWarehouseCode"); - - b.Property("Uom") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("Uom"); - - b.Property("WorkStation") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.HasKey("Id"); - - b.HasIndex("FromPackingCode"); - - b.HasIndex("MasterID"); - - b.HasIndex("Number", "FromPackingCode", "FromLocationCode", "ToLocationCode") - .IsUnique() - .HasFilter("[FromPackingCode] IS NOT NULL"); - - b.ToTable("Store_IssueNoteDetail", (string)null); - }); - - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ItemTransformNote", b => - { - b.Property("Id") - .HasColumnType("uniqueidentifier"); - - b.Property("ActiveDate") - .HasColumnType("datetime2"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("nvarchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime2") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("uniqueidentifier") - .HasColumnName("CreatorId"); - - b.Property("ExtraProperties") - .HasColumnType("nvarchar(max)") - .HasColumnName("ExtraProperties"); - - b.Property("JobNumber") - .HasColumnType("nvarchar(max)"); - - b.Property("LastModificationTime") - .HasColumnType("datetime2") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("uniqueidentifier") - .HasColumnName("LastModifierId"); - - b.Property("Number") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("Number"); - - b.Property("Remark") - .HasMaxLength(3072) - .HasColumnType("nvarchar(3072)") - .HasColumnName("Remark"); - - b.Property("RequestNumber") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("TenantId") - .HasColumnType("uniqueidentifier") - .HasColumnName("TenantId"); - - b.Property("Worker") - .HasColumnType("nvarchar(max)"); - - b.HasKey("Id"); - - b.HasIndex("Number") - .IsUnique(); - - b.ToTable("Store_ItemTransformNote", (string)null); - }); - - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ItemTransformNoteDetail", b => - { - b.Property("Id") - .HasColumnType("uniqueidentifier"); - - b.Property("ConcurrencyStamp") - .HasColumnType("nvarchar(max)"); - - b.Property("CreationTime") - .HasColumnType("datetime2") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("uniqueidentifier") - .HasColumnName("CreatorId"); - - b.Property("FromArriveDate") - .HasColumnType("datetime2"); - - b.Property("FromContainerCode") - .HasColumnType("nvarchar(max)"); - - b.Property("FromExpireDate") - .HasColumnType("datetime2"); - - b.Property("FromLocationArea") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("FromLocationArea"); - - b.Property("FromLocationCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("FromLocationCode"); - - b.Property("FromLocationErpCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("FromLocationErpCode"); - - b.Property("FromLocationGroup") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("FromLocationGroup"); - - b.Property("FromLot") - .HasColumnType("nvarchar(max)"); - - b.Property("FromPackingCode") - .HasColumnType("nvarchar(450)"); - - b.Property("FromProduceDate") - .HasColumnType("datetime2"); - - b.Property("FromQty") - .HasColumnType("decimal(18,6)"); - - b.Property("FromStatus") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("FromSupplierBatch") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("FromWarehouseCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("FromWarehouseCode"); - - b.Property("ItemCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ItemCode"); - - b.Property("ItemDesc1") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ItemDesc1"); - - b.Property("ItemDesc2") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ItemDesc2"); - - b.Property("ItemName") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ItemName"); - - b.Property("LastModificationTime") - .HasColumnType("datetime2") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("uniqueidentifier") - .HasColumnName("LastModifierId"); - - b.Property("MasterID") - .HasColumnType("uniqueidentifier"); - - b.Property("Number") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("Number"); - - b.Property("ReasonCode") - .HasColumnType("nvarchar(max)"); - - b.Property("Remark") - .HasMaxLength(3072) - .HasColumnType("nvarchar(3072)") - .HasColumnName("Remark"); - - b.Property("TenantId") - .HasColumnType("uniqueidentifier") - .HasColumnName("TenantId"); - - b.Property("ToArriveDate") - .HasColumnType("datetime2"); - - b.Property("ToContainerCode") - .HasColumnType("nvarchar(max)"); - - b.Property("ToExpireDate") - .HasColumnType("datetime2"); - - b.Property("ToItemCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("ToItemDesc1") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("ToItemDesc2") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("ToItemName") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("ToLocationArea") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ToLocationArea"); - - b.Property("ToLocationCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ToLocationCode"); - - b.Property("ToLocationErpCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ToLocationErpCode"); - - b.Property("ToLocationGroup") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ToLocationGroup"); - - b.Property("ToLot") - .HasColumnType("nvarchar(max)"); - - b.Property("ToPackingCode") - .HasColumnType("nvarchar(450)"); - - b.Property("ToProduceDate") - .HasColumnType("datetime2"); - - b.Property("ToQty") - .HasColumnType("decimal(18,6)"); - - b.Property("ToStatus") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("ToSupplierBatch") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("ToWarehouseCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ToWarehouseCode"); - - b.Property("Uom") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.HasKey("Id"); - - b.HasIndex("MasterID"); - - b.HasIndex("Number", "FromPackingCode", "FromStatus", "ToPackingCode", "ToStatus") - .IsUnique() - .HasFilter("[FromPackingCode] IS NOT NULL AND [ToPackingCode] IS NOT NULL"); - - b.ToTable("Store_ItemTransformNoteDetail", (string)null); - }); - - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ItemTransformRequest", b => - { - b.Property("Id") - .HasColumnType("uniqueidentifier"); - - b.Property("ActiveDate") - .HasColumnType("datetime2"); - - b.Property("AutoAgree") - .HasColumnType("bit"); - - b.Property("AutoCompleteJob") - .HasColumnType("bit"); - - b.Property("AutoHandle") - .HasColumnType("bit"); - - b.Property("AutoSubmit") - .HasColumnType("bit"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("nvarchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime2") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("uniqueidentifier") - .HasColumnName("CreatorId"); - - b.Property("DirectCreateNote") - .HasColumnType("bit"); - - b.Property("ExtraProperties") - .HasColumnType("nvarchar(max)") - .HasColumnName("ExtraProperties"); - - b.Property("LastModificationTime") - .HasColumnType("datetime2") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("uniqueidentifier") - .HasColumnName("LastModifierId"); - - b.Property("Number") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("Number"); - - b.Property("Remark") - .HasMaxLength(3072) - .HasColumnType("nvarchar(3072)") - .HasColumnName("Remark"); - - b.Property("RequestStatus") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("TenantId") - .HasColumnType("uniqueidentifier") - .HasColumnName("TenantId"); - - b.Property("Worker") - .HasColumnType("nvarchar(max)"); - - b.HasKey("Id"); - - b.HasIndex("Number") - .IsUnique(); - - b.ToTable("Store_ItemTransformRequest", (string)null); - }); - - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ItemTransformRequestDetail", b => - { - b.Property("Id") - .HasColumnType("uniqueidentifier"); - - b.Property("CreationTime") - .HasColumnType("datetime2") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("uniqueidentifier") - .HasColumnName("CreatorId"); - - b.Property("FromArriveDate") - .HasColumnType("datetime2"); - - b.Property("FromContainerCode") - .HasColumnType("nvarchar(max)"); - - b.Property("FromExpireDate") - .HasColumnType("datetime2"); - - b.Property("FromLocationArea") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("FromLocationArea"); - - b.Property("FromLocationCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("FromLocationCode"); - - b.Property("FromLocationErpCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("FromLocationErpCode"); - - b.Property("FromLocationGroup") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("FromLocationGroup"); - - b.Property("FromLot") - .HasColumnType("nvarchar(max)"); - - b.Property("FromPackingCode") - .HasColumnType("nvarchar(450)"); - - b.Property("FromProduceDate") - .HasColumnType("datetime2"); - - b.Property("FromQty") - .HasColumnType("decimal(18,6)"); - - b.Property("FromStatus") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("FromSupplierBatch") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("FromWarehouseCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("FromWarehouseCode"); - - b.Property("ItemCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ItemCode"); - - b.Property("ItemDesc1") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ItemDesc1"); - - b.Property("ItemDesc2") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ItemDesc2"); - - b.Property("ItemName") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ItemName"); - - b.Property("LastModificationTime") - .HasColumnType("datetime2") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("uniqueidentifier") - .HasColumnName("LastModifierId"); - - b.Property("MasterID") - .HasColumnType("uniqueidentifier"); - - b.Property("Number") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("Number"); - - b.Property("ReasonCode") - .HasColumnType("nvarchar(max)"); - - b.Property("Remark") - .HasMaxLength(3072) - .HasColumnType("nvarchar(3072)") - .HasColumnName("Remark"); - - b.Property("TenantId") - .HasColumnType("uniqueidentifier") - .HasColumnName("TenantId"); - - b.Property("ToArriveDate") - .HasColumnType("datetime2"); - - b.Property("ToContainerCode") - .HasColumnType("nvarchar(max)"); - - b.Property("ToExpireDate") - .HasColumnType("datetime2"); - - b.Property("ToItemCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("ToItemDesc1") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("ToItemDesc2") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("ToItemName") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("ToLocationArea") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ToLocationArea"); - - b.Property("ToLocationCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ToLocationCode"); - - b.Property("ToLocationErpCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ToLocationErpCode"); - - b.Property("ToLocationGroup") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ToLocationGroup"); - - b.Property("ToLot") - .HasColumnType("nvarchar(max)"); - - b.Property("ToPackingCode") - .HasColumnType("nvarchar(450)"); - - b.Property("ToProduceDate") - .HasColumnType("datetime2"); - - b.Property("ToQty") - .HasColumnType("decimal(18,6)"); - - b.Property("ToStatus") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("ToSupplierBatch") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("ToWarehouseCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ToWarehouseCode"); - - b.Property("Uom") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.HasKey("Id"); - - b.HasIndex("MasterID"); - - b.HasIndex("Number", "FromPackingCode", "FromStatus", "ToPackingCode", "ToStatus") - .IsUnique() - .HasFilter("[FromPackingCode] IS NOT NULL AND [ToPackingCode] IS NOT NULL"); - - b.ToTable("Store_ItemTransformRequestDetail", (string)null); - }); - - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.JisDeliverJob", b => - { - b.Property("Id") - .HasColumnType("uniqueidentifier"); - - b.Property("AcceptTime") - .HasColumnType("datetime2"); - - b.Property("AcceptUserId") - .HasColumnType("uniqueidentifier"); - - b.Property("AcceptUserName") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("CompleteTime") - .HasColumnType("datetime2"); - - b.Property("CompleteUserId") - .HasColumnType("uniqueidentifier"); - - b.Property("CompleteUserName") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("nvarchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("ContainerQty") - .HasColumnType("decimal(18,6)"); - - b.Property("CreationTime") - .HasColumnType("datetime2") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("uniqueidentifier") - .HasColumnName("CreatorId"); - - b.Property("Customer") - .HasColumnType("nvarchar(max)"); - - b.Property("CustomerAddressCode") - .HasColumnType("nvarchar(max)"); - - b.Property("CustomerLocationCode") - .HasColumnType("nvarchar(max)"); - - b.Property("CustomerWarehouseCode") - .HasColumnType("nvarchar(max)"); - - b.Property("ExtraProperties") - .HasColumnType("nvarchar(max)") - .HasColumnName("ExtraProperties"); - - b.Property("IsAutoComplete") - .ValueGeneratedOnAdd() - .HasColumnType("bit") - .HasDefaultValue(false); - - b.Property("ItemQty") - .HasColumnType("decimal(18,6)"); - - b.Property("JobDescription") - .HasMaxLength(1024) - .HasColumnType("nvarchar(1024)"); - - b.Property("JobStatus") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("JobType") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("LastModificationTime") - .HasColumnType("datetime2") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("uniqueidentifier") - .HasColumnName("LastModifierId"); - - b.Property("Number") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("PlanTime") - .HasColumnType("datetime2"); - - b.Property("Position") - .HasColumnType("nvarchar(max)"); - - b.Property("Priority") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasDefaultValue(0); - - b.Property("PriorityIncrement") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasDefaultValue(0); - - b.Property("ProjectCode") - .HasColumnType("nvarchar(max)"); - - b.Property("Remark") - .HasMaxLength(3072) - .HasColumnType("nvarchar(3072)") - .HasColumnName("Remark"); - - b.Property("TenantId") - .HasColumnType("uniqueidentifier") - .HasColumnName("TenantId"); - - b.Property("UpStreamJobNumber") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("WarehouseCode") - .HasColumnType("nvarchar(max)"); - - b.Property("WorkGroupCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("Worker") - .HasColumnType("nvarchar(max)"); - - b.HasKey("Id"); - - b.HasIndex("Number") - .IsUnique(); - - b.ToTable("Job_JisDeliverJob", (string)null); - }); - - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.JisDeliverJobDetail", b => - { - b.Property("Id") - .HasColumnType("uniqueidentifier"); - - b.Property("ContainerCode") - .HasColumnType("nvarchar(max)"); - - b.Property("ContainerDesc") - .HasColumnType("nvarchar(max)"); - - b.Property("ContainerName") - .HasColumnType("nvarchar(max)"); - - b.Property("CreationTime") - .HasColumnType("datetime2") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("uniqueidentifier") - .HasColumnName("CreatorId"); - - b.Property("FromLocationArea") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("FromLocationCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("FromLocationErpCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("FromLocationGroup") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("FromWarehouseCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("ItemQty") - .HasColumnType("decimal(18,6)"); - - b.Property("LastModificationTime") - .HasColumnType("datetime2") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("uniqueidentifier") - .HasColumnName("LastModifierId"); - - b.Property("MasterID") - .HasColumnType("uniqueidentifier"); - - b.Property("Number") - .HasColumnType("nvarchar(max)"); - - b.Property("Remark") - .HasMaxLength(3072) - .HasColumnType("nvarchar(3072)") - .HasColumnName("Remark"); - - b.Property("Status") - .IsRequired() - .HasColumnType("nvarchar(max)"); - - b.Property("TenantId") - .HasColumnType("uniqueidentifier") - .HasColumnName("TenantId"); - - b.Property("ToLocationArea") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("ToLocationCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("ToLocationErpCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("ToLocationGroup") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("ToWarehouseCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.HasKey("Id"); - - b.HasIndex("MasterID"); - - b.ToTable("Job_JisDeliverJobDetail", (string)null); - }); - - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.JisDeliverNote", b => - { - b.Property("Id") - .HasColumnType("uniqueidentifier"); - - b.Property("ActiveDate") - .HasColumnType("datetime2"); - - b.Property("ArrivalTime") - .HasColumnType("datetime2"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("nvarchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("ContainerQty") - .HasColumnType("decimal(18,6)"); - - b.Property("CreationTime") - .HasColumnType("datetime2") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("uniqueidentifier") - .HasColumnName("CreatorId"); - - b.Property("Customer") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("CustomerAddressCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("DeliverTime") - .HasColumnType("datetime2"); - - b.Property("ExtraProperties") - .HasColumnType("nvarchar(max)") - .HasColumnName("ExtraProperties"); - - b.Property("ItemQty") - .HasColumnType("decimal(18,6)"); - - b.Property("JobNumber") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("JobNumber"); - - b.Property("LastModificationTime") - .HasColumnType("datetime2") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("uniqueidentifier") - .HasColumnName("LastModifierId"); - - b.Property("Number") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("Number"); - - b.Property("ProjectCode") - .HasColumnType("nvarchar(max)"); - - b.Property("Remark") - .HasMaxLength(3072) - .HasColumnType("nvarchar(3072)") - .HasColumnName("Remark"); - - b.Property("TenantId") - .HasColumnType("uniqueidentifier") - .HasColumnName("TenantId"); - - b.Property("TotalPackCapacity") - .HasColumnType("nvarchar(max)"); - - b.Property("Worker") - .HasColumnType("nvarchar(max)"); - - b.HasKey("Id"); - - b.HasIndex("Number") - .IsUnique(); - - b.ToTable("Store_JisDeliverNote", (string)null); - }); - - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.JisDeliverNoteDetail", b => - { - b.Property("Id") - .HasColumnType("uniqueidentifier"); - - b.Property("ArriveDate") - .HasColumnType("datetime2"); - - b.Property("CreationTime") - .HasColumnType("datetime2") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("uniqueidentifier") - .HasColumnName("CreatorId"); - - b.Property("DeliverTime") - .HasColumnType("datetime2"); - - b.Property("ExpireDate") - .HasColumnType("datetime2"); - - b.Property("ExpiredTime") - .HasColumnType("datetime2"); - - b.Property("FromContainerCode") - .HasColumnType("nvarchar(max)"); - - b.Property("FromLocationArea") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("FromLocationArea"); - - b.Property("FromLocationCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("FromLocationCode"); - - b.Property("FromLocationErpCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("FromLocationErpCode"); - - b.Property("FromLocationGroup") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("FromLocationGroup"); - - b.Property("FromLot") - .HasColumnType("nvarchar(max)"); - - b.Property("FromPackingCode") - .HasColumnType("nvarchar(450)"); - - b.Property("FromStatus") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("FromWarehouseCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("FromWarehouseCode"); - - b.Property("ItemCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ItemCode"); - - b.Property("ItemDesc1") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ItemDesc1"); - - b.Property("ItemDesc2") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ItemDesc2"); - - b.Property("ItemName") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ItemName"); - - b.Property("LastModificationTime") - .HasColumnType("datetime2") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("uniqueidentifier") - .HasColumnName("LastModifierId"); - - b.Property("MasterID") - .HasColumnType("uniqueidentifier"); - - b.Property("Number") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("Number"); - - b.Property("OnlineType") - .HasColumnType("nvarchar(max)"); - - b.Property("PackCapacity") - .HasColumnType("nvarchar(max)"); - - b.Property("Position") - .HasColumnType("nvarchar(max)"); - - b.Property("ProduceDate") - .HasColumnType("datetime2"); - - b.Property("ProductNo") - .HasColumnType("nvarchar(max)"); - - b.Property("ProjectCode") - .HasColumnType("nvarchar(max)"); - - b.Property("Qty") - .HasPrecision(18, 6) - .HasColumnType("decimal(18,6)") - .HasColumnName("Qty"); - - b.Property("Remark") - .HasMaxLength(3072) - .HasColumnType("nvarchar(3072)") - .HasColumnName("Remark"); - - b.Property("SeqNo") - .HasColumnType("nvarchar(max)"); - - b.Property("Stage") - .HasColumnType("nvarchar(max)"); - - b.Property("StdPackQty") - .HasColumnType("decimal(18,6)"); - - b.Property("SupplierBatch") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("SupplierBatch"); - - b.Property("TenantId") - .HasColumnType("uniqueidentifier") - .HasColumnName("TenantId"); - - b.Property("ToContainerCode") - .HasColumnType("nvarchar(max)"); - - b.Property("ToLocationArea") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ToLocationArea"); - - b.Property("ToLocationCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ToLocationCode"); - - b.Property("ToLocationErpCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ToLocationErpCode"); - - b.Property("ToLocationGroup") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ToLocationGroup"); - - b.Property("ToLot") - .HasColumnType("nvarchar(max)"); - - b.Property("ToPackingCode") - .HasColumnType("nvarchar(max)"); - - b.Property("ToStatus") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("ToWarehouseCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ToWarehouseCode"); - - b.Property("Uom") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("Uom"); - - b.Property("UsedFor") - .HasColumnType("nvarchar(max)"); - - b.Property("Year") - .HasColumnType("nvarchar(max)"); - - b.HasKey("Id"); - - b.HasIndex("MasterID"); - - b.HasIndex("Number", "FromPackingCode", "FromLocationCode", "ToLocationCode") - .IsUnique() - .HasFilter("[FromPackingCode] IS NOT NULL"); - - b.ToTable("Store_JisDeliverNoteDetail", (string)null); - }); - - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.JisProductReceiptNote", b => - { - b.Property("Id") - .HasColumnType("uniqueidentifier"); - - b.Property("ActiveDate") - .HasColumnType("datetime2"); - - b.Property("CompleteTime") - .HasColumnType("datetime2"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("nvarchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("ContainerQty") - .HasColumnType("decimal(18,6)"); - - b.Property("CreationTime") - .HasColumnType("datetime2") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("uniqueidentifier") - .HasColumnName("CreatorId"); - - b.Property("ExtraProperties") - .HasColumnType("nvarchar(max)") - .HasColumnName("ExtraProperties"); - - b.Property("ItemQty") - .HasColumnType("decimal(18,6)"); - - b.Property("JobNumber") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("JobNumber"); - - b.Property("LastModificationTime") - .HasColumnType("datetime2") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("uniqueidentifier") - .HasColumnName("LastModifierId"); - - b.Property("LocationCode") - .HasColumnType("nvarchar(max)"); - - b.Property("Number") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("Number"); - - b.Property("ProdLine") - .HasColumnType("nvarchar(max)"); - - b.Property("ProductionPlanNumber") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("RawLocationCode") - .HasColumnType("nvarchar(max)"); - - b.Property("ReceiptType") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("Remark") - .HasMaxLength(3072) - .HasColumnType("nvarchar(3072)") - .HasColumnName("Remark"); - - b.Property("Shift") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("SourceNumber") - .HasColumnType("nvarchar(max)"); - - b.Property("TenantId") - .HasColumnType("uniqueidentifier") - .HasColumnName("TenantId"); - - b.Property("WarehouseCode") - .HasColumnType("nvarchar(max)"); - - b.Property("WorkShop") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("Worker") - .HasColumnType("nvarchar(max)"); - - b.HasKey("Id"); - - b.HasIndex("Number") - .IsUnique(); - - b.ToTable("Store_JisProductReceiptNote", (string)null); - }); - - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.JisProductReceiptNoteDetail", b => - { - b.Property("Id") - .HasColumnType("uniqueidentifier"); - - b.Property("ArriveDate") - .HasColumnType("datetime2"); - - b.Property("BomVersion") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("ContainerCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ContainerCode"); - - b.Property("CreationTime") - .HasColumnType("datetime2") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("uniqueidentifier") - .HasColumnName("CreatorId"); - - b.Property("ExpireDate") - .HasColumnType("datetime2"); - - b.Property("ItemCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ItemCode"); - - b.Property("ItemDesc1") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ItemDesc1"); - - b.Property("ItemDesc2") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ItemDesc2"); - - b.Property("ItemName") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ItemName"); - - b.Property("LastModificationTime") - .HasColumnType("datetime2") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("uniqueidentifier") - .HasColumnName("LastModifierId"); - - b.Property("LocationArea") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("LocationArea"); - - b.Property("LocationCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("LocationCode"); - - b.Property("LocationErpCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("LocationErpCode"); - - b.Property("LocationGroup") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("LocationGroup"); - - b.Property("Lot") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("Lot"); - - b.Property("MasterID") - .HasColumnType("uniqueidentifier"); - - b.Property("Number") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("Number"); - - b.Property("PackingCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("PackingCode"); - - b.Property("Position") - .HasColumnType("nvarchar(max)"); - - b.Property("ProdLine") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("ProduceDate") - .HasColumnType("datetime2"); - - b.Property("ProductNo") - .HasColumnType("nvarchar(max)"); - - b.Property("ProjectCode") - .HasColumnType("nvarchar(max)"); - - b.Property("Qty") - .HasPrecision(18, 6) - .HasColumnType("decimal(18,6)") - .HasColumnName("Qty"); - - b.Property("RawLocationCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("Remark") - .HasMaxLength(3072) - .HasColumnType("nvarchar(3072)") - .HasColumnName("Remark"); - - b.Property("SeqNo") - .HasColumnType("nvarchar(max)"); - - b.Property("Status") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("StdPackQty") - .HasColumnType("decimal(18,6)"); - - b.Property("SupplierBatch") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("SupplierBatch"); - - b.Property("TenantId") - .HasColumnType("uniqueidentifier") - .HasColumnName("TenantId"); - - b.Property("Uom") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("Uom"); - - b.Property("WarehouseCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("WarehouseCode"); - - b.Property("Year") - .HasColumnType("nvarchar(max)"); - - b.HasKey("Id"); - - b.HasIndex("MasterID"); - - b.HasIndex("Number", "PackingCode") - .IsUnique(); - - b.ToTable("Store_JisProductReceiptNoteDetail", (string)null); - }); - - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.MaterialRequest", b => - { - b.Property("Id") - .HasColumnType("uniqueidentifier"); - - b.Property("ActiveDate") - .HasColumnType("datetime2"); - - b.Property("AutoAgree") - .HasColumnType("bit"); - - b.Property("AutoCompleteJob") - .HasColumnType("bit"); - - b.Property("AutoHandle") - .HasColumnType("bit"); - - b.Property("AutoSubmit") - .HasColumnType("bit"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("nvarchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime2") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("uniqueidentifier") - .HasColumnName("CreatorId"); - - b.Property("DirectCreateNote") - .HasColumnType("bit"); - - b.Property("ExtraProperties") - .HasColumnType("nvarchar(max)") - .HasColumnName("ExtraProperties"); - - b.Property("LastModificationTime") - .HasColumnType("datetime2") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("uniqueidentifier") - .HasColumnName("LastModifierId"); - - b.Property("Number") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("Number"); - - b.Property("PreparationPlanNumber") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("ProdLine") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("Remark") - .HasMaxLength(3072) - .HasColumnType("nvarchar(3072)") - .HasColumnName("Remark"); - - b.Property("RequestStatus") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("TenantId") - .HasColumnType("uniqueidentifier") - .HasColumnName("TenantId"); - - b.Property("Type") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("UseOnTheWayLocation") - .HasColumnType("bit"); - - b.Property("Worker") - .HasColumnType("nvarchar(max)"); - - b.Property("Workshop") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.HasKey("Id"); - - b.HasIndex("Number") - .IsUnique(); - - b.ToTable("Store_MaterialRequest", (string)null); - }); - - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.MaterialRequestDetail", b => - { - b.Property("Id") - .HasColumnType("uniqueidentifier"); - - b.Property("CreationTime") - .HasColumnType("datetime2") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("uniqueidentifier") - .HasColumnName("CreatorId"); - - b.Property("ExpiredTime") - .HasColumnType("datetime2"); - - b.Property("FromLocationArea") - .HasColumnType("nvarchar(max)"); - - b.Property("IssuedQty") - .HasPrecision(18, 6) - .HasColumnType("decimal(18,6)"); - - b.Property("ItemCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ItemCode"); - - b.Property("ItemDesc1") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ItemDesc1"); - - b.Property("ItemDesc2") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ItemDesc2"); - - b.Property("ItemName") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ItemName"); - - b.Property("LastModificationTime") - .HasColumnType("datetime2") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("uniqueidentifier") - .HasColumnName("LastModifierId"); - - b.Property("MasterID") - .HasColumnType("uniqueidentifier"); - - b.Property("Number") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("Number"); - - b.Property("ProdLine") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("Qty") - .HasPrecision(18, 6) - .HasColumnType("decimal(18,6)") - .HasColumnName("Qty"); - - b.Property("ReceivedQty") - .HasPrecision(18, 6) - .HasColumnType("decimal(18,6)"); - - b.Property("Remark") - .HasMaxLength(3072) - .HasColumnType("nvarchar(3072)") - .HasColumnName("Remark"); - - b.Property("Status") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("StdPackQty") - .HasColumnType("decimal(18,6)"); - - b.Property("TenantId") - .HasColumnType("uniqueidentifier") - .HasColumnName("TenantId"); - - b.Property("ToLocationArea") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("ToLocationCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("ToLocationErpCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("ToLocationGroup") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("ToWarehouseCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("Uom") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("Uom"); - - b.Property("WorkStation") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.HasKey("Id"); - - b.HasIndex("ItemCode"); - - b.HasIndex("MasterID"); - - b.HasIndex("Number", "ItemCode", "ToLocationCode") - .IsUnique(); - - b.ToTable("Store_MaterialRequestDetail", (string)null); - }); - - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.NoOkConvertOkNote", b => - { - b.Property("Id") - .HasColumnType("uniqueidentifier"); - - b.Property("ActiveDate") - .HasColumnType("datetime2"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("nvarchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime2") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("uniqueidentifier") - .HasColumnName("CreatorId"); - - b.Property("ExtraProperties") - .HasColumnType("nvarchar(max)") - .HasColumnName("ExtraProperties"); - - b.Property("LastModificationTime") - .HasColumnType("datetime2") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("uniqueidentifier") - .HasColumnName("LastModifierId"); - - b.Property("Number") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("Number"); - - b.Property("Remark") - .HasMaxLength(3072) - .HasColumnType("nvarchar(3072)") - .HasColumnName("Remark"); - - b.Property("TenantId") - .HasColumnType("uniqueidentifier") - .HasColumnName("TenantId"); - - b.Property("Worker") - .HasColumnType("nvarchar(max)"); - - b.HasKey("Id"); - - b.HasIndex("Number") - .IsUnique(); - - b.ToTable("Store_NoOkConvertOkNote", (string)null); - }); - - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.NoOkConvertOkNoteDetail", b => - { - b.Property("Id") - .HasColumnType("uniqueidentifier"); - - b.Property("ArriveDate") - .HasColumnType("datetime2"); - - b.Property("CreationTime") - .HasColumnType("datetime2") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("uniqueidentifier") - .HasColumnName("CreatorId"); - - b.Property("ExpireDate") - .HasColumnType("datetime2"); - - b.Property("FromContainerCode") - .HasColumnType("nvarchar(max)"); - - b.Property("FromLocationArea") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("FromLocationArea"); - - b.Property("FromLocationCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("FromLocationCode"); - - b.Property("FromLocationErpCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("FromLocationErpCode"); - - b.Property("FromLocationGroup") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("FromLocationGroup"); - - b.Property("FromLot") - .HasColumnType("nvarchar(max)"); - - b.Property("FromPackingCode") - .HasColumnType("nvarchar(450)"); - - b.Property("FromStatus") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("FromWarehouseCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("FromWarehouseCode"); - - b.Property("ItemCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ItemCode"); - - b.Property("ItemDesc1") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ItemDesc1"); - - b.Property("ItemDesc2") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ItemDesc2"); - - b.Property("ItemName") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ItemName"); - - b.Property("LastModificationTime") - .HasColumnType("datetime2") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("uniqueidentifier") - .HasColumnName("LastModifierId"); - - b.Property("MasterID") - .HasColumnType("uniqueidentifier"); - - b.Property("Number") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("Number"); - - b.Property("ProduceDate") - .HasColumnType("datetime2"); - - b.Property("Qty") - .HasPrecision(18, 6) - .HasColumnType("decimal(18,6)") - .HasColumnName("Qty"); - - b.Property("Remark") - .HasMaxLength(3072) - .HasColumnType("nvarchar(3072)") - .HasColumnName("Remark"); - - b.Property("StdPackQty") - .HasColumnType("decimal(18,6)"); - - b.Property("SupplierBatch") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("SupplierBatch"); - - b.Property("TenantId") - .HasColumnType("uniqueidentifier") - .HasColumnName("TenantId"); - - b.Property("ToContainerCode") - .HasColumnType("nvarchar(max)"); - - b.Property("ToLocationArea") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ToLocationArea"); - - b.Property("ToLocationCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ToLocationCode"); - - b.Property("ToLocationErpCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ToLocationErpCode"); - - b.Property("ToLocationGroup") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ToLocationGroup"); - - b.Property("ToLot") - .HasColumnType("nvarchar(max)"); - - b.Property("ToPackingCode") - .HasColumnType("nvarchar(max)"); - - b.Property("ToStatus") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("ToWarehouseCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ToWarehouseCode"); - - b.Property("Uom") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("Uom"); - - b.HasKey("Id"); - - b.HasIndex("MasterID"); - - b.HasIndex("Number", "FromPackingCode", "FromLocationCode", "ToLocationCode") - .IsUnique() - .HasFilter("[FromPackingCode] IS NOT NULL"); - - b.ToTable("Store_NoOkConvertOkNoteDetail", (string)null); - }); - - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.OfflineSettlementNote", b => - { - b.Property("Id") - .HasColumnType("uniqueidentifier"); - - b.Property("ActiveDate") - .HasColumnType("datetime2"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("nvarchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime2") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("uniqueidentifier") - .HasColumnName("CreatorId"); - - b.Property("ExtraProperties") - .HasColumnType("nvarchar(max)") - .HasColumnName("ExtraProperties"); - - b.Property("JobNumber") - .HasColumnType("nvarchar(max)"); - - b.Property("LastModificationTime") - .HasColumnType("datetime2") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("uniqueidentifier") - .HasColumnName("LastModifierId"); - - b.Property("Number") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("Number"); - - b.Property("ProductReceiptNumber") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("Remark") - .HasMaxLength(3072) - .HasColumnType("nvarchar(3072)") - .HasColumnName("Remark"); - - b.Property("TenantId") - .HasColumnType("uniqueidentifier") - .HasColumnName("TenantId"); - - b.Property("Worker") - .HasColumnType("nvarchar(max)"); - - b.HasKey("Id"); - - b.HasIndex("Number") - .IsUnique(); - - b.ToTable("Store_OfflineSettlementNote", (string)null); - }); - - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.OfflineSettlementNoteDetail", b => - { - b.Property("Id") - .HasColumnType("uniqueidentifier"); - - b.Property("ArriveDate") - .HasColumnType("datetime2"); - - b.Property("ContainerCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ContainerCode"); - - b.Property("CreationTime") - .HasColumnType("datetime2") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("uniqueidentifier") - .HasColumnName("CreatorId"); - - b.Property("ExpireDate") - .HasColumnType("datetime2"); - - b.Property("ItemCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ItemCode"); - - b.Property("ItemDesc1") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ItemDesc1"); - - b.Property("ItemDesc2") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ItemDesc2"); - - b.Property("ItemName") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ItemName"); - - b.Property("LastModificationTime") - .HasColumnType("datetime2") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("uniqueidentifier") - .HasColumnName("LastModifierId"); - - b.Property("LocationArea") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("LocationArea"); - - b.Property("LocationCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("LocationCode"); - - b.Property("LocationErpCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("LocationErpCode"); - - b.Property("LocationGroup") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("LocationGroup"); - - b.Property("Lot") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("Lot"); - - b.Property("MasterID") - .HasColumnType("uniqueidentifier"); - - b.Property("Number") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("Number"); - - b.Property("PackingCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("PackingCode"); - - b.Property("ProduceDate") - .HasColumnType("datetime2"); - - b.Property("Qty") - .HasPrecision(18, 6) - .HasColumnType("decimal(18,6)") - .HasColumnName("Qty"); - - b.Property("Remark") - .HasMaxLength(3072) - .HasColumnType("nvarchar(3072)") - .HasColumnName("Remark"); - - b.Property("Status") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("StdPackQty") - .HasColumnType("decimal(18,6)"); - - b.Property("SupplierBatch") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("SupplierBatch"); - - b.Property("TenantId") - .HasColumnType("uniqueidentifier") - .HasColumnName("TenantId"); - - b.Property("Uom") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("Uom"); - - b.Property("WarehouseCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("WarehouseCode"); - - b.HasKey("Id"); - - b.HasIndex("MasterID"); - - b.HasIndex("Number") - .IsUnique(); - - b.ToTable("Store_OfflineSettlementNoteDetail", (string)null); - }); - - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.PreparationPlan", b => - { - b.Property("Id") - .HasColumnType("uniqueidentifier"); - - b.Property("ActiveDate") - .HasColumnType("datetime2"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("nvarchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime2") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("uniqueidentifier") - .HasColumnName("CreatorId"); - - b.Property("ExtraProperties") - .HasColumnType("nvarchar(max)") - .HasColumnName("ExtraProperties"); - - b.Property("LastModificationTime") - .HasColumnType("datetime2") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("uniqueidentifier") - .HasColumnName("LastModifierId"); - - b.Property("Number") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("Number"); - - b.Property("PlanDate") - .HasColumnType("datetime2"); - - b.Property("PlanTime") - .HasColumnType("datetime2"); - - b.Property("ProdLine") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("ProductionPlanNumber") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("Remark") - .HasMaxLength(3072) - .HasColumnType("nvarchar(3072)") - .HasColumnName("Remark"); - - b.Property("Shift") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("Status") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("Team") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("TenantId") - .HasColumnType("uniqueidentifier") - .HasColumnName("TenantId"); - - b.Property("Worker") - .HasColumnType("nvarchar(max)"); - - b.Property("Workshop") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.HasKey("Id"); - - b.HasIndex("Number") - .IsUnique(); - - b.ToTable("Store_PreparationPlan", (string)null); - }); - - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.PreparationPlanDetail", b => - { - b.Property("Id") - .HasColumnType("uniqueidentifier"); - - b.Property("CreationTime") - .HasColumnType("datetime2") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("uniqueidentifier") - .HasColumnName("CreatorId"); - - b.Property("ItemCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ItemCode"); - - b.Property("ItemDesc1") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ItemDesc1"); - - b.Property("ItemDesc2") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ItemDesc2"); - - b.Property("ItemName") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ItemName"); - - b.Property("LastModificationTime") - .HasColumnType("datetime2") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("uniqueidentifier") - .HasColumnName("LastModifierId"); - - b.Property("LatestTime") - .HasColumnType("datetime2"); - - b.Property("LineStatus") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("MasterID") - .HasColumnType("uniqueidentifier"); - - b.Property("Number") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("Number"); - - b.Property("Qty") - .HasPrecision(18, 6) - .HasColumnType("decimal(18,6)") - .HasColumnName("Qty"); - - b.Property("Remark") - .HasMaxLength(3072) - .HasColumnType("nvarchar(3072)") - .HasColumnName("Remark"); - - b.Property("StdPackQty") - .HasColumnType("decimal(18,6)"); - - b.Property("TenantId") - .HasColumnType("uniqueidentifier") - .HasColumnName("TenantId"); - - b.Property("ToLocationCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("Uom") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("Uom"); - - b.Property("WorkStation") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.HasKey("Id"); - - b.HasIndex("MasterID"); - - b.HasIndex("Number", "ItemCode") - .IsUnique(); - - b.ToTable("Store_PreparationPlanDetail", (string)null); - }); - - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ProductionPlan", b => - { - b.Property("Id") - .HasColumnType("uniqueidentifier"); - - b.Property("ActiveDate") - .HasColumnType("datetime2"); - - b.Property("AutoAgree") - .HasColumnType("bit"); - - b.Property("AutoCompleteJob") - .HasColumnType("bit"); - - b.Property("AutoHandle") - .HasColumnType("bit"); - - b.Property("AutoSubmit") - .HasColumnType("bit"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("nvarchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime2") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("uniqueidentifier") - .HasColumnName("CreatorId"); - - b.Property("DirectCreateNote") - .HasColumnType("bit"); - - b.Property("ExtraProperties") - .HasColumnType("nvarchar(max)") - .HasColumnName("ExtraProperties"); - - b.Property("LastModificationTime") - .HasColumnType("datetime2") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("uniqueidentifier") - .HasColumnName("LastModifierId"); - - b.Property("Number") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("Number"); - - b.Property("PlanDate") - .HasColumnType("datetime2"); - - b.Property("PlanTime") - .HasColumnType("datetime2"); - - b.Property("ProdLine") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("Remark") - .HasMaxLength(3072) - .HasColumnType("nvarchar(3072)") - .HasColumnName("Remark"); - - b.Property("RequestStatus") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("Shift") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("Team") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("TenantId") - .HasColumnType("uniqueidentifier") - .HasColumnName("TenantId"); - - b.Property("Worker") - .HasColumnType("nvarchar(max)"); - - b.Property("Workshop") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.HasKey("Id"); - - b.HasIndex("Number") - .IsUnique(); - - b.ToTable("Store_ProductionPlan", (string)null); - }); - - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ProductionPlanDetail", b => - { - b.Property("Id") - .HasColumnType("uniqueidentifier"); - - b.Property("ArriveDate") - .HasColumnType("datetime2"); - - b.Property("BomVersion") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("CreationTime") - .HasColumnType("datetime2") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("uniqueidentifier") - .HasColumnName("CreatorId"); - - b.Property("ExpireDate") - .HasColumnType("datetime2"); - - b.Property("GoodQty") - .ValueGeneratedOnAdd() - .HasColumnType("decimal(18,6)") - .HasDefaultValue(1m); - - b.Property("ItemCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ItemCode"); - - b.Property("ItemDesc1") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ItemDesc1"); - - b.Property("ItemDesc2") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ItemDesc2"); - - b.Property("ItemName") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ItemName"); - - b.Property("LastModificationTime") - .HasColumnType("datetime2") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("uniqueidentifier") - .HasColumnName("LastModifierId"); - - b.Property("LineStatus") - .HasColumnType("int"); - - b.Property("Lot") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("Lot"); - - b.Property("MasterID") - .HasColumnType("uniqueidentifier"); - - b.Property("NoGoodQty") - .ValueGeneratedOnAdd() - .HasColumnType("decimal(18,6)") - .HasDefaultValue(1m); - - b.Property("Number") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("Number"); - - b.Property("PlanQty") - .HasColumnType("decimal(18,6)"); - - b.Property("ProduceDate") - .HasColumnType("datetime2"); - - b.Property("Remark") - .HasMaxLength(3072) - .HasColumnType("nvarchar(3072)") - .HasColumnName("Remark"); - - b.Property("SupplierBatch") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("SupplierBatch"); - - b.Property("TenantId") - .HasColumnType("uniqueidentifier") - .HasColumnName("TenantId"); - - b.Property("Uom") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.HasKey("Id"); - - b.HasIndex("MasterID"); - - b.HasIndex("Number", "ItemCode") - .IsUnique(); - - b.ToTable("Store_ProductionPlanDetail", (string)null); - }); - - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ProductionReturnJob", b => - { - b.Property("Id") - .HasColumnType("uniqueidentifier"); - - b.Property("AcceptTime") - .HasColumnType("datetime2"); - - b.Property("AcceptUserId") - .HasColumnType("uniqueidentifier"); - - b.Property("AcceptUserName") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("CompleteTime") - .HasColumnType("datetime2"); - - b.Property("CompleteUserId") - .HasColumnType("uniqueidentifier"); - - b.Property("CompleteUserName") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("nvarchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime2") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("uniqueidentifier") - .HasColumnName("CreatorId"); - - b.Property("ExtraProperties") - .HasColumnType("nvarchar(max)") - .HasColumnName("ExtraProperties"); - - b.Property("IsAutoComplete") - .ValueGeneratedOnAdd() - .HasColumnType("bit") - .HasDefaultValue(false); - - b.Property("JobDescription") - .HasMaxLength(1024) - .HasColumnType("nvarchar(1024)"); - - b.Property("JobStatus") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("JobType") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("LastModificationTime") - .HasColumnType("datetime2") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("uniqueidentifier") - .HasColumnName("LastModifierId"); - - b.Property("Number") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("Priority") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasDefaultValue(0); - - b.Property("PriorityIncrement") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasDefaultValue(0); - - b.Property("ProductionReturnRequestNumber") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("Remark") - .HasMaxLength(3072) - .HasColumnType("nvarchar(3072)") - .HasColumnName("Remark"); - - b.Property("TenantId") - .HasColumnType("uniqueidentifier") - .HasColumnName("TenantId"); - - b.Property("UpStreamJobNumber") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("WarehouseCode") - .HasColumnType("nvarchar(max)"); - - b.Property("WorkGroupCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("Worker") - .HasColumnType("nvarchar(max)"); - - b.HasKey("Id"); - - b.HasIndex("Number") - .IsUnique(); - - b.ToTable("Job_ProductionReturnJob", (string)null); - }); - - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ProductionReturnJobDetail", b => - { - b.Property("Id") - .HasColumnType("uniqueidentifier"); - - b.Property("CreationTime") - .HasColumnType("datetime2") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("uniqueidentifier") - .HasColumnName("CreatorId"); - - b.Property("FromLocationArea") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("FromLocationCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("FromLocationErpCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("FromLocationGroup") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("FromWarehouseCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("HandledArriveDate") - .HasColumnType("datetime2"); - - b.Property("HandledContainerCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("HandledContainerCode"); - - b.Property("HandledExpireDate") - .HasColumnType("datetime2"); - - b.Property("HandledLot") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("HandledLot"); - - b.Property("HandledPackingCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("HandledPackingCode"); - - b.Property("HandledProduceDate") - .HasColumnType("datetime2"); - - b.Property("HandledQty") - .HasColumnType("decimal(18,6)"); - - b.Property("HandledSupplierBatch") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("HandledSupplierBatch"); - - b.Property("HandledToLocationArea") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("HandledToLocationArea"); - - b.Property("HandledToLocationCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("HandledToLocationCode"); - - b.Property("HandledToLocationErpCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("HandledToLocationErpCode"); - - b.Property("HandledToLocationGroup") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("HandledToLocationGroup"); - - b.Property("HandledToWarehouseCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("HandledToWarehouseCode"); - - b.Property("ItemCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ItemCode"); - - b.Property("ItemDesc1") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ItemDesc1"); - - b.Property("ItemDesc2") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ItemDesc2"); - - b.Property("ItemName") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ItemName"); - - b.Property("LastModificationTime") - .HasColumnType("datetime2") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("uniqueidentifier") - .HasColumnName("LastModifierId"); - - b.Property("MasterID") - .HasColumnType("uniqueidentifier"); - - b.Property("Number") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("RecommendArriveDate") - .HasColumnType("datetime2"); - - b.Property("RecommendContainerCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendContainerCode"); - - b.Property("RecommendExpireDate") - .HasColumnType("datetime2"); - - b.Property("RecommendLot") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendLot"); - - b.Property("RecommendPackingCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendPackingCode"); - - b.Property("RecommendProduceDate") - .HasColumnType("datetime2"); - - b.Property("RecommendQty") - .HasColumnType("decimal(18,6)"); - - b.Property("RecommendSupplierBatch") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendSupplierBatch"); - - b.Property("RecommendToLocationArea") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendToLocationArea"); - - b.Property("RecommendToLocationCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendToLocationCode"); - - b.Property("RecommendToLocationErpCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendToLocationErpCode"); - - b.Property("RecommendToLocationGroup") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendToLocationGroup"); - - b.Property("RecommendToWarehouseCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendToWarehouseCode"); - - b.Property("Remark") - .HasMaxLength(3072) - .HasColumnType("nvarchar(3072)") - .HasColumnName("Remark"); - - b.Property("Status") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("StdPackQty") - .HasColumnType("decimal(18,6)"); - - b.Property("TenantId") - .HasColumnType("uniqueidentifier") - .HasColumnName("TenantId"); - - b.Property("Uom") - .HasColumnType("nvarchar(max)"); - - b.HasKey("Id"); - - b.HasIndex("MasterID"); - - b.ToTable("Job_ProductionReturnJobDetail", (string)null); - }); - - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ProductionReturnNote", b => - { - b.Property("Id") - .HasColumnType("uniqueidentifier"); - - b.Property("ActiveDate") - .HasColumnType("datetime2"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("nvarchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime2") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("uniqueidentifier") - .HasColumnName("CreatorId"); - - b.Property("ExtraProperties") - .HasColumnType("nvarchar(max)") - .HasColumnName("ExtraProperties"); - - b.Property("JobNumber") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("JobNumber"); - - b.Property("LastModificationTime") - .HasColumnType("datetime2") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("uniqueidentifier") - .HasColumnName("LastModifierId"); - - b.Property("Number") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("Number"); - - b.Property("ProductionReturnRequestNumber") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("Remark") - .HasMaxLength(3072) - .HasColumnType("nvarchar(3072)") - .HasColumnName("Remark"); - - b.Property("ReturnTime") - .HasColumnType("datetime2"); - - b.Property("TenantId") - .HasColumnType("uniqueidentifier") - .HasColumnName("TenantId"); - - b.Property("Worker") - .HasColumnType("nvarchar(max)"); - - b.HasKey("Id"); - - b.HasIndex("Number") - .IsUnique(); - - b.ToTable("Store_ProductionReturnNote", (string)null); - }); - - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ProductionReturnNoteDetail", b => - { - b.Property("Id") - .HasColumnType("uniqueidentifier"); - - b.Property("ArriveDate") - .HasColumnType("datetime2"); - - b.Property("CreationTime") - .HasColumnType("datetime2") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("uniqueidentifier") - .HasColumnName("CreatorId"); - - b.Property("ExpireDate") - .HasColumnType("datetime2"); - - b.Property("FromContainerCode") - .HasColumnType("nvarchar(max)"); - - b.Property("FromLocationArea") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("FromLocationArea"); - - b.Property("FromLocationCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("FromLocationCode"); - - b.Property("FromLocationErpCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("FromLocationErpCode"); - - b.Property("FromLocationGroup") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("FromLocationGroup"); - - b.Property("FromLot") - .HasColumnType("nvarchar(max)"); - - b.Property("FromPackingCode") - .HasColumnType("nvarchar(450)"); - - b.Property("FromStatus") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("FromWarehouseCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("FromWarehouseCode"); - - b.Property("HandledArriveDate") - .HasColumnType("datetime2"); - - b.Property("HandledContainerCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("HandledContainerCode"); - - b.Property("HandledExpireDate") - .HasColumnType("datetime2"); - - b.Property("HandledLot") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("HandledLot"); - - b.Property("HandledPackingCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("HandledPackingCode"); - - b.Property("HandledProduceDate") - .HasColumnType("datetime2"); - - b.Property("HandledQty") - .HasColumnType("decimal(18,6)"); - - b.Property("HandledSupplierBatch") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("HandledSupplierBatch"); - - b.Property("HandledToLocationArea") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("HandledToLocationArea"); - - b.Property("HandledToLocationCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("HandledToLocationCode"); - - b.Property("HandledToLocationErpCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("HandledToLocationErpCode"); - - b.Property("HandledToLocationGroup") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("HandledToLocationGroup"); - - b.Property("HandledToWarehouseCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("HandledToWarehouseCode"); - - b.Property("ItemCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ItemCode"); - - b.Property("ItemDesc1") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ItemDesc1"); - - b.Property("ItemDesc2") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ItemDesc2"); - - b.Property("ItemName") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ItemName"); - - b.Property("LastModificationTime") - .HasColumnType("datetime2") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("uniqueidentifier") - .HasColumnName("LastModifierId"); - - b.Property("MasterID") - .HasColumnType("uniqueidentifier"); - - b.Property("Number") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("Number"); - - b.Property("ProduceDate") - .HasColumnType("datetime2"); - - b.Property("Qty") - .HasPrecision(18, 6) - .HasColumnType("decimal(18,6)") - .HasColumnName("Qty"); - - b.Property("RecommendArriveDate") - .HasColumnType("datetime2"); - - b.Property("RecommendContainerCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendContainerCode"); - - b.Property("RecommendExpireDate") - .HasColumnType("datetime2"); - - b.Property("RecommendLot") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendLot"); - - b.Property("RecommendPackingCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendPackingCode"); - - b.Property("RecommendProduceDate") - .HasColumnType("datetime2"); - - b.Property("RecommendQty") - .HasColumnType("decimal(18,6)"); - - b.Property("RecommendSupplierBatch") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendSupplierBatch"); - - b.Property("RecommendToLocationArea") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendToLocationArea"); - - b.Property("RecommendToLocationCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendToLocationCode"); - - b.Property("RecommendToLocationErpCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendToLocationErpCode"); - - b.Property("RecommendToLocationGroup") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendToLocationGroup"); - - b.Property("RecommendToWarehouseCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendToWarehouseCode"); - - b.Property("Remark") - .HasMaxLength(3072) - .HasColumnType("nvarchar(3072)") - .HasColumnName("Remark"); - - b.Property("StdPackQty") - .HasColumnType("decimal(18,6)"); - - b.Property("SupplierBatch") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("SupplierBatch"); - - b.Property("TenantId") - .HasColumnType("uniqueidentifier") - .HasColumnName("TenantId"); - - b.Property("ToContainerCode") - .HasColumnType("nvarchar(max)"); - - b.Property("ToLocationArea") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ToLocationArea"); - - b.Property("ToLocationCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ToLocationCode"); - - b.Property("ToLocationErpCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ToLocationErpCode"); - - b.Property("ToLocationGroup") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ToLocationGroup"); - - b.Property("ToLot") - .HasColumnType("nvarchar(max)"); - - b.Property("ToPackingCode") - .HasColumnType("nvarchar(450)"); - - b.Property("ToStatus") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("ToWarehouseCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ToWarehouseCode"); - - b.Property("Uom") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("Uom"); - - b.HasKey("Id"); - - b.HasIndex("MasterID"); - - b.HasIndex("Number", "ItemCode", "FromPackingCode", "ToPackingCode", "FromLocationCode", "ToLocationCode") - .IsUnique() - .HasFilter("[FromPackingCode] IS NOT NULL AND [ToPackingCode] IS NOT NULL"); - - b.ToTable("Store_ProductionReturnNoteDetail", (string)null); - }); - - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ProductionReturnRequest", b => - { - b.Property("Id") - .HasColumnType("uniqueidentifier"); - - b.Property("ActiveDate") - .HasColumnType("datetime2"); - - b.Property("AutoAgree") - .HasColumnType("bit"); - - b.Property("AutoCompleteJob") - .HasColumnType("bit"); - - b.Property("AutoHandle") - .HasColumnType("bit"); - - b.Property("AutoSubmit") - .HasColumnType("bit"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("nvarchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime2") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("uniqueidentifier") - .HasColumnName("CreatorId"); - - b.Property("DirectCreateNote") - .HasColumnType("bit"); - - b.Property("ExtraProperties") - .HasColumnType("nvarchar(max)") - .HasColumnName("ExtraProperties"); - - b.Property("LastModificationTime") - .HasColumnType("datetime2") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("uniqueidentifier") - .HasColumnName("LastModifierId"); - - b.Property("Number") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("Number"); - - b.Property("Remark") - .HasMaxLength(3072) - .HasColumnType("nvarchar(3072)") - .HasColumnName("Remark"); - - b.Property("RequestStatus") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("TenantId") - .HasColumnType("uniqueidentifier") - .HasColumnName("TenantId"); - - b.Property("Worker") - .HasColumnType("nvarchar(max)"); - - b.HasKey("Id"); - - b.HasIndex("Number") - .IsUnique(); - - b.ToTable("Store_ProductionReturnRequest", (string)null); - }); - - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ProductionReturnRequestDetail", b => - { - b.Property("Id") - .HasColumnType("uniqueidentifier"); - - b.Property("ArriveDate") - .HasColumnType("datetime2"); - - b.Property("CreationTime") - .HasColumnType("datetime2") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("uniqueidentifier") - .HasColumnName("CreatorId"); - - b.Property("ExpireDate") - .HasColumnType("datetime2"); - - b.Property("FromContainerCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("FromLocationArea") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("FromLocationArea"); - - b.Property("FromLocationCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("FromLocationCode"); - - b.Property("FromLocationErpCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("FromLocationErpCode"); - - b.Property("FromLocationGroup") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("FromLocationGroup"); - - b.Property("FromLot") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("FromPackingCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("FromStatus") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("FromWarehouseCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("FromWarehouseCode"); - - b.Property("ItemCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ItemCode"); - - b.Property("ItemDesc1") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ItemDesc1"); - - b.Property("ItemDesc2") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ItemDesc2"); - - b.Property("ItemName") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ItemName"); - - b.Property("LastModificationTime") - .HasColumnType("datetime2") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("uniqueidentifier") - .HasColumnName("LastModifierId"); - - b.Property("MasterID") - .HasColumnType("uniqueidentifier"); - - b.Property("Number") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("Number"); - - b.Property("ProduceDate") - .HasColumnType("datetime2"); - - b.Property("Qty") - .HasPrecision(18, 6) - .HasColumnType("decimal(18,6)") - .HasColumnName("Qty"); - - b.Property("Remark") - .HasMaxLength(3072) - .HasColumnType("nvarchar(3072)") - .HasColumnName("Remark"); - - b.Property("StdPackQty") - .HasColumnType("decimal(18,6)"); - - b.Property("SupplierBatch") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("SupplierBatch"); - - b.Property("TenantId") - .HasColumnType("uniqueidentifier") - .HasColumnName("TenantId"); - - b.Property("ToContainerCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("ToLocationArea") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ToLocationArea"); - - b.Property("ToLocationCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ToLocationCode"); - - b.Property("ToLocationErpCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ToLocationErpCode"); - - b.Property("ToLocationGroup") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ToLocationGroup"); - - b.Property("ToLot") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("ToPackingCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("ToStatus") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("ToWarehouseCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ToWarehouseCode"); - - b.Property("Uom") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("Uom"); - - b.HasKey("Id"); - - b.HasIndex("ItemCode"); - - b.HasIndex("MasterID"); - - b.HasIndex("Number", "ItemCode", "FromLocationCode") - .IsUnique(); - - b.ToTable("Store_ProductionReturnRequestDetail", (string)null); - }); - - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ProductL7PartsNote", b => - { - b.Property("Id") - .HasColumnType("uniqueidentifier"); - - b.Property("ActiveDate") - .HasColumnType("datetime2"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("nvarchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("Configuration") - .HasColumnType("nvarchar(max)"); - - b.Property("ContainerCode") - .HasColumnType("nvarchar(max)"); - - b.Property("CreateDate") - .HasColumnType("datetime2"); - - b.Property("CreationTime") - .HasColumnType("datetime2") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("uniqueidentifier") - .HasColumnName("CreatorId"); - - b.Property("ExtraProperties") - .HasColumnType("nvarchar(max)") - .HasColumnName("ExtraProperties"); - - b.Property("FATA") - .HasColumnType("nvarchar(max)"); - - b.Property("LastModificationTime") - .HasColumnType("datetime2") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("uniqueidentifier") - .HasColumnName("LastModifierId"); - - b.Property("Number") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("Number"); - - b.Property("Position") - .HasColumnType("nvarchar(max)"); - - b.Property("ProductNo") - .HasColumnType("nvarchar(max)"); - - b.Property("Program") - .HasColumnType("nvarchar(max)"); - - b.Property("ReceiptNumber") - .HasColumnType("nvarchar(max)"); - - b.Property("Remark") - .HasMaxLength(3072) - .HasColumnType("nvarchar(3072)") - .HasColumnName("Remark"); - - b.Property("State") - .HasColumnType("int"); - - b.Property("Status") - .HasColumnType("int"); - - b.Property("TenantId") - .HasColumnType("uniqueidentifier") - .HasColumnName("TenantId"); - - b.Property("Worker") - .HasColumnType("nvarchar(max)"); - - b.Property("Year") - .HasColumnType("nvarchar(max)"); - - b.HasKey("Id"); - - b.HasIndex("Number") - .IsUnique(); - - b.ToTable("Store_ProductL7PartsNote", (string)null); - }); - - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ProductL7PartsNoteDetail", b => - { - b.Property("Id") - .HasColumnType("uniqueidentifier"); - - b.Property("CanBuy") - .HasColumnType("bit"); - - b.Property("CanMake") - .HasColumnType("bit"); - - b.Property("Configuration") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("CreateDate") - .HasColumnType("datetime2"); - - b.Property("CreationTime") - .HasColumnType("datetime2") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("uniqueidentifier") - .HasColumnName("CreatorId"); - - b.Property("FATA") - .HasColumnType("nvarchar(max)"); - - b.Property("ItemCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ItemCode"); - - b.Property("ItemDesc1") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ItemDesc1"); - - b.Property("ItemDesc2") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ItemDesc2"); - - b.Property("ItemName") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ItemName"); - - b.Property("L7Part") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("LastModificationTime") - .HasColumnType("datetime2") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("uniqueidentifier") - .HasColumnName("LastModifierId"); - - b.Property("LocationCode") - .HasColumnType("nvarchar(max)"); - - b.Property("MasterID") - .HasColumnType("uniqueidentifier"); - - b.Property("Number") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("Number"); - - b.Property("Position") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("ProdLine") - .HasColumnType("nvarchar(max)"); - - b.Property("ProductNo") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("Program") - .HasColumnType("nvarchar(max)"); - - b.Property("Qty") - .HasColumnType("int"); - - b.Property("RawLocationCode") - .HasColumnType("nvarchar(max)"); - - b.Property("Remark") - .HasMaxLength(3072) - .HasColumnType("nvarchar(3072)") - .HasColumnName("Remark"); - - b.Property("RowID") - .HasColumnType("int"); - - b.Property("State") - .HasColumnType("int"); - - b.Property("TenantId") - .HasColumnType("uniqueidentifier") - .HasColumnName("TenantId"); - - b.HasKey("Id"); - - b.HasIndex("MasterID"); - - b.HasIndex("Number", "ProductNo", "Position", "Configuration", "L7Part") - .IsUnique() - .HasFilter("[ProductNo] IS NOT NULL AND [Position] IS NOT NULL AND [Configuration] IS NOT NULL AND [L7Part] IS NOT NULL"); - - b.ToTable("Store_ProductL7PartsNoteDetail", (string)null); - }); - - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ProductReceiptNote", b => - { - b.Property("Id") - .HasColumnType("uniqueidentifier"); - - b.Property("ActiveDate") - .HasColumnType("datetime2"); - - b.Property("CompleteTime") - .HasColumnType("datetime2"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("nvarchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime2") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("uniqueidentifier") - .HasColumnName("CreatorId"); - - b.Property("ExtraProperties") - .HasColumnType("nvarchar(max)") - .HasColumnName("ExtraProperties"); - - b.Property("JobNumber") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("JobNumber"); - - b.Property("LastModificationTime") - .HasColumnType("datetime2") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("uniqueidentifier") - .HasColumnName("LastModifierId"); - - b.Property("Number") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("Number"); - - b.Property("ProductReceiptRequestNumber") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("ProductionPlanNumber") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("ReceiptType") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("Remark") - .HasMaxLength(3072) - .HasColumnType("nvarchar(3072)") - .HasColumnName("Remark"); - - b.Property("Shift") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("SourceNumber") - .HasColumnType("nvarchar(max)"); - - b.Property("TenantId") - .HasColumnType("uniqueidentifier") - .HasColumnName("TenantId"); - - b.Property("Type") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("WarehouseCode") - .HasColumnType("nvarchar(max)"); - - b.Property("WorkShop") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("Worker") - .HasColumnType("nvarchar(max)"); - - b.HasKey("Id"); - - b.HasIndex("Number") - .IsUnique(); - - b.ToTable("Store_ProductReceiptNote", (string)null); - }); - - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ProductReceiptNoteDetail", b => - { - b.Property("Id") - .HasColumnType("uniqueidentifier"); - - b.Property("ArriveDate") - .HasColumnType("datetime2"); - - b.Property("BomVersion") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("ContainerCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ContainerCode"); - - b.Property("CreationTime") - .HasColumnType("datetime2") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("uniqueidentifier") - .HasColumnName("CreatorId"); - - b.Property("ExpireDate") - .HasColumnType("datetime2"); - - b.Property("HandledArriveDate") - .HasColumnType("datetime2"); - - b.Property("HandledContainerCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("HandledContainerCode"); - - b.Property("HandledExpireDate") - .HasColumnType("datetime2"); - - b.Property("HandledLot") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("HandledLot"); - - b.Property("HandledPackingCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("HandledPackingCode"); - - b.Property("HandledProduceDate") - .HasColumnType("datetime2"); - - b.Property("HandledQty") - .HasColumnType("decimal(18,6)"); - - b.Property("HandledSupplierBatch") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("HandledSupplierBatch"); - - b.Property("HandledToLocationArea") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("HandledToLocationArea"); - - b.Property("HandledToLocationCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("HandledToLocationCode"); - - b.Property("HandledToLocationErpCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("HandledToLocationErpCode"); - - b.Property("HandledToLocationGroup") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("HandledToLocationGroup"); - - b.Property("HandledToWarehouseCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("HandledToWarehouseCode"); - - b.Property("ItemCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ItemCode"); - - b.Property("ItemDesc1") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ItemDesc1"); - - b.Property("ItemDesc2") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ItemDesc2"); - - b.Property("ItemName") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ItemName"); - - b.Property("LastModificationTime") - .HasColumnType("datetime2") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("uniqueidentifier") - .HasColumnName("LastModifierId"); - - b.Property("LocationArea") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("LocationArea"); - - b.Property("LocationCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("LocationCode"); - - b.Property("LocationErpCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("LocationErpCode"); - - b.Property("LocationGroup") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("LocationGroup"); - - b.Property("Lot") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("Lot"); - - b.Property("MasterID") - .HasColumnType("uniqueidentifier"); - - b.Property("Number") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("Number"); - - b.Property("PackingCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("PackingCode"); - - b.Property("ProdLine") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("ProduceDate") - .HasColumnType("datetime2"); - - b.Property("Qty") - .HasPrecision(18, 6) - .HasColumnType("decimal(18,6)") - .HasColumnName("Qty"); - - b.Property("RawArea") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("RawLocationCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("RecommendArriveDate") - .HasColumnType("datetime2"); - - b.Property("RecommendContainerCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendContainerCode"); - - b.Property("RecommendExpireDate") - .HasColumnType("datetime2"); - - b.Property("RecommendLot") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendLot"); - - b.Property("RecommendPackingCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendPackingCode"); - - b.Property("RecommendProduceDate") - .HasColumnType("datetime2"); - - b.Property("RecommendQty") - .HasColumnType("decimal(18,6)"); - - b.Property("RecommendSupplierBatch") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendSupplierBatch"); - - b.Property("RecommendToLocationArea") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendToLocationArea"); - - b.Property("RecommendToLocationCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendToLocationCode"); - - b.Property("RecommendToLocationErpCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendToLocationErpCode"); - - b.Property("RecommendToLocationGroup") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendToLocationGroup"); - - b.Property("RecommendToWarehouseCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendToWarehouseCode"); - - b.Property("Remark") - .HasMaxLength(3072) - .HasColumnType("nvarchar(3072)") - .HasColumnName("Remark"); - - b.Property("ReturnQty") - .ValueGeneratedOnAdd() - .HasColumnType("decimal(18,6)") - .HasDefaultValue(0m); - - b.Property("Status") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("StdPackQty") - .HasColumnType("decimal(18,6)"); - - b.Property("SupplierBatch") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("SupplierBatch"); - - b.Property("TenantId") - .HasColumnType("uniqueidentifier") - .HasColumnName("TenantId"); - - b.Property("Uom") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("Uom"); - - b.Property("WarehouseCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("WarehouseCode"); - - b.HasKey("Id"); - - b.HasIndex("MasterID"); - - b.HasIndex("Number", "ItemCode", "PackingCode", "Lot", "Status") - .IsUnique() - .HasFilter("[Lot] IS NOT NULL"); - - b.ToTable("Store_ProductReceiptNoteDetail", (string)null); - }); - - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ProductReceiptRequest", b => - { - b.Property("Id") - .HasColumnType("uniqueidentifier"); - - b.Property("ActiveDate") - .HasColumnType("datetime2"); - - b.Property("AutoAgree") - .HasColumnType("bit"); - - b.Property("AutoCompleteJob") - .HasColumnType("bit"); - - b.Property("AutoHandle") - .HasColumnType("bit"); - - b.Property("AutoSubmit") - .HasColumnType("bit"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("nvarchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime2") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("uniqueidentifier") - .HasColumnName("CreatorId"); - - b.Property("DirectCreateNote") - .HasColumnType("bit"); - - b.Property("ExtraProperties") - .HasColumnType("nvarchar(max)") - .HasColumnName("ExtraProperties"); - - b.Property("LastModificationTime") - .HasColumnType("datetime2") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("uniqueidentifier") - .HasColumnName("LastModifierId"); - - b.Property("Number") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("Number"); - - b.Property("PlanDate") - .HasColumnType("datetime2"); - - b.Property("ProdLine") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("ProductionPlanNumber") - .HasColumnType("nvarchar(max)"); - - b.Property("Remark") - .HasMaxLength(3072) - .HasColumnType("nvarchar(3072)") - .HasColumnName("Remark"); - - b.Property("RequestStatus") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("Shift") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("Team") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("TenantId") - .HasColumnType("uniqueidentifier") - .HasColumnName("TenantId"); - - b.Property("Type") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("Worker") - .HasColumnType("nvarchar(max)"); - - b.Property("Workshop") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.HasKey("Id"); - - b.HasIndex("Number") - .IsUnique(); - - b.ToTable("Store_ProductReceiptRequest", (string)null); - }); - - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ProductReceiptRequestDetail", b => - { - b.Property("Id") - .HasColumnType("uniqueidentifier"); - - b.Property("ArriveDate") - .HasColumnType("datetime2"); - - b.Property("BomVersion") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("CreationTime") - .HasColumnType("datetime2") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("uniqueidentifier") - .HasColumnName("CreatorId"); - - b.Property("ExpireDate") - .HasColumnType("datetime2"); - - b.Property("ItemCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ItemCode"); - - b.Property("ItemDesc1") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ItemDesc1"); - - b.Property("ItemDesc2") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ItemDesc2"); - - b.Property("ItemName") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ItemName"); - - b.Property("LastModificationTime") - .HasColumnType("datetime2") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("uniqueidentifier") - .HasColumnName("LastModifierId"); - - b.Property("LocationArea") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("LocationArea"); - - b.Property("LocationCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("LocationCode"); - - b.Property("LocationErpCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("LocationErpCode"); - - b.Property("LocationGroup") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("LocationGroup"); - - b.Property("Lot") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("Lot"); - - b.Property("MasterID") - .HasColumnType("uniqueidentifier"); - - b.Property("Number") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("Number"); - - b.Property("ProduceDate") - .HasColumnType("datetime2"); - - b.Property("Qty") - .HasPrecision(18, 6) - .HasColumnType("decimal(18,6)") - .HasColumnName("Qty"); - - b.Property("RawArea") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("Remark") - .HasMaxLength(3072) - .HasColumnType("nvarchar(3072)") - .HasColumnName("Remark"); - - b.Property("ReturnQty") - .ValueGeneratedOnAdd() - .HasColumnType("decimal(18,6)") - .HasDefaultValue(0m); - - b.Property("StdPackQty") - .HasColumnType("decimal(18,6)"); - - b.Property("SupplierBatch") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("SupplierBatch"); - - b.Property("TenantId") - .HasColumnType("uniqueidentifier") - .HasColumnName("TenantId"); - - b.Property("Uom") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("Uom"); - - b.Property("WarehouseCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("WarehouseCode"); - - b.HasKey("Id"); - - b.HasIndex("MasterID"); - - b.HasIndex("Number", "ItemCode", "LocationCode") - .IsUnique(); - - b.ToTable("Store_ProductReceiptRequestDetail", (string)null); - }); - - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ProductReceiveJob", b => - { - b.Property("Id") - .HasColumnType("uniqueidentifier"); - - b.Property("AcceptTime") - .HasColumnType("datetime2"); - - b.Property("AcceptUserId") - .HasColumnType("uniqueidentifier"); - - b.Property("AcceptUserName") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("CompleteTime") - .HasColumnType("datetime2"); - - b.Property("CompleteUserId") - .HasColumnType("uniqueidentifier"); - - b.Property("CompleteUserName") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("nvarchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime2") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("uniqueidentifier") - .HasColumnName("CreatorId"); - - b.Property("ExtraProperties") - .HasColumnType("nvarchar(max)") - .HasColumnName("ExtraProperties"); - - b.Property("IsAutoComplete") - .ValueGeneratedOnAdd() - .HasColumnType("bit") - .HasDefaultValue(false); - - b.Property("JobDescription") - .HasMaxLength(1024) - .HasColumnType("nvarchar(1024)"); - - b.Property("JobStatus") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("JobType") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("LastModificationTime") - .HasColumnType("datetime2") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("uniqueidentifier") - .HasColumnName("LastModifierId"); - - b.Property("Number") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("Priority") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasDefaultValue(0); - - b.Property("PriorityIncrement") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasDefaultValue(0); - - b.Property("ProductionPlanNumber") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("Remark") - .HasMaxLength(3072) - .HasColumnType("nvarchar(3072)") - .HasColumnName("Remark"); - - b.Property("Shift") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("TenantId") - .HasColumnType("uniqueidentifier") - .HasColumnName("TenantId"); - - b.Property("UpStreamJobNumber") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("WarehouseCode") - .HasColumnType("nvarchar(max)"); - - b.Property("WorkGroupCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("Worker") - .HasColumnType("nvarchar(max)"); - - b.Property("Workshop") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.HasKey("Id"); - - b.HasIndex("Number") - .IsUnique(); - - b.ToTable("Job_ProductReceiveJob", (string)null); - }); - - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ProductReceiveJobDetail", b => - { - b.Property("Id") - .HasColumnType("uniqueidentifier"); - - b.Property("CreationTime") - .HasColumnType("datetime2") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("uniqueidentifier") - .HasColumnName("CreatorId"); - - b.Property("HandledArriveDate") - .HasColumnType("datetime2"); - - b.Property("HandledContainerCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("HandledContainerCode"); - - b.Property("HandledExpireDate") - .HasColumnType("datetime2"); - - b.Property("HandledLot") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("HandledLot"); - - b.Property("HandledPackingCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("HandledPackingCode"); - - b.Property("HandledProduceDate") - .HasColumnType("datetime2"); - - b.Property("HandledQty") - .HasColumnType("decimal(18,6)"); - - b.Property("HandledSupplierBatch") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("HandledSupplierBatch"); - - b.Property("HandledToLocationArea") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("HandledToLocationArea"); - - b.Property("HandledToLocationCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("HandledToLocationCode"); - - b.Property("HandledToLocationErpCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("HandledToLocationErpCode"); - - b.Property("HandledToLocationGroup") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("HandledToLocationGroup"); - - b.Property("HandledToWarehouseCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("HandledToWarehouseCode"); - - b.Property("ItemCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ItemCode"); - - b.Property("ItemDesc1") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ItemDesc1"); - - b.Property("ItemDesc2") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ItemDesc2"); - - b.Property("ItemName") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ItemName"); - - b.Property("LastModificationTime") - .HasColumnType("datetime2") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("uniqueidentifier") - .HasColumnName("LastModifierId"); - - b.Property("MasterID") - .HasColumnType("uniqueidentifier"); - - b.Property("Number") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("ProdLine") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("RawLocationCode") - .HasColumnType("nvarchar(max)"); - - b.Property("RecommendArriveDate") - .HasColumnType("datetime2"); - - b.Property("RecommendContainerCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendContainerCode"); - - b.Property("RecommendExpireDate") - .HasColumnType("datetime2"); - - b.Property("RecommendLot") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendLot"); - - b.Property("RecommendPackingCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendPackingCode"); - - b.Property("RecommendProduceDate") - .HasColumnType("datetime2"); - - b.Property("RecommendQty") - .HasColumnType("decimal(18,6)"); - - b.Property("RecommendSupplierBatch") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendSupplierBatch"); - - b.Property("RecommendToLocationArea") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendToLocationArea"); - - b.Property("RecommendToLocationCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendToLocationCode"); - - b.Property("RecommendToLocationErpCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendToLocationErpCode"); - - b.Property("RecommendToLocationGroup") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendToLocationGroup"); - - b.Property("RecommendToWarehouseCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendToWarehouseCode"); - - b.Property("Remark") - .HasMaxLength(3072) - .HasColumnType("nvarchar(3072)") - .HasColumnName("Remark"); - - b.Property("Status") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("StdPackQty") - .HasColumnType("decimal(18,6)"); - - b.Property("TenantId") - .HasColumnType("uniqueidentifier") - .HasColumnName("TenantId"); - - b.Property("Uom") - .HasColumnType("nvarchar(max)"); - - b.HasKey("Id"); - - b.HasIndex("MasterID"); - - b.ToTable("Job_ProductReceiveJobDetail", (string)null); - }); - - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ProductRecycleMaterialDetail", b => - { - b.Property("Id") - .HasColumnType("uniqueidentifier"); - - b.Property("ArriveDate") - .HasColumnType("datetime2"); - - b.Property("BomVersion") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("ContainerCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ContainerCode"); - - b.Property("CreationTime") - .HasColumnType("datetime2") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("uniqueidentifier") - .HasColumnName("CreatorId"); - - b.Property("ExpireDate") - .HasColumnType("datetime2"); - - b.Property("ItemCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ItemCode"); - - b.Property("ItemDesc1") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ItemDesc1"); - - b.Property("ItemDesc2") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ItemDesc2"); - - b.Property("ItemName") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ItemName"); - - b.Property("LastModificationTime") - .HasColumnType("datetime2") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("uniqueidentifier") - .HasColumnName("LastModifierId"); - - b.Property("LocationArea") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("LocationArea"); - - b.Property("LocationCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("LocationCode"); - - b.Property("LocationErpCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("LocationErpCode"); - - b.Property("LocationGroup") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("LocationGroup"); - - b.Property("Lot") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("Lot"); - - b.Property("MasterID") - .HasColumnType("uniqueidentifier"); - - b.Property("Number") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("Number"); - - b.Property("PackingCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("PackingCode"); - - b.Property("ProduceDate") - .HasColumnType("datetime2"); - - b.Property("ProductItemCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("ProductItemDesc1") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("ProductItemDesc2") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("ProductItemName") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("ProductLot") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("ProductPackingCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("Qty") - .HasPrecision(18, 6) - .HasColumnType("decimal(18,6)") - .HasColumnName("Qty"); - - b.Property("Remark") - .HasMaxLength(3072) - .HasColumnType("nvarchar(3072)") - .HasColumnName("Remark"); - - b.Property("Status") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("StdPackQty") - .HasColumnType("decimal(18,6)"); - - b.Property("SupplierBatch") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("SupplierBatch"); - - b.Property("TenantId") - .HasColumnType("uniqueidentifier") - .HasColumnName("TenantId"); - - b.Property("Uom") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("Uom"); - - b.Property("WarehouseCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("WarehouseCode"); - - b.HasKey("Id"); - - b.HasIndex("MasterID"); - - b.HasIndex("Number", "ProductItemCode", "ItemCode"); - - b.ToTable("Store_ProductRecycleMaterialDetail", (string)null); - }); - - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ProductRecycleNote", b => - { - b.Property("Id") - .HasColumnType("uniqueidentifier"); - - b.Property("ActiveDate") - .HasColumnType("datetime2"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("nvarchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime2") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("uniqueidentifier") - .HasColumnName("CreatorId"); - - b.Property("ExtraProperties") - .HasColumnType("nvarchar(max)") - .HasColumnName("ExtraProperties"); - - b.Property("LastModificationTime") - .HasColumnType("datetime2") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("uniqueidentifier") - .HasColumnName("LastModifierId"); - - b.Property("Number") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("Number"); - - b.Property("RecycleTime") - .HasColumnType("datetime2"); - - b.Property("Remark") - .HasMaxLength(3072) - .HasColumnType("nvarchar(3072)") - .HasColumnName("Remark"); - - b.Property("RequestNumber") - .HasColumnType("nvarchar(max)"); - - b.Property("Shift") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("TenantId") - .HasColumnType("uniqueidentifier") - .HasColumnName("TenantId"); - - b.Property("Worker") - .HasColumnType("nvarchar(max)"); - - b.Property("Workshop") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.HasKey("Id"); - - b.HasIndex("Number") - .IsUnique(); - - b.ToTable("Store_ProductRecycleNote", (string)null); - }); - - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ProductRecycleNoteDetail", b => - { - b.Property("Id") - .HasColumnType("uniqueidentifier"); - - b.Property("ArriveDate") - .HasColumnType("datetime2"); - - b.Property("ContainerCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ContainerCode"); - - b.Property("CreationTime") - .HasColumnType("datetime2") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("uniqueidentifier") - .HasColumnName("CreatorId"); - - b.Property("ExpireDate") - .HasColumnType("datetime2"); - - b.Property("ExtraProperties") - .HasColumnType("nvarchar(max)") - .HasColumnName("ExtraProperties"); - - b.Property("ItemCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ItemCode"); - - b.Property("ItemDesc1") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ItemDesc1"); - - b.Property("ItemDesc2") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ItemDesc2"); - - b.Property("ItemName") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ItemName"); - - b.Property("LastModificationTime") - .HasColumnType("datetime2") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("uniqueidentifier") - .HasColumnName("LastModifierId"); - - b.Property("LocationArea") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("LocationArea"); - - b.Property("LocationCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("LocationCode"); - - b.Property("LocationErpCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("LocationErpCode"); - - b.Property("LocationGroup") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("LocationGroup"); - - b.Property("Lot") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("Lot"); - - b.Property("MasterID") - .HasColumnType("uniqueidentifier"); - - b.Property("Number") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("Number"); - - b.Property("PackingCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("PackingCode"); - - b.Property("ProduceDate") - .HasColumnType("datetime2"); - - b.Property("Qty") - .HasPrecision(18, 6) - .HasColumnType("decimal(18,6)") - .HasColumnName("Qty"); - - b.Property("ReasonCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("Remark") - .HasMaxLength(3072) - .HasColumnType("nvarchar(3072)") - .HasColumnName("Remark"); - - b.Property("Status") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("StdPackQty") - .HasColumnType("decimal(18,6)"); - - b.Property("SupplierBatch") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("SupplierBatch"); - - b.Property("TenantId") - .HasColumnType("uniqueidentifier") - .HasColumnName("TenantId"); - - b.Property("Uom") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("Uom"); - - b.Property("WarehouseCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("WarehouseCode"); - - b.HasKey("Id"); - - b.HasIndex("MasterID"); - - b.HasIndex("Number", "ItemCode") - .IsUnique(); - - b.ToTable("Store_ProductRecycleNoteDetail", (string)null); - }); - - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ProductRecycleRequest", b => - { - b.Property("Id") - .HasColumnType("uniqueidentifier"); - - b.Property("ActiveDate") - .HasColumnType("datetime2"); - - b.Property("AutoAgree") - .HasColumnType("bit"); - - b.Property("AutoCompleteJob") - .HasColumnType("bit"); - - b.Property("AutoHandle") - .HasColumnType("bit"); - - b.Property("AutoSubmit") - .HasColumnType("bit"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("nvarchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime2") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("uniqueidentifier") - .HasColumnName("CreatorId"); - - b.Property("DirectCreateNote") - .HasColumnType("bit"); - - b.Property("ExtraProperties") - .HasColumnType("nvarchar(max)") - .HasColumnName("ExtraProperties"); - - b.Property("LastModificationTime") - .HasColumnType("datetime2") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("uniqueidentifier") - .HasColumnName("LastModifierId"); - - b.Property("Number") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("Number"); - - b.Property("Remark") - .HasMaxLength(3072) - .HasColumnType("nvarchar(3072)") - .HasColumnName("Remark"); - - b.Property("RequestStatus") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("Shift") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("TenantId") - .HasColumnType("uniqueidentifier") - .HasColumnName("TenantId"); - - b.Property("Worker") - .HasColumnType("nvarchar(max)"); - - b.Property("Workshop") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.HasKey("Id"); - - b.HasIndex("Number") - .IsUnique(); - - b.ToTable("Store_ProductRecycleRequest", (string)null); - }); - - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ProductRecycleRequestDetail", b => - { - b.Property("Id") - .HasColumnType("uniqueidentifier"); - - b.Property("BomVersion") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("CreationTime") - .HasColumnType("datetime2") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("uniqueidentifier") - .HasColumnName("CreatorId"); - - b.Property("ExtraProperties") - .HasColumnType("nvarchar(max)") - .HasColumnName("ExtraProperties"); - - b.Property("ItemCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ItemCode"); - - b.Property("ItemDesc1") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ItemDesc1"); - - b.Property("ItemDesc2") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ItemDesc2"); - - b.Property("ItemName") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ItemName"); - - b.Property("LastModificationTime") - .HasColumnType("datetime2") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("uniqueidentifier") - .HasColumnName("LastModifierId"); - - b.Property("LocationArea") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("LocationArea"); - - b.Property("LocationCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("LocationCode"); - - b.Property("LocationErpCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("LocationErpCode"); - - b.Property("LocationGroup") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("LocationGroup"); - - b.Property("MasterID") - .HasColumnType("uniqueidentifier"); - - b.Property("Number") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("Number"); - - b.Property("Qty") - .HasPrecision(18, 6) - .HasColumnType("decimal(18,6)") - .HasColumnName("Qty"); - - b.Property("RawLocationArea") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("RawLocationCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("RawLocationErpCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("RawLocationGroup") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("RawWarehouseCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("Remark") - .HasMaxLength(3072) - .HasColumnType("nvarchar(3072)") - .HasColumnName("Remark"); - - b.Property("Status") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("TenantId") - .HasColumnType("uniqueidentifier") - .HasColumnName("TenantId"); - - b.Property("Uom") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("Uom"); - - b.Property("WarehouseCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("WarehouseCode"); - - b.HasKey("Id"); - - b.HasIndex("MasterID"); - - b.HasIndex("Number", "ItemCode") - .IsUnique(); - - b.ToTable("Store_ProductRecycleRequestDetail", (string)null); - }); - - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.PurchaseOrder", b => - { - b.Property("Id") - .HasColumnType("uniqueidentifier"); - - b.Property("ActiveDate") - .HasColumnType("datetime2"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("nvarchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("ContactEmail") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("ContactName") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("ContactPhone") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("CreationTime") - .HasColumnType("datetime2") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("uniqueidentifier") - .HasColumnName("CreatorId"); - - b.Property("DueDate") - .HasColumnType("datetime2"); - - b.Property("ExtraProperties") - .HasColumnType("nvarchar(max)") - .HasColumnName("ExtraProperties"); - - b.Property("IsConsignment") - .ValueGeneratedOnAdd() - .HasColumnType("bit") - .HasDefaultValue(false); - - b.Property("LastModificationTime") - .HasColumnType("datetime2") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("uniqueidentifier") - .HasColumnName("LastModifierId"); - - b.Property("Number") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("Number"); - - b.Property("OrderDate") - .HasColumnType("datetime2"); - - b.Property("OrderStatus") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("PoType") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("Remark") - .HasMaxLength(3072) - .HasColumnType("nvarchar(3072)") - .HasColumnName("Remark"); - - b.Property("SupplierAddress") - .HasColumnType("nvarchar(max)"); - - b.Property("SupplierCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("SupplierName") - .HasColumnType("nvarchar(max)"); - - b.Property("TaxRate") - .ValueGeneratedOnAdd() - .HasColumnType("decimal(18,6)") - .HasDefaultValue(0m); - - b.Property("TenantId") - .HasColumnType("uniqueidentifier") - .HasColumnName("TenantId"); - - b.Property("Version") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("Worker") - .HasColumnType("nvarchar(max)"); - - b.HasKey("Id"); - - b.HasIndex("Number") - .IsUnique(); - - b.ToTable("Store_PurchaseOrder", (string)null); - }); - - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.PurchaseOrderDetail", b => - { - b.Property("Id") - .HasColumnType("uniqueidentifier"); - - b.Property("ConvertRate") - .ValueGeneratedOnAdd() - .HasColumnType("decimal(18,6)") - .HasDefaultValue(1m); - - b.Property("CreationTime") - .HasColumnType("datetime2") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("uniqueidentifier") - .HasColumnName("CreatorId"); - - b.Property("Ctype") - .HasColumnType("nvarchar(max)"); - - b.Property("ExpireDate") - .HasColumnType("datetime2"); - - b.Property("IsConsignment") - .ValueGeneratedOnAdd() - .HasColumnType("bit") - .HasDefaultValue(false); - - b.Property("ItemCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ItemCode"); - - b.Property("ItemDesc1") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ItemDesc1"); - - b.Property("ItemDesc2") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ItemDesc2"); - - b.Property("ItemName") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ItemName"); - - b.Property("LastModificationTime") - .HasColumnType("datetime2") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("uniqueidentifier") - .HasColumnName("LastModifierId"); - - b.Property("LineStatus") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("LocationErpCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("Lot") - .HasColumnType("nvarchar(max)"); - - b.Property("MasterID") - .HasColumnType("uniqueidentifier"); - - b.Property("Number") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("Number"); - - b.Property("OrderRemark") - .HasColumnType("nvarchar(max)"); - - b.Property("PlanArriveDate") - .HasColumnType("datetime2"); - - b.Property("PlanUserCode") - .HasColumnType("nvarchar(max)"); - - b.Property("PoLine") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("ProduceDate") - .HasColumnType("datetime2"); - - b.Property("ProjectCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("PutAwayQty") - .HasColumnType("decimal(18,6)"); - - b.Property("Qty") - .HasPrecision(18, 6) - .HasColumnType("decimal(18,6)") - .HasColumnName("Qty"); - - b.Property("ReceivedQty") - .HasColumnType("decimal(18,6)"); - - b.Property("Remark") - .HasMaxLength(3072) - .HasColumnType("nvarchar(3072)") - .HasColumnName("Remark"); - - b.Property("ReturnedQty") - .HasColumnType("decimal(18,6)"); - - b.Property("ShippedQty") - .HasColumnType("decimal(18,6)"); - - b.Property("StdPackQty") - .HasColumnType("decimal(18,6)"); - - b.Property("SupplierPackQty") - .HasColumnType("decimal(18,6)"); - - b.Property("SupplierPackUom") - .HasColumnType("nvarchar(max)"); - - b.Property("TenantId") - .HasColumnType("uniqueidentifier") - .HasColumnName("TenantId"); - - b.Property("Uom") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("Uom"); - - b.HasKey("Id"); - - b.HasIndex("MasterID"); - - b.HasIndex("ItemCode", "Number", "PoLine") - .IsUnique() - .HasFilter("[PoLine] IS NOT NULL"); - - b.ToTable("Store_PurchaseOrderDetail", (string)null); - }); - - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.PurchaseReceiptJob", b => - { - b.Property("Id") - .HasColumnType("uniqueidentifier"); - - b.Property("AcceptTime") - .HasColumnType("datetime2"); - - b.Property("AcceptUserId") - .HasColumnType("uniqueidentifier"); - - b.Property("AcceptUserName") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("AsnNumber") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("CompleteTime") - .HasColumnType("datetime2"); - - b.Property("CompleteUserId") - .HasColumnType("uniqueidentifier"); - - b.Property("CompleteUserName") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("nvarchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime2") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("uniqueidentifier") - .HasColumnName("CreatorId"); - - b.Property("ExtraProperties") - .HasColumnType("nvarchar(max)") - .HasColumnName("ExtraProperties"); - - b.Property("IsAutoComplete") - .ValueGeneratedOnAdd() - .HasColumnType("bit") - .HasDefaultValue(false); - - b.Property("JobDescription") - .HasMaxLength(1024) - .HasColumnType("nvarchar(1024)"); - - b.Property("JobStatus") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("JobType") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("LastModificationTime") - .HasColumnType("datetime2") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("uniqueidentifier") - .HasColumnName("LastModifierId"); - - b.Property("Number") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("PlanArriveDate") - .HasColumnType("datetime2"); - - b.Property("PoNumber") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("Priority") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasDefaultValue(0); - - b.Property("PriorityIncrement") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasDefaultValue(0); - - b.Property("PurchaseReceiptRequestNumber") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("Remark") - .HasMaxLength(3072) - .HasColumnType("nvarchar(3072)") - .HasColumnName("Remark"); - - b.Property("RpNumber") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("SupplierAddress") - .HasColumnType("nvarchar(max)"); - - b.Property("SupplierCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("SupplierName") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("TenantId") - .HasColumnType("uniqueidentifier") - .HasColumnName("TenantId"); - - b.Property("TimeWindow") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("Type") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("UpStreamJobNumber") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("WarehouseCode") - .HasColumnType("nvarchar(max)"); - - b.Property("WorkGroupCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("Worker") - .HasColumnType("nvarchar(max)"); - - b.HasKey("Id"); - - b.HasIndex("Number") - .IsUnique(); - - b.ToTable("Job_PurchaseReceiptJob", (string)null); - }); - - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.PurchaseReceiptJobDetail", b => - { - b.Property("Id") - .HasColumnType("uniqueidentifier"); - - b.Property("ArriveDate") - .HasColumnType("datetime2"); - - b.Property("CreationTime") - .HasColumnType("datetime2") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("uniqueidentifier") - .HasColumnName("CreatorId"); - - b.Property("FailedReason") - .HasColumnType("nvarchar(max)"); - - b.Property("HandledArriveDate") - .HasColumnType("datetime2"); - - b.Property("HandledContainerCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("HandledContainerCode"); - - b.Property("HandledExpireDate") - .HasColumnType("datetime2"); - - b.Property("HandledLot") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("HandledLot"); - - b.Property("HandledPackingCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("HandledPackingCode"); - - b.Property("HandledProduceDate") - .HasColumnType("datetime2"); - - b.Property("HandledQty") - .HasColumnType("decimal(18,6)"); - - b.Property("HandledSupplierBatch") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("HandledSupplierBatch"); - - b.Property("HandledToLocationArea") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("HandledToLocationArea"); - - b.Property("HandledToLocationCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("HandledToLocationCode"); - - b.Property("HandledToLocationErpCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("HandledToLocationErpCode"); - - b.Property("HandledToLocationGroup") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("HandledToLocationGroup"); - - b.Property("HandledToWarehouseCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("HandledToWarehouseCode"); - - b.Property("InspectPhotoJson") - .HasColumnType("nvarchar(max)"); - - b.Property("ItemCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ItemCode"); - - b.Property("ItemDesc1") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ItemDesc1"); - - b.Property("ItemDesc2") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ItemDesc2"); - - b.Property("ItemName") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ItemName"); - - b.Property("LastModificationTime") - .HasColumnType("datetime2") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("uniqueidentifier") - .HasColumnName("LastModifierId"); - - b.Property("MassDefect") - .HasColumnType("nvarchar(max)"); - - b.Property("MasterID") - .HasColumnType("uniqueidentifier"); - - b.Property("Number") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("PoLine") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("PoNumber") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("PurchaseReceiptInspectStatus") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("RecommendArriveDate") - .HasColumnType("datetime2"); - - b.Property("RecommendContainerCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendContainerCode"); - - b.Property("RecommendExpireDate") - .HasColumnType("datetime2"); - - b.Property("RecommendLot") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendLot"); - - b.Property("RecommendPackingCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendPackingCode"); - - b.Property("RecommendProduceDate") - .HasColumnType("datetime2"); - - b.Property("RecommendQty") - .HasColumnType("decimal(18,6)"); - - b.Property("RecommendSupplierBatch") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendSupplierBatch"); - - b.Property("RecommendToLocationArea") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendToLocationArea"); - - b.Property("RecommendToLocationCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendToLocationCode"); - - b.Property("RecommendToLocationErpCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendToLocationErpCode"); - - b.Property("RecommendToLocationGroup") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendToLocationGroup"); - - b.Property("RecommendToWarehouseCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendToWarehouseCode"); - - b.Property("Remark") - .HasMaxLength(3072) - .HasColumnType("nvarchar(3072)") - .HasColumnName("Remark"); - - b.Property("Status") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("StdPackQty") - .HasColumnType("decimal(18,6)"); - - b.Property("SupplierPackQty") - .HasColumnType("decimal(18,6)"); - - b.Property("SupplierPackUom") - .HasColumnType("nvarchar(max)"); - - b.Property("TenantId") - .HasColumnType("uniqueidentifier") - .HasColumnName("TenantId"); - - b.Property("Uom") - .HasColumnType("nvarchar(max)"); - - b.HasKey("Id"); - - b.HasIndex("MasterID"); - - b.ToTable("Job_PurchaseReceiptJobDetail", (string)null); - }); - - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.PurchaseReceiptNote", b => - { - b.Property("Id") - .HasColumnType("uniqueidentifier"); - - b.Property("ActiveDate") - .HasColumnType("datetime2"); - - b.Property("AsnNumber") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("nvarchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime2") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("uniqueidentifier") - .HasColumnName("CreatorId"); - - b.Property("ExtraProperties") - .HasColumnType("nvarchar(max)") - .HasColumnName("ExtraProperties"); - - b.Property("JobNumber") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("JobNumber"); - - b.Property("LastModificationTime") - .HasColumnType("datetime2") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("uniqueidentifier") - .HasColumnName("LastModifierId"); - - b.Property("Number") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("Number"); - - b.Property("PoNumber") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("PurchaseReceiptRequestNumber") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("ReceiveTime") - .HasColumnType("datetime2"); - - b.Property("Remark") - .HasMaxLength(3072) - .HasColumnType("nvarchar(3072)") - .HasColumnName("Remark"); - - b.Property("RpNumber") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("Status") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("SupplierAddress") - .HasColumnType("nvarchar(max)"); - - b.Property("SupplierCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("SupplierName") - .HasColumnType("nvarchar(max)"); - - b.Property("TenantId") - .HasColumnType("uniqueidentifier") - .HasColumnName("TenantId"); - - b.Property("Type") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("WarehouseCode") - .HasColumnType("nvarchar(max)"); - - b.Property("Worker") - .HasColumnType("nvarchar(max)"); - - b.HasKey("Id"); - - b.HasIndex("Number") - .IsUnique(); - - b.HasIndex("SupplierCode"); - - b.ToTable("Store_PurchaseReceiptNote", (string)null); - }); - - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.PurchaseReceiptNoteDetail", b => - { - b.Property("Id") - .HasColumnType("uniqueidentifier"); - - b.Property("ArriveDate") - .HasColumnType("datetime2"); - - b.Property("ContainerCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ContainerCode"); - - b.Property("CreationTime") - .HasColumnType("datetime2") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("uniqueidentifier") - .HasColumnName("CreatorId"); - - b.Property("ExpireDate") - .HasColumnType("datetime2"); - - b.Property("FailedReason") - .HasColumnType("nvarchar(max)"); - - b.Property("HandledArriveDate") - .HasColumnType("datetime2"); - - b.Property("HandledContainerCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("HandledContainerCode"); - - b.Property("HandledExpireDate") - .HasColumnType("datetime2"); - - b.Property("HandledLot") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("HandledLot"); - - b.Property("HandledPackingCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("HandledPackingCode"); - - b.Property("HandledProduceDate") - .HasColumnType("datetime2"); - - b.Property("HandledQty") - .HasColumnType("decimal(18,6)"); - - b.Property("HandledSupplierBatch") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("HandledSupplierBatch"); - - b.Property("HandledToLocationArea") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("HandledToLocationArea"); - - b.Property("HandledToLocationCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("HandledToLocationCode"); - - b.Property("HandledToLocationErpCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("HandledToLocationErpCode"); - - b.Property("HandledToLocationGroup") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("HandledToLocationGroup"); - - b.Property("HandledToWarehouseCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("HandledToWarehouseCode"); - - b.Property("InspectPhotoJson") - .HasColumnType("nvarchar(max)"); - - b.Property("ItemCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ItemCode"); - - b.Property("ItemDesc1") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ItemDesc1"); - - b.Property("ItemDesc2") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ItemDesc2"); - - b.Property("ItemName") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ItemName"); - - b.Property("LastModificationTime") - .HasColumnType("datetime2") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("uniqueidentifier") - .HasColumnName("LastModifierId"); - - b.Property("LocationArea") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("LocationArea"); - - b.Property("LocationCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("LocationCode"); - - b.Property("LocationErpCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("LocationErpCode"); - - b.Property("LocationGroup") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("LocationGroup"); - - b.Property("Lot") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("Lot"); - - b.Property("MassDefect") - .HasColumnType("nvarchar(max)"); - - b.Property("MasterID") - .HasColumnType("uniqueidentifier"); - - b.Property("Number") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("Number"); - - b.Property("PackingCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("PackingCode"); - - b.Property("PoLine") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("PoLine"); - - b.Property("PoNumber") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("PoNumber"); - - b.Property("ProduceDate") - .HasColumnType("datetime2"); - - b.Property("PurchaseReceiptInspectStatus") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("Qty") - .HasPrecision(18, 6) - .HasColumnType("decimal(18,6)") - .HasColumnName("Qty"); - - b.Property("RecommendArriveDate") - .HasColumnType("datetime2"); - - b.Property("RecommendContainerCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendContainerCode"); - - b.Property("RecommendExpireDate") - .HasColumnType("datetime2"); - - b.Property("RecommendLot") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendLot"); - - b.Property("RecommendPackingCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendPackingCode"); - - b.Property("RecommendProduceDate") - .HasColumnType("datetime2"); - - b.Property("RecommendQty") - .HasColumnType("decimal(18,6)"); - - b.Property("RecommendSupplierBatch") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendSupplierBatch"); - - b.Property("RecommendToLocationArea") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendToLocationArea"); - - b.Property("RecommendToLocationCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendToLocationCode"); - - b.Property("RecommendToLocationErpCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendToLocationErpCode"); - - b.Property("RecommendToLocationGroup") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendToLocationGroup"); - - b.Property("RecommendToWarehouseCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendToWarehouseCode"); - - b.Property("Remark") - .HasMaxLength(3072) - .HasColumnType("nvarchar(3072)") - .HasColumnName("Remark"); - - b.Property("Status") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("StdPackQty") - .HasColumnType("decimal(18,6)"); - - b.Property("SupplierBatch") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("SupplierBatch"); - - b.Property("SupplierPackQty") - .HasColumnType("decimal(18,6)"); - - b.Property("SupplierPackUom") - .HasColumnType("nvarchar(max)"); - - b.Property("TenantId") - .HasColumnType("uniqueidentifier") - .HasColumnName("TenantId"); - - b.Property("Uom") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("Uom"); - - b.Property("WarehouseCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("WarehouseCode"); - - b.HasKey("Id"); - - b.HasIndex("MasterID"); - - b.ToTable("Store_PurchaseReceiptNoteDetail", (string)null); - }); - - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.PurchaseReceiptRequest", b => - { - b.Property("Id") - .HasColumnType("uniqueidentifier"); - - b.Property("ActiveDate") - .HasColumnType("datetime2"); - - b.Property("AsnNumber") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("AutoAgree") - .HasColumnType("bit"); - - b.Property("AutoCompleteJob") - .HasColumnType("bit"); - - b.Property("AutoHandle") - .HasColumnType("bit"); - - b.Property("AutoSubmit") - .HasColumnType("bit"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("nvarchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime2") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("uniqueidentifier") - .HasColumnName("CreatorId"); - - b.Property("DirectCreateNote") - .HasColumnType("bit"); - - b.Property("DockCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("ExtraProperties") - .HasColumnType("nvarchar(max)") - .HasColumnName("ExtraProperties"); - - b.Property("LastModificationTime") - .HasColumnType("datetime2") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("uniqueidentifier") - .HasColumnName("LastModifierId"); - - b.Property("Number") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("Number"); - - b.Property("PlanArriveDate") - .HasColumnType("datetime2"); - - b.Property("PoNumber") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("Remark") - .HasMaxLength(3072) - .HasColumnType("nvarchar(3072)") - .HasColumnName("Remark"); - - b.Property("RequestStatus") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("RpNumber") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("SupplierAddress") - .HasColumnType("nvarchar(max)"); - - b.Property("SupplierCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("SupplierName") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("TenantId") - .HasColumnType("uniqueidentifier") - .HasColumnName("TenantId"); - - b.Property("TimeWindow") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("TruckNumber") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("Worker") - .HasColumnType("nvarchar(max)"); - - b.HasKey("Id"); - - b.HasIndex("Number") - .IsUnique(); - - b.HasIndex("SupplierCode"); - - b.ToTable("Store_PurchaseReceiptRequest", (string)null); - }); - - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.PurchaseReceiptRequestDetail", b => - { - b.Property("Id") - .HasColumnType("uniqueidentifier"); - - b.Property("ArriveDate") - .HasColumnType("datetime2"); - - b.Property("ContainerCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ContainerCode"); - - b.Property("ConvertRate") - .HasColumnType("decimal(18,6)"); - - b.Property("CreationTime") - .HasColumnType("datetime2") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("uniqueidentifier") - .HasColumnName("CreatorId"); - - b.Property("ExpireDate") - .HasColumnType("datetime2"); - - b.Property("ItemCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ItemCode"); - - b.Property("ItemDesc1") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ItemDesc1"); - - b.Property("ItemDesc2") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ItemDesc2"); - - b.Property("ItemName") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ItemName"); - - b.Property("LastModificationTime") - .HasColumnType("datetime2") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("uniqueidentifier") - .HasColumnName("LastModifierId"); - - b.Property("Lot") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("Lot"); - - b.Property("MasterID") - .HasColumnType("uniqueidentifier"); - - b.Property("Number") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("Number"); - - b.Property("PackingCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("PackingCode"); - - b.Property("PoLine") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("PoLine"); - - b.Property("PoNumber") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("PoNumber"); - - b.Property("ProduceDate") - .HasColumnType("datetime2"); - - b.Property("Qty") - .HasPrecision(18, 6) - .HasColumnType("decimal(18,6)") - .HasColumnName("Qty"); - - b.Property("RecommendErpCode") - .HasColumnType("nvarchar(max)"); - - b.Property("Remark") - .HasMaxLength(3072) - .HasColumnType("nvarchar(3072)") - .HasColumnName("Remark"); - - b.Property("StdPackQty") - .HasColumnType("decimal(18,6)"); - - b.Property("SupplierBatch") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("SupplierBatch"); - - b.Property("SupplierPackQty") - .HasColumnType("decimal(18,6)"); - - b.Property("SupplierPackUom") - .HasColumnType("nvarchar(max)"); - - b.Property("TenantId") - .HasColumnType("uniqueidentifier") - .HasColumnName("TenantId"); - - b.Property("Uom") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("Uom"); - - b.HasKey("Id"); - - b.HasIndex("MasterID"); - - b.HasIndex("Number", "PackingCode") - .IsUnique(); - - b.ToTable("Store_PurchaseReceiptRequestDetail", (string)null); - }); - - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.PurchaseReturnJob", b => - { - b.Property("Id") - .HasColumnType("uniqueidentifier"); - - b.Property("AcceptTime") - .HasColumnType("datetime2"); - - b.Property("AcceptUserId") - .HasColumnType("uniqueidentifier"); - - b.Property("AcceptUserName") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("AsnNumber") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("CompleteTime") - .HasColumnType("datetime2"); - - b.Property("CompleteUserId") - .HasColumnType("uniqueidentifier"); - - b.Property("CompleteUserName") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("nvarchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime2") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("uniqueidentifier") - .HasColumnName("CreatorId"); - - b.Property("ExtraProperties") - .HasColumnType("nvarchar(max)") - .HasColumnName("ExtraProperties"); - - b.Property("IsAutoComplete") - .ValueGeneratedOnAdd() - .HasColumnType("bit") - .HasDefaultValue(false); - - b.Property("JobDescription") - .HasMaxLength(1024) - .HasColumnType("nvarchar(1024)"); - - b.Property("JobStatus") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("JobType") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("LastModificationTime") - .HasColumnType("datetime2") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("uniqueidentifier") - .HasColumnName("LastModifierId"); - - b.Property("Number") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("PoNumber") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("Priority") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasDefaultValue(0); - - b.Property("PriorityIncrement") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasDefaultValue(0); - - b.Property("PurchaseReturnRequestNumber") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("Remark") - .HasMaxLength(3072) - .HasColumnType("nvarchar(3072)") - .HasColumnName("Remark"); - - b.Property("ReturnReason") - .HasColumnType("nvarchar(max)"); - - b.Property("ReturnTime") - .HasColumnType("datetime2"); - - b.Property("ReturnType") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("RpNumber") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("SupplierCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("TenantId") - .HasColumnType("uniqueidentifier") - .HasColumnName("TenantId"); - - b.Property("UpStreamJobNumber") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("WarehouseCode") - .HasColumnType("nvarchar(max)"); - - b.Property("WorkGroupCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("Worker") - .HasColumnType("nvarchar(max)"); - - b.HasKey("Id"); - - b.HasIndex("Number") - .IsUnique(); - - b.ToTable("Job_PurchaseReturnJob", (string)null); - }); - - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.PurchaseReturnJobDetail", b => - { - b.Property("Id") - .HasColumnType("uniqueidentifier"); - - b.Property("CreationTime") - .HasColumnType("datetime2") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("uniqueidentifier") - .HasColumnName("CreatorId"); - - b.Property("HandledArriveDate") - .HasColumnType("datetime2"); - - b.Property("HandledContainerCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("HandledContainerCode"); - - b.Property("HandledExpireDate") - .HasColumnType("datetime2"); - - b.Property("HandledFromLocationArea") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("HandledFromLocationArea"); - - b.Property("HandledFromLocationCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("HandledFromLocationCode"); - - b.Property("HandledFromLocationErpCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("HandledFromLocationErpCode"); - - b.Property("HandledFromLocationGroup") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("HandledFromLocationGroup"); - - b.Property("HandledFromWarehouseCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("HandledFromWarehouseCode"); - - b.Property("HandledLot") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("HandledLot"); - - b.Property("HandledPackingCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("HandledPackingCode"); - - b.Property("HandledProduceDate") - .HasColumnType("datetime2"); - - b.Property("HandledQty") - .HasColumnType("decimal(18,6)"); - - b.Property("HandledSupplierBatch") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("HandledSupplierBatch"); - - b.Property("ItemCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ItemCode"); - - b.Property("ItemDesc1") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ItemDesc1"); - - b.Property("ItemDesc2") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ItemDesc2"); - - b.Property("ItemName") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ItemName"); - - b.Property("LastModificationTime") - .HasColumnType("datetime2") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("uniqueidentifier") - .HasColumnName("LastModifierId"); - - b.Property("MasterID") - .HasColumnType("uniqueidentifier"); - - b.Property("Number") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("PoLine") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("PoNumber") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("Reason") - .HasColumnType("nvarchar(max)"); - - b.Property("RecommendArriveDate") - .HasColumnType("datetime2"); - - b.Property("RecommendContainerCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendContainerCode"); - - b.Property("RecommendExpireDate") - .HasColumnType("datetime2"); - - b.Property("RecommendFromLocationArea") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendFromLocationArea"); - - b.Property("RecommendFromLocationCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendFromLocationCode"); - - b.Property("RecommendFromLocationErpCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendFromLocationErpCode"); - - b.Property("RecommendFromLocationGroup") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendFromLocationGroup"); - - b.Property("RecommendFromWarehouseCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendFromWarehouseCode"); - - b.Property("RecommendLot") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendLot"); - - b.Property("RecommendPackingCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendPackingCode"); - - b.Property("RecommendProduceDate") - .HasColumnType("datetime2"); - - b.Property("RecommendQty") - .HasColumnType("decimal(18,6)"); - - b.Property("RecommendSupplierBatch") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendSupplierBatch"); - - b.Property("Remark") - .HasMaxLength(3072) - .HasColumnType("nvarchar(3072)") - .HasColumnName("Remark"); - - b.Property("Status") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("StdPackQty") - .HasColumnType("decimal(18,6)"); - - b.Property("TenantId") - .HasColumnType("uniqueidentifier") - .HasColumnName("TenantId"); - - b.Property("Uom") - .HasColumnType("nvarchar(max)"); - - b.HasKey("Id"); - - b.HasIndex("MasterID"); - - b.ToTable("Job_PurchaseReturnJobDetail", (string)null); - }); - - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.PurchaseReturnNote", b => - { - b.Property("Id") - .HasColumnType("uniqueidentifier"); - - b.Property("ActiveDate") - .HasColumnType("datetime2"); - - b.Property("AsnNumber") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("nvarchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime2") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("uniqueidentifier") - .HasColumnName("CreatorId"); - - b.Property("ExtraProperties") - .HasColumnType("nvarchar(max)") - .HasColumnName("ExtraProperties"); - - b.Property("JobNumber") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("JobNumber"); - - b.Property("LastModificationTime") - .HasColumnType("datetime2") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("uniqueidentifier") - .HasColumnName("LastModifierId"); - - b.Property("Number") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("Number"); - - b.Property("PoNumber") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("PurchaseReturnRequestNumber") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("Remark") - .HasMaxLength(3072) - .HasColumnType("nvarchar(3072)") - .HasColumnName("Remark"); - - b.Property("ReturnReason") - .HasColumnType("nvarchar(max)"); - - b.Property("ReturnTime") - .HasColumnType("datetime2"); - - b.Property("ReturnType") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("RpNumber") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("Status") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("SupplierCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("TenantId") - .HasColumnType("uniqueidentifier") - .HasColumnName("TenantId"); - - b.Property("Worker") - .HasColumnType("nvarchar(max)"); - - b.HasKey("Id"); - - b.HasIndex("Number") - .IsUnique(); - - b.ToTable("Store_PurchaseReturnNote", (string)null); - }); - - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.PurchaseReturnNoteDetail", b => - { - b.Property("Id") - .HasColumnType("uniqueidentifier"); - - b.Property("ArriveDate") - .HasColumnType("datetime2"); - - b.Property("ContainerCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ContainerCode"); - - b.Property("CreationTime") - .HasColumnType("datetime2") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("uniqueidentifier") - .HasColumnName("CreatorId"); - - b.Property("ExpireDate") - .HasColumnType("datetime2"); - - b.Property("HandledArriveDate") - .HasColumnType("datetime2"); - - b.Property("HandledContainerCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("HandledContainerCode"); - - b.Property("HandledExpireDate") - .HasColumnType("datetime2"); - - b.Property("HandledFromLocationArea") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("HandledFromLocationArea"); - - b.Property("HandledFromLocationCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("HandledFromLocationCode"); - - b.Property("HandledFromLocationErpCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("HandledFromLocationErpCode"); - - b.Property("HandledFromLocationGroup") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("HandledFromLocationGroup"); - - b.Property("HandledFromWarehouseCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("HandledFromWarehouseCode"); - - b.Property("HandledLot") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("HandledLot"); - - b.Property("HandledPackingCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("HandledPackingCode"); - - b.Property("HandledProduceDate") - .HasColumnType("datetime2"); - - b.Property("HandledQty") - .HasColumnType("decimal(18,6)"); - - b.Property("HandledSupplierBatch") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("HandledSupplierBatch"); - - b.Property("ItemCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ItemCode"); - - b.Property("ItemDesc1") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ItemDesc1"); - - b.Property("ItemDesc2") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ItemDesc2"); - - b.Property("ItemName") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ItemName"); - - b.Property("LastModificationTime") - .HasColumnType("datetime2") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("uniqueidentifier") - .HasColumnName("LastModifierId"); - - b.Property("LocationArea") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("LocationArea"); - - b.Property("LocationCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("LocationCode"); - - b.Property("LocationErpCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("LocationErpCode"); - - b.Property("LocationGroup") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("LocationGroup"); - - b.Property("Lot") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("Lot"); - - b.Property("MasterID") - .HasColumnType("uniqueidentifier"); - - b.Property("Number") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("Number"); - - b.Property("PackingCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("PackingCode"); - - b.Property("PoLine") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("PoLine"); - - b.Property("PoNumber") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("PoNumber"); - - b.Property("ProduceDate") - .HasColumnType("datetime2"); - - b.Property("Qty") - .HasPrecision(18, 6) - .HasColumnType("decimal(18,6)") - .HasColumnName("Qty"); - - b.Property("Reason") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("RecommendArriveDate") - .HasColumnType("datetime2"); - - b.Property("RecommendContainerCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendContainerCode"); - - b.Property("RecommendExpireDate") - .HasColumnType("datetime2"); - - b.Property("RecommendFromLocationArea") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendFromLocationArea"); - - b.Property("RecommendFromLocationCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendFromLocationCode"); - - b.Property("RecommendFromLocationErpCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendFromLocationErpCode"); - - b.Property("RecommendFromLocationGroup") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendFromLocationGroup"); - - b.Property("RecommendFromWarehouseCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendFromWarehouseCode"); - - b.Property("RecommendLot") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendLot"); - - b.Property("RecommendPackingCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendPackingCode"); - - b.Property("RecommendProduceDate") - .HasColumnType("datetime2"); - - b.Property("RecommendQty") - .HasColumnType("decimal(18,6)"); - - b.Property("RecommendSupplierBatch") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendSupplierBatch"); - - b.Property("Remark") - .HasMaxLength(3072) - .HasColumnType("nvarchar(3072)") - .HasColumnName("Remark"); - - b.Property("Status") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("StdPackQty") - .HasColumnType("decimal(18,6)"); - - b.Property("SupplierBatch") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("SupplierBatch"); - - b.Property("TenantId") - .HasColumnType("uniqueidentifier") - .HasColumnName("TenantId"); - - b.Property("Uom") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("Uom"); - - b.Property("WarehouseCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("WarehouseCode"); - - b.HasKey("Id"); - - b.HasIndex("MasterID"); - - b.HasIndex("Number", "PackingCode") - .IsUnique(); - - b.ToTable("Store_PurchaseReturnNoteDetail", (string)null); - }); - - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.PurchaseReturnRequest", b => - { - b.Property("Id") - .HasColumnType("uniqueidentifier"); - - b.Property("ActiveDate") - .HasColumnType("datetime2"); - - b.Property("AsnNumber") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("AutoAgree") - .HasColumnType("bit"); - - b.Property("AutoCompleteJob") - .HasColumnType("bit"); - - b.Property("AutoHandle") - .HasColumnType("bit"); - - b.Property("AutoSubmit") - .HasColumnType("bit"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("nvarchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime2") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("uniqueidentifier") - .HasColumnName("CreatorId"); - - b.Property("DirectCreateNote") - .HasColumnType("bit"); - - b.Property("ExtraProperties") - .HasColumnType("nvarchar(max)") - .HasColumnName("ExtraProperties"); - - b.Property("LastModificationTime") - .HasColumnType("datetime2") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("uniqueidentifier") - .HasColumnName("LastModifierId"); - - b.Property("Number") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("Number"); - - b.Property("PoNumber") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("Remark") - .HasMaxLength(3072) - .HasColumnType("nvarchar(3072)") - .HasColumnName("Remark"); - - b.Property("RequestStatus") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("ReturnTime") - .HasColumnType("datetime2"); - - b.Property("ReturnType") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("RpNumber") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("SupplierCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("TenantId") - .HasColumnType("uniqueidentifier") - .HasColumnName("TenantId"); - - b.Property("Worker") - .HasColumnType("nvarchar(max)"); - - b.HasKey("Id"); - - b.HasIndex("Number") - .IsUnique(); - - b.ToTable("Store_PurchaseReturnRequest", (string)null); - }); - - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.PurchaseReturnRequestDetail", b => - { - b.Property("Id") - .HasColumnType("uniqueidentifier"); - - b.Property("ArriveDate") - .HasColumnType("datetime2"); - - b.Property("ContainerCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ContainerCode"); - - b.Property("CreationTime") - .HasColumnType("datetime2") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("uniqueidentifier") - .HasColumnName("CreatorId"); - - b.Property("ExpireDate") - .HasColumnType("datetime2"); - - b.Property("ItemCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ItemCode"); - - b.Property("ItemDesc1") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ItemDesc1"); - - b.Property("ItemDesc2") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ItemDesc2"); - - b.Property("ItemName") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ItemName"); - - b.Property("LastModificationTime") - .HasColumnType("datetime2") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("uniqueidentifier") - .HasColumnName("LastModifierId"); - - b.Property("LocationArea") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("LocationArea"); - - b.Property("LocationCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("LocationCode"); - - b.Property("LocationErpCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("LocationErpCode"); - - b.Property("LocationGroup") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("LocationGroup"); - - b.Property("Lot") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("Lot"); - - b.Property("MasterID") - .HasColumnType("uniqueidentifier"); - - b.Property("Number") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("Number"); - - b.Property("PackingCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("PackingCode"); - - b.Property("PoLine") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("PoLine"); - - b.Property("PoNumber") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("PoNumber"); - - b.Property("ProduceDate") - .HasColumnType("datetime2"); - - b.Property("Qty") - .HasPrecision(18, 6) - .HasColumnType("decimal(18,6)") - .HasColumnName("Qty"); - - b.Property("Remark") - .HasMaxLength(3072) - .HasColumnType("nvarchar(3072)") - .HasColumnName("Remark"); - - b.Property("Status") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("StdPackQty") - .HasColumnType("decimal(18,6)"); - - b.Property("SupplierBatch") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("SupplierBatch"); - - b.Property("TenantId") - .HasColumnType("uniqueidentifier") - .HasColumnName("TenantId"); - - b.Property("Uom") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("Uom"); - - b.Property("WarehouseCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("WarehouseCode"); - - b.HasKey("Id"); - - b.HasIndex("MasterID"); - - b.HasIndex("Number", "PackingCode") - .IsUnique(); - - b.ToTable("Store_PurchaseReturnRequestDetail", (string)null); - }); - - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.PutawayJob", b => - { - b.Property("Id") - .HasColumnType("uniqueidentifier"); - - b.Property("AcceptTime") - .HasColumnType("datetime2"); - - b.Property("AcceptUserId") - .HasColumnType("uniqueidentifier"); - - b.Property("AcceptUserName") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("AsnNumber") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("CompleteTime") - .HasColumnType("datetime2"); - - b.Property("CompleteUserId") - .HasColumnType("uniqueidentifier"); - - b.Property("CompleteUserName") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("nvarchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime2") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("uniqueidentifier") - .HasColumnName("CreatorId"); - - b.Property("ExtraProperties") - .HasColumnType("nvarchar(max)") - .HasColumnName("ExtraProperties"); - - b.Property("InspectNumber") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("IsAutoComplete") - .ValueGeneratedOnAdd() - .HasColumnType("bit") - .HasDefaultValue(false); - - b.Property("JobDescription") - .HasMaxLength(1024) - .HasColumnType("nvarchar(1024)"); - - b.Property("JobStatus") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("JobType") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("LastModificationTime") - .HasColumnType("datetime2") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("uniqueidentifier") - .HasColumnName("LastModifierId"); - - b.Property("Number") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("PoNumber") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("Priority") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasDefaultValue(0); - - b.Property("PriorityIncrement") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasDefaultValue(0); - - b.Property("ProductReceiptNumber") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("PurchaseReceiptRequestNumber") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("PutawayMode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("ReceiptNumber") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("Remark") - .HasMaxLength(3072) - .HasColumnType("nvarchar(3072)") - .HasColumnName("Remark"); - - b.Property("RpNumber") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("SupplierCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("TenantId") - .HasColumnType("uniqueidentifier") - .HasColumnName("TenantId"); - - b.Property("Type") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("UpStreamJobNumber") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("WarehouseCode") - .HasColumnType("nvarchar(max)"); - - b.Property("WorkGroupCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("Worker") - .HasColumnType("nvarchar(max)"); - - b.HasKey("Id"); - - b.HasIndex("Number") - .IsUnique(); - - b.ToTable("Job_PutawayJob", (string)null); - }); - - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.PutawayJobDetail", b => - { - b.Property("Id") - .HasColumnType("uniqueidentifier"); - - b.Property("CreationTime") - .HasColumnType("datetime2") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("uniqueidentifier") - .HasColumnName("CreatorId"); - - b.Property("FromLocationArea") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("FromLocationCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("FromLocationErpCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("FromLocationGroup") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("FromWarehouseCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("HandledArriveDate") - .HasColumnType("datetime2"); - - b.Property("HandledContainerCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("HandledContainerCode"); - - b.Property("HandledExpireDate") - .HasColumnType("datetime2"); - - b.Property("HandledLot") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("HandledLot"); - - b.Property("HandledPackingCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("HandledPackingCode"); - - b.Property("HandledProduceDate") - .HasColumnType("datetime2"); - - b.Property("HandledQty") - .HasColumnType("decimal(18,6)"); - - b.Property("HandledSupplierBatch") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("HandledSupplierBatch"); - - b.Property("HandledToLocationArea") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("HandledToLocationArea"); - - b.Property("HandledToLocationCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("HandledToLocationCode"); - - b.Property("HandledToLocationErpCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("HandledToLocationErpCode"); - - b.Property("HandledToLocationGroup") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("HandledToLocationGroup"); - - b.Property("HandledToWarehouseCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("HandledToWarehouseCode"); - - b.Property("ItemCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ItemCode"); - - b.Property("ItemDesc1") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ItemDesc1"); - - b.Property("ItemDesc2") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ItemDesc2"); - - b.Property("ItemName") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ItemName"); - - b.Property("LastModificationTime") - .HasColumnType("datetime2") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("uniqueidentifier") - .HasColumnName("LastModifierId"); - - b.Property("MasterID") - .HasColumnType("uniqueidentifier"); - - b.Property("Number") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("PoLine") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("PoNumber") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("Qty") - .HasPrecision(18, 6) - .HasColumnType("decimal(18,6)") - .HasColumnName("Qty"); - - b.Property("RecommendArriveDate") - .HasColumnType("datetime2"); - - b.Property("RecommendContainerCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendContainerCode"); - - b.Property("RecommendExpireDate") - .HasColumnType("datetime2"); - - b.Property("RecommendLot") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendLot"); - - b.Property("RecommendPackingCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendPackingCode"); - - b.Property("RecommendProduceDate") - .HasColumnType("datetime2"); - - b.Property("RecommendQty") - .HasColumnType("decimal(18,6)"); - - b.Property("RecommendSupplierBatch") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendSupplierBatch"); - - b.Property("RecommendToLocationArea") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendToLocationArea"); - - b.Property("RecommendToLocationCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendToLocationCode"); - - b.Property("RecommendToLocationErpCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendToLocationErpCode"); - - b.Property("RecommendToLocationGroup") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendToLocationGroup"); - - b.Property("RecommendToWarehouseCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendToWarehouseCode"); - - b.Property("Remark") - .HasMaxLength(3072) - .HasColumnType("nvarchar(3072)") - .HasColumnName("Remark"); - - b.Property("Status") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("StdPackQty") - .HasColumnType("decimal(18,6)"); - - b.Property("TenantId") - .HasColumnType("uniqueidentifier") - .HasColumnName("TenantId"); - - b.Property("Uom") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("Uom"); - - b.HasKey("Id"); - - b.HasIndex("MasterID"); - - b.ToTable("Job_PutawayJobDetail", (string)null); - }); - - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.PutawayNote", b => - { - b.Property("Id") - .HasColumnType("uniqueidentifier"); - - b.Property("ActiveDate") - .HasColumnType("datetime2"); - - b.Property("AsnNumber") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("nvarchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime2") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("uniqueidentifier") - .HasColumnName("CreatorId"); - - b.Property("ExtraProperties") - .HasColumnType("nvarchar(max)") - .HasColumnName("ExtraProperties"); - - b.Property("InspectNumber") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("JobNumber") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("JobNumber"); - - b.Property("LastModificationTime") - .HasColumnType("datetime2") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("uniqueidentifier") - .HasColumnName("LastModifierId"); - - b.Property("Number") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("Number"); - - b.Property("ProductReceiptNumber") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("PurchaseReceiptRequestNumber") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("ReceiptNumber") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("Remark") - .HasMaxLength(3072) - .HasColumnType("nvarchar(3072)") - .HasColumnName("Remark"); - - b.Property("RpNumber") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("SupplierCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("TenantId") - .HasColumnType("uniqueidentifier") - .HasColumnName("TenantId"); - - b.Property("Type") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("Worker") - .HasColumnType("nvarchar(max)"); - - b.HasKey("Id"); - - b.HasIndex("Number") - .IsUnique(); - - b.ToTable("Store_PutawayNote", (string)null); - }); - - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.PutawayNoteDetail", b => - { - b.Property("Id") - .HasColumnType("uniqueidentifier"); - - b.Property("ArriveDate") - .HasColumnType("datetime2"); - - b.Property("CreationTime") - .HasColumnType("datetime2") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("uniqueidentifier") - .HasColumnName("CreatorId"); - - b.Property("ExpireDate") - .HasColumnType("datetime2"); - - b.Property("FromContainerCode") - .HasColumnType("nvarchar(max)"); - - b.Property("FromLocationArea") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("FromLocationArea"); - - b.Property("FromLocationCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("FromLocationCode"); - - b.Property("FromLocationErpCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("FromLocationErpCode"); - - b.Property("FromLocationGroup") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("FromLocationGroup"); - - b.Property("FromLot") - .HasColumnType("nvarchar(max)"); - - b.Property("FromPackingCode") - .HasColumnType("nvarchar(450)"); - - b.Property("FromStatus") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("FromWarehouseCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("FromWarehouseCode"); - - b.Property("HandledArriveDate") - .HasColumnType("datetime2"); - - b.Property("HandledContainerCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("HandledContainerCode"); - - b.Property("HandledExpireDate") - .HasColumnType("datetime2"); - - b.Property("HandledLot") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("HandledLot"); - - b.Property("HandledPackingCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("HandledPackingCode"); - - b.Property("HandledProduceDate") - .HasColumnType("datetime2"); - - b.Property("HandledQty") - .HasColumnType("decimal(18,6)"); - - b.Property("HandledSupplierBatch") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("HandledSupplierBatch"); - - b.Property("HandledToLocationArea") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("HandledToLocationArea"); - - b.Property("HandledToLocationCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("HandledToLocationCode"); - - b.Property("HandledToLocationErpCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("HandledToLocationErpCode"); - - b.Property("HandledToLocationGroup") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("HandledToLocationGroup"); - - b.Property("HandledToWarehouseCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("HandledToWarehouseCode"); - - b.Property("ItemCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ItemCode"); - - b.Property("ItemDesc1") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ItemDesc1"); - - b.Property("ItemDesc2") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ItemDesc2"); - - b.Property("ItemName") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ItemName"); - - b.Property("JobNumber") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("JobNumber"); - - b.Property("LastModificationTime") - .HasColumnType("datetime2") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("uniqueidentifier") - .HasColumnName("LastModifierId"); - - b.Property("MasterID") - .HasColumnType("uniqueidentifier"); - - b.Property("Number") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("Number"); - - b.Property("PoLine") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("PoLine"); - - b.Property("PoNumber") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("PoNumber"); - - b.Property("ProduceDate") - .HasColumnType("datetime2"); - - b.Property("Qty") - .HasPrecision(18, 6) - .HasColumnType("decimal(18,6)") - .HasColumnName("Qty"); - - b.Property("RecommendArriveDate") - .HasColumnType("datetime2"); - - b.Property("RecommendContainerCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendContainerCode"); - - b.Property("RecommendExpireDate") - .HasColumnType("datetime2"); - - b.Property("RecommendLot") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendLot"); - - b.Property("RecommendPackingCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendPackingCode"); - - b.Property("RecommendProduceDate") - .HasColumnType("datetime2"); - - b.Property("RecommendQty") - .HasColumnType("decimal(18,6)"); - - b.Property("RecommendSupplierBatch") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendSupplierBatch"); - - b.Property("RecommendToLocationArea") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendToLocationArea"); - - b.Property("RecommendToLocationCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendToLocationCode"); - - b.Property("RecommendToLocationErpCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendToLocationErpCode"); - - b.Property("RecommendToLocationGroup") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendToLocationGroup"); - - b.Property("RecommendToWarehouseCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendToWarehouseCode"); - - b.Property("Remark") - .HasMaxLength(3072) - .HasColumnType("nvarchar(3072)") - .HasColumnName("Remark"); - - b.Property("StdPackQty") - .HasColumnType("decimal(18,6)"); - - b.Property("SupplierBatch") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("SupplierBatch"); - - b.Property("TenantId") - .HasColumnType("uniqueidentifier") - .HasColumnName("TenantId"); - - b.Property("ToContainerCode") - .HasColumnType("nvarchar(max)"); - - b.Property("ToLocationArea") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ToLocationArea"); - - b.Property("ToLocationCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ToLocationCode"); - - b.Property("ToLocationErpCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ToLocationErpCode"); - - b.Property("ToLocationGroup") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ToLocationGroup"); - - b.Property("ToLot") - .HasColumnType("nvarchar(max)"); - - b.Property("ToPackingCode") - .HasColumnType("nvarchar(450)"); - - b.Property("ToStatus") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("ToWarehouseCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ToWarehouseCode"); - - b.Property("Uom") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("Uom"); - - b.HasKey("Id"); - - b.HasIndex("MasterID"); - - b.HasIndex("Number", "FromPackingCode", "FromLocationCode", "ToLocationCode", "ToPackingCode") - .IsUnique() - .HasFilter("[FromPackingCode] IS NOT NULL AND [ToPackingCode] IS NOT NULL"); - - b.ToTable("Store_PutawayNoteDetail", (string)null); - }); - - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.PutawayRequest", b => - { - b.Property("Id") - .HasColumnType("uniqueidentifier"); - - b.Property("ActiveDate") - .HasColumnType("datetime2"); - - b.Property("AsnNumber") - .HasColumnType("nvarchar(max)"); - - b.Property("AutoAgree") - .HasColumnType("bit"); - - b.Property("AutoCompleteJob") - .HasColumnType("bit"); - - b.Property("AutoHandle") - .HasColumnType("bit"); - - b.Property("AutoSubmit") - .HasColumnType("bit"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("nvarchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime2") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("uniqueidentifier") - .HasColumnName("CreatorId"); - - b.Property("DirectCreateNote") - .HasColumnType("bit"); - - b.Property("ExtraProperties") - .HasColumnType("nvarchar(max)") - .HasColumnName("ExtraProperties"); - - b.Property("InspectNumber") - .HasColumnType("nvarchar(max)"); - - b.Property("LastModificationTime") - .HasColumnType("datetime2") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("uniqueidentifier") - .HasColumnName("LastModifierId"); - - b.Property("Number") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("Number"); - - b.Property("PoNumber") - .HasColumnType("nvarchar(max)"); - - b.Property("ProductReceiptNumber") - .HasColumnType("nvarchar(max)"); - - b.Property("PurchaseReceiptRequestNumber") - .HasColumnType("nvarchar(max)"); - - b.Property("PutawayMode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("ReceiptNumber") - .HasColumnType("nvarchar(max)"); - - b.Property("Remark") - .HasMaxLength(3072) - .HasColumnType("nvarchar(3072)") - .HasColumnName("Remark"); - - b.Property("RequestNumber") - .HasColumnType("nvarchar(max)"); - - b.Property("RequestStatus") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("RpNumber") - .HasColumnType("nvarchar(max)"); - - b.Property("SupplierCode") - .HasColumnType("nvarchar(max)"); - - b.Property("TenantId") - .HasColumnType("uniqueidentifier") - .HasColumnName("TenantId"); - - b.Property("Type") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("Worker") - .HasColumnType("nvarchar(max)"); - - b.HasKey("Id"); - - b.HasIndex("Number") - .IsUnique(); - - b.ToTable("Store_PutawayRequest", (string)null); - }); - - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.PutawayRequestDetail", b => - { - b.Property("Id") - .HasColumnType("uniqueidentifier"); - - b.Property("ArriveDate") - .HasColumnType("datetime2"); - - b.Property("CreationTime") - .HasColumnType("datetime2") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("uniqueidentifier") - .HasColumnName("CreatorId"); - - b.Property("ExpireDate") - .HasColumnType("datetime2"); - - b.Property("FromContainerCode") - .HasColumnType("nvarchar(max)"); - - b.Property("FromLocationArea") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("FromLocationArea"); - - b.Property("FromLocationCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("FromLocationCode"); - - b.Property("FromLocationErpCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("FromLocationErpCode"); - - b.Property("FromLocationGroup") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("FromLocationGroup"); - - b.Property("FromLot") - .HasColumnType("nvarchar(max)"); - - b.Property("FromPackingCode") - .HasColumnType("nvarchar(max)"); - - b.Property("FromStatus") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("FromWarehouseCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("FromWarehouseCode"); - - b.Property("InventoryQty") - .HasColumnType("decimal(18,6)"); - - b.Property("ItemCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ItemCode"); - - b.Property("ItemDesc1") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ItemDesc1"); - - b.Property("ItemDesc2") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ItemDesc2"); - - b.Property("ItemName") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ItemName"); - - b.Property("LastModificationTime") - .HasColumnType("datetime2") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("uniqueidentifier") - .HasColumnName("LastModifierId"); - - b.Property("MasterID") - .HasColumnType("uniqueidentifier"); - - b.Property("Number") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("Number"); - - b.Property("PoLine") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("PoLine"); - - b.Property("PoNumber") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("PoNumber"); - - b.Property("ProduceDate") - .HasColumnType("datetime2"); - - b.Property("Qty") - .HasPrecision(18, 6) - .HasColumnType("decimal(18,6)") - .HasColumnName("Qty"); - - b.Property("Remark") - .HasMaxLength(3072) - .HasColumnType("nvarchar(3072)") - .HasColumnName("Remark"); - - b.Property("StdPackQty") - .HasColumnType("decimal(18,6)"); - - b.Property("SupplierBatch") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("SupplierBatch"); - - b.Property("TenantId") - .HasColumnType("uniqueidentifier") - .HasColumnName("TenantId"); - - b.Property("ToContainerCode") - .HasColumnType("nvarchar(max)"); - - b.Property("ToLocationArea") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ToLocationArea"); - - b.Property("ToLocationCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ToLocationCode"); - - b.Property("ToLocationErpCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ToLocationErpCode"); - - b.Property("ToLocationGroup") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ToLocationGroup"); - - b.Property("ToLot") - .HasColumnType("nvarchar(max)"); - - b.Property("ToPackingCode") - .HasColumnType("nvarchar(max)"); - - b.Property("ToStatus") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("ToWarehouseCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ToWarehouseCode"); - - b.Property("Uom") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("Uom"); - - b.HasKey("Id"); - - b.HasIndex("MasterID"); - - b.ToTable("Store_PutawayRequestDetail", (string)null); - }); - - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ReceiptAbnormalNote", b => - { - b.Property("Id") - .HasColumnType("uniqueidentifier"); - - b.Property("ActiveDate") - .HasColumnType("datetime2"); - - b.Property("AsnNumber") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("nvarchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime2") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("uniqueidentifier") - .HasColumnName("CreatorId"); - - b.Property("ExtraProperties") - .HasColumnType("nvarchar(max)") - .HasColumnName("ExtraProperties"); - - b.Property("LastModificationTime") - .HasColumnType("datetime2") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("uniqueidentifier") - .HasColumnName("LastModifierId"); - - b.Property("Number") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("Number"); - - b.Property("ReceiptNumber") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("Remark") - .HasMaxLength(3072) - .HasColumnType("nvarchar(3072)") - .HasColumnName("Remark"); - - b.Property("SupplierCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("TenantId") - .HasColumnType("uniqueidentifier") - .HasColumnName("TenantId"); - - b.Property("Worker") - .HasColumnType("nvarchar(max)"); - - b.HasKey("Id"); - - b.HasIndex("SupplierCode"); - - b.HasIndex("AsnNumber", "Number", "SupplierCode", "ReceiptNumber") - .IsUnique(); - - b.ToTable("Store_ReceiptAbnormalNote", (string)null); - }); - - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ReceiptAbnormalNoteDetail", b => - { - b.Property("Id") - .HasColumnType("uniqueidentifier"); - - b.Property("AbnormalType") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("ArriveDate") - .HasColumnType("datetime2"); - - b.Property("ContainerCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ContainerCode"); - - b.Property("CreationTime") - .HasColumnType("datetime2") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("uniqueidentifier") - .HasColumnName("CreatorId"); - - b.Property("ExpireDate") - .HasColumnType("datetime2"); - - b.Property("ItemCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ItemCode"); - - b.Property("ItemDesc1") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ItemDesc1"); - - b.Property("ItemDesc2") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ItemDesc2"); - - b.Property("ItemName") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ItemName"); - - b.Property("LastModificationTime") - .HasColumnType("datetime2") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("uniqueidentifier") - .HasColumnName("LastModifierId"); - - b.Property("LocationArea") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("LocationArea"); - - b.Property("LocationCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("LocationCode"); - - b.Property("LocationErpCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("LocationErpCode"); - - b.Property("LocationGroup") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("LocationGroup"); - - b.Property("Lot") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("Lot"); - - b.Property("MasterID") - .HasColumnType("uniqueidentifier"); - - b.Property("Number") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("Number"); - - b.Property("PackingCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("PackingCode"); - - b.Property("Photos") - .HasColumnType("nvarchar(max)"); - - b.Property("ProduceDate") - .HasColumnType("datetime2"); - - b.Property("Qty") - .HasPrecision(18, 6) - .HasColumnType("decimal(18,6)") - .HasColumnName("Qty"); - - b.Property("ReceiptNumber") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("Remark") - .HasMaxLength(3072) - .HasColumnType("nvarchar(3072)") - .HasColumnName("Remark"); - - b.Property("Status") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("StdPackQty") - .HasColumnType("decimal(18,6)"); - - b.Property("SupplierBatch") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("SupplierBatch"); - - b.Property("TenantId") - .HasColumnType("uniqueidentifier") - .HasColumnName("TenantId"); - - b.Property("Uom") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("Uom"); - - b.Property("WarehouseCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("WarehouseCode"); - - b.HasKey("Id"); - - b.HasIndex("MasterID"); - - b.HasIndex("Number", "PackingCode", "ReceiptNumber") - .IsUnique(); - - b.ToTable("Store_ReceiptAbnormalNoteDetail", (string)null); - }); - - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.RecycledMaterialReceiptNote", b => - { - b.Property("Id") - .HasColumnType("uniqueidentifier"); - - b.Property("ActiveDate") - .HasColumnType("datetime2"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("nvarchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime2") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("uniqueidentifier") - .HasColumnName("CreatorId"); - - b.Property("ExtraProperties") - .HasColumnType("nvarchar(max)") - .HasColumnName("ExtraProperties"); - - b.Property("LastModificationTime") - .HasColumnType("datetime2") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("uniqueidentifier") - .HasColumnName("LastModifierId"); - - b.Property("Number") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("Number"); - - b.Property("Remark") - .HasMaxLength(3072) - .HasColumnType("nvarchar(3072)") - .HasColumnName("Remark"); - - b.Property("TenantId") - .HasColumnType("uniqueidentifier") - .HasColumnName("TenantId"); - - b.Property("Worker") - .HasColumnType("nvarchar(max)"); - - b.HasKey("Id"); - - b.HasIndex("Number") - .IsUnique(); - - b.ToTable("Store_RecycledMaterialReceiptNote", (string)null); - }); - - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.RecycledMaterialReceiptNoteDetail", b => - { - b.Property("Id") - .HasColumnType("uniqueidentifier"); - - b.Property("ArriveDate") - .HasColumnType("datetime2"); - - b.Property("ContainerCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ContainerCode"); - - b.Property("CreationTime") - .HasColumnType("datetime2") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("uniqueidentifier") - .HasColumnName("CreatorId"); - - b.Property("ExpireDate") - .HasColumnType("datetime2"); - - b.Property("ItemCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ItemCode"); - - b.Property("ItemDesc1") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ItemDesc1"); - - b.Property("ItemDesc2") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ItemDesc2"); - - b.Property("ItemName") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ItemName"); - - b.Property("LastModificationTime") - .HasColumnType("datetime2") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("uniqueidentifier") - .HasColumnName("LastModifierId"); - - b.Property("LocationArea") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("LocationArea"); - - b.Property("LocationCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("LocationCode"); - - b.Property("LocationErpCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("LocationErpCode"); - - b.Property("LocationGroup") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("LocationGroup"); - - b.Property("Lot") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("Lot"); - - b.Property("MasterID") - .HasColumnType("uniqueidentifier"); - - b.Property("Number") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("Number"); - - b.Property("PackingCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("PackingCode"); - - b.Property("ProduceDate") - .HasColumnType("datetime2"); - - b.Property("Qty") - .HasPrecision(18, 6) - .HasColumnType("decimal(18,6)") - .HasColumnName("Qty"); - - b.Property("ReasonCode") - .HasColumnType("nvarchar(max)"); - - b.Property("Remark") - .HasMaxLength(3072) - .HasColumnType("nvarchar(3072)") - .HasColumnName("Remark"); - - b.Property("Status") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("StdPackQty") - .HasColumnType("decimal(18,6)"); - - b.Property("SupplierBatch") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("SupplierBatch"); - - b.Property("TenantId") - .HasColumnType("uniqueidentifier") - .HasColumnName("TenantId"); - - b.Property("Uom") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("Uom"); - - b.Property("WarehouseCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("WarehouseCode"); - - b.HasKey("Id"); - - b.HasIndex("MasterID"); - - b.HasIndex("Number", "PackingCode") - .IsUnique(); - - b.ToTable("Store_RecycledMaterialReceiptNoteDetail", (string)null); - }); - - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.SaleOrder", b => - { - b.Property("Id") - .HasColumnType("uniqueidentifier"); - - b.Property("ActiveDate") - .HasColumnType("datetime2"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("nvarchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("ContactEmail") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("ContactName") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("ContactPhone") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("CreationTime") - .HasColumnType("datetime2") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("uniqueidentifier") - .HasColumnName("CreatorId"); - - b.Property("CustomerCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("DueDate") - .HasColumnType("datetime2"); - - b.Property("ExtraProperties") - .HasColumnType("nvarchar(max)") - .HasColumnName("ExtraProperties"); - - b.Property("LastModificationTime") - .HasColumnType("datetime2") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("uniqueidentifier") - .HasColumnName("LastModifierId"); - - b.Property("Number") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("Number"); - - b.Property("OrderDate") - .HasColumnType("datetime2"); - - b.Property("Remark") - .HasMaxLength(3072) - .HasColumnType("nvarchar(3072)") - .HasColumnName("Remark"); - - b.Property("SoStatus") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("SoType") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("TaxRate") - .ValueGeneratedOnAdd() - .HasColumnType("decimal(18,6)") - .HasDefaultValue(0m); - - b.Property("TenantId") - .HasColumnType("uniqueidentifier") - .HasColumnName("TenantId"); - - b.Property("Version") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("Worker") - .HasColumnType("nvarchar(max)"); - - b.HasKey("Id"); - - b.HasIndex("CustomerCode"); - - b.HasIndex("Number") - .IsUnique(); - - b.ToTable("Store_SaleOrder", (string)null); - }); - - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.SaleOrderDetail", b => - { - b.Property("Id") - .HasColumnType("uniqueidentifier"); - - b.Property("ConvertRate") - .ValueGeneratedOnAdd() - .HasColumnType("decimal(18,6)") - .HasDefaultValue(1m); - - b.Property("CreationTime") - .HasColumnType("datetime2") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("uniqueidentifier") - .HasColumnName("CreatorId"); - - b.Property("CustomerPackQty") - .HasColumnType("decimal(18,6)"); - - b.Property("CustomerPackUom") - .HasColumnType("nvarchar(max)"); - - b.Property("ItemCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ItemCode"); - - b.Property("ItemDesc1") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ItemDesc1"); - - b.Property("ItemDesc2") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ItemDesc2"); - - b.Property("ItemName") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ItemName"); - - b.Property("LastModificationTime") - .HasColumnType("datetime2") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("uniqueidentifier") - .HasColumnName("LastModifierId"); - - b.Property("LineStatus") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("MasterID") - .HasColumnType("uniqueidentifier"); - - b.Property("Number") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("Number"); - - b.Property("Qty") - .HasPrecision(18, 6) - .HasColumnType("decimal(18,6)") - .HasColumnName("Qty"); - - b.Property("Remark") - .HasMaxLength(3072) - .HasColumnType("nvarchar(3072)") - .HasColumnName("Remark"); - - b.Property("SoLine") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("StdPackQty") - .HasColumnType("decimal(18,6)"); - - b.Property("TenantId") - .HasColumnType("uniqueidentifier") - .HasColumnName("TenantId"); - - b.Property("Uom") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("Uom"); - - b.HasKey("Id"); - - b.HasIndex("MasterID"); - - b.HasIndex("Number", "SoLine", "ItemCode") - .IsUnique(); - - b.ToTable("Store_SaleOrderDetail", (string)null); - }); - - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ScrapNote", b => - { - b.Property("Id") - .HasColumnType("uniqueidentifier"); - - b.Property("ActiveDate") - .HasColumnType("datetime2"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("nvarchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime2") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("uniqueidentifier") - .HasColumnName("CreatorId"); - - b.Property("ExtraProperties") - .HasColumnType("nvarchar(max)") - .HasColumnName("ExtraProperties"); - - b.Property("JobNumber") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("JobNumber"); - - b.Property("LastModificationTime") - .HasColumnType("datetime2") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("uniqueidentifier") - .HasColumnName("LastModifierId"); - - b.Property("Number") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("Number"); - - b.Property("Remark") - .HasMaxLength(3072) - .HasColumnType("nvarchar(3072)") - .HasColumnName("Remark"); - - b.Property("ScrapRequestNumber") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("TenantId") - .HasColumnType("uniqueidentifier") - .HasColumnName("TenantId"); - - b.Property("Type") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("Worker") - .HasColumnType("nvarchar(max)"); - - b.HasKey("Id"); - - b.HasIndex("Number") - .IsUnique(); - - b.ToTable("Store_ScrapNote", (string)null); - }); - - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ScrapNoteDetail", b => - { - b.Property("Id") - .HasColumnType("uniqueidentifier"); - - b.Property("ArriveDate") - .HasColumnType("datetime2"); - - b.Property("CreationTime") - .HasColumnType("datetime2") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("uniqueidentifier") - .HasColumnName("CreatorId"); - - b.Property("ExpireDate") - .HasColumnType("datetime2"); - - b.Property("FromContainerCode") - .HasColumnType("nvarchar(max)"); - - b.Property("FromLocationArea") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("FromLocationArea"); - - b.Property("FromLocationCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("FromLocationCode"); - - b.Property("FromLocationErpCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("FromLocationErpCode"); - - b.Property("FromLocationGroup") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("FromLocationGroup"); - - b.Property("FromLot") - .HasColumnType("nvarchar(450)"); - - b.Property("FromPackingCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("FromStatus") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("FromWarehouseCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("FromWarehouseCode"); - - b.Property("ItemCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ItemCode"); - - b.Property("ItemDesc1") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ItemDesc1"); - - b.Property("ItemDesc2") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ItemDesc2"); - - b.Property("ItemName") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ItemName"); - - b.Property("LastModificationTime") - .HasColumnType("datetime2") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("uniqueidentifier") - .HasColumnName("LastModifierId"); - - b.Property("MasterID") - .HasColumnType("uniqueidentifier"); - - b.Property("Number") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("Number"); - - b.Property("ProduceDate") - .HasColumnType("datetime2"); - - b.Property("Qty") - .HasPrecision(18, 6) - .HasColumnType("decimal(18,6)") - .HasColumnName("Qty"); - - b.Property("ReasonCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("Remark") - .HasMaxLength(3072) - .HasColumnType("nvarchar(3072)") - .HasColumnName("Remark"); - - b.Property("StdPackQty") - .HasColumnType("decimal(18,6)"); - - b.Property("SupplierBatch") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("SupplierBatch"); - - b.Property("TenantId") - .HasColumnType("uniqueidentifier") - .HasColumnName("TenantId"); - - b.Property("ToContainerCode") - .HasColumnType("nvarchar(max)"); - - b.Property("ToLocationArea") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ToLocationArea"); - - b.Property("ToLocationCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ToLocationCode"); - - b.Property("ToLocationErpCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ToLocationErpCode"); - - b.Property("ToLocationGroup") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ToLocationGroup"); - - b.Property("ToLot") - .HasColumnType("nvarchar(max)"); - - b.Property("ToPackingCode") - .HasColumnType("nvarchar(max)"); - - b.Property("ToStatus") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("ToWarehouseCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ToWarehouseCode"); - - b.Property("Uom") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("Uom"); - - b.HasKey("Id"); - - b.HasIndex("MasterID"); - - b.HasIndex("Number", "ItemCode", "FromPackingCode", "FromLocationCode", "ToLocationCode", "FromLot", "FromStatus") - .IsUnique() - .HasFilter("[FromPackingCode] IS NOT NULL AND [FromLot] IS NOT NULL"); - - b.ToTable("Store_ScrapNoteDetail", (string)null); - }); - - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ScrapRequest", b => - { - b.Property("Id") - .HasColumnType("uniqueidentifier"); - - b.Property("ActiveDate") - .HasColumnType("datetime2"); - - b.Property("AutoAgree") - .HasColumnType("bit"); - - b.Property("AutoCompleteJob") - .HasColumnType("bit"); - - b.Property("AutoHandle") - .HasColumnType("bit"); - - b.Property("AutoSubmit") - .HasColumnType("bit"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("nvarchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime2") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("uniqueidentifier") - .HasColumnName("CreatorId"); - - b.Property("DirectCreateNote") - .HasColumnType("bit"); - - b.Property("ExtraProperties") - .HasColumnType("nvarchar(max)") - .HasColumnName("ExtraProperties"); - - b.Property("LastModificationTime") - .HasColumnType("datetime2") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("uniqueidentifier") - .HasColumnName("LastModifierId"); - - b.Property("Number") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("Number"); - - b.Property("Remark") - .HasMaxLength(3072) - .HasColumnType("nvarchar(3072)") - .HasColumnName("Remark"); - - b.Property("RequestStatus") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("TenantId") - .HasColumnType("uniqueidentifier") - .HasColumnName("TenantId"); - - b.Property("Type") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("Worker") - .HasColumnType("nvarchar(max)"); - - b.HasKey("Id"); - - b.HasIndex("Number") - .IsUnique(); - - b.ToTable("Store_ScrapRequest", (string)null); - }); - - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ScrapRequestDetail", b => - { - b.Property("Id") - .HasColumnType("uniqueidentifier"); - - b.Property("CreationTime") - .HasColumnType("datetime2") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("uniqueidentifier") - .HasColumnName("CreatorId"); - - b.Property("ItemCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ItemCode"); - - b.Property("ItemDesc1") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ItemDesc1"); - - b.Property("ItemDesc2") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ItemDesc2"); - - b.Property("ItemName") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ItemName"); - - b.Property("LastModificationTime") - .HasColumnType("datetime2") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("uniqueidentifier") - .HasColumnName("LastModifierId"); - - b.Property("LocationArea") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("LocationArea"); - - b.Property("LocationCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("LocationCode"); - - b.Property("LocationErpCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("LocationErpCode"); - - b.Property("LocationGroup") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("LocationGroup"); - - b.Property("MasterID") - .HasColumnType("uniqueidentifier"); - - b.Property("Number") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("Number"); - - b.Property("Qty") - .HasPrecision(18, 6) - .HasColumnType("decimal(18,6)") - .HasColumnName("Qty"); - - b.Property("ReasonCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("Remark") - .HasMaxLength(3072) - .HasColumnType("nvarchar(3072)") - .HasColumnName("Remark"); - - b.Property("StdPackQty") - .HasColumnType("decimal(18,6)"); - - b.Property("TenantId") - .HasColumnType("uniqueidentifier") - .HasColumnName("TenantId"); - - b.Property("Uom") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("Uom"); - - b.Property("WarehouseCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("WarehouseCode"); - - b.HasKey("Id"); - - b.HasIndex("MasterID"); - - b.HasIndex("Number", "ItemCode", "LocationCode") - .IsUnique(); - - b.ToTable("Store_ScrapRequestDetail", (string)null); - }); - - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.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("Store_SplitPackingRec", (string)null); - }); - - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.SupplierAsn", b => - { - b.Property("Id") - .HasColumnType("uniqueidentifier"); - - b.Property("ActiveDate") - .HasColumnType("datetime2"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("nvarchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("ContactEmail") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("ContactName") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("ContactPhone") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("CreateType") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("CreationTime") - .HasColumnType("datetime2") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("uniqueidentifier") - .HasColumnName("CreatorId"); - - b.Property("Ctype") - .HasColumnType("nvarchar(max)"); - - b.Property("DockCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("DueDate") - .HasColumnType("datetime2"); - - b.Property("ExtraProperties") - .HasColumnType("nvarchar(max)") - .HasColumnName("ExtraProperties"); - - b.Property("LastModificationTime") - .HasColumnType("datetime2") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("uniqueidentifier") - .HasColumnName("LastModifierId"); - - b.Property("Number") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("Number"); - - b.Property("PlanArriveDate") - .HasColumnType("datetime2"); - - b.Property("PlanUserCode") - .HasColumnType("nvarchar(max)"); - - b.Property("PoNumber") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("Remark") - .HasMaxLength(3072) - .HasColumnType("nvarchar(3072)") - .HasColumnName("Remark"); - - b.Property("RpNumber") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("ShipDate") - .HasColumnType("datetime2"); - - b.Property("Status") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("SupplierAddress") - .HasColumnType("nvarchar(max)"); - - b.Property("SupplierCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("SupplierName") - .HasColumnType("nvarchar(max)"); - - b.Property("TenantId") - .HasColumnType("uniqueidentifier") - .HasColumnName("TenantId"); - - b.Property("TimeWindow") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("TruckNumber") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("Worker") - .HasColumnType("nvarchar(max)"); - - b.HasKey("Id"); - - b.HasIndex("Number") - .IsUnique(); - - b.HasIndex("SupplierCode"); - - b.ToTable("Store_SupplierAsn", (string)null); - }); - - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.SupplierAsnDetail", b => - { - b.Property("Id") - .HasColumnType("uniqueidentifier"); - - b.Property("ArriveDate") - .HasColumnType("datetime2"); - - b.Property("ContainerCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ContainerCode"); - - b.Property("ConvertRate") - .HasColumnType("decimal(18,6)"); - - b.Property("CreationTime") - .HasColumnType("datetime2") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("uniqueidentifier") - .HasColumnName("CreatorId"); - - b.Property("Ctype") - .HasColumnType("nvarchar(max)"); - - b.Property("ExpireDate") - .HasColumnType("datetime2"); - - b.Property("ItemCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ItemCode"); - - b.Property("ItemDesc1") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ItemDesc1"); - - b.Property("ItemDesc2") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ItemDesc2"); - - b.Property("ItemName") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ItemName"); - - b.Property("LastModificationTime") - .HasColumnType("datetime2") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("uniqueidentifier") - .HasColumnName("LastModifierId"); - - b.Property("Lot") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("Lot"); - - b.Property("MasterID") - .HasColumnType("uniqueidentifier"); - - b.Property("Number") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("Number"); - - b.Property("PackingCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("PackingCode"); - - b.Property("PlanUserCode") - .HasColumnType("nvarchar(max)"); - - b.Property("PoLine") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("PoLine"); - - b.Property("PoNumber") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("PoNumber"); - - b.Property("ProduceDate") - .HasColumnType("datetime2"); - - b.Property("ProjectCode") - .HasColumnType("nvarchar(max)"); - - b.Property("Qty") - .HasPrecision(18, 6) - .HasColumnType("decimal(18,6)") - .HasColumnName("Qty"); - - b.Property("RecommendErpCode") - .HasColumnType("nvarchar(max)"); - - b.Property("Remark") - .HasMaxLength(3072) - .HasColumnType("nvarchar(3072)") - .HasColumnName("Remark"); - - b.Property("StdPackQty") - .HasColumnType("decimal(18,6)"); - - b.Property("SupplierBatch") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("SupplierBatch"); - - b.Property("SupplierPackQty") - .HasColumnType("decimal(18,6)"); - - b.Property("SupplierPackUom") - .HasColumnType("nvarchar(max)"); - - b.Property("TenantId") - .HasColumnType("uniqueidentifier") - .HasColumnName("TenantId"); - - b.Property("Uom") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("Uom"); - - b.HasKey("Id"); - - b.HasIndex("MasterID"); - - b.HasIndex("Number", "ItemCode", "PackingCode") - .IsUnique(); - - b.ToTable("Store_SupplierAsnDetail", (string)null); - }); - - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.TransferNote", b => - { - b.Property("Id") - .HasColumnType("uniqueidentifier"); - - b.Property("ActiveDate") - .HasColumnType("datetime2"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("nvarchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("ConfirmTime") - .HasColumnType("datetime2"); - - b.Property("Confirmed") - .HasColumnType("bit"); - - b.Property("CreationTime") - .HasColumnType("datetime2") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("uniqueidentifier") - .HasColumnName("CreatorId"); - - b.Property("ExtraProperties") - .HasColumnType("nvarchar(max)") - .HasColumnName("ExtraProperties"); - - b.Property("JobNumber") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("JobNumber"); - - b.Property("LastModificationTime") - .HasColumnType("datetime2") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("uniqueidentifier") - .HasColumnName("LastModifierId"); - - b.Property("Number") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("Number"); - - b.Property("Remark") - .HasMaxLength(3072) - .HasColumnType("nvarchar(3072)") - .HasColumnName("Remark"); - - b.Property("RequestNumber") - .HasColumnType("nvarchar(max)"); - - b.Property("TenantId") - .HasColumnType("uniqueidentifier") - .HasColumnName("TenantId"); - - b.Property("Type") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("UseOnTheWayLocation") - .HasColumnType("bit"); - - b.Property("Worker") - .HasColumnType("nvarchar(max)"); - - b.HasKey("Id"); - - b.HasIndex("Number") - .IsUnique(); - - b.ToTable("Store_TransferNote", (string)null); - }); - - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.TransferNoteDetail", b => - { - b.Property("Id") - .HasColumnType("uniqueidentifier"); - - b.Property("ArriveDate") - .HasColumnType("datetime2"); - - b.Property("CreationTime") - .HasColumnType("datetime2") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("uniqueidentifier") - .HasColumnName("CreatorId"); - - b.Property("ExpireDate") - .HasColumnType("datetime2"); - - b.Property("FromContainerCode") - .HasColumnType("nvarchar(max)"); - - b.Property("FromLocationArea") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("FromLocationArea"); - - b.Property("FromLocationCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("FromLocationCode"); - - b.Property("FromLocationErpCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("FromLocationErpCode"); - - b.Property("FromLocationGroup") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("FromLocationGroup"); - - b.Property("FromLot") - .HasColumnType("nvarchar(max)"); - - b.Property("FromPackingCode") - .HasColumnType("nvarchar(450)"); - - b.Property("FromStatus") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("FromWarehouseCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("FromWarehouseCode"); - - b.Property("ItemCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ItemCode"); - - b.Property("ItemDesc1") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ItemDesc1"); - - b.Property("ItemDesc2") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ItemDesc2"); - - b.Property("ItemName") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ItemName"); - - b.Property("LastModificationTime") - .HasColumnType("datetime2") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("uniqueidentifier") - .HasColumnName("LastModifierId"); - - b.Property("MasterID") - .HasColumnType("uniqueidentifier"); - - b.Property("Number") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("Number"); - - b.Property("OnTheWayLocationCode") - .HasColumnType("nvarchar(max)"); - - b.Property("ProduceDate") - .HasColumnType("datetime2"); - - b.Property("Qty") - .HasPrecision(18, 6) - .HasColumnType("decimal(18,6)") - .HasColumnName("Qty"); - - b.Property("Reason") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("Remark") - .HasMaxLength(3072) - .HasColumnType("nvarchar(3072)") - .HasColumnName("Remark"); - - b.Property("StdPackQty") - .HasColumnType("decimal(18,6)"); - - b.Property("SupplierBatch") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("SupplierBatch"); - - b.Property("TenantId") - .HasColumnType("uniqueidentifier") - .HasColumnName("TenantId"); - - b.Property("ToContainerCode") - .HasColumnType("nvarchar(max)"); - - b.Property("ToLocationArea") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ToLocationArea"); - - b.Property("ToLocationCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ToLocationCode"); - - b.Property("ToLocationErpCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ToLocationErpCode"); - - b.Property("ToLocationGroup") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ToLocationGroup"); - - b.Property("ToLot") - .HasColumnType("nvarchar(max)"); - - b.Property("ToPackingCode") - .HasColumnType("nvarchar(max)"); - - b.Property("ToStatus") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("ToWarehouseCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ToWarehouseCode"); - - b.Property("Uom") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("Uom"); - - b.HasKey("Id"); - - b.HasIndex("MasterID"); - - b.HasIndex("Number", "FromPackingCode", "FromLocationCode", "ToLocationCode", "FromStatus", "ToStatus") - .IsUnique() - .HasFilter("[FromPackingCode] IS NOT NULL"); - - b.ToTable("Store_TransferNoteDetail", (string)null); - }); - - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.TransferRequest", b => - { - b.Property("Id") - .HasColumnType("uniqueidentifier"); - - b.Property("ActiveDate") - .HasColumnType("datetime2"); - - b.Property("AutoAgree") - .HasColumnType("bit"); - - b.Property("AutoCompleteJob") - .HasColumnType("bit"); - - b.Property("AutoHandle") - .HasColumnType("bit"); - - b.Property("AutoSubmit") - .HasColumnType("bit"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("nvarchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime2") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("uniqueidentifier") - .HasColumnName("CreatorId"); - - b.Property("DirectCreateNote") - .HasColumnType("bit"); - - b.Property("ExtraProperties") - .HasColumnType("nvarchar(max)") - .HasColumnName("ExtraProperties"); - - b.Property("LastModificationTime") - .HasColumnType("datetime2") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("uniqueidentifier") - .HasColumnName("LastModifierId"); - - b.Property("Number") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("Number"); - - b.Property("Remark") - .HasMaxLength(3072) - .HasColumnType("nvarchar(3072)") - .HasColumnName("Remark"); - - b.Property("RequestStatus") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("TenantId") - .HasColumnType("uniqueidentifier") - .HasColumnName("TenantId"); - - b.Property("Type") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("UseOnTheWayLocation") - .HasColumnType("bit"); - - b.Property("Worker") - .HasColumnType("nvarchar(max)"); - - b.HasKey("Id"); - - b.HasIndex("Number") - .IsUnique(); - - b.ToTable("Store_TransferRequest", (string)null); - }); - - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.TransferRequestDetail", b => - { - b.Property("Id") - .HasColumnType("uniqueidentifier"); - - b.Property("ArriveDate") - .HasColumnType("datetime2"); - - b.Property("CreationTime") - .HasColumnType("datetime2") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("uniqueidentifier") - .HasColumnName("CreatorId"); - - b.Property("ExpireDate") - .HasColumnType("datetime2"); - - b.Property("FromContainerCode") - .HasColumnType("nvarchar(max)"); - - b.Property("FromLocationArea") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("FromLocationArea"); - - b.Property("FromLocationCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("FromLocationCode"); - - b.Property("FromLocationErpCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("FromLocationErpCode"); - - b.Property("FromLocationGroup") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("FromLocationGroup"); - - b.Property("FromLot") - .HasColumnType("nvarchar(max)"); - - b.Property("FromPackingCode") - .HasColumnType("nvarchar(max)"); - - b.Property("FromStatus") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("FromWarehouseCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("FromWarehouseCode"); - - b.Property("ItemCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ItemCode"); - - b.Property("ItemDesc1") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ItemDesc1"); - - b.Property("ItemDesc2") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ItemDesc2"); - - b.Property("ItemName") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ItemName"); - - b.Property("LastModificationTime") - .HasColumnType("datetime2") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("uniqueidentifier") - .HasColumnName("LastModifierId"); - - b.Property("MasterID") - .HasColumnType("uniqueidentifier"); - - b.Property("Number") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("Number"); - - b.Property("ProduceDate") - .HasColumnType("datetime2"); - - b.Property("Qty") - .HasPrecision(18, 6) - .HasColumnType("decimal(18,6)") - .HasColumnName("Qty"); - - b.Property("Reason") - .HasColumnType("nvarchar(max)"); - - b.Property("Remark") - .HasMaxLength(3072) - .HasColumnType("nvarchar(3072)") - .HasColumnName("Remark"); - - b.Property("StdPackQty") - .HasColumnType("decimal(18,6)"); - - b.Property("SupplierBatch") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("SupplierBatch"); - - b.Property("TenantId") - .HasColumnType("uniqueidentifier") - .HasColumnName("TenantId"); - - b.Property("ToContainerCode") - .HasColumnType("nvarchar(max)"); - - b.Property("ToLocationArea") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ToLocationArea"); - - b.Property("ToLocationCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ToLocationCode"); - - b.Property("ToLocationErpCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ToLocationErpCode"); - - b.Property("ToLocationGroup") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ToLocationGroup"); - - b.Property("ToLot") - .HasColumnType("nvarchar(max)"); - - b.Property("ToPackingCode") - .HasColumnType("nvarchar(max)"); - - b.Property("ToStatus") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("ToWarehouseCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ToWarehouseCode"); - - b.Property("Uom") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("Uom"); - - b.HasKey("Id"); - - b.HasIndex("MasterID"); - - b.ToTable("Store_TransferRequestDetail", (string)null); - }); - - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.UnplannedIssueJob", b => - { - b.Property("Id") - .HasColumnType("uniqueidentifier"); - - b.Property("AcceptTime") - .HasColumnType("datetime2"); - - b.Property("AcceptUserId") - .HasColumnType("uniqueidentifier"); - - b.Property("AcceptUserName") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("BuildDate") - .HasColumnType("datetime2"); - - b.Property("CompleteTime") - .HasColumnType("datetime2"); - - b.Property("CompleteUserId") - .HasColumnType("uniqueidentifier"); - - b.Property("CompleteUserName") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("nvarchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime2") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("uniqueidentifier") - .HasColumnName("CreatorId"); - - b.Property("DeptCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("DeptName") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("ExtraProperties") - .HasColumnType("nvarchar(max)") - .HasColumnName("ExtraProperties"); - - b.Property("IsAutoComplete") - .ValueGeneratedOnAdd() - .HasColumnType("bit") - .HasDefaultValue(false); - - b.Property("JobDescription") - .HasMaxLength(1024) - .HasColumnType("nvarchar(1024)"); - - b.Property("JobStatus") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("JobType") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("LastModificationTime") - .HasColumnType("datetime2") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("uniqueidentifier") - .HasColumnName("LastModifierId"); - - b.Property("Number") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("OANumber") - .HasColumnType("nvarchar(max)"); - - b.Property("Priority") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasDefaultValue(0); - - b.Property("PriorityIncrement") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasDefaultValue(0); - - b.Property("Remark") - .HasMaxLength(3072) - .HasColumnType("nvarchar(3072)") - .HasColumnName("Remark"); - - b.Property("TenantId") - .HasColumnType("uniqueidentifier") - .HasColumnName("TenantId"); - - b.Property("UnplannedIssueRequestNumber") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("UnplannedIssueType") - .HasColumnType("int"); - - b.Property("UpStreamJobNumber") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("WarehouseCode") - .HasColumnType("nvarchar(max)"); - - b.Property("WorkGroupCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("Worker") - .HasColumnType("nvarchar(max)"); - - b.HasKey("Id"); - - b.HasIndex("Number") - .IsUnique(); - - b.ToTable("Job_UnplannedIssueJob", (string)null); - }); - - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.UnplannedIssueJobDetail", b => - { - b.Property("Id") - .HasColumnType("uniqueidentifier"); - - b.Property("CaseCode") - .HasColumnType("nvarchar(max)"); - - b.Property("CreationTime") - .HasColumnType("datetime2") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("uniqueidentifier") - .HasColumnName("CreatorId"); - - b.Property("Explain") - .HasColumnType("nvarchar(max)"); - - b.Property("ExtraProperties") - .HasColumnType("nvarchar(max)") - .HasColumnName("ExtraProperties"); - - b.Property("HandledArriveDate") - .HasColumnType("datetime2"); - - b.Property("HandledContainerCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("HandledContainerCode"); - - b.Property("HandledExpireDate") - .HasColumnType("datetime2"); - - b.Property("HandledFromLocationArea") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("HandledFromLocationArea"); - - b.Property("HandledFromLocationCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("HandledFromLocationCode"); - - b.Property("HandledFromLocationErpCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("HandledFromLocationErpCode"); - - b.Property("HandledFromLocationGroup") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("HandledFromLocationGroup"); - - b.Property("HandledFromWarehouseCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("HandledFromWarehouseCode"); - - b.Property("HandledLot") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("HandledLot"); - - b.Property("HandledPackingCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("HandledPackingCode"); - - b.Property("HandledProduceDate") - .HasColumnType("datetime2"); - - b.Property("HandledQty") - .HasColumnType("decimal(18,6)"); - - b.Property("HandledSupplierBatch") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("HandledSupplierBatch"); - - b.Property("ItemCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ItemCode"); - - b.Property("ItemDesc1") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ItemDesc1"); - - b.Property("ItemDesc2") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ItemDesc2"); - - b.Property("ItemName") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ItemName"); - - b.Property("LastModificationTime") - .HasColumnType("datetime2") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("uniqueidentifier") - .HasColumnName("LastModifierId"); - - b.Property("MasterID") - .HasColumnType("uniqueidentifier"); - - b.Property("Number") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("OnceBusiCode") - .HasColumnType("nvarchar(max)"); - - b.Property("ProjCapacityCode") - .HasColumnType("nvarchar(max)"); - - b.Property("ReasonCode") - .HasColumnType("nvarchar(max)"); - - b.Property("RecommendArriveDate") - .HasColumnType("datetime2"); - - b.Property("RecommendContainerCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendContainerCode"); - - b.Property("RecommendExpireDate") - .HasColumnType("datetime2"); - - b.Property("RecommendFromLocationArea") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendFromLocationArea"); - - b.Property("RecommendFromLocationCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendFromLocationCode"); - - b.Property("RecommendFromLocationErpCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendFromLocationErpCode"); - - b.Property("RecommendFromLocationGroup") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendFromLocationGroup"); - - b.Property("RecommendFromWarehouseCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendFromWarehouseCode"); - - b.Property("RecommendLot") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendLot"); - - b.Property("RecommendPackingCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendPackingCode"); - - b.Property("RecommendProduceDate") - .HasColumnType("datetime2"); - - b.Property("RecommendQty") - .HasColumnType("decimal(18,6)"); - - b.Property("RecommendSupplierBatch") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendSupplierBatch"); - - b.Property("Remark") - .HasMaxLength(3072) - .HasColumnType("nvarchar(3072)") - .HasColumnName("Remark"); - - b.Property("Status") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("StdPackQty") - .HasColumnType("decimal(18,6)"); - - b.Property("TenantId") - .HasColumnType("uniqueidentifier") - .HasColumnName("TenantId"); - - b.Property("Uom") - .HasColumnType("nvarchar(max)"); - - b.HasKey("Id"); - - b.HasIndex("MasterID"); - - b.ToTable("Job_UnplannedIssueJobDetail", (string)null); - }); - - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.UnplannedIssueNote", b => - { - b.Property("Id") - .HasColumnType("uniqueidentifier"); - - b.Property("ActiveDate") - .HasColumnType("datetime2"); - - b.Property("BuildDate") - .HasColumnType("datetime2"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("nvarchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime2") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("uniqueidentifier") - .HasColumnName("CreatorId"); - - b.Property("DeptCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("DeptName") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("ExtraProperties") - .HasColumnType("nvarchar(max)") - .HasColumnName("ExtraProperties"); - - b.Property("JobNumber") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("LastModificationTime") - .HasColumnType("datetime2") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("uniqueidentifier") - .HasColumnName("LastModifierId"); - - b.Property("Number") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("Number"); - - b.Property("OANumber") - .HasColumnType("nvarchar(max)"); - - b.Property("Remark") - .HasMaxLength(3072) - .HasColumnType("nvarchar(3072)") - .HasColumnName("Remark"); - - b.Property("TenantId") - .HasColumnType("uniqueidentifier") - .HasColumnName("TenantId"); - - b.Property("UnplannedIssueRequestNumber") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("UnplannedIssueType") - .HasColumnType("int"); - - b.Property("Worker") - .HasColumnType("nvarchar(max)"); - - b.HasKey("Id"); - - b.HasIndex("Number") - .IsUnique(); - - b.ToTable("Store_UnplannedIssueNote", (string)null); - }); - - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.UnplannedIssueNoteDetail", b => - { - b.Property("Id") - .HasColumnType("uniqueidentifier"); - - b.Property("ArriveDate") - .HasColumnType("datetime2"); - - b.Property("CaseCode") - .HasColumnType("nvarchar(max)"); - - b.Property("ContainerCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ContainerCode"); - - b.Property("CreationTime") - .HasColumnType("datetime2") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("uniqueidentifier") - .HasColumnName("CreatorId"); - - b.Property("ExpireDate") - .HasColumnType("datetime2"); - - b.Property("Explain") - .HasColumnType("nvarchar(max)"); - - b.Property("ExtraProperties") - .HasColumnType("nvarchar(max)") - .HasColumnName("ExtraProperties"); - - b.Property("HandledArriveDate") - .HasColumnType("datetime2"); - - b.Property("HandledContainerCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("HandledContainerCode"); - - b.Property("HandledExpireDate") - .HasColumnType("datetime2"); - - b.Property("HandledFromLocationArea") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("HandledFromLocationArea"); - - b.Property("HandledFromLocationCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("HandledFromLocationCode"); - - b.Property("HandledFromLocationErpCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("HandledFromLocationErpCode"); - - b.Property("HandledFromLocationGroup") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("HandledFromLocationGroup"); - - b.Property("HandledFromWarehouseCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("HandledFromWarehouseCode"); - - b.Property("HandledLot") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("HandledLot"); - - b.Property("HandledPackingCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("HandledPackingCode"); - - b.Property("HandledProduceDate") - .HasColumnType("datetime2"); - - b.Property("HandledQty") - .HasColumnType("decimal(18,6)"); - - b.Property("HandledSupplierBatch") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("HandledSupplierBatch"); - - b.Property("ItemCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ItemCode"); - - b.Property("ItemDesc1") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ItemDesc1"); - - b.Property("ItemDesc2") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ItemDesc2"); - - b.Property("ItemName") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ItemName"); - - b.Property("LastModificationTime") - .HasColumnType("datetime2") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("uniqueidentifier") - .HasColumnName("LastModifierId"); - - b.Property("LocationArea") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("LocationArea"); - - b.Property("LocationCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("LocationCode"); - - b.Property("LocationErpCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("LocationErpCode"); - - b.Property("LocationGroup") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("LocationGroup"); - - b.Property("Lot") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("Lot"); - - b.Property("MasterID") - .HasColumnType("uniqueidentifier"); - - b.Property("Number") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("Number"); - - b.Property("OnceBusiCode") - .HasColumnType("nvarchar(max)"); - - b.Property("PackingCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("PackingCode"); - - b.Property("ProduceDate") - .HasColumnType("datetime2"); - - b.Property("ProjCapacityCode") - .HasColumnType("nvarchar(max)"); - - b.Property("Qty") - .HasPrecision(18, 6) - .HasColumnType("decimal(18,6)") - .HasColumnName("Qty"); - - b.Property("ReasonCode") - .HasColumnType("nvarchar(max)"); - - b.Property("RecommendArriveDate") - .HasColumnType("datetime2"); - - b.Property("RecommendContainerCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendContainerCode"); - - b.Property("RecommendExpireDate") - .HasColumnType("datetime2"); - - b.Property("RecommendFromLocationArea") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendFromLocationArea"); - - b.Property("RecommendFromLocationCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendFromLocationCode"); - - b.Property("RecommendFromLocationErpCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendFromLocationErpCode"); - - b.Property("RecommendFromLocationGroup") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendFromLocationGroup"); - - b.Property("RecommendFromWarehouseCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendFromWarehouseCode"); - - b.Property("RecommendLot") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendLot"); - - b.Property("RecommendPackingCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendPackingCode"); - - b.Property("RecommendProduceDate") - .HasColumnType("datetime2"); - - b.Property("RecommendQty") - .HasColumnType("decimal(18,6)"); - - b.Property("RecommendSupplierBatch") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendSupplierBatch"); - - b.Property("Remark") - .HasMaxLength(3072) - .HasColumnType("nvarchar(3072)") - .HasColumnName("Remark"); - - b.Property("Status") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("StdPackQty") - .HasColumnType("decimal(18,6)"); - - b.Property("SupplierBatch") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("SupplierBatch"); - - b.Property("TenantId") - .HasColumnType("uniqueidentifier") - .HasColumnName("TenantId"); - - b.Property("Uom") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("Uom"); - - b.Property("WarehouseCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("WarehouseCode"); - - b.HasKey("Id"); - - b.HasIndex("MasterID"); - - b.HasIndex("Number", "PackingCode", "ItemCode", "Lot", "Status") - .IsUnique() - .HasFilter("[Lot] IS NOT NULL"); - - b.ToTable("Store_UnplannedIssueNoteDetail", (string)null); - }); - - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.UnplannedIssueRequest", b => - { - b.Property("Id") - .HasColumnType("uniqueidentifier"); - - b.Property("ActiveDate") - .HasColumnType("datetime2"); - - b.Property("AutoAgree") - .HasColumnType("bit"); - - b.Property("AutoCompleteJob") - .HasColumnType("bit"); - - b.Property("AutoHandle") - .HasColumnType("bit"); - - b.Property("AutoSubmit") - .HasColumnType("bit"); - - b.Property("BuildDate") - .HasColumnType("datetime2"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("nvarchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime2") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("uniqueidentifier") - .HasColumnName("CreatorId"); - - b.Property("DeptCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("DeptName") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("DirectCreateNote") - .HasColumnType("bit"); - - b.Property("ExtraProperties") - .HasColumnType("nvarchar(max)") - .HasColumnName("ExtraProperties"); - - b.Property("LastModificationTime") - .HasColumnType("datetime2") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("uniqueidentifier") - .HasColumnName("LastModifierId"); - - b.Property("Number") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("Number"); - - b.Property("OANumber") - .HasColumnType("nvarchar(max)"); - - b.Property("Remark") - .HasMaxLength(3072) - .HasColumnType("nvarchar(3072)") - .HasColumnName("Remark"); - - b.Property("RequestStatus") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("TenantId") - .HasColumnType("uniqueidentifier") - .HasColumnName("TenantId"); - - b.Property("UnplannedIssueType") - .HasColumnType("int"); - - b.Property("Worker") - .HasColumnType("nvarchar(max)"); - - b.HasKey("Id"); - - b.HasIndex("Number") - .IsUnique(); - - b.ToTable("Store_UnplannedIssueRequest", (string)null); - }); - - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.UnplannedIssueRequestDetail", b => - { - b.Property("Id") - .HasColumnType("uniqueidentifier"); - - b.Property("ArriveDate") - .HasColumnType("datetime2"); - - b.Property("CaseCode") - .HasColumnType("nvarchar(max)"); - - b.Property("ContainerCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ContainerCode"); - - b.Property("CreationTime") - .HasColumnType("datetime2") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("uniqueidentifier") - .HasColumnName("CreatorId"); - - b.Property("ExpireDate") - .HasColumnType("datetime2"); - - b.Property("Explain") - .HasColumnType("nvarchar(max)"); - - b.Property("ExtraProperties") - .HasColumnType("nvarchar(max)") - .HasColumnName("ExtraProperties"); - - b.Property("ItemCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ItemCode"); - - b.Property("ItemDesc1") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ItemDesc1"); - - b.Property("ItemDesc2") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ItemDesc2"); - - b.Property("ItemName") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ItemName"); - - b.Property("LastModificationTime") - .HasColumnType("datetime2") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("uniqueidentifier") - .HasColumnName("LastModifierId"); - - b.Property("LocationArea") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("LocationArea"); - - b.Property("LocationCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("LocationCode"); - - b.Property("LocationErpCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("LocationErpCode"); - - b.Property("LocationGroup") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("LocationGroup"); - - b.Property("Lot") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("Lot"); - - b.Property("MasterID") - .HasColumnType("uniqueidentifier"); - - b.Property("Number") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("Number"); - - b.Property("OnceBusiCode") - .HasColumnType("nvarchar(max)"); - - b.Property("PackingCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("PackingCode"); - - b.Property("ProduceDate") - .HasColumnType("datetime2"); - - b.Property("ProjCapacityCode") - .HasColumnType("nvarchar(max)"); - - b.Property("Qty") - .HasPrecision(18, 6) - .HasColumnType("decimal(18,6)") - .HasColumnName("Qty"); - - b.Property("Remark") - .HasMaxLength(3072) - .HasColumnType("nvarchar(3072)") - .HasColumnName("Remark"); - - b.Property("Status") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("StdPackQty") - .HasColumnType("decimal(18,6)"); - - b.Property("SupplierBatch") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("SupplierBatch"); - - b.Property("TenantId") - .HasColumnType("uniqueidentifier") - .HasColumnName("TenantId"); - - b.Property("Uom") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("Uom"); - - b.Property("WarehouseCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("WarehouseCode"); - - b.HasKey("Id"); - - b.HasIndex("MasterID"); - - b.HasIndex("Number", "PackingCode", "ItemCode", "Lot", "Status") - .IsUnique() - .HasFilter("[Lot] IS NOT NULL"); - - b.ToTable("Store_UnplannedIssueRequestDetail", (string)null); - }); - - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.UnplannedReceiptJob", b => - { - b.Property("Id") - .HasColumnType("uniqueidentifier"); - - b.Property("AcceptTime") - .HasColumnType("datetime2"); - - b.Property("AcceptUserId") - .HasColumnType("uniqueidentifier"); - - b.Property("AcceptUserName") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("BuildDate") - .HasColumnType("datetime2"); - - b.Property("CompleteTime") - .HasColumnType("datetime2"); - - b.Property("CompleteUserId") - .HasColumnType("uniqueidentifier"); - - b.Property("CompleteUserName") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("nvarchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime2") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("uniqueidentifier") - .HasColumnName("CreatorId"); - - b.Property("DeptCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("DeptName") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("ExtraProperties") - .HasColumnType("nvarchar(max)") - .HasColumnName("ExtraProperties"); - - b.Property("IsAutoComplete") - .ValueGeneratedOnAdd() - .HasColumnType("bit") - .HasDefaultValue(false); - - b.Property("JobDescription") - .HasMaxLength(1024) - .HasColumnType("nvarchar(1024)"); - - b.Property("JobStatus") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("JobType") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("LastModificationTime") - .HasColumnType("datetime2") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("uniqueidentifier") - .HasColumnName("LastModifierId"); - - b.Property("Number") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("OANumber") - .HasColumnType("nvarchar(max)"); - - b.Property("Priority") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasDefaultValue(0); - - b.Property("PriorityIncrement") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasDefaultValue(0); - - b.Property("Remark") - .HasMaxLength(3072) - .HasColumnType("nvarchar(3072)") - .HasColumnName("Remark"); - - b.Property("TenantId") - .HasColumnType("uniqueidentifier") - .HasColumnName("TenantId"); - - b.Property("UnplannedReceiptRequestNumber") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("UnplannedReceiptType") - .HasColumnType("int"); - - b.Property("UpStreamJobNumber") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("WarehouseCode") - .HasColumnType("nvarchar(max)"); - - b.Property("WorkGroupCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("Worker") - .HasColumnType("nvarchar(max)"); - - b.HasKey("Id"); - - b.HasIndex("Number") - .IsUnique(); - - b.ToTable("Job_UnplannedReceiptJob", (string)null); - }); - - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.UnplannedReceiptJobDetail", b => - { - b.Property("Id") - .HasColumnType("uniqueidentifier"); - - b.Property("CaseCode") - .HasColumnType("nvarchar(max)"); - - b.Property("CreationTime") - .HasColumnType("datetime2") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("uniqueidentifier") - .HasColumnName("CreatorId"); - - b.Property("Explain") - .HasColumnType("nvarchar(max)"); - - b.Property("ExtraProperties") - .HasColumnType("nvarchar(max)") - .HasColumnName("ExtraProperties"); - - b.Property("HandledArriveDate") - .HasColumnType("datetime2"); - - b.Property("HandledContainerCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("HandledContainerCode"); - - b.Property("HandledExpireDate") - .HasColumnType("datetime2"); - - b.Property("HandledLot") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("HandledLot"); - - b.Property("HandledPackingCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("HandledPackingCode"); - - b.Property("HandledProduceDate") - .HasColumnType("datetime2"); - - b.Property("HandledQty") - .HasColumnType("decimal(18,6)"); - - b.Property("HandledSupplierBatch") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("HandledSupplierBatch"); - - b.Property("HandledToLocationArea") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("HandledToLocationArea"); - - b.Property("HandledToLocationCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("HandledToLocationCode"); - - b.Property("HandledToLocationErpCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("HandledToLocationErpCode"); - - b.Property("HandledToLocationGroup") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("HandledToLocationGroup"); - - b.Property("HandledToWarehouseCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("HandledToWarehouseCode"); - - b.Property("ItemCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ItemCode"); - - b.Property("ItemDesc1") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ItemDesc1"); - - b.Property("ItemDesc2") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ItemDesc2"); - - b.Property("ItemName") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ItemName"); - - b.Property("LastModificationTime") - .HasColumnType("datetime2") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("uniqueidentifier") - .HasColumnName("LastModifierId"); - - b.Property("MasterID") - .HasColumnType("uniqueidentifier"); - - b.Property("Number") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("OnceBusiCode") - .HasColumnType("nvarchar(max)"); - - b.Property("ProjCapacityCode") - .HasColumnType("nvarchar(max)"); - - b.Property("ReasonCode") - .HasColumnType("nvarchar(max)"); - - b.Property("RecommendArriveDate") - .HasColumnType("datetime2"); - - b.Property("RecommendContainerCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendContainerCode"); - - b.Property("RecommendExpireDate") - .HasColumnType("datetime2"); - - b.Property("RecommendLot") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendLot"); - - b.Property("RecommendPackingCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendPackingCode"); - - b.Property("RecommendProduceDate") - .HasColumnType("datetime2"); - - b.Property("RecommendQty") - .HasColumnType("decimal(18,6)"); - - b.Property("RecommendSupplierBatch") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendSupplierBatch"); - - b.Property("RecommendToLocationArea") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendToLocationArea"); - - b.Property("RecommendToLocationCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendToLocationCode"); - - b.Property("RecommendToLocationErpCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendToLocationErpCode"); - - b.Property("RecommendToLocationGroup") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendToLocationGroup"); - - b.Property("RecommendToWarehouseCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendToWarehouseCode"); - - b.Property("Remark") - .HasMaxLength(3072) - .HasColumnType("nvarchar(3072)") - .HasColumnName("Remark"); - - b.Property("Status") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("StdPackQty") - .HasColumnType("decimal(18,6)"); - - b.Property("TenantId") - .HasColumnType("uniqueidentifier") - .HasColumnName("TenantId"); - - b.Property("Uom") - .HasColumnType("nvarchar(max)"); - - b.HasKey("Id"); - - b.HasIndex("MasterID"); - - b.ToTable("Job_UnplannedReceiptJobDetail", (string)null); - }); - - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.UnplannedReceiptNote", b => - { - b.Property("Id") - .HasColumnType("uniqueidentifier"); - - b.Property("ActiveDate") - .HasColumnType("datetime2"); - - b.Property("BuildDate") - .HasColumnType("datetime2"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("nvarchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime2") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("uniqueidentifier") - .HasColumnName("CreatorId"); - - b.Property("DeptCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("DeptName") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("ExtraProperties") - .HasColumnType("nvarchar(max)") - .HasColumnName("ExtraProperties"); - - b.Property("JobNumber") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("LastModificationTime") - .HasColumnType("datetime2") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("uniqueidentifier") - .HasColumnName("LastModifierId"); - - b.Property("Number") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("Number"); - - b.Property("OANumber") - .HasColumnType("nvarchar(max)"); - - b.Property("Remark") - .HasMaxLength(3072) - .HasColumnType("nvarchar(3072)") - .HasColumnName("Remark"); - - b.Property("TenantId") - .HasColumnType("uniqueidentifier") - .HasColumnName("TenantId"); - - b.Property("UnplannedReceiptRequestNumber") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("UnplannedReceiptType") - .HasColumnType("int"); - - b.Property("Worker") - .HasColumnType("nvarchar(max)"); - - b.HasKey("Id"); - - b.HasIndex("Number") - .IsUnique(); - - b.ToTable("Store_UnplannedReceiptNote", (string)null); - }); - - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.UnplannedReceiptNoteDetail", b => - { - b.Property("Id") - .HasColumnType("uniqueidentifier"); - - b.Property("ArriveDate") - .HasColumnType("datetime2"); - - b.Property("CaseCode") - .HasColumnType("nvarchar(max)"); - - b.Property("ContainerCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ContainerCode"); - - b.Property("CreationTime") - .HasColumnType("datetime2") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("uniqueidentifier") - .HasColumnName("CreatorId"); - - b.Property("ExpireDate") - .HasColumnType("datetime2"); - - b.Property("Explain") - .HasColumnType("nvarchar(max)"); - - b.Property("ExtraProperties") - .HasColumnType("nvarchar(max)") - .HasColumnName("ExtraProperties"); - - b.Property("HandledArriveDate") - .HasColumnType("datetime2"); - - b.Property("HandledContainerCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("HandledContainerCode"); - - b.Property("HandledExpireDate") - .HasColumnType("datetime2"); - - b.Property("HandledLot") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("HandledLot"); - - b.Property("HandledPackingCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("HandledPackingCode"); - - b.Property("HandledProduceDate") - .HasColumnType("datetime2"); - - b.Property("HandledQty") - .HasColumnType("decimal(18,6)"); - - b.Property("HandledSupplierBatch") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("HandledSupplierBatch"); - - b.Property("HandledToLocationArea") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("HandledToLocationArea"); - - b.Property("HandledToLocationCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("HandledToLocationCode"); - - b.Property("HandledToLocationErpCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("HandledToLocationErpCode"); - - b.Property("HandledToLocationGroup") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("HandledToLocationGroup"); - - b.Property("HandledToWarehouseCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("HandledToWarehouseCode"); - - b.Property("ItemCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ItemCode"); - - b.Property("ItemDesc1") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ItemDesc1"); - - b.Property("ItemDesc2") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ItemDesc2"); - - b.Property("ItemName") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ItemName"); - - b.Property("LastModificationTime") - .HasColumnType("datetime2") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("uniqueidentifier") - .HasColumnName("LastModifierId"); - - b.Property("LocationArea") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("LocationArea"); - - b.Property("LocationCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("LocationCode"); - - b.Property("LocationErpCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("LocationErpCode"); - - b.Property("LocationGroup") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("LocationGroup"); - - b.Property("Lot") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("Lot"); - - b.Property("MasterID") - .HasColumnType("uniqueidentifier"); - - b.Property("Number") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("Number"); - - b.Property("OnceBusiCode") - .HasColumnType("nvarchar(max)"); - - b.Property("PackingCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("PackingCode"); - - b.Property("ProduceDate") - .HasColumnType("datetime2"); - - b.Property("ProjCapacityCode") - .HasColumnType("nvarchar(max)"); - - b.Property("Qty") - .HasPrecision(18, 6) - .HasColumnType("decimal(18,6)") - .HasColumnName("Qty"); - - b.Property("ReasonCode") - .HasColumnType("nvarchar(max)"); - - b.Property("RecommendArriveDate") - .HasColumnType("datetime2"); - - b.Property("RecommendContainerCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendContainerCode"); - - b.Property("RecommendExpireDate") - .HasColumnType("datetime2"); - - b.Property("RecommendLot") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendLot"); - - b.Property("RecommendPackingCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendPackingCode"); - - b.Property("RecommendProduceDate") - .HasColumnType("datetime2"); - - b.Property("RecommendQty") - .HasColumnType("decimal(18,6)"); - - b.Property("RecommendSupplierBatch") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendSupplierBatch"); - - b.Property("RecommendToLocationArea") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendToLocationArea"); - - b.Property("RecommendToLocationCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendToLocationCode"); - - b.Property("RecommendToLocationErpCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendToLocationErpCode"); - - b.Property("RecommendToLocationGroup") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendToLocationGroup"); - - b.Property("RecommendToWarehouseCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("RecommendToWarehouseCode"); - - b.Property("Remark") - .HasMaxLength(3072) - .HasColumnType("nvarchar(3072)") - .HasColumnName("Remark"); - - b.Property("Status") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("StdPackQty") - .HasColumnType("decimal(18,6)"); - - b.Property("SupplierBatch") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("SupplierBatch"); - - b.Property("TenantId") - .HasColumnType("uniqueidentifier") - .HasColumnName("TenantId"); - - b.Property("Uom") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("Uom"); - - b.Property("WarehouseCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("WarehouseCode"); - - b.HasKey("Id"); - - b.HasIndex("MasterID"); - - b.HasIndex("Number", "PackingCode", "ItemCode", "Lot", "Status") - .IsUnique() - .HasFilter("[Lot] IS NOT NULL"); - - b.ToTable("Store_UnplannedReceiptNoteDetail", (string)null); - }); - - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.UnplannedReceiptRequest", b => - { - b.Property("Id") - .HasColumnType("uniqueidentifier"); - - b.Property("ActiveDate") - .HasColumnType("datetime2"); - - b.Property("AutoAgree") - .HasColumnType("bit"); - - b.Property("AutoCompleteJob") - .HasColumnType("bit"); - - b.Property("AutoHandle") - .HasColumnType("bit"); - - b.Property("AutoSubmit") - .HasColumnType("bit"); - - b.Property("BuildDate") - .HasColumnType("datetime2"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("nvarchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime2") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("uniqueidentifier") - .HasColumnName("CreatorId"); - - b.Property("DeptCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("DeptName") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("DirectCreateNote") - .HasColumnType("bit"); - - b.Property("ExtraProperties") - .HasColumnType("nvarchar(max)") - .HasColumnName("ExtraProperties"); - - b.Property("LastModificationTime") - .HasColumnType("datetime2") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("uniqueidentifier") - .HasColumnName("LastModifierId"); - - b.Property("Number") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("Number"); - - b.Property("OANumber") - .HasColumnType("nvarchar(max)"); - - b.Property("Remark") - .HasMaxLength(3072) - .HasColumnType("nvarchar(3072)") - .HasColumnName("Remark"); - - b.Property("RequestStatus") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("TenantId") - .HasColumnType("uniqueidentifier") - .HasColumnName("TenantId"); - - b.Property("UnplannedReceiptType") - .HasColumnType("int"); - - b.Property("Worker") - .HasColumnType("nvarchar(max)"); - - b.HasKey("Id"); - - b.HasIndex("Number") - .IsUnique(); - - b.ToTable("Store_UnplannedReceiptRequest", (string)null); - }); - - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.UnplannedReceiptRequestDetail", b => - { - b.Property("Id") - .HasColumnType("uniqueidentifier"); - - b.Property("ArriveDate") - .HasColumnType("datetime2"); - - b.Property("CaseCode") - .HasColumnType("nvarchar(max)"); - - b.Property("ContainerCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ContainerCode"); - - b.Property("CreationTime") - .HasColumnType("datetime2") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("uniqueidentifier") - .HasColumnName("CreatorId"); - - b.Property("ExpireDate") - .HasColumnType("datetime2"); - - b.Property("Explain") - .HasColumnType("nvarchar(max)"); - - b.Property("ExtraProperties") - .HasColumnType("nvarchar(max)") - .HasColumnName("ExtraProperties"); - - b.Property("ItemCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ItemCode"); - - b.Property("ItemDesc1") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ItemDesc1"); - - b.Property("ItemDesc2") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ItemDesc2"); - - b.Property("ItemName") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ItemName"); - - b.Property("LastModificationTime") - .HasColumnType("datetime2") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("uniqueidentifier") - .HasColumnName("LastModifierId"); - - b.Property("LocationArea") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("LocationArea"); - - b.Property("LocationCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("LocationCode"); - - b.Property("LocationErpCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("LocationErpCode"); - - b.Property("LocationGroup") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("LocationGroup"); - - b.Property("Lot") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("Lot"); - - b.Property("MasterID") - .HasColumnType("uniqueidentifier"); - - b.Property("Number") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("Number"); - - b.Property("OnceBusiCode") - .HasColumnType("nvarchar(max)"); - - b.Property("PackingCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("PackingCode"); - - b.Property("ProduceDate") - .HasColumnType("datetime2"); - - b.Property("ProjCapacityCode") - .HasColumnType("nvarchar(max)"); - - b.Property("Qty") - .HasPrecision(18, 6) - .HasColumnType("decimal(18,6)") - .HasColumnName("Qty"); - - b.Property("ReasonCode") - .HasColumnType("nvarchar(max)"); - - b.Property("Remark") - .HasMaxLength(3072) - .HasColumnType("nvarchar(3072)") - .HasColumnName("Remark"); - - b.Property("Status") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("StdPackQty") - .HasColumnType("decimal(18,6)"); - - b.Property("SupplierBatch") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("SupplierBatch"); - - b.Property("TenantId") - .HasColumnType("uniqueidentifier") - .HasColumnName("TenantId"); - - b.Property("Uom") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("Uom"); - - b.Property("WarehouseCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("WarehouseCode"); - - b.HasKey("Id"); - - b.HasIndex("MasterID"); - - b.HasIndex("Number", "PackingCode", "ItemCode", "Lot", "Status") - .IsUnique() - .HasFilter("[Lot] IS NOT NULL"); - - b.ToTable("Store_UnplannedReceiptRequestDetail", (string)null); - }); - - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.WarehouseTransferNote", b => - { - b.Property("Id") - .HasColumnType("uniqueidentifier"); - - b.Property("ActiveDate") - .HasColumnType("datetime2"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("nvarchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime2") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("uniqueidentifier") - .HasColumnName("CreatorId"); - - b.Property("ExtraProperties") - .HasColumnType("nvarchar(max)") - .HasColumnName("ExtraProperties"); - - b.Property("JobNumber") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("JobNumber"); - - b.Property("LastModificationTime") - .HasColumnType("datetime2") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("uniqueidentifier") - .HasColumnName("LastModifierId"); - - b.Property("Number") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("Number"); - - b.Property("Remark") - .HasMaxLength(3072) - .HasColumnType("nvarchar(3072)") - .HasColumnName("Remark"); - - b.Property("SupplierCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("TenantId") - .HasColumnType("uniqueidentifier") - .HasColumnName("TenantId"); - - b.Property("Worker") - .HasColumnType("nvarchar(max)"); - - b.HasKey("Id"); - - b.HasIndex("Number") - .IsUnique(); - - b.ToTable("Store_WarehouseTransferNote", (string)null); - }); - - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.WarehouseTransferNoteDetail", b => - { - b.Property("Id") - .HasColumnType("uniqueidentifier"); - - b.Property("ArriveDate") - .HasColumnType("datetime2"); - - b.Property("CreationTime") - .HasColumnType("datetime2") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("uniqueidentifier") - .HasColumnName("CreatorId"); - - b.Property("ExpireDate") - .HasColumnType("datetime2"); - - b.Property("FromContainerCode") - .HasColumnType("nvarchar(max)"); - - b.Property("FromLocationArea") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("FromLocationArea"); - - b.Property("FromLocationCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("FromLocationCode"); - - b.Property("FromLocationErpCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("FromLocationErpCode"); - - b.Property("FromLocationGroup") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("FromLocationGroup"); - - b.Property("FromLot") - .HasColumnType("nvarchar(max)"); - - b.Property("FromPackingCode") - .HasColumnType("nvarchar(450)"); - - b.Property("FromStatus") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("FromWarehouseCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("FromWarehouseCode"); - - b.Property("ItemCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ItemCode"); - - b.Property("ItemDesc1") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ItemDesc1"); - - b.Property("ItemDesc2") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ItemDesc2"); - - b.Property("ItemName") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ItemName"); - - b.Property("LastModificationTime") - .HasColumnType("datetime2") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("uniqueidentifier") - .HasColumnName("LastModifierId"); - - b.Property("MasterID") - .HasColumnType("uniqueidentifier"); - - b.Property("Number") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("Number"); - - b.Property("ProduceDate") - .HasColumnType("datetime2"); - - b.Property("Qty") - .HasPrecision(18, 6) - .HasColumnType("decimal(18,6)") - .HasColumnName("Qty"); - - b.Property("Reason") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("Remark") - .HasMaxLength(3072) - .HasColumnType("nvarchar(3072)") - .HasColumnName("Remark"); - - b.Property("StdPackQty") - .HasColumnType("decimal(18,6)"); - - b.Property("SupplierBatch") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("SupplierBatch"); - - b.Property("TenantId") - .HasColumnType("uniqueidentifier") - .HasColumnName("TenantId"); - - b.Property("ToContainerCode") - .HasColumnType("nvarchar(max)"); - - b.Property("ToLocationArea") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ToLocationArea"); - - b.Property("ToLocationCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ToLocationCode"); - - b.Property("ToLocationErpCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ToLocationErpCode"); - - b.Property("ToLocationGroup") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ToLocationGroup"); - - b.Property("ToLot") - .HasColumnType("nvarchar(max)"); - - b.Property("ToPackingCode") - .HasColumnType("nvarchar(max)"); - - b.Property("ToStatus") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("ToWarehouseCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ToWarehouseCode"); - - b.Property("Uom") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("Uom"); - - b.HasKey("Id"); - - b.HasIndex("MasterID"); - - b.HasIndex("Number", "FromPackingCode", "FromLocationCode", "ToLocationCode") - .IsUnique() - .HasFilter("[FromPackingCode] IS NOT NULL"); - - b.ToTable("Store_WarehouseTransferNoteDetail", (string)null); - }); - - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.WipWarehouseAdjustNote", b => - { - b.Property("Id") - .HasColumnType("uniqueidentifier"); - - b.Property("ActiveDate") - .HasColumnType("datetime2"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("nvarchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("ConfirmTime") - .HasColumnType("datetime2"); - - b.Property("Confirmed") - .HasColumnType("bit"); - - b.Property("CreationTime") - .HasColumnType("datetime2") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("uniqueidentifier") - .HasColumnName("CreatorId"); - - b.Property("ExtraProperties") - .HasColumnType("nvarchar(max)") - .HasColumnName("ExtraProperties"); - - b.Property("JobNumber") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("JobNumber"); - - b.Property("LastModificationTime") - .HasColumnType("datetime2") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("uniqueidentifier") - .HasColumnName("LastModifierId"); - - b.Property("Number") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("Number"); - - b.Property("Remark") - .HasMaxLength(3072) - .HasColumnType("nvarchar(3072)") - .HasColumnName("Remark"); - - b.Property("RequestNumber") - .HasColumnType("nvarchar(max)"); - - b.Property("TenantId") - .HasColumnType("uniqueidentifier") - .HasColumnName("TenantId"); - - b.Property("Type") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("Worker") - .HasColumnType("nvarchar(max)"); - - b.HasKey("Id"); - - b.HasIndex("Number") - .IsUnique(); - - b.ToTable("Store_WipWarehouseAdjustNote", (string)null); - }); - - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.WipWarehouseAdjustNoteDetail", b => - { - b.Property("Id") - .HasColumnType("uniqueidentifier"); - - b.Property("ArriveDate") - .HasColumnType("datetime2"); - - b.Property("CreationTime") - .HasColumnType("datetime2") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("uniqueidentifier") - .HasColumnName("CreatorId"); - - b.Property("ExpireDate") - .HasColumnType("datetime2"); - - b.Property("FromContainerCode") - .HasColumnType("nvarchar(max)"); - - b.Property("FromLocationArea") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("FromLocationArea"); - - b.Property("FromLocationCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("FromLocationCode"); - - b.Property("FromLocationErpCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("FromLocationErpCode"); - - b.Property("FromLocationGroup") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("FromLocationGroup"); - - b.Property("FromLot") - .HasColumnType("nvarchar(max)"); - - b.Property("FromPackingCode") - .HasColumnType("nvarchar(450)"); - - b.Property("FromStatus") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("FromWarehouseCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("FromWarehouseCode"); - - b.Property("ItemCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ItemCode"); - - b.Property("ItemDesc1") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ItemDesc1"); - - b.Property("ItemDesc2") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ItemDesc2"); - - b.Property("ItemName") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ItemName"); - - b.Property("LastModificationTime") - .HasColumnType("datetime2") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("uniqueidentifier") - .HasColumnName("LastModifierId"); - - b.Property("MasterID") - .HasColumnType("uniqueidentifier"); - - b.Property("Number") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("Number"); - - b.Property("ProduceDate") - .HasColumnType("datetime2"); - - b.Property("Qty") - .HasPrecision(18, 6) - .HasColumnType("decimal(18,6)") - .HasColumnName("Qty"); - - b.Property("Reason") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("ReasonCode") - .HasMaxLength(4096) - .HasColumnType("nvarchar(max)"); - - b.Property("Remark") - .HasMaxLength(3072) - .HasColumnType("nvarchar(3072)") - .HasColumnName("Remark"); - - b.Property("StdPackQty") - .HasColumnType("decimal(18,6)"); - - b.Property("SupplierBatch") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("SupplierBatch"); - - b.Property("TenantId") - .HasColumnType("uniqueidentifier") - .HasColumnName("TenantId"); - - b.Property("ToContainerCode") - .HasColumnType("nvarchar(max)"); - - b.Property("ToLocationArea") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ToLocationArea"); - - b.Property("ToLocationCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ToLocationCode"); - - b.Property("ToLocationErpCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ToLocationErpCode"); - - b.Property("ToLocationGroup") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ToLocationGroup"); - - b.Property("ToLot") - .HasColumnType("nvarchar(max)"); - - b.Property("ToPackingCode") - .HasColumnType("nvarchar(max)"); - - b.Property("ToStatus") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("ToWarehouseCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ToWarehouseCode"); - - b.Property("Uom") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("Uom"); - - b.HasKey("Id"); - - b.HasIndex("MasterID"); - - b.HasIndex("Number", "FromPackingCode", "FromLocationCode", "ToLocationCode", "FromStatus", "ToStatus") - .IsUnique() - .HasFilter("[FromPackingCode] IS NOT NULL"); - - b.ToTable("Store_WipWarehouseAdjustNoteDetail", (string)null); - }); - - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.WipWarehouseAdjustRequest", b => - { - b.Property("Id") - .HasColumnType("uniqueidentifier"); - - b.Property("ActiveDate") - .HasColumnType("datetime2"); - - b.Property("AutoAgree") - .HasColumnType("bit"); - - b.Property("AutoCompleteJob") - .HasColumnType("bit"); - - b.Property("AutoHandle") - .HasColumnType("bit"); - - b.Property("AutoSubmit") - .HasColumnType("bit"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("nvarchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime2") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("uniqueidentifier") - .HasColumnName("CreatorId"); - - b.Property("DirectCreateNote") - .HasColumnType("bit"); - - b.Property("ExtraProperties") - .HasColumnType("nvarchar(max)") - .HasColumnName("ExtraProperties"); - - b.Property("LastModificationTime") - .HasColumnType("datetime2") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("uniqueidentifier") - .HasColumnName("LastModifierId"); - - b.Property("Number") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("Number"); - - b.Property("Remark") - .HasMaxLength(3072) - .HasColumnType("nvarchar(3072)") - .HasColumnName("Remark"); - - b.Property("RequestStatus") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("TenantId") - .HasColumnType("uniqueidentifier") - .HasColumnName("TenantId"); - - b.Property("Type") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("Worker") - .HasColumnType("nvarchar(max)"); - - b.HasKey("Id"); - - b.HasIndex("Number") - .IsUnique(); - - b.ToTable("Store_WipWarehouseAdjustRequest", (string)null); - }); - - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.WipWarehouseAdjustRequestDetail", b => - { - b.Property("Id") - .HasColumnType("uniqueidentifier"); - - b.Property("ArriveDate") - .HasColumnType("datetime2"); - - b.Property("CreationTime") - .HasColumnType("datetime2") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("uniqueidentifier") - .HasColumnName("CreatorId"); - - b.Property("ExpireDate") - .HasColumnType("datetime2"); - - b.Property("FromContainerCode") - .HasColumnType("nvarchar(max)"); - - b.Property("FromLocationArea") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("FromLocationArea"); - - b.Property("FromLocationCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("FromLocationCode"); - - b.Property("FromLocationErpCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("FromLocationErpCode"); - - b.Property("FromLocationGroup") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("FromLocationGroup"); - - b.Property("FromLot") - .HasColumnType("nvarchar(max)"); - - b.Property("FromPackingCode") - .HasColumnType("nvarchar(max)"); - - b.Property("FromStatus") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("FromWarehouseCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("FromWarehouseCode"); - - b.Property("ItemCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ItemCode"); - - b.Property("ItemDesc1") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ItemDesc1"); - - b.Property("ItemDesc2") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ItemDesc2"); - - b.Property("ItemName") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ItemName"); - - b.Property("LastModificationTime") - .HasColumnType("datetime2") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("uniqueidentifier") - .HasColumnName("LastModifierId"); - - b.Property("MasterID") - .HasColumnType("uniqueidentifier"); - - b.Property("Number") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("Number"); - - b.Property("ProduceDate") - .HasColumnType("datetime2"); - - b.Property("Qty") - .HasPrecision(18, 6) - .HasColumnType("decimal(18,6)") - .HasColumnName("Qty"); - - b.Property("Reason") - .HasMaxLength(4096) - .HasColumnType("nvarchar(max)"); - - b.Property("ReasonCode") - .HasMaxLength(4096) - .HasColumnType("nvarchar(max)"); - - b.Property("Remark") - .HasMaxLength(3072) - .HasColumnType("nvarchar(3072)") - .HasColumnName("Remark"); - - b.Property("StdPackQty") - .HasColumnType("decimal(18,6)"); - - b.Property("SupplierBatch") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("SupplierBatch"); - - b.Property("TenantId") - .HasColumnType("uniqueidentifier") - .HasColumnName("TenantId"); - - b.Property("ToContainerCode") - .HasColumnType("nvarchar(max)"); - - b.Property("ToLocationArea") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ToLocationArea"); - - b.Property("ToLocationCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ToLocationCode"); - - b.Property("ToLocationErpCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ToLocationErpCode"); - - b.Property("ToLocationGroup") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ToLocationGroup"); - - b.Property("ToLot") - .HasColumnType("nvarchar(max)"); - - b.Property("ToPackingCode") - .HasColumnType("nvarchar(max)"); - - b.Property("ToStatus") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("ToWarehouseCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ToWarehouseCode"); - - b.Property("Uom") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("Uom"); - - b.HasKey("Id"); - - b.HasIndex("MasterID"); - - b.ToTable("Store_WipWarehouseAdjustRequestDetail", (string)null); - }); - - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.WorkOrder", b => - { - b.Property("Id") - .HasColumnType("uniqueidentifier"); - - b.Property("ActiveDate") - .HasColumnType("datetime2"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("nvarchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime2") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("uniqueidentifier") - .HasColumnName("CreatorId"); - - b.Property("EffectiveDate") - .HasColumnType("datetime2"); - - b.Property("ExtraProperties") - .HasColumnType("nvarchar(max)") - .HasColumnName("ExtraProperties"); - - b.Property("ItemCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ItemCode"); - - b.Property("ItemDesc1") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ItemDesc1"); - - b.Property("ItemDesc2") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ItemDesc2"); - - b.Property("ItemName") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ItemName"); - - b.Property("LastModificationTime") - .HasColumnType("datetime2") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("uniqueidentifier") - .HasColumnName("LastModifierId"); - - b.Property("LocationCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("Number") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("Number"); - - b.Property("Op") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("Qty") - .HasPrecision(18, 6) - .HasColumnType("decimal(18,6)") - .HasColumnName("Qty"); - - b.Property("Remark") - .HasMaxLength(3072) - .HasColumnType("nvarchar(3072)") - .HasColumnName("Remark"); - - b.Property("TenantId") - .HasColumnType("uniqueidentifier") - .HasColumnName("TenantId"); - - b.Property("Type") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("Uom") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("Uom"); - - b.Property("WoStatus") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("WorkOrderId") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("WorkStation") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("Worker") - .HasColumnType("nvarchar(max)"); - - b.HasKey("Id"); - - b.HasIndex("Number") - .IsUnique(); - - b.ToTable("Store_WorkOrder", (string)null); - }); - - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.WorkOrderDetail", b => - { - b.Property("Id") - .HasColumnType("uniqueidentifier"); - - b.Property("CreationTime") - .HasColumnType("datetime2") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("uniqueidentifier") - .HasColumnName("CreatorId"); - - b.Property("EffectiveDate") - .HasColumnType("datetime2"); - - b.Property("ItemCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ItemCode"); - - b.Property("ItemDesc1") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ItemDesc1"); - - b.Property("ItemDesc2") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ItemDesc2"); - - b.Property("ItemName") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("ItemName"); - - b.Property("LastModificationTime") - .HasColumnType("datetime2") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("uniqueidentifier") - .HasColumnName("LastModifierId"); - - b.Property("MasterID") - .HasColumnType("uniqueidentifier"); - - b.Property("Number") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)") - .HasColumnName("Number"); - - b.Property("Op") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("RawLocationCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("RawQty") - .HasColumnType("decimal(18,6)"); - - b.Property("RawUom") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("Remark") - .HasMaxLength(3072) - .HasColumnType("nvarchar(3072)") - .HasColumnName("Remark"); - - b.Property("TenantId") - .HasColumnType("uniqueidentifier") - .HasColumnName("TenantId"); - - b.HasKey("Id"); - - b.HasIndex("MasterID"); - - b.HasIndex("Number", "ItemCode") - .IsUnique(); - - b.ToTable("Store_WorkOrderDetail", (string)null); - }); - - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.BackFlushNoteDetail", b => - { - b.HasOne("Win_in.Sfs.Wms.Store.Domain.BackFlushNote", null) - .WithMany("Details") - .HasForeignKey("MasterID") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.CheckJobDetail", b => - { - b.HasOne("Win_in.Sfs.Wms.Store.Domain.CheckJob", null) - .WithMany("Details") - .HasForeignKey("MasterID") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ContainerBindNoteDetail", b => - { - b.HasOne("Win_in.Sfs.Wms.Store.Domain.ContainerBindNote", null) - .WithMany("Details") - .HasForeignKey("MasterID") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.CountAdjustNoteDetail", b => - { - b.HasOne("Win_in.Sfs.Wms.Store.Domain.CountAdjustNote", null) - .WithMany("Details") - .HasForeignKey("MasterID") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.CountAdjustRequestDetail", b => - { - b.HasOne("Win_in.Sfs.Wms.Store.Domain.CountAdjustRequest", null) - .WithMany("Details") - .HasForeignKey("MasterID") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.CountJobDetail", b => - { - b.HasOne("Win_in.Sfs.Wms.Store.Domain.CountJob", null) - .WithMany("Details") - .HasForeignKey("MasterID") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.CountNoteDetail", b => - { - b.HasOne("Win_in.Sfs.Wms.Store.Domain.CountNote", null) - .WithMany("Details") - .HasForeignKey("MasterID") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.CountPlanDetail", b => - { - b.HasOne("Win_in.Sfs.Wms.Store.Domain.CountPlan", null) - .WithMany("Details") - .HasForeignKey("MasterID") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.CustomerAsnDetail", b => - { - b.HasOne("Win_in.Sfs.Wms.Store.Domain.CustomerAsn", null) - .WithMany("Details") - .HasForeignKey("MasterID") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.CustomerReturnNoteDetail", b => - { - b.HasOne("Win_in.Sfs.Wms.Store.Domain.CustomerReturnNote", null) - .WithMany("Details") - .HasForeignKey("MasterID") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.DeliverJobDetail", b => - { - b.HasOne("Win_in.Sfs.Wms.Store.Domain.DeliverJob", null) - .WithMany("Details") - .HasForeignKey("MasterID") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.DeliverNoteDetail", b => - { - b.HasOne("Win_in.Sfs.Wms.Store.Domain.DeliverNote", null) - .WithMany("Details") - .HasForeignKey("MasterID") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.DeliverPlanDetail", b => - { - b.HasOne("Win_in.Sfs.Wms.Store.Domain.DeliverPlan", null) - .WithMany("Details") - .HasForeignKey("MasterID") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.DeliverRequestDetail", b => - { - b.HasOne("Win_in.Sfs.Wms.Store.Domain.DeliverRequest", null) - .WithMany("Details") - .HasForeignKey("MasterID") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.InspectAbnormalNoteDetail", b => - { - b.HasOne("Win_in.Sfs.Wms.Store.Domain.InspectAbnormalNote", null) - .WithMany("Details") - .HasForeignKey("MasterID") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.InspectJobDetail", b => - { - b.HasOne("Win_in.Sfs.Wms.Store.Domain.InspectJob", null) - .WithMany("Details") - .HasForeignKey("MasterID") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.InspectJobSummaryDetail", b => - { - b.HasOne("Win_in.Sfs.Wms.Store.Domain.InspectJob", null) - .WithMany("SummaryDetails") - .HasForeignKey("MasterID") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.InspectNoteDetail", b => - { - b.HasOne("Win_in.Sfs.Wms.Store.Domain.InspectNote", null) - .WithMany("Details") - .HasForeignKey("MasterID") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.InspectNoteSummaryDetail", b => - { - b.HasOne("Win_in.Sfs.Wms.Store.Domain.InspectNote", null) - .WithMany("SummaryDetails") - .HasForeignKey("MasterID") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.InspectRequestDetail", b => - { - b.HasOne("Win_in.Sfs.Wms.Store.Domain.InspectRequest", null) - .WithMany("Details") - .HasForeignKey("MasterID") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.InspectRequestSummaryDetail", b => - { - b.HasOne("Win_in.Sfs.Wms.Store.Domain.InspectRequest", null) - .WithMany("SummaryDetails") - .HasForeignKey("MasterID") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.InventoryInitialNoteDetail", b => - { - b.HasOne("Win_in.Sfs.Wms.Store.Domain.InventoryInitialNote", null) - .WithMany("Details") - .HasForeignKey("MasterID") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.InventoryTransferNoteDetail", b => - { - b.HasOne("Win_in.Sfs.Wms.Store.Domain.InventoryTransferNote", null) - .WithMany("Details") - .HasForeignKey("MasterID") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.IsolationNoteDetail", b => - { - b.HasOne("Win_in.Sfs.Wms.Store.Domain.IsolationNote", null) - .WithMany("Details") - .HasForeignKey("MasterID") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.IssueJobDetail", b => - { - b.HasOne("Win_in.Sfs.Wms.Store.Domain.IssueJob", null) - .WithMany("Details") - .HasForeignKey("MasterID") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.IssueNoteDetail", b => - { - b.HasOne("Win_in.Sfs.Wms.Store.Domain.IssueNote", null) - .WithMany("Details") - .HasForeignKey("MasterID") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ItemTransformNoteDetail", b => - { - b.HasOne("Win_in.Sfs.Wms.Store.Domain.ItemTransformNote", null) - .WithMany("Details") - .HasForeignKey("MasterID") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ItemTransformRequestDetail", b => - { - b.HasOne("Win_in.Sfs.Wms.Store.Domain.ItemTransformRequest", null) - .WithMany("Details") - .HasForeignKey("MasterID") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.JisDeliverJobDetail", b => - { - b.HasOne("Win_in.Sfs.Wms.Store.Domain.JisDeliverJob", null) - .WithMany("Details") - .HasForeignKey("MasterID") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.JisDeliverNoteDetail", b => - { - b.HasOne("Win_in.Sfs.Wms.Store.Domain.JisDeliverNote", null) - .WithMany("Details") - .HasForeignKey("MasterID") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.JisProductReceiptNoteDetail", b => - { - b.HasOne("Win_in.Sfs.Wms.Store.Domain.JisProductReceiptNote", null) - .WithMany("Details") - .HasForeignKey("MasterID") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.MaterialRequestDetail", b => - { - b.HasOne("Win_in.Sfs.Wms.Store.Domain.MaterialRequest", null) - .WithMany("Details") - .HasForeignKey("MasterID") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.NoOkConvertOkNoteDetail", b => - { - b.HasOne("Win_in.Sfs.Wms.Store.Domain.NoOkConvertOkNote", null) - .WithMany("Details") - .HasForeignKey("MasterID") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.OfflineSettlementNoteDetail", b => - { - b.HasOne("Win_in.Sfs.Wms.Store.Domain.OfflineSettlementNote", null) - .WithMany("Details") - .HasForeignKey("MasterID") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.PreparationPlanDetail", b => - { - b.HasOne("Win_in.Sfs.Wms.Store.Domain.PreparationPlan", null) - .WithMany("Details") - .HasForeignKey("MasterID") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ProductionPlanDetail", b => - { - b.HasOne("Win_in.Sfs.Wms.Store.Domain.ProductionPlan", null) - .WithMany("Details") - .HasForeignKey("MasterID") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ProductionReturnJobDetail", b => - { - b.HasOne("Win_in.Sfs.Wms.Store.Domain.ProductionReturnJob", null) - .WithMany("Details") - .HasForeignKey("MasterID") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ProductionReturnNoteDetail", b => - { - b.HasOne("Win_in.Sfs.Wms.Store.Domain.ProductionReturnNote", null) - .WithMany("Details") - .HasForeignKey("MasterID") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ProductionReturnRequestDetail", b => - { - b.HasOne("Win_in.Sfs.Wms.Store.Domain.ProductionReturnRequest", null) - .WithMany("Details") - .HasForeignKey("MasterID") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ProductL7PartsNoteDetail", b => - { - b.HasOne("Win_in.Sfs.Wms.Store.Domain.ProductL7PartsNote", null) - .WithMany("Details") - .HasForeignKey("MasterID") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ProductReceiptNoteDetail", b => - { - b.HasOne("Win_in.Sfs.Wms.Store.Domain.ProductReceiptNote", null) - .WithMany("Details") - .HasForeignKey("MasterID") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ProductReceiptRequestDetail", b => - { - b.HasOne("Win_in.Sfs.Wms.Store.Domain.ProductReceiptRequest", null) - .WithMany("Details") - .HasForeignKey("MasterID") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ProductReceiveJobDetail", b => - { - b.HasOne("Win_in.Sfs.Wms.Store.Domain.ProductReceiveJob", null) - .WithMany("Details") - .HasForeignKey("MasterID") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ProductRecycleMaterialDetail", b => - { - b.HasOne("Win_in.Sfs.Wms.Store.Domain.ProductRecycleNote", null) - .WithMany("MaterialDetails") - .HasForeignKey("MasterID") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ProductRecycleNoteDetail", b => - { - b.HasOne("Win_in.Sfs.Wms.Store.Domain.ProductRecycleNote", null) - .WithMany("Details") - .HasForeignKey("MasterID") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ProductRecycleRequestDetail", b => - { - b.HasOne("Win_in.Sfs.Wms.Store.Domain.ProductRecycleRequest", null) - .WithMany("Details") - .HasForeignKey("MasterID") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.PurchaseOrderDetail", b => - { - b.HasOne("Win_in.Sfs.Wms.Store.Domain.PurchaseOrder", null) - .WithMany("Details") - .HasForeignKey("MasterID") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.PurchaseReceiptJobDetail", b => - { - b.HasOne("Win_in.Sfs.Wms.Store.Domain.PurchaseReceiptJob", null) - .WithMany("Details") - .HasForeignKey("MasterID") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.PurchaseReceiptNoteDetail", b => - { - b.HasOne("Win_in.Sfs.Wms.Store.Domain.PurchaseReceiptNote", null) - .WithMany("Details") - .HasForeignKey("MasterID") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.PurchaseReceiptRequestDetail", b => - { - b.HasOne("Win_in.Sfs.Wms.Store.Domain.PurchaseReceiptRequest", null) - .WithMany("Details") - .HasForeignKey("MasterID") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.PurchaseReturnJobDetail", b => - { - b.HasOne("Win_in.Sfs.Wms.Store.Domain.PurchaseReturnJob", null) - .WithMany("Details") - .HasForeignKey("MasterID") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.PurchaseReturnNoteDetail", b => - { - b.HasOne("Win_in.Sfs.Wms.Store.Domain.PurchaseReturnNote", null) - .WithMany("Details") - .HasForeignKey("MasterID") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.PurchaseReturnRequestDetail", b => - { - b.HasOne("Win_in.Sfs.Wms.Store.Domain.PurchaseReturnRequest", null) - .WithMany("Details") - .HasForeignKey("MasterID") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.PutawayJobDetail", b => - { - b.HasOne("Win_in.Sfs.Wms.Store.Domain.PutawayJob", null) - .WithMany("Details") - .HasForeignKey("MasterID") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.PutawayNoteDetail", b => - { - b.HasOne("Win_in.Sfs.Wms.Store.Domain.PutawayNote", null) - .WithMany("Details") - .HasForeignKey("MasterID") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.PutawayRequestDetail", b => - { - b.HasOne("Win_in.Sfs.Wms.Store.Domain.PutawayRequest", null) - .WithMany("Details") - .HasForeignKey("MasterID") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ReceiptAbnormalNoteDetail", b => - { - b.HasOne("Win_in.Sfs.Wms.Store.Domain.ReceiptAbnormalNote", null) - .WithMany("Details") - .HasForeignKey("MasterID") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.RecycledMaterialReceiptNoteDetail", b => - { - b.HasOne("Win_in.Sfs.Wms.Store.Domain.RecycledMaterialReceiptNote", null) - .WithMany("Details") - .HasForeignKey("MasterID") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.SaleOrderDetail", b => - { - b.HasOne("Win_in.Sfs.Wms.Store.Domain.SaleOrder", null) - .WithMany("Details") - .HasForeignKey("MasterID") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ScrapNoteDetail", b => - { - b.HasOne("Win_in.Sfs.Wms.Store.Domain.ScrapNote", null) - .WithMany("Details") - .HasForeignKey("MasterID") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ScrapRequestDetail", b => - { - b.HasOne("Win_in.Sfs.Wms.Store.Domain.ScrapRequest", null) - .WithMany("Details") - .HasForeignKey("MasterID") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.SupplierAsnDetail", b => - { - b.HasOne("Win_in.Sfs.Wms.Store.Domain.SupplierAsn", null) - .WithMany("Details") - .HasForeignKey("MasterID") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.TransferNoteDetail", b => - { - b.HasOne("Win_in.Sfs.Wms.Store.Domain.TransferNote", null) - .WithMany("Details") - .HasForeignKey("MasterID") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.TransferRequestDetail", b => - { - b.HasOne("Win_in.Sfs.Wms.Store.Domain.TransferRequest", null) - .WithMany("Details") - .HasForeignKey("MasterID") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.UnplannedIssueJobDetail", b => - { - b.HasOne("Win_in.Sfs.Wms.Store.Domain.UnplannedIssueJob", null) - .WithMany("Details") - .HasForeignKey("MasterID") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.UnplannedIssueNoteDetail", b => - { - b.HasOne("Win_in.Sfs.Wms.Store.Domain.UnplannedIssueNote", null) - .WithMany("Details") - .HasForeignKey("MasterID") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.UnplannedIssueRequestDetail", b => - { - b.HasOne("Win_in.Sfs.Wms.Store.Domain.UnplannedIssueRequest", null) - .WithMany("Details") - .HasForeignKey("MasterID") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.UnplannedReceiptJobDetail", b => - { - b.HasOne("Win_in.Sfs.Wms.Store.Domain.UnplannedReceiptJob", null) - .WithMany("Details") - .HasForeignKey("MasterID") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.UnplannedReceiptNoteDetail", b => - { - b.HasOne("Win_in.Sfs.Wms.Store.Domain.UnplannedReceiptNote", null) - .WithMany("Details") - .HasForeignKey("MasterID") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.UnplannedReceiptRequestDetail", b => - { - b.HasOne("Win_in.Sfs.Wms.Store.Domain.UnplannedReceiptRequest", null) - .WithMany("Details") - .HasForeignKey("MasterID") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.WarehouseTransferNoteDetail", b => - { - b.HasOne("Win_in.Sfs.Wms.Store.Domain.WarehouseTransferNote", null) - .WithMany("Details") - .HasForeignKey("MasterID") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.WipWarehouseAdjustNoteDetail", b => - { - b.HasOne("Win_in.Sfs.Wms.Store.Domain.WipWarehouseAdjustNote", null) - .WithMany("Details") - .HasForeignKey("MasterID") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.WipWarehouseAdjustRequestDetail", b => - { - b.HasOne("Win_in.Sfs.Wms.Store.Domain.WipWarehouseAdjustRequest", null) - .WithMany("Details") - .HasForeignKey("MasterID") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.WorkOrderDetail", b => - { - b.HasOne("Win_in.Sfs.Wms.Store.Domain.WorkOrder", null) - .WithMany("Details") - .HasForeignKey("MasterID") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.BackFlushNote", b => - { - b.Navigation("Details"); - }); - - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.CheckJob", b => - { - b.Navigation("Details"); - }); - - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ContainerBindNote", b => - { - b.Navigation("Details"); - }); - - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.CountAdjustNote", b => - { - b.Navigation("Details"); - }); - - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.CountAdjustRequest", b => - { - b.Navigation("Details"); - }); - - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.CountJob", b => - { - b.Navigation("Details"); - }); - - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.CountNote", b => - { - b.Navigation("Details"); - }); - - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.CountPlan", b => - { - b.Navigation("Details"); - }); - - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.CustomerAsn", b => - { - b.Navigation("Details"); - }); - - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.CustomerReturnNote", b => - { - b.Navigation("Details"); - }); - - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.DeliverJob", b => - { - b.Navigation("Details"); - }); - - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.DeliverNote", b => - { - b.Navigation("Details"); - }); - - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.DeliverPlan", b => - { - b.Navigation("Details"); - }); - - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.DeliverRequest", b => - { - b.Navigation("Details"); - }); - - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.InspectAbnormalNote", b => - { - b.Navigation("Details"); - }); - - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.InspectJob", b => - { - b.Navigation("Details"); - - b.Navigation("SummaryDetails"); - }); - - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.InspectNote", b => - { - b.Navigation("Details"); - - b.Navigation("SummaryDetails"); - }); - - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.InspectRequest", b => - { - b.Navigation("Details"); - - b.Navigation("SummaryDetails"); - }); - - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.InventoryInitialNote", b => - { - b.Navigation("Details"); - }); - - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.InventoryTransferNote", b => - { - b.Navigation("Details"); - }); - - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.IsolationNote", b => - { - b.Navigation("Details"); - }); - - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.IssueJob", b => - { - b.Navigation("Details"); - }); - - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.IssueNote", b => - { - b.Navigation("Details"); - }); - - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ItemTransformNote", b => - { - b.Navigation("Details"); - }); - - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ItemTransformRequest", b => - { - b.Navigation("Details"); - }); - - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.JisDeliverJob", b => - { - b.Navigation("Details"); - }); - - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.JisDeliverNote", b => - { - b.Navigation("Details"); - }); - - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.JisProductReceiptNote", b => - { - b.Navigation("Details"); - }); - - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.MaterialRequest", b => - { - b.Navigation("Details"); - }); - - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.NoOkConvertOkNote", b => - { - b.Navigation("Details"); - }); - - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.OfflineSettlementNote", b => - { - b.Navigation("Details"); - }); - - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.PreparationPlan", b => - { - b.Navigation("Details"); - }); - - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ProductionPlan", b => - { - b.Navigation("Details"); - }); - - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ProductionReturnJob", b => - { - b.Navigation("Details"); - }); - - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ProductionReturnNote", b => - { - b.Navigation("Details"); - }); - - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ProductionReturnRequest", b => - { - b.Navigation("Details"); - }); - - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ProductL7PartsNote", b => - { - b.Navigation("Details"); - }); - - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ProductReceiptNote", b => - { - b.Navigation("Details"); - }); - - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ProductReceiptRequest", b => - { - b.Navigation("Details"); - }); - - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ProductReceiveJob", b => - { - b.Navigation("Details"); - }); - - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ProductRecycleNote", b => - { - b.Navigation("Details"); - - b.Navigation("MaterialDetails"); - }); - - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ProductRecycleRequest", b => - { - b.Navigation("Details"); - }); - - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.PurchaseOrder", b => - { - b.Navigation("Details"); - }); - - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.PurchaseReceiptJob", b => - { - b.Navigation("Details"); - }); - - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.PurchaseReceiptNote", b => - { - b.Navigation("Details"); - }); - - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.PurchaseReceiptRequest", b => - { - b.Navigation("Details"); - }); - - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.PurchaseReturnJob", b => - { - b.Navigation("Details"); - }); - - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.PurchaseReturnNote", b => - { - b.Navigation("Details"); - }); - - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.PurchaseReturnRequest", b => - { - b.Navigation("Details"); - }); - - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.PutawayJob", b => - { - b.Navigation("Details"); - }); - - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.PutawayNote", b => - { - b.Navigation("Details"); - }); - - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.PutawayRequest", b => - { - b.Navigation("Details"); - }); - - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ReceiptAbnormalNote", b => - { - b.Navigation("Details"); - }); - - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.RecycledMaterialReceiptNote", b => - { - b.Navigation("Details"); - }); - - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.SaleOrder", b => - { - b.Navigation("Details"); - }); - - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ScrapNote", b => - { - b.Navigation("Details"); - }); - - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.ScrapRequest", b => - { - b.Navigation("Details"); - }); - - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.SupplierAsn", b => - { - b.Navigation("Details"); - }); - - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.TransferNote", b => - { - b.Navigation("Details"); - }); - - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.TransferRequest", b => - { - b.Navigation("Details"); - }); - - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.UnplannedIssueJob", b => - { - b.Navigation("Details"); - }); - - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.UnplannedIssueNote", b => - { - b.Navigation("Details"); - }); - - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.UnplannedIssueRequest", b => - { - b.Navigation("Details"); - }); - - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.UnplannedReceiptJob", b => - { - b.Navigation("Details"); - }); - - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.UnplannedReceiptNote", b => - { - b.Navigation("Details"); - }); - - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.UnplannedReceiptRequest", b => - { - b.Navigation("Details"); - }); - - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.WarehouseTransferNote", b => - { - b.Navigation("Details"); - }); - - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.WipWarehouseAdjustNote", b => - { - b.Navigation("Details"); - }); - - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.WipWarehouseAdjustRequest", b => - { - b.Navigation("Details"); - }); - - modelBuilder.Entity("Win_in.Sfs.Wms.Store.Domain.WorkOrder", b => - { - b.Navigation("Details"); - }); -#pragma warning restore 612, 618 - } - } -} 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/StoreDbContextModelSnapshot.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/Migrations/StoreDbContextModelSnapshot.cs index 4976f8be9..2060cdebc 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,75 +4788,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"); @@ -4648,10 +4842,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) @@ -4674,11 +4864,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"); @@ -4687,25 +4872,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)"); @@ -4715,10 +4887,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) @@ -4736,19 +4904,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"); @@ -4758,11 +4925,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"); @@ -4771,45 +4933,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) @@ -4839,127 +4965,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"); @@ -4967,9 +5185,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)") @@ -4983,6 +5209,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"); @@ -5001,9 +5232,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() @@ -5043,7 +5272,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"); @@ -5052,23 +5304,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"); @@ -5082,10 +5342,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)"); @@ -5111,13 +5534,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"); @@ -5129,18 +5549,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) @@ -5155,13 +5563,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"); @@ -5170,6 +5584,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) @@ -5185,7 +5604,6 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("nvarchar(64)"); b.Property("ReceiptNumber") - .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)"); @@ -5194,11 +5612,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)"); @@ -5212,9 +5625,6 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("TenantId"); - b.Property("WarehouseCode") - .HasColumnType("nvarchar(max)"); - b.Property("Worker") .HasColumnType("nvarchar(max)"); @@ -5223,10 +5633,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"); @@ -5234,17 +5644,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"); @@ -5261,6 +5676,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)") @@ -5271,6 +5703,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) @@ -5330,18 +5766,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)") @@ -5389,12 +5834,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"); @@ -5402,10 +5853,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"); @@ -5417,7 +5868,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") @@ -5431,24 +5884,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) @@ -5546,22 +6008,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) @@ -5576,6 +6052,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"); @@ -5594,12 +6073,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)"); @@ -5607,6 +6109,9 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("TenantId"); + b.Property("WarehouseCode") + .HasColumnType("nvarchar(max)"); + b.Property("Worker") .HasColumnType("nvarchar(max)"); @@ -5615,18 +6120,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)") @@ -5640,9 +6150,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) @@ -5714,19 +6239,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) @@ -5745,10 +6283,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() @@ -5760,26 +6296,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") @@ -5789,14 +6324,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") @@ -5806,49 +6375,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"); @@ -5857,50 +6473,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() @@ -5931,6 +6569,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"); @@ -5940,6 +6605,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"); @@ -5948,15 +6619,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)"); @@ -5969,66 +6641,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"); @@ -6078,10 +6714,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)"); @@ -6090,10 +6735,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"); @@ -6200,6 +6845,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)") @@ -6267,42 +6916,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) @@ -6321,24 +6951,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") @@ -6348,76 +6964,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"); @@ -6426,73 +7006,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() @@ -6529,168 +7086,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"); @@ -6703,10 +7218,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") @@ -6716,21 +7245,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)"); @@ -6739,9 +7281,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)"); @@ -6754,17 +7307,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"); @@ -6773,53 +7323,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"); @@ -6878,9 +7391,6 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("nvarchar(64)") .HasColumnName("HandledSupplierBatch"); - b.Property("IssueTime") - .HasColumnType("datetime2"); - b.Property("ItemCode") .IsRequired() .HasMaxLength(64) @@ -6916,24 +7426,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"); @@ -6992,70 +7509,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) @@ -7063,18 +7572,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"); @@ -7088,6 +7591,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"); @@ -7101,7 +7610,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") @@ -7126,28 +7637,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") @@ -7157,15 +7679,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)") @@ -7194,27 +7716,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) @@ -7253,43 +7825,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)") @@ -7316,23 +7952,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) @@ -7340,21 +7966,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"); @@ -7362,18 +7996,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,13 +8010,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"); @@ -7414,8 +8036,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)"); @@ -7431,14 +8052,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"); @@ -7641,33 +8265,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() @@ -7675,9 +8294,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 +8302,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,46 +8320,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)"); @@ -7784,23 +8345,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"); @@ -7809,28 +8361,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") @@ -7844,6 +8452,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") @@ -7851,54 +8465,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"); @@ -7915,29 +8601,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") @@ -7950,8 +8649,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)"); @@ -7965,9 +8679,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,16 +8698,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") @@ -7995,77 +8723,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") @@ -8079,123 +8758,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"); @@ -8203,7 +8808,7 @@ namespace Win_in.Sfs.Wms.Store.Migrations b.Property("ActiveDate") .HasColumnType("datetime2"); - b.Property("CompleteTime") + b.Property("ArrivalTime") .HasColumnType("datetime2"); b.Property("ConcurrencyStamp") @@ -8223,6 +8828,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"); @@ -8243,54 +8861,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)"); @@ -8299,10 +8890,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"); @@ -8310,15 +8901,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,64 +8909,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"); @@ -8395,19 +8998,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"); @@ -8423,11 +9021,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)") @@ -8436,10 +9029,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)"); @@ -8453,17 +9044,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)"); @@ -8472,13 +9102,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"); @@ -8486,17 +9117,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() @@ -8504,6 +9126,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"); @@ -8512,13 +9137,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"); @@ -8527,17 +9157,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)"); @@ -8546,42 +9186,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"); @@ -8590,16 +9241,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) @@ -8629,6 +9273,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"); @@ -8638,24 +9309,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) @@ -8664,58 +9358,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"); @@ -8723,6 +9400,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) @@ -8737,6 +9426,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"); @@ -8755,34 +9447,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"); @@ -8791,36 +9504,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)"); @@ -11730,22 +12652,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") @@ -11755,19 +12691,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) @@ -11809,11 +13568,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"); @@ -11823,44 +13577,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)") @@ -11871,14 +13612,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"); @@ -11899,12 +13632,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"); @@ -11918,6 +13652,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"); @@ -11926,10 +13672,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"); @@ -11944,52 +13698,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") @@ -11999,12 +13767,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() @@ -12035,32 +13807,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"); @@ -12071,41 +13828,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") @@ -12117,41 +13889,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() @@ -12167,12 +13943,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") @@ -12185,20 +13977,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)"); @@ -12206,29 +14025,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") @@ -12238,9 +14072,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() @@ -12271,61 +14164,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) @@ -12337,33 +14255,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"); @@ -12371,24 +14286,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"); @@ -12397,17 +14304,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") @@ -12423,46 +14327,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)"); @@ -12471,18 +14383,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") @@ -12492,16 +14409,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() @@ -12532,16 +14504,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") @@ -12553,51 +14543,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)"); @@ -12614,45 +14663,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() @@ -12668,28 +14714,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") @@ -12702,7 +14737,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"); @@ -12711,25 +14747,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)"); @@ -12751,22 +14778,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)"); @@ -12778,10 +14794,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"); @@ -12789,6 +14807,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"); @@ -12797,69 +14823,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) @@ -12889,8 +14855,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"); @@ -12898,91 +14866,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)"); @@ -12994,27 +14920,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) @@ -13033,10 +14982,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") @@ -13049,57 +15012,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)"); @@ -13108,24 +15079,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"); @@ -13134,12 +15095,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"); @@ -13151,54 +15106,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() @@ -13229,73 +15181,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"); @@ -13308,51 +15211,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) @@ -13367,41 +15270,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"); @@ -13413,18 +15296,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) @@ -13439,18 +15310,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"); @@ -13465,19 +15333,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)"); @@ -13486,15 +15361,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)"); @@ -13502,15 +15374,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)"); @@ -13519,12 +15382,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"); @@ -13537,9 +15398,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"); @@ -13551,6 +15409,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) @@ -13560,72 +15475,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)"); @@ -13634,12 +15634,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"); @@ -13650,6 +15644,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"); @@ -13657,37 +15657,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() @@ -13703,29 +15698,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"); @@ -13737,33 +15716,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"); @@ -13785,17 +15753,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)"); @@ -13804,14 +15761,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"); @@ -13820,63 +15785,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) @@ -13896,91 +15807,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) @@ -13995,32 +15890,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) @@ -14039,10 +15968,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") @@ -14055,39 +16002,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)"); @@ -14099,6 +16052,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)"); @@ -14107,22 +16076,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"); @@ -14131,8 +16092,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"); @@ -14145,51 +16123,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() @@ -14220,70 +16198,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"); @@ -14295,51 +16230,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) @@ -14354,11 +16289,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"); @@ -14369,23 +16299,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"); @@ -14397,18 +16318,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) @@ -14423,13 +16332,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"); @@ -14444,28 +16359,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)"); @@ -14478,40 +16388,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() @@ -14534,6 +16543,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"); @@ -14542,76 +16556,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)"); @@ -14624,56 +16657,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() @@ -14689,32 +16753,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") @@ -14727,29 +16774,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() @@ -14757,21 +16792,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") @@ -14782,17 +16822,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)"); @@ -14801,14 +16830,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"); @@ -14817,82 +16849,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() @@ -14929,94 +16932,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() @@ -15028,10 +17022,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"); @@ -15040,6 +17034,7 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("datetime2"); b.Property("AsnNumber") + .IsRequired() .HasMaxLength(64) .HasColumnType("nvarchar(64)"); @@ -15061,15 +17056,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"); @@ -15084,28 +17070,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)"); @@ -15113,30 +17089,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"); @@ -15148,130 +17131,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") @@ -15281,148 +17296,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() @@ -15430,18 +17456,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"); @@ -15449,27 +17480,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"); @@ -15478,16 +17506,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"); @@ -15502,48 +17531,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)"); @@ -15552,76 +17566,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) @@ -15651,6 +17627,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"); @@ -15660,19 +17641,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)") @@ -15683,60 +17651,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) @@ -15747,10 +17673,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"); @@ -15758,11 +17687,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) @@ -15781,6 +17705,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"); @@ -15795,18 +17724,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)"); @@ -15814,37 +17737,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"); @@ -15856,6 +17771,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) @@ -15885,85 +17843,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() @@ -15971,23 +17929,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"); @@ -15995,6 +17948,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) @@ -16009,6 +17974,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"); @@ -16032,10 +18000,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)"); @@ -16044,22 +18021,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"); @@ -16068,9 +18037,6 @@ namespace Win_in.Sfs.Wms.Store.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("CreatorId"); - b.Property("ExpireDate") - .HasColumnType("datetime2"); - b.Property("ItemCode") .IsRequired() .HasMaxLength(64) @@ -16122,11 +18088,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"); @@ -16136,41 +18097,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"); @@ -16191,13 +18134,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"); @@ -16223,6 +18166,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"); @@ -16231,7 +18179,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)"); @@ -16256,33 +18208,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)"); @@ -16291,23 +18264,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") @@ -16317,12 +18296,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) @@ -16352,10 +18331,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"); @@ -16366,24 +18345,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"); @@ -16398,26 +18411,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"); @@ -16430,10 +18463,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") @@ -16446,23 +18496,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)"); @@ -16474,10 +18546,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"); @@ -16522,16 +18594,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() @@ -16560,6 +18629,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"); @@ -16572,10 +18644,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"); @@ -16585,9 +18657,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) @@ -16637,10 +18708,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() @@ -16658,14 +18727,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"); @@ -16673,24 +18738,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"); @@ -16699,13 +18758,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"); @@ -16725,19 +18786,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)"); @@ -16746,139 +18809,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") @@ -16888,54 +18828,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") @@ -16946,72 +18905,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"); @@ -17019,29 +19013,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"); @@ -17050,16 +19039,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)") @@ -17079,56 +19060,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)"); @@ -17138,12 +19089,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"); @@ -17151,27 +19100,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() @@ -17194,6 +19174,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"); @@ -17202,11 +19185,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"); @@ -17216,37 +19194,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") @@ -17262,16 +19218,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) @@ -17282,10 +19274,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 => @@ -20785,6 +22774,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) @@ -20812,6 +22882,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) @@ -21172,6 +23269,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 +23449,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) @@ -21466,6 +23599,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"); @@ -21657,6 +23805,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 +23902,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/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/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 667258241..78760e319 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,6 +16,9 @@ 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; } @@ -58,6 +61,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; } @@ -108,6 +114,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 403997da7..999c52712 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 @@ -51,6 +51,7 @@ public static class StoreDbContextModelCreatingExtensions builder.ConfigureItemTransformRequest(options); builder.ConfigureTransferRequest(options); + builder.ConfigureTransferLibRequest(options); builder.ConfigureProductReceiptRequest(options); builder.ConfigurePurchaseReceiptRequest(options); builder.ConfigureMaterialRequest(options); @@ -78,6 +79,7 @@ public static class StoreDbContextModelCreatingExtensions builder.ConfigureItemTransformNote(options); builder.ConfigureRecycledMaterialReceiptNote(options); builder.ConfigureTransferNote(options); + builder.ConfigureTransferLibNote(options); builder.ConfigureJisProductReceiptNote(options); builder.ConfigureJisDeliverNote(options); builder.ConfigureProductReceiptNote(options); @@ -130,7 +132,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 b27cd4fc9..4dfd83642 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 @@ -54,6 +54,7 @@ public class StoreEntityFrameworkCoreModule : AbpModule context.Services.AddTransient(); context.Services.AddTransient(); + context.Services.AddTransient(); context.Services.AddTransient(); context.Services.AddTransient(); context.Services.AddTransient(); @@ -84,6 +85,7 @@ public class StoreEntityFrameworkCoreModule : AbpModule context.Services .AddTransient(); context.Services.AddTransient(); + context.Services.AddTransient(); context.Services.AddTransient(); context.Services.AddTransient(); context.Services.AddTransient(); @@ -138,6 +140,7 @@ public class StoreEntityFrameworkCoreModule : AbpModule context.Services.AddTransient(); context.Services.AddTransient(); context.Services.AddTransient(); + context.Services.AddTransient(); #endregion context.Services.AddTransient(); @@ -180,6 +183,8 @@ 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 +227,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 => @@ -331,6 +339,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.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/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/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/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/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 bbbd1fbd7..8ee76afb4 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 @@ -44,7 +44,7 @@ public partial class StoreEventAutoMapperProfile : Profile PutawayJobAutoMapperProfile(); UnplannedIssueJobAutoMapperProfile(); UnplannedReceiptJobAutoMapperProfile(); - + TransferLibJobAutoMapperProfile(); #endregion #region Notes @@ -90,12 +90,14 @@ public partial class StoreEventAutoMapperProfile : Profile ProductRecycleRequestAutoMapperProfile(); PutawayRequestAutoMapperProfile(); TransferRequestAutoMapperProfile(); + TransferLibRequestAutoMapperProfile(); TransferNoteAutoMapperProfile(); NoOkConvertOkNoteAutoMapperProfile(); ScrapRequestMapperProfile(); ProductReceiptRequestMapperProfile(); CountAdjustRequestAutoMapperProfile(); InventoryInitialNoteAutoMapperProfile(); + TransferLibNoteAutoMapperProfile(); }